From: Dave@usppc.abb.com
Subject: Re: Client/Server Coding
Reply-To: Dave@usppc.abb.com
Organization: The Internet
Date: Sun, 10 Jan 1993 21:43:48 GMT

Thanks for your note, Mike.  Its a nice rest from polishing something
for client installation tomorrow.

| Are you programming/running a Linux system?

Maybe later this year.  My old Amiga 1000 has been getting terribly
lonely and terribly dated.  I currently look after Vaxen and Sun 4's
and make stuff for operator traning simulators and power plant
monitoring computers.

I'd like to learn a little X and C++ and was looking at Linux on a new
DECpc 433 as a place to do that.

| Any idea what system/library calls would be of interest?

If Linus has a TLI socket interface, that would be the way to go if you
do your own protocols.  The Berkeley sockets interface is obsolescent.
TLI is System V ready.

My personal preference is to use Open Network Computing Remote
Procedure Calls.  Any NFS capable platform has the necessary RPC and
XDR libraries.  The advantages are

	RPC presents the metaphore of a procedure call to both client
	and server

	RPC uses XDR (external data representation) to achieve machine
	independence

	RPC isolates you from the transport and uses the ones
	available. Then newest flavor is TLI RPC.  It will use any TLI
	supported protocol which the server offers (i believe with
	automatic negotiation of the protocol to use).

You can literally saw a monolithic application in two and make it
client- server using these libraries.

XDR lets radically different machines participate in the application by
converting everything exchanged between them to canonic form.  Your PC
can colaborate with a VAX or an AXP machine, "no problemo".

We did just this at work to make several server processes distributed
for use in an nuclear power plant operator training simulator.  It took
about two weeks to put the prototype together starting with library
routines for our existing data dictionary and snapshot librarian.

Sun recommends using XDR routines to convert internal data into canonic
form for reading and writing files.  This allows machines of different
architectures to share binary files sitting on the NFS server.
Radical!

|  Stevens book's strengths?

I like Steven's "UNIX Network Programming ..."  It is very complete up
to remote procedure calls.  It covers pipes, sockets, system V
messages, shared memory, and semaphores and essential UNIX system
calls.  It then does telnet, rmt, rlogin, rcmd, rexec, lpr, ping,
time-and-date, as examples.  I haven't been through them all, but his
System V IPC chapter saved us a lot of pain at PPC.

| Power Programming with RPC comments

The O'Rilley book is OK on RPC.  I hate the PC puke title.  It has good
examples but its not up to the high standard set by the Stevens books.
It does compare ONC and DNC (OSF style) remote procedures.  The two
camps have dulled the hatchets and agreed to make their RPC's the
same.  He develops several example applications and makes his
presentations in more detail that the those in the Sun Programmers
Guide.

We did our first application mostly with the Sun tutorials.  They have
example code on several servers.  I believe you can get it from
uunet.uu.net if it is not part of the Linux distribution or archives.

Regards
Dave.Hamby
Usppc.Abb.Com
Newsgroups: comp.os.linux