Week 2 Flashcards
What is a monolith?
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.
Advantages of monolith style
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.
Why are monoliths considered bad
Synonymous with legacy applications
Overcomplicated, messy etc.
What is the 2 pizza rule?
Every internal team would be small enough that it could be adequately fed with two pizzas
What is microservices?
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.
Advantages of the microservice style
Deployed independently
More fault resistant
Scaling easily
Development is easy, as each microservice can use a different language
What is Conway’s Law
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.
What do enterprises do in Conways Law?
Do it in reverse, make our microservices, then make the company structure reflect this.
What are two approaches to building a software product MVP
Microservices late
Microservices early
What is microservices late?
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.
What is the Strangler pattern?
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.
What is microservices early?
Build straight into microservices. Enters the market with a better structured product, but later. Not as flexible to rethink.
What do the best microservice designs have
High cohesion
Loose coupling
What does high cohesion mean
Related functionality is found in one component, unrelated functionality is in another.
Easier to change.
What does loose coupling mean?
Services should be independent of one another. Changing one microservice does not necessitate changing others. They dont share much.