Something like asynchronous XML-RPC possible?

Irmen de Jong irmen at NOSPAM-REMOVETHIS-xs4all.nl
Fri Jan 24 06:54:56 EST 2003


Will Stuyvesant wrote:
> Under the hood the processes communicate by means of TCP.  But now my
> boss wants them to communicate by means of UDP!  Any ideas how to
> accomplish this?  It would mean that operation or method calls are no
> longer possible, only communication via events will be there.  The
> desired usage pattern would be::
> 
>   p2 = remote_async_process(url, portnumber)
>   p2.sendEvent(event)
> 
> where the event could be just a string for now.  Later it could be
> useful to have objects as events, but I could also just turn a string
> into any object I need.  What is important is that the caller is *not
> blocking* while waiting for a return value from ``p2``.

Are you tied to XML-RPC? Is UDP a requirement?
If not: Pyro supports your desired usage pattern already.
Either use Pyro's asynchronous Event Server, or use Pyro's
"oneway" method calls.
They currently use TCP for reliable delivery, but once the
request has been sent, your program carries on, not waiting for
any answers from the other object.

See http://pyro.sourceforge.net


Irmen de Jong





More information about the Python-list mailing list