Persistent server with GUI interactive functions ?

Thomas Guettler pan-newsreader at thomas-guettler.de
Thu Apr 3 11:09:29 CEST 2003


On Thu, 03 Apr 2003 10:29:28 +0200, Frank wrote:

> I need to write a GUI app that will serve as a peer to peer
> client/server.  At the highest level it would be similar to a chat
> client, which has a server component (waiting for any incoming
> connections) as well as the client part (initiating a connection,
> executing user commands).

How are your client and server connected? 

Can both create tcp sockets to each other? 
You can't do this if a client is behind a masquarding (NAT)
router. If you can use TCP/IP, I think Pyro is the best choice. I have
not used it yet.

Can the client make a tcp connection to the server? Some networks only
allow http through a proxy. If some clients are behind a http proxy
I would recommend xml-rpc.
 

> Each of those function appears to involve entering an "endless loop" as
> the last logical step to initiate processing (i.e. "mainloop()" for the
> user interface and "serve_forever()" for the server).  I haven't yet
> grasped the logical structure that will allow me to have two
> non-returning calls and maintain control of the program.

I would do it with threads. Maybe there it is possible to do it without 
threads, too.

In the subject you used the word "Persistent". I would use pickles for
development. If you have too much data you can switch to ZODB later.

 thomas

-- 
Thomas Guettler <guettli at thomas-guettler.de>
http://www.thomas-guettler.de




More information about the Python-list mailing list