21-04-2012, 05:06 PM
Distributed Computing Systems
Week 1 -- Remote Procedure Call.ppt (Size: 360 KB / Downloads: 164)
Remote Procedure Call (RPC)
Fundamental idea: –
Server process exports an interface of procedures or functions that can be called by client programs
similar to library API, class definitions, etc.
Clients make local procedure/function calls
As if directly linked with the server process
Under the covers, procedure/function call is converted into a message exchange with remote server process
Result
The hard work of building messages, formatting, uniform representation, etc., is buried in the stubs
Where it can be automated!
Client and server designers can concentrate on the semantics of application
Programs behave in familiar way
RPC Model
A server defines the service interface using an interface definition language (IDL)
the IDL specifies the names, parameters, and types for all client-callable server procedures
A stub compiler reads the IDL declarations and produces two stub functions for each server function
Marshalling Arguments
Marshalling is the packing of function parameters into a message packet
the RPC stubs call type-specific functions to marshal or unmarshal the parameters of an RPC
Client stub marshals the arguments into a message
Server stub unmarshals the arguments and uses them to invoke the service function
on return:
the server stub marshals return values
the client stub unmarshals return values, and returns to the client program
Week 1 -- Remote Procedure Call.ppt (Size: 360 KB / Downloads: 164)
Remote Procedure Call (RPC)
Fundamental idea: –
Server process exports an interface of procedures or functions that can be called by client programs
similar to library API, class definitions, etc.
Clients make local procedure/function calls
As if directly linked with the server process
Under the covers, procedure/function call is converted into a message exchange with remote server process
Result
The hard work of building messages, formatting, uniform representation, etc., is buried in the stubs
Where it can be automated!
Client and server designers can concentrate on the semantics of application
Programs behave in familiar way
RPC Model
A server defines the service interface using an interface definition language (IDL)
the IDL specifies the names, parameters, and types for all client-callable server procedures
A stub compiler reads the IDL declarations and produces two stub functions for each server function
Marshalling Arguments
Marshalling is the packing of function parameters into a message packet
the RPC stubs call type-specific functions to marshal or unmarshal the parameters of an RPC
Client stub marshals the arguments into a message
Server stub unmarshals the arguments and uses them to invoke the service function
on return:
the server stub marshals return values
the client stub unmarshals return values, and returns to the client program