Networking!

hyperbob at walla.com hyperbob at walla.com
Tue Apr 20 09:48:16 EDT 2004


Hello,

I'm in the design stage of an application that will consist of two or more processes that will be either on different computers in a network or on the same computer and will have to communicate with each other. I don't have much experience with networking, inter-process communication or client-server architectures, and I'm wondering what is the best way to do it.

These are the basic functions that need to be:
1. Some processes will wait for requests and then do some computation and return a value to the requester.
2. When making a request, sometimes processes will want a response immediately.
3. Other times, processes will want to make a request that requires some time to complete, continue with their business, and be informed when the task is finished (or, for example, request to be notified when a certain event occurs).

How should this be done?

What I thought was, that every process that needs to receive requests should have a main loop that will check for them (how I don't know), and when a request is intercepted, it will run the function associated with it. In case 3 described above, I thought that maybe when the request is made, a new thread with an event loop is automatically created to wait for the response. Is this a good way to go about it? What are the alternatives?

I thought of using Twisted for the networking. Are there any other good options?
When all of the processes run on the same computer, will it be too cumbersome to use Twisted or networking in general?

-----------------------------------------------------------------------
Walla! Mail, Get Your Private, Free E-mail from Walla! at:
http://mail.walla.co.il

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20040420/95dd23b5/attachment.html>


More information about the Python-list mailing list