chapter 3 [ RPC ] Flashcards
what is the most used model for organizing distributed applications?
client-server model
what is a Chained Client-Server Interactions?
when a server acts as a client for another server
what is the downside of a Client-Server Model?
- usually doesn’t run faster than a centralized application
- client waits while server works
what are advantages of a Client-Server Model?
- specialized resources [ faster cpu, larger memory ]
- splits up the application
- allows server use by multiple clients
what is RPC?
the extension of local procedure calls into the context of a distributed system
how does RPC work?
by converting procedure call invocations into network messages and vice versa
what is a stub?
a piece of code on the client side that converts:
- function call to network req
- network resp to function returns
what is a skeleton?
is a piece of code on the server side that converts:
- net req to function call
- function return to net response
how are stubs and skeletons generated?
automatically by the RPC
what are limitations of RPC?
clients and servers do not share:
- address space
- file descriptors
- global vars
- func params
what constraints does RPC place on client-server model?
- server needs to have function prototypes
- both client and server can have internal data that can not be accessed by the other
what is sun RPC?
is a mechanism that automatically generates client stub and server skeleton using RPC compiler rpcgen.
sun rpc is _________ dependent and ________ independent?
language [ c ] and platform
what is port mapper?
a protocol that permits a client to look up the port number of programs hosted on the server
What port is port mapper?
port 111
what do we mean by RPC runtime is unaware?
- it doesn’t know about function prototypes, procedure names, what the procedures are doing or what arguments they take
what is the only thing an RPC is concerned with?
managing requests and shipping response buffers
what is the downside of using UDP based RPC?
- lose of req and resp
what happens if a request gets lost in a UDP based RPC?
- client automatically resends request until it receives a response
what happens if a response gets lost in a UDP based RPC?
- server will be invoked several times [ however many times it takes ] until response is sent
what type of server is recommended if using UDP based RPC?
idempotent server : performing an operation once is the same as performing it multiple times
what is (Un)Marshalling Parameters?
process of converting parameters from a lower level representations to a higher level representations and vice versa
what is the lower level and higher level representation of parameters respectively?
- buffers and C variables
what is in charge of parameter conversion?
XDR [ external data representation ] layer
what is the role of client Stub in XDR context?
calls XDR function to:
- marshal procedure params to buffers
- un marshal function return to variables
what is the role of server Skeleton?
- defines a function that handles incoming requests
- creates TCP and UDP server sockets and registers them to the port mapper
- registers function created at 1 to RPC system
- waits for incoming requests from RPC