[Tutor] Client Server Programming

dman dsh8290@rit.edu
Tue, 2 Oct 2001 16:40:24 -0400

On Tue, Oct 02, 2001 at 05:21:40PM +0100, alan.gauld@bt.com wrote:
| > First we had to write it using sockets and create our own protocol.
| > This can be done and doesn't rely on any 3rd party software, but is a
| > lot of work for little gain.  
| Hmm, sockets are usually my default option. Unless the protocol is 
| very complex or the number of messages very rich(>50 say) I tend to 
| opt for sockets - easy to write, easy to debug and fairly performant. 
| 'Course security and scaleability etc are poor (or must be hand crafted)...

With the first iteration of the app for lab my partner and I had a
whole bunch of classes used as data for the communication.  We had a
class for each type of request, and a data that was then returned.
There were also classes for the various error conditions that could be
returned.  The idea behind the many classes was to allow subclassing
in the future for more advanced systems.
java.io.Object[In|Out]putStream was used and each side would just
check the type of the object read from the stream.  

When we re-wrote it to use RMI, and now CORBA the system got much
simpler.  We removed lots of code and most of the classes.  The hard
part was figuring out how to get the middleware systems up and
running (the docs for rmiregistry kinda left out a few rather
important details).

Just so you know _why_ I have the opinion I have, and you can decide
if you agree or not :-).

Also, I was forgetting about xml-rpc when I wrote my previous message.