[Twisted-Python] Multicast XMLRPC

Chaz. eprparadocs at gmail.com
Fri Aug 25 15:36:28 EDT 2006


radix at twistedmatrix.com wrote:
> On 06:43 pm, eprparadocs at gmail.com wrote:
>  >If I use TCP and stick to the serial, synchronized semantics of RPC, 
> doing
>  >one call at a time, I have only a few ways to solve the problem. Do 
> one call
>  >at a time, repeat N times, and that could take quite a while. I could 
> do M
>  >spawnProcesses and have each do N/M RPC calls. Or I could use M 
> threads and
>  >do it that way. Granted I have M sockets open at a time, it is 
> possible for
>  >this to take quite a while to execute. Performance would be terrible (and
>  >yes I want an approach that has good to very good performance. After 
> all who
>  >would want poor to terrible performance?)
> 
> Let's just focus on this one thing, ignoring other resource issues for 
> now, because I think it needs to be clarified. Maybe this isn't the 
> case, but it looks like you're totally misunderstanding how asynchronous 
> I/O works.
> 
> Here is an important thing: You can deal with multiple requests at the 
> same time even with TCP. You don't need to wait for one result before 
> you can send the next request. Send a bunch of requests at once, 
> asynchronously, and then deal with each response as it comes in. This 
> Just Works with multiple TCP connections in Twisted. No need for 
> threads, no need for Broadcast or Multicast.
> 

I understand about the state machine of Twisted and how it can do the 
requests. The problem is that I still get down to issuing 1000s of TCP 
requests (and on top of that XML-RPC, SOAP, PB or whatever). It does beg 
the question has anyone really used a twisted server (or client) to 
invoke thousands of simultaneous RPC requests?

Chaz





More information about the Twisted-Python mailing list