Week 2 Flashcards

1
Q

What is a monolith?

A

A large single entity. Where products are programs formed from a collection of modules and run by a single process. All communication between modules is by procedure calls.

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

Advantages of monolith style

A

Modules can be made to correspond directly to business functions identified by domain-driven design
Modules can be developed by teams working to agreed interfaces through permissionless innovation
The program as a whole can easily be deployed from version control automatically.

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

Why are monoliths considered bad

A

Synonymous with legacy applications

Overcomplicated, messy etc.

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

What is the 2 pizza rule?

A

Every internal team would be small enough that it could be adequately fed with two pizzas

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

What is microservices?

A

Architectural style where products are applications formed from a collection of microservices, each a separate program run by a separate process. All communication is by message passing.

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

Advantages of the microservice style

A

Deployed independently
More fault resistant
Scaling easily
Development is easy, as each microservice can use a different language

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

What is Conway’s Law

A

Any organisation that designs a system (defined more broadly here than just information systems) will inevitably produce a design whose structure is a copy of the orgs communication structure e.g. 4 departments, 4 microservices.

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

What do enterprises do in Conways Law?

A

Do it in reverse, make our microservices, then make the company structure reflect this.

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

What are two approaches to building a software product MVP

A

Microservices late
Microservices early

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

What is microservices late?

A

Begin making a monolith then make microservices from it later. Much easier to make changes now than if we had proper structure.

Enter the marker with a poor product to learn from customer.

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

What is the Strangler pattern?

A

Manages migrations by putting an intermediary facade in front of the monolith, initially, this provides access to modules. As modules are replaced by microservices, the monolith is slowly strangled by microservices, killing it.

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

What is microservices early?

A

Build straight into microservices. Enters the market with a better structured product, but later. Not as flexible to rethink.

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

What do the best microservice designs have

A

High cohesion
Loose coupling

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

What does high cohesion mean

A

Related functionality is found in one component, unrelated functionality is in another.
Easier to change.

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

What does loose coupling mean?

A

Services should be independent of one another. Changing one microservice does not necessitate changing others. They dont share much.

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

What connects microservices?

A

A microservice bus connects them with an open, pluggable framework.

17
Q

What is the microservice bus protocol

A

HTTP, JSON, REST.

18
Q

What is HTTP

A

Synchronous protocol, the client sends a request and then blocks until a server sends back a response.
POST GET PUT DELETE

19
Q

Issues with JSON for microservices

A

It does not support binary content, such as audio or video.

20
Q

What are the 4 archetypes

A

Documents
Collections
Stores
Controller

21
Q

What are documents

A

Describes operations on file-like resources
GET reads the file
PUT updates the file
DELETE deletes the file

22
Q

What are collections

A

Describes operations on directory like resources
GET returns a list of the resources
POST creates a new resource in the directory with given contents, choosing resource name and returning it.

23
Q

What are stores

A

Describes operations on directory-like resources
GET reads the directory-like resources
GET reads the directory and returns a list of the resources
PUT creates a new resource using the given resource name, or updates one.

24
Q

What are controllers

A

Describes operations on external resources

POST causes the external resource to carry out some task and returns any result.

25
Q

What is gRPC

A

Alternative to REST
Google Remote Procedure Call

Services connected using grpc are defined using protocol buffers and exchange BINARY data (efficient 7x faster)
It does mean the servers are coupled due to the binary format.