{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Presentation5

Presentation5 - Part 8 Interprocess RPC Lab5 Interprocess...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Part 8: Interprocess RPC
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Lab5: Interprocess RPC RPC- Remote Procedure Call Server exports procedures that a remote client can execute. Client sends to server the arguments and the name of the procedure to run remotely. Then it waits for a result The server gets the arguments, runs the indicated procedure and sends the results back to the client The client receives the results and resumes execution.
Background image of page 2
Lab5: Interprocess RPC The client and the server will run in separate processes and they will communicate using shared memory. Shared memory needs to be backed by a file. The name of the file will be known be both client and server. Client Server Shared Memory (RPCShare d)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Lab5: Interprocess RPC The class RPCServer is used by the servers to export procedures. These classes are in the file RPC.h A server: (See http://www.cs.purdue.edu/homes/cs354/lab5-rpc/lab5- src/server1.cc) Instantiates an RPCServer object, RPCServer * server = new RPCServer( "server1.rpc“,5 ); Registers the procedures it will serve using server->registerRPC( "add", add, 0 ); It calls the server loop. It never returns.
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}