Networking!

H

hyperbob

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?
 
I

Irmen de Jong

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.

Have a look at Pyro, http://pyro.sourceforge.net
It basically abstracts away all communication details for you :)

--Irmen de Jong.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top