how-to for getting two programs talking on a network

Need help with C, C++, perl, python, etc?

how-to for getting two programs talking on a network

Postby hertelbrian » 2006-10-13 13:06

i was wondering if anyone can point me into a good direction for a how to on getting two simple programs talking to eachother... (just need to send a couple variables back and forth)

thanks again in advance guys
hertelbrian
 
Posts: 13
Joined: 2006-10-05 22:49

Postby Daylung » 2006-10-13 14:47

You could use mpi (message passing interface), I think that's a pretty standard way to do what you want. I have written only written very basic mpi codes, but this site would be a good place to start. http://www-unix.mcs.anl.gov/mpi/

Though MPI is usually for one program, It is possible to write a program that calls other programs, this program could implement mpi so those two programs could pass variables to eachother.
Daylung
 
Posts: 103
Joined: 2005-12-24 04:44

Postby shoof » 2006-10-13 14:51

Kinda depends on what language you are using and what kind of data you need to exchange.

If you are using Perl, you can exchange variables (scalars, arrays or hashes) using the SOAP protocol over http. I'm sure other languages have SOAP implemtations.
shoof
 
Posts: 379
Joined: 2006-09-08 20:41
Location: My chair

Postby hertelbrian » 2006-10-13 15:20

hmmmm

i have a read only pebble linux box (stripped down version of debian) and i need to send a couple boolean's and a few integer arrays back and forth.. nothing to complicated...

just some 'hey i sent you something did you get it' .. 'yeah i got it.. heres my response'

i'm guessing there are some preset things likek open_conection(IP_ADDRESS);

thats really what i'm looking for
hertelbrian
 
Posts: 13
Joined: 2006-10-05 22:49

Postby shoof » 2006-10-13 15:51

You can use Perl or the other scripting languages to make simple programs that talk via a socket connection, but that would also entail you having the scripts running as daemons to listen for those socket connections.

in Perl you'll want to look at the Socket module.
shoof
 
Posts: 379
Joined: 2006-09-08 20:41
Location: My chair


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest

fashionable