RPC Flashcards

1
Q

What is RPC?

A

Remote procedure call

A networking pattern used in client-server architectures.

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

How does RPC work?

A

A server offers a set of operations, and a client can call these operations. at the clientside the operation is called as though it was local because of the middleware attached at both ends.

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

How does RPC allow the client to call the server as though it was local?

A

With the help of middleware which makes use of the service interface.

The server and the client communicates with middleware which gives the illusion that the other part is local. The middleware then does the communication over internet.

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

What is some features with RPC?

A

It allows one process on one machine, to start an operation on another machine (requires network)

it simplifies building of the client-side as you dont have to translate code in the client, the middleware will do that

it has an IDL (interface definition language) which is the ‘list/interface’ of procedures that can be called. (like a registry of the methods i think he said once).

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

Is RPC async or sync?

A

at its core simple RPC in its simplest form is a synchronous process. If you start a thread to make a request that thread waits for the response.

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

How does a RPC flow look when a client calls a server?

A

client sends arguments to methods in the middleware the middleware sends it through the internet with rpc protocol to the client.

client sends arguments to the middleware, call it a stub or ORB (object request broker) if you want, these arguments goes into methods which have been created from the IDL which is the description of methods and how to call them on the server. It then uses the RPC protocol to contact the server which goes up the same layers.

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

what are some typical errors that can happen?

A

client cant reach server
loss of request/response due to network.
server crash
client crash

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

How can you handle a client cant reach server error?

A

Try to resend the request if its idempotent

- for non idempotent request add a sequence variable to let server know the request is a retransmit

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

How can you deal with servercrash?

A

Keep trying, dont guarentee anything so if the server crashes the client doesnt know how to not deal with no response.

hard because the client wont know why there is no response

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

How can you deal with client crashes?

A

Expiration: each RPC is given an amount of time to dojob

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

What is XML-RPC?

A

It is an RPC protocol which passes information from client to the server in XML format… its just RPC using XML format.

Parameters are a simple list of types and content; structs and arrays are the most complex types available; no object type

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

What does the XML format look like?

A

Extensible Markup Language (XML) file. These are really just plain text files that use custom tags to describe the structure and other features of the document

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