Lesson 2: Primer on Remote Procedure Call Flashcards

1
Q

What is client-server architecture?

A

One or more nodes in a distributed system are clients. They send requests (for data or processing) to other designated server nodes. The server node receives the request, performs the requested action, and returns a response.

To return the requested data or processing result, the server copies the data from the server memory or storage into one or more network packets, and transmits them to the client.

Typically a client needs to provide some arguments when making a request. It must also copy this data from its memory into network packets and send them out.

Before this network exchange happens the client needs to identify the server its going to contact and if necessary, establish a connection with it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is RPC?

A

remote procedure call. its a way of doing distributed programming that looks like you’re just making a local procedure call.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the main mechanisms enabled by RPC?

A
  • service registration
  • connection management
  • interface specification
  • type system
  • data management
  • dealing with failures
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is hard in client-server systems?

A
  • Discovery and binding. the client needs to find the server its going to contact
  • identifying the interface and parameter types
  • agreeing on the data representation
  • explicit data management
  • unpredictable delays
  • unknown cause of failures
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the goals of an RPC system?

A
  • hide complexity of distributed programming from applications and developers
  • make distributed programming appear similar to local node programming
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the architecture of an RPC system?

A

Stub - When clients make a request they make a call to something that looks similar to a procedure, however, instead of having the program counter jump to the address space of the procedure the RPC call results in a jump into the stub layer. This layer has knowledge about the remote procedure, its arguments and results, it will perform all steps required for marshaling and unmarshaling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Describe synchronous vs asynchronous RPC

A

synchronous - the client makes a call, then must wait for a response

asynchronous - the client makes a call, then is free to do other things before eventually checking if response has arrived. if the client wants to be notified as soon as the response is available, this is called registering a callback

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What kinds of guarantees do RPCs make regarding the delivery of RPC calls?

A

at most once - rpc system eliminates duplicates

at least once - no guarantees duplicates will be eliminated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the architecture of an RPC system?

A

API - the programming interface that clients and servers use to interact with the system

Stub - when client makes a request, they make a call to something that looks similar to a procedure but instead of having the program counter jump to a location in the address space that holds the implementation of the procedure, the RPC call results in a jump into the stub layer. this layer has knowledge about the remote procedure, its arguments and results, and will provide all steps required for marshaling and unmarshaling data.

RPC Runtime - responsible for tasks like connection management, sending and receiving data, dealing with failures, etc.

Interface Definition Language (IDL) - used to create an interface specification

RPC Compiler - takes the IDL and generates code that’s used by the stubs and the runtime.

Service Registry - rules for how servers announce their services and become discoverable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly