[Twisted-Python] servers that are also clients? (newbie question)

mikah at ceruleansoftware.com mikah at ceruleansoftware.com
Wed Mar 16 08:12:07 EST 2005


Hello everyone,

  I've decided to implement my latest work project using
Twisted. I'm still in the design phase, and haven't actually
written any Twisted code. I'm still wading through the
documentation.

  My app is both a server and client at the same time. It takes
requests from some clients, and also relays these requests
(suitably reformatted) to a pair of third-party servers. In
this sense, it is acting as a client (I intend to use
ReconnectingClient for this).

  It essentially needs to seek confirmation from those other
servers before deciding how to respond to the 'real' clients.

  So, I understand how to write the server part of it (based on
the Howtos for mktap plugins and writing servers), but where
does the client part of the code come in?

  As I understand it, Services or Factories can encapsulate
code that should be independent of the Protocols. Should the
server-as-client code go there? 

  Thanks in advance! I hope someone can point me in the right
direction.

mikah






More information about the Twisted-Python mailing list