ervices?
What is Microservices?
Microservices are small,
autonomous services that work
together
Modelli
Modelling Microservices
What makes a good service?
Loose Coupling + High Cohesion
The Bounded Context
Specific responsibility enforced by explicit boundaries
grationIntegration
Avoid breaking changes
Technology Agnostics
Simple for Consumers
Hide internal implementation detail
Integration Technology - what are we looking for?
Avoid at all cost:
The Shared Database
Decide between:
Synchronous vs Asynchronous
Orchestration vs Choreography
Recommendations
Avoid database integration at all cost
Strongly consider REST for request/response integration
Prefer choreography over orchestration
Avoid breaking changes and the need to version
User Int
User Interface
API Composition
UI Fragment Composition
API Gateway - not like this
Backends for Frontends done properly
esting
Testing
Mike Cohn’s Test Pyramid
End-to-end tests are...
Flaky, brittle, and slow
Consumer-Driven tests to the rescue
No real tests against the real consumers, use consumer-driven contract (CDC)
Recommendations
Optimize for fast feedback
Avoid end-to-end tests when possible (use consumer-driven contracts)
Use consumer-driven contracts to provide conversation between teams
Understand the trade-off between putting more efforts into testing and detecting
issues faster in production
Topics not covered
Splitting the Monolith
Deployment
Monitoring
Security
...and many more
Any organization that designs a system will inevitably
produce a design whose structure is a copy of the
organization’s communication structure

Building Microservices: Designing Fine-Grained System by Sam Newman