RE: Communication between remote scripts

Discussion in 'Python' started by Tim Golden, Sep 14, 2004.

  1. Tim Golden

    Tim Golden Guest

    | In article <>,
    | says...
    | > I have a python script (A) that monitors a process (3rd
    | party) on the
    | > local machine (Windows).
    | >
    | > I would like to create a second program on a remote Windows
    | computer
    | > that receives an update from program A periodically (maybe every 10
    | > minutes or so), and tells it everything is running without
    | a problem.
    | >
    | > Can anyone recommend a good (and preferably simple) way for
    | two programs
    | > to communicate on a network?

    | Am I correct in saying that remote objects are not really needed for
    | this?

    You have several options:

    1) Email: sounds silly but is a perfectly reasonable solution if
    you already had email infrastructure on both machines and
    weren't that bothered about real time.

    2) UDP heartbeat: see this recipe in the Python Cookbook.
    http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52302

    3) xml-rpc: see the Python docs.
    http://python.org/doc/2.3.4/lib/module-xmlrpclib.html

    4) Pyro (Python Remote Objects). See http://pyro.sf.net.
    I suspect you don't want this, given your follow-up
    question. But it will work and is easy enough.

    5) Straight socket server stuff. Again, python docs.
    http://python.org/doc/2.3.4/lib/module-SocketServer.html

    6) SOAP / DCOM (if you fancy your chances) / CORBA, other acronyms.

    Personally, I think xml-rpc is a good way to go for
    general purpose stuff. But since you're really just
    after a heartbeat, the UDP solution might be best.

    TJG

    ________________________________________________________________________
    This e-mail has been scanned for all viruses by Star. The
    service is powered by MessageLabs. For more information on a proactive
    anti-virus service working around the clock, around the globe, visit:
    http://www.star.net.uk
    ________________________________________________________________________
    Tim Golden, Sep 14, 2004
    #1
    1. Advertising

  2. In article <>,
    Tim Golden <> wrote:
    >| In article <>,
    >| says...
    >| > I have a python script (A) that monitors a process (3rd
    >| party) on the
    >| > local machine (Windows).
    >| >
    >| > I would like to create a second program on a remote Windows
    >| computer
    >| > that receives an update from program A periodically (maybe every 10
    >| > minutes or so), and tells it everything is running without
    >| a problem.
    >| >
    >| > Can anyone recommend a good (and preferably simple) way for
    >| two programs
    >| > to communicate on a network?
    >
    >| Am I correct in saying that remote objects are not really needed for
    >| this?
    >
    >You have several options:
    >
    >1) Email: sounds silly but is a perfectly reasonable solution if
    > you already had email infrastructure on both machines and
    > weren't that bothered about real time.
    >
    >2) UDP heartbeat: see this recipe in the Python Cookbook.
    > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52302
    >
    >3) xml-rpc: see the Python docs.
    > http://python.org/doc/2.3.4/lib/module-xmlrpclib.html
    >
    >4) Pyro (Python Remote Objects). See http://pyro.sf.net.
    > I suspect you don't want this, given your follow-up
    > question. But it will work and is easy enough.
    >
    >5) Straight socket server stuff. Again, python docs.
    > http://python.org/doc/2.3.4/lib/module-SocketServer.html
    >
    >6) SOAP / DCOM (if you fancy your chances) / CORBA, other acronyms.
    >
    >Personally, I think xml-rpc is a good way to go for
    >general purpose stuff. But since you're really just
    >after a heartbeat, the UDP solution might be best.

    .
    .
    .
    Nice description.

    If the problem involved just a bit more information and variability
    than a heartbeat, I'd start to recommend async and/or Twisted.
    Cameron Laird, Sep 14, 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. ChrisH
    Replies:
    5
    Views:
    356
    Irmen de Jong
    Sep 14, 2004
  2. Chris
    Replies:
    9
    Views:
    902
  3. Jan Danielsson
    Replies:
    8
    Views:
    620
    Mike Meyer
    Jul 22, 2005
  4. Jp Calderone
    Replies:
    0
    Views:
    449
    Jp Calderone
    Jul 21, 2005
  5. Jean

    Communication across Perl scripts

    Jean, Oct 11, 2010, in forum: Perl Misc
    Replies:
    18
    Views:
    654
    Ted Zlatanov
    Oct 14, 2010
Loading...

Share This Page