[comp.unix.questions] Communication between Unix processes running on different machines

pfluegl@chopin.eng.uci.edu (Manfred J. Pfluegl) (03/19/91)

~s Communication between Unix processes running on different machines

I am just starting to think about the implementation of a distributed
algorithm on a set of Sun stations. Since I have never coded anything
like that I was hoping for a few hints or other helpful input.

I was skipping through the man-pages and it seems that creating
a socket (2), and sending to or receiving from the socket
with send(2), sendto(2), and recv(2) would be one possibility.

My main interest is in very efficient communication (i.e. minumum message
delay). All messages will be short (about 20 bytes). 

The following questions come to my mind:

     Are sockets the best approach?
     If not, what should I use instead?

     Has anyone written a simple test/application program
     including communication between different machines that I
     could look at?

Any help is appreciated,
	
	Manfred

--
                Manfred Pfluegl - believer of "Per Aspera Ad Astra"    
  *****  *****  pfluegl@uci.edu              (Internet)                 
 * **** * ****  pfluegl@uci.bitnet           (Bitnet)
*  *****  ****  pfluegl%uci.edu@RELAY.CS.NET (Internet from Europe)     

barmar@think.com (Barry Margolin) (03/20/91)

In article <27E5DD23.20422@orion.oac.uci.edu> pfluegl@chopin.eng.uci.edu (Manfred J. Pfluegl) writes:
>I am just starting to think about the implementation of a distributed
>algorithm on a set of Sun stations. Since I have never coded anything
>like that I was hoping for a few hints or other helpful input.

>     Are sockets the best approach?
>     If not, what should I use instead?

There is no one "best" approach, it depends on your goals.  Sockets is
currently the most used approach, simply because it is one of the oldest
Unix networking libraries.  TLI is being introduced on many platforms, and
might be more portable into the mid-90's.  If your application conforms to
procedure-calling structure, then RPC may be good.

>     Has anyone written a simple test/application program
>     including communication between different machines that I
>     could look at?

Get the book "Unix Network Programming" by W. Richard Stevens.
It has many good examples.
--
Barry Margolin, Thinking Machines Corp.

barmar@think.com
{uunet,harvard}!think!barmar