Communication between remote scripts

C

ChrisH

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

Irmen de Jong

ChrisH said:
Am I correct in saying that remote objects are not really needed for
this? [...]
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?

Perhaps remote objects are a bit overkill for your specific problem.
But then again, Pyro for instance (pyro.sf.net) essentially removes
the need for any network code in your app, and takes care of various
other nasty things that happen at the network level.
So unless you choose to use Pyro or some other high level API,
you will have to deal with all this yourself-- and that may be
more work than you think...

--Irmen
 
C

ChrisH

Thanks for the info. I've actually been looking at Pyro as a possible
solution. In some ways however, it seems a lot more powerful than what I
need for this project.

Could you give a simple example of how a two programs can "talk" to one
another? I don't think I really need RPCs in this case.

irmen@-NOSPAM- said:
ChrisH said:
Am I correct in saying that remote objects are not really needed for
this? [...]
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?

Perhaps remote objects are a bit overkill for your specific problem.
But then again, Pyro for instance (pyro.sf.net) essentially removes
the need for any network code in your app, and takes care of various
other nasty things that happen at the network level.
So unless you choose to use Pyro or some other high level API,
you will have to deal with all this yourself-- and that may be
more work than you think...

--Irmen
 
I

Irmen de Jong

ChrisH said:
Thanks for the info. I've actually been looking at Pyro as a possible
solution. In some ways however, it seems a lot more powerful than what I
need for this project.

Could you give a simple example of how a two programs can "talk" to one
another? I don't think I really need RPCs in this case.

Well if you don't want (or need) Pyro or another high-level RPC mechanism,
you have to decide on something else. TCP or UDP socket communication
is an option. See Tim Golden's reply.

The Python source distribution contains some small socket examples
(in Demo/sockets/).

--Irmen
 

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

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top