Home > Archive > Unix Programming > October 2004 > RPC ADVICE
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| James Pascoe 2004-10-21, 8:57 am |
| 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
| |
| Barry Margolin 2004-10-21, 4:03 pm |
| In 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 ***
|
|
|
|
|