Something like asynchronous XML-RPC possible?

Irmen de Jong irmen at
Fri Jan 24 15:30:09 CET 2003

Will Stuyvesant wrote:

> I am not really tied to XML-RPC, but synchronous XML-RPC gives me the
> transparancy to write:
>   r = remote_process(url, port, ...)
>   result = r.operation(params)
> so I can use r just like any other class instance object.

That is also what Pyro provides. Just call the object as it were
a local class instance, and your calls (and attribute lookups!) are
transparantly remoted to the real object on the other machine.

At least check out what Pyro provides, and see if you can benefit.

> What I want to do now is::
>   r = remote_event_handler(url, port, ...)
>   r.sendEvent(event)  # this statement has realtime constraints
>                       # note there is no waiting for return values

If you use Pyro's event service, you can do exactly that.
Also, it supports a publish-subscribe mechanism so you have full
decoupled publishers and subscribers (on topics, or topic patterns).

You could also just flag the required method "OneWay" and then
Pyro will not wait for an answer to come back from the method call.

This is all asynchronous, implemented on TCP.

Like Martin pointed out, you can build asynchronous communication
using TCP. UDP is not strictly necessary. Also it's perfectly possible
to use UDP as a basis for /synchronous/ communication. It all depends
on how you design your protocol.

> I *know* I am not tied to UDP but to convince my boss I would have to
> use UDP since he knows that is asynchronous.  Otherwise I would have
See above.

> to convince him that what I am doing is also okay.  Using UDP would
> save me from lengthly explanations and discussions.  I can foresee not
> being able to convince them that the "components" I build have an
> asynchronous semantics unless they communicate via UDP.  You know
> bosses...
> "Sounds interesting, but why don't you just use UDP like we asked you
> to".

"because UDP is not strictly necessary for asynchronous communication,
and TCP guarantees us the *delivery* of the message. The processing
is done asynchronously".

Irmen de Jong

More information about the Python-list mailing list