Multi-threaded, Multiplexing ONC-RPC -- try it out!

Derek Atkins warlord@MIT.EDU
03 Jan 2001 19:16:50 -0500


Hi,

I decided that the best way to cope with my previous problem was to
just use threads.  So, I did, and it works (at least for me).  It does
mean that any server we build will have to be somewhat thread-aware,
but that shouldn't be too hard.

Anyways, I've got a demo which you can download and play with, if you
care.  The download contains the RPC code and some client/server code
to actually show how it works.  The demo is kinda stupid; there is
only one RPC function that passes a string and gets a void reply.
There is also one callback, which also passes a string and gets a void
reply.  The client connects to the server and makes two (synchronous)
RPCs, sending two strings.  While processing the call, the server
makes a callback to the calling client.  (See, I told you it was
stupid :).

Feel free to download the code and try it.  I've put the tarball on my
MIT Homepage (see my signature).  After you download and untar the
code in it's own directory (check tar -t to see why), type "make" to
build the code.  Then in one window type "test_server", in another
other "test_client".  The test only works on localhost (127.0.0.1 is
hardcoded into the client).

Also, I've only tried it on Linux, so there may be some dependencies
on GLIBC; I'll try to fix those as they reported to me.

So, please feel free to check this out and let me know what you think.
Just note that the APIs haven't stabilized, and I'll probably add some
more functionality over time.

Thanks!

-derek

PS: Note that there is no README in the distribution.  I'll get to
that eventually ;)

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available