[Twisted-Python] PB - Dual Use Objects?

Sergio Trejo serj_trejo at hotmail.com
Fri Jul 16 09:53:29 MDT 2004


I'm curious, for those who use PB for their projects, do they make their 
objects at each end of the wire dual use (meaning, both objects run a PB 
Server and PB Client Factory such that each object can remotely call the 
other), or do most people stick to a typical client-server model wherby the 
PB Server Factory object just waits for requests from the Client and does 
not attempt to initiate any messages to the client?

I ask because as a newbie to Twisted, I also started reading the 
twisted.flow HowTo and it looks like there are some really interesting 
things that could be done with PB. I have an app in mind whereby a PB Client 
(A) triggers a PB Server, and then the PB Server expects incoming data from 
another PB Client (B) but the data that comes in from B is useful to pass 
back to A (all in a deferred manner however). Therefore the PB Server acts 
as an intermediary. But this could get really hairy if I turned the PB 
Server into a server handling multiple requests from PB Clients of type A 
and PB Clients of type B (could look like a spaghetti bowl f the Server is 
required to route data from the Bs to the As) so maybe better to stick with 
a typical client-server model.

Serg

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus





More information about the Twisted-Python mailing list