2.0 Communication Flashcards

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

What does HTTP stand for?

A

Hypertext Transfer Protocol

HTTP is a method for encoding and transporting data between a client and a server.

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

What type of protocol is HTTP?

A

Request/response protocol

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

What are the components of a basic HTTP request?

A

Verb (method) and resource (endpoint)

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

List three common HTTP verbs.

A
  • GET
  • POST
  • DELETE
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

True or False: The GET method is idempotent.

A

True

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

Fill in the blank: The _______ method creates or replaces a resource.

A

PUT

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

What does TCP stand for?

A

Transmission Control Protocol

TCP is a connection-oriented protocol over an IP network.

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

What is a key feature of TCP?

A

Connection established and terminated using a handshake

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

What ensures packets are delivered in the original order in TCP?

A

Sequence numbers and acknowledgment packets

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

What is one disadvantage of TCP compared to UDP?

A

More delays and less efficient transmission

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

When should you use TCP over UDP?

A
  • You need all of the data to arrive intact
  • You want to automatically make a best estimate use of the network throughput
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does UDP stand for?

A

User Datagram Protocol

UDP is a connectionless protocol.

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

What is a key characteristic of UDP?

A

Datagrams might reach their destination out of order or not at all

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

List two scenarios where UDP is preferred over TCP.

A
  • You need the lowest latency
  • Late data is worse than loss of data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is RPC?

A

Remote Procedure Call

In an RPC, a client causes a procedure to execute on a different address space.

17
Q

What is the main disadvantage of using RPC?

A

Clients become tightly coupled to the service implementation

18
Q

What does REST stand for?

A

Representational State Transfer

19
Q

What is a key principle of REST?

A

Stateless communication

20
Q

List the four qualities of a RESTful interface.

A
  • Identify resources (URI)
  • Change with representations (Verbs)
  • Self-descriptive error message (status response)
  • HATEOAS (HTML interface for HTTP)
21
Q

True or False: REST is focused on exposing behaviors.

22
Q

What is a disadvantage of REST?

A

It can require multiple round trips to fetch complicated resources

23
Q

How is an RPC call structured?

A

Client calls the client stub, marshals the procedure id and arguments into a request message

24
Q

What is the purpose of HATEOAS in REST?

A

Ensures the web service is fully accessible in a browser

25
Q

Fill in the blank: REST minimizes the coupling between ______ and ______.

A

client, server

26
Q

What is one reason to choose a native library for RPC?

A

You want to control how your ‘logic’ is accessed

27
Q

List three popular RPC frameworks.

A
  • Protobuf
  • Thrift
  • Avro
28
Q

What is a key difference between RPC and REST in terms of operation?

A

RPC requires a new API for every new operation; REST uses standard HTTP methods