Code Comments
Programming Forum and web based access to our favorite programming groups.Dear All, Please excuse this if it is OT, but I was wondering if anyone had any advice on the following: I am in the process of designing a simple RPC layer (in C) for an application. My requirements are pretty straightforward - I need to be able to call functions that 'reside' on a server, pass data to them and read back the results. It is envisaged that the underlying transport protocol will be TCP, implemented over BSD sockets. I can't use an exisiting RPC toolkit for two reasons: i) it will introduce a library dependency into my code ii) the complexity is probably unnecessary So, I am rolling my own. Now, pretty much all of the reference material centers around well known toolkits such as Sun RPC, so I was wondering if anyone had any general advice on this particularly with regard to the following: i) marshalling and unmarshalling data - particularly with reference to byte-order and passing data between architectures that implement the same types differently ii) general RPC protocol advice Any help, or pointers to reference information will be gratefully received ;-). Many thanks, James
Post Follow-up to this messageIn article <fe6eb44f.0410210421.1d9eec3@posting.google.com>, james@james-pascoe.com (James Pascoe) wrote: > I can't use an exisiting RPC toolkit for two reasons: > > i) it will introduce a library dependency into my code Why? There must be several RPC libraries available, so you can use any of them. > ii) the complexity is probably unnecessary If you're trying to do everything that an RPC library does, the complexity has to reside somewhere. The fact that you had to post here indicates that it's complex. > > So, I am rolling my own. Now, pretty much all of the reference > material centers around well known toolkits such as Sun RPC, so I was > wondering if anyone had any general advice on this particularly with > regard to the following: > > i) marshalling and unmarshalling data - particularly with reference > to > byte-order and passing data between architectures that implement > the same > types differently Can you use an existing XDR library? That will allow you to marshall the data into a buffer that you can then write(). > ii) general RPC protocol advice Send a query and wait for the reply. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.