Lecture 5: Microservices Flashcards

1
Q

Service API Patterns

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

RPC

A
  • send messages that encapsulate the semantic procedure or method execution in order to execute a functional method
  • method name and parameter method needed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Message API

A
  • sending commands or events to remote systems over HTTP while avoiding the direct coupling to remote procedures
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Resource API

A
  • manipulate data by a remote system while avoiding direct coupling to remote procedures and minimise the need for domain-specific APIs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Service Interaction Patterns

A
  • Request/Response
  • Request/Acknowledgement
  • Request/Acknowledgement/Poll
  • Request/Acknowledgement/Callback
  • Linked Services
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Request/Response

A
  • Process requests when they are received and return results over the same client connection without any delay! (flight search)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Request/Acknowledge

A

First validate the request and schedule the processing of the request and then return the acknowledgement indicating that or containing unique request identifier, the processing of the request will occur later.

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

Request/Acknowledge/Poll

A

This pattern allows client to poll whenever the client wants

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

Request/Acknowledge/Callback (relay)

A

The callback service can also act as a relay which means it simply receive the callback message and then forward that message to one or more service

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

Linked Services

A

Here the client only needs to know the addresses of one or more services in RESTFUL services

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

Service Collaboration/Composition Patterns

A
  • Choreography

- Orchestration

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

Choreography

A
  • Direct interaction (via Message Broker) for services

- No central controller!

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

Orchestration

A
  • Composite service acts as controller
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Client-Service Communication/Access Patterns

A

API Gateway

  • Can provide cross-cutting services such as authentication, caching, logging. routing. circuit breaker, rate controller and so on
  • Per bounded context or for each client application type (backend for frontend pattern)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

SAGA Pattern

A
  • Sequence of local transactions
  • Transaction Rollback: if local transaction fails, the SAGA executes a series of compensating transactions that undo the changes that were made by the preceding local transactions (booking -> customer decides to cancel)
  • SAGA Choreography or SAGA Orchestration
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Client-to-Microservice Problems

A
  • Tightly coupling to microservices
  • Too many round trips
  • Security vulnerability
  • Cross-cutting concerns
17
Q

Data Management Patterns

A
  • Database per Service Pattern

- SAGA Pattern