Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > RE: Communication between remote scripts

Reply
Thread Tools

RE: Communication between remote scripts

 
 
Tim Golden
Guest
Posts: n/a
 
      09-14-2004
| 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/Coo...n/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/modu...ketServer.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
__________________________________________________ ______________________
 
Reply With Quote
 
 
 
 
Cameron Laird
Guest
Posts: n/a
 
      09-14-2004
In article <mailman.3305.1095168708.5135.python->,
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/Coo...n/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/modu...ketServer.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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Communication across Perl scripts Jean Perl Misc 18 10-14-2010 02:53 PM
Stupid question: Making scripts python-scripts Jan Danielsson Python 8 07-22-2005 12:20 AM
Communication between python scripts Chris Python 9 03-04-2005 08:52 PM
Remote Assistance fails to connect, remote remote host name could not be resolved Peter Sale Wireless Networking 1 12-11-2004 09:09 PM
Communication between remote scripts ChrisH Python 5 09-14-2004 07:25 PM



Advertisments