RE: Communication between remote scripts

From: Tim Golden (tim.golden_at_viacom-outdoor.co.uk)
Date: 09/14/04


To: python-list@python.org
Date: Tue, 14 Sep 2004 14:27:32 +0100


| In article <MPG.1bb0b7d621a77bc598968c@news2.atlantic.net>,
| secun@yahoo.com 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
________________________________________________________________________



Relevant Pages

  • Communication between remote scripts
    ... I have a python script that monitors a process (3rd party) on the ... local machine. ... I would like to create a second program on a remote Windows computer ...
    (comp.lang.python)
  • Re: Communication between remote scripts
    ... Am I correct in saying that remote objects are not really needed for ... > local machine (Windows). ... > I would like to create a second program on a remote Windows computer ...
    (comp.lang.python)
  • Re: Domain users
    ... controller and then themselves as their preferred dns server. ... > same name as I called it in the Domain Windows 2000 ADV Server. ... But the user is an Admin on the Local machine Windows XP. ... >> As a regular user they will not be able to install much of anything. ...
    (microsoft.public.win2000.group_policy)
  • RE: Drivial Pursuit: Internet Explorer Browser & Your Files and Folders !
    ... I can positively confirm this vulnerability on both WMP 7 and 8 on Windows ... The default Enhanced Security Configuration of IE ... access to files and folders on the local machine from the internet. ... result of a 'trusted' media file or not is unclear. ...
    (Bugtraq)
  • Re: [VulnWatch] Drivial Pursuit: Internet Explorer Browser & Your Files and Folders !
    ... The default Enhanced Security Configuration of IE on ... Windows 2003 does nothing to prevent automatically opening certain media types. ... > access to files and folders on the local machine from the internet. ... > result of a 'trusted' media file or not is unclear. ...
    (VulnWatch)