How to implement system.multicall in zope (xml-rpc)
Hello, How can I implement the multicall (many xmlrpc calls at once) functionallity in Zope. Has anybody done it? Cheers, Geir Arne Evjen
Sorry, that I was so unclear in my post. Instead of only sending one xml-rpc call from the client to the zope server you can group several calls into an array and send it over (multicalls). The result is returned in the same manner. -- Geir Arne -----Opprinnelig melding----- Fra: Dieter Maurer [mailto:dieter@handshake.de] Sendt: 11. mars 2004 22:57 Til: Geir Arne Evjen Kopi: zope@zope.org Emne: Re: [Zope] How to implement system.multicall in zope (xml-rpc) Geir Arne Evjen wrote at 2004-3-11 10:42 +0100:
How can I implement the multicall (many xmlrpc calls at once) functionallity in Zope. Has anybody done it?
What is that? -- Dieter
Geir Arne Evjen wrote:
Instead of only sending one xml-rpc call from the client to the zope server you can group several calls into an array and send it over (multicalls). The result is returned in the same manner.
Try it and let us know what happens... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
I was ofcourse hoping that somebody already has done this before, but since I really need this functionallity it need to put it in somehow. Do you know if it possible to register the addresses of an external method so that it can called with a string later. (This is basically what I need for the multicall thing) Geir Arne -----Opprinnelig melding----- Fra: Chris Withers [mailto:lists@simplistix.co.uk] Sendt: 12. mars 2004 09:09 Til: Geir Arne Evjen Kopi: Dieter Maurer; zope@zope.org Emne: Re: SV: [Zope] How to implement system.multicall in zope (xml-rpc) Geir Arne Evjen wrote:
Instead of only sending one xml-rpc call from the client to the zope server you can group several calls into an array and send it over (multicalls). The result is returned in the same manner.
Try it and let us know what happens... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Geir Arne Evjen wrote at 2004-3-12 00:00 +0100:
Instead of only sending one xml-rpc call from the client to the zope server you can group several calls into an array and send it over (multicalls). The result is returned in the same manner.
Why would you want to do that? XML-RPC is an RPC (remote procedure call). RPC is a synchronous protocol: the caller is waiting for the result. There will be no second call before the first one returns. When you simple want to reuse the connection, I would look how Python's "httplib" handles several requests on the same connection. You may need to give your XML-RPC then a new underlaying transport to use this approach. -- Dieter
Thanks for the answer. What I really mean it that if you want to do id.e 10 independent calls (not XML-RPC calls but call external functions on the Zope server) in a sequence (with independent calls I mean that each call result in not put into the argumement list of the subsequent calls) this could be a really nice thing. Ofcource, one solution is to rewrite the server interface such that the client get the results of his wanted '10 independent' calls in an array, but I prefer the system.multicall solution since you don't have to extend the interface on the server side and you only have one xml-rpc call for doing many serverside calls. Here is a link which describes this in more detail: http://www.xmlrpc.com/discuss/msgReader$1208 -- Geir Arne -----Opprinnelig melding----- Fra: Dieter Maurer [mailto:dieter@handshake.de] Sendt: 12. mars 2004 20:34 Til: Geir Arne Evjen Kopi: zope@zope.org Emne: Re: SV: [Zope] How to implement system.multicall in zope (xml-rpc) Geir Arne Evjen wrote at 2004-3-12 00:00 +0100:
Instead of only sending one xml-rpc call from the client to the zope server you can group several calls into an array and send it over (multicalls). The result is returned in the same manner.
Why would you want to do that? XML-RPC is an RPC (remote procedure call). RPC is a synchronous protocol: the caller is waiting for the result. There will be no second call before the first one returns. When you simple want to reuse the connection, I would look how Python's "httplib" handles several requests on the same connection. You may need to give your XML-RPC then a new underlaying transport to use this approach. -- Dieter
participants (3)
-
Chris Withers -
Dieter Maurer -
Geir Arne Evjen