Networking!

Discussion in 'Python' started by hyperbob@walla.com, Apr 20, 2004.

  1. Guest

    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
     
    , Apr 20, 2004
    #1
    1. Advertising

  2. wrote:
    >
    > 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.
     
    Irmen de Jong, Apr 21, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Grazzini

    Re: Networking with Perl

    Steve Grazzini, Jul 30, 2003, in forum: Perl
    Replies:
    0
    Views:
    1,081
    Steve Grazzini
    Jul 30, 2003
  2. mirek
    Replies:
    3
    Views:
    536
    Chris Jackson
    Dec 17, 2003
  3. Hong Kong Expressions

    Work in VB.NET, ASP.Net, Networking

    Hong Kong Expressions, Feb 11, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    371
    Devils Advocate
    Feb 11, 2004
  4. Jim Heavey

    Networking ASP.Net

    Jim Heavey, Feb 25, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    326
    Hrvoje Vrbanc
    Feb 25, 2004
  5. Jason Shohet
    Replies:
    0
    Views:
    529
    Jason Shohet
    Jul 13, 2004
Loading...

Share This Page