I am in the process of designing an RPC procedure which scans a file
with typical size of 200MB+ upon client requests. One design is to let
the procedure returns 8K result data per-call (similar to NFS).
Because of the synchronous RPC nature, the client has to do something
like the following pseudo code:
while ((result = rpc_call(fileName, thisPageNum, ...)) != EOF)
result = rpc_call(fileName, nextPageNum++, ...);
Each iteration has to send a request, wait for the 8K result sent back
across the network, then send the next request (two-way msg
delays). Significant sequential delays are introduced if the client
wants to scan the whole file.
What I really want to have is for the client to make a single RPC call
and get all 200MB+ data back. If using sockets, the client can send a
request, then repeatedly read from the connected TCP socket. This way
only one request is needed for 200MB+ data.
Any hints on how I could achieve the same thing using RPC? Will
threaded clients or servers help? (maybe 200MB/8K = 25K threads
Dept. of Computer Science
are enough interests.