Something like asynchronous XML-RPC possible?

Skip Montanaro skip at pobox.com
Fri Jan 24 15:53:23 CET 2003


>>>>> "Will" == Will Stuyvesant <hwlgw at hotmail.com> writes:

    Will> Under the hood the processes communicate by means of TCP.  But now
    Will> my boss wants them to communicate by means of UDP!  Any ideas how
    Will> to accomplish this?  It would mean that operation or method calls
    Will> are no longer possible, only communication via events will be
    Will> there.  The desired usage pattern would be::

    Will>   p2 = remote_async_process(url, portnumber)
    Will>   p2.sendEvent(event)

    Will> where the event could be just a string for now.  

Why is UDP important?  Just implement sendEvent() in the server as a method
like so:

    def sendEvent(self, event):
        self.queue.put(event)
        return "okay"

Later on, whatever thread processes that event may make a sendEvent call
back to the requester with results of the processing.

Skip





More information about the Python-list mailing list