0% found this document useful (0 votes)
24 views

Notes On RPC

Remote Procedure Calls (RPCs) allow functions to be called remotely like local functions. Function parameters are marshalled into a packet and sent to the server, which calls the function with the provided data. Output data is copied back from the server. RPCs do not support global variables, environment variables, files, or pointers besides to basic datatypes. Asynchronous RPCs allow the client stub to return immediately by using callbacks or promises to return reply data later.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Notes On RPC

Remote Procedure Calls (RPCs) allow functions to be called remotely like local functions. Function parameters are marshalled into a packet and sent to the server, which calls the function with the provided data. Output data is copied back from the server. RPCs do not support global variables, environment variables, files, or pointers besides to basic datatypes. Asynchronous RPCs allow the client stub to return immediately by using callbacks or promises to return reply data later.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Notes on RPCs

A Remote Procedure Call appears to the user like a call to a function on the local machine.

RPC concept is similar to conventional programming Procedure calling has well understood semantics RPC simplifies access to remote systems

Function parameters are marshalled into a communications packet and sent to the server which calls the appropriate function with the data provided.

Parameter types
Input

basic datatype - pass by value semantics, copy data to server arrays or structures - copy data to server, may be a lot of data pointers to single datatype - copy data item to server pointers in general - not allowed

Output

data, not addresses, copied from server return value copied from server

Environment

no global variables no environment variables

no files

Exception handling - what does the communication stub do if the first effort to send a msg fails?

no retry RPC may not work at-least-once Keep sending until it gets there idempotent functions at-most-once retry but server must filter repeats

Binding of server location

goals

transparency - it would be nice if an RPC looked just like a local function call portability - allow the application to be used on different systems load balancing - select server with lowest utilization failure recovery - select a different server if original fails efficiency

methods

write server name in code put server name in header file specify to the linker all RPC applications call an initialization function put the server address in the function call environment file of server addresses environment variable ask a human name server broadcast request for a server

Asynchronous RPC

Asynchronous RPC without reply - stub returns to caller after sending message Asynchronous RPC with reply

callbacks - client accepts call from the server promises - each RPC generates a promise. A promise identifies the RPC reply to be provided later. A promise can be ready or blocked. The client can inspect a promise without blocking and can retrieve the results.

X- windows uses Asynchronous RPC


main computer is the client terminal is the server

You might also like