How to use Sun RPC for large slow procedure calls

Kenneth Almquist ka at cs.washington.edu
Sun Oct 8 17:11:24 AEST 1989


> Gregory Bond writes:
>> [description of RPC based database application that sometimes
>>  takes a long time for lookups]

Kemp at DOCKMASTER.NCSC.MIL replies:
> The accepted solution to this very common situation is to use callback
> RPC's, in a scenario something like this:
>
>  1. Client requests an action
>  2. Server does whatever can be guaranteed to finish quickly (checking
>     request validity, user authentication, whatever) and acknowledges
>     the request
>  3. Server does the lengthy job (computation or database lookup) and
>     when it's finished, sends a callback RPC to the client

Accepted by whom?  The technical problems of implementing RPC systems
are basicly solved.  The political problem of keeping SUN from foisting
lousy software on the world is harder to solve, but it may be that
Gregory can manage to get hold of another RPC system.  (Nat Mishkin
mentions one such system.)  Lacking a good RPC system, I would be
inclined to use sockets rather than SUN RPC.  Kemp acknowledges of
the kludge he describes:

> This is [analogous] to asynchronous I/O, and requires a similar amount
> of care by the programmer to do the job right.

Care of course translates into programmer time.  It won't necessarily
take any longer to in effect build your own specialized RPC mechanism
on top of sockets.  And this latter approach won't force you to mangle
your code to mesh with the IPC mechanism.
				Kenneth Almquist



More information about the Comp.unix.wizards mailing list