Microservices are the next hype. Websites are full of introducing posts, books are being written and conferences organized. There’s big promises of scalability and flexibility. However, when you are knee deep in mud as an architect, developer or tester, it’s hard to find out how to get there. Sander Hoogendoorn, independent craftsman and CTO of Klaverblad Insurances, discusses the long and winding road his projects, greenfield and brownfield, have travelled. Sander will e.g. address polyglot persistence, DDD, bounded contexts, modelling HTTP/REST, continuous delivery and many lessons learned.
The rise and fall and rise of Virtual Reality - Adriaan Rijkens - Codemotion...
Ähnlich wie Designing, building, testing and deploying microservices. A stairway to heaven or a highway to hell? - Sander Hoogendoorn - Codemotion Amsterdam 2016
Moved to https://slidr.io/azzazzel/business-wins-in-modularity-microservices-...Milen Dyankov
Ähnlich wie Designing, building, testing and deploying microservices. A stairway to heaven or a highway to hell? - Sander Hoogendoorn - Codemotion Amsterdam 2016 (20)
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Designing, building, testing and deploying microservices. A stairway to heaven or a highway to hell? - Sander Hoogendoorn - Codemotion Amsterdam 2016
1. @aahoogendoorn | www.ditisagile.nlMicroservices. Stairway to heaven or highway to hell? 1
@aahoogendoorn | www.ditisagile.nl
Microservices.
Stairway to heaven
or highway to hell?
Sander Hoogendoorn
ditisagile.nl
Mentoring ▪ Consulting ▪ Training
Agile ▪ Software
architecture ▪ Code
2. @aahoogendoorn | www.ditisagile.nlMicroservices. Stairway to heaven or highway to hell? 2
Sander Hoogendoorn
Me
Dad
Mentor, trainer, software architect,
programmer
Books, articles, conferences
Work
Owner ditisagile.nl
CTO Klaverblad Verzekeringen
Web
www.sanderhoogendoorn.com
@aahoogendoorn
sander@ditisagile.nl
5. @aahoogendoorn | www.ditisagile.nlMicroservices. Stairway to heaven or highway to hell? 5
@aahoogendoorn | www.ditisagile.nl
Monoliths
Hard to deliver,
even harder to test
and impossible to maintain
7. @aahoogendoorn | www.ditisagile.nlMicroservices. Stairway to heaven or highway to hell? 7
Advantages
A single (layered) architecture
A single technology stack
A single code base maintained by multiple teams
Disadvantages
All parts are interconnected
Many other systems are connected to your system
Hard to change, hard to maintain
Long time between releases, thereby increasing risks
Slow innovation
Hard to move to newer technologies
Doesn’t scale very well
Monoliths
Advantages and disadvantages
21. @aahoogendoorn | www.ditisagile.nlMicroservices. Stairway to heaven or highway to hell? 22
In short, the microservice architectural style is an approach
to developing a single application as a suite of small services,
each running in its own process and communicating with
lightweight mechanisms, often an HTTP resource API.
These services are built around business capabilities and
independently deployable by fully automated deployment
machinery. There is a bare minimum of centralized
management of these services, which may be written in
different programming languages and use different data
storage technologies.
Martin Fowler
22. @aahoogendoorn | www.ditisagile.nlMicroservices. Stairway to heaven or highway to hell? 23
In short, the microservice architectural style is an approach
to developing a single application as a suite of small services,
each running in its own process and communicating with
lightweight mechanisms, often an HTTP resource API.
These services are built around business capabilities and
independently deployable by fully automated deployment
machinery. There is a bare minimum of centralized
management of these services, which may be written in
different programming languages and use different data
storage technologies.
Martin Fowler
29. @aahoogendoorn | www.ditisagile.nlMicroservices. Stairway to heaven or highway to hell? 30
Products not projects
Scalable
Decentralized governance
Replaceable parts
High performance
Technology independent
Polyglot persistence
Easy to build
Easy to test
Easier deployment than monoliths
Microservices
Promises
30. @aahoogendoorn | www.ditisagile.nlMicroservices. Stairway to heaven or highway to hell? 31
What is a microservice exactly?
How small is a microservice?
Requirements in a microservice world
Components or services
Who owns a microservice?
What technologies do you use?
What protocols do you apply?
How to define messages
How to test microservices
How to coordinate when business services run
across components?
How to build deployment pipelines?
Microservices
But…
44. @aahoogendoorn | www.ditisagile.nlMicroservices. Stairway to heaven or highway to hell? 53
Client thinks in business processes, so we implement business
processes
We move away from the mainframe, to a new systems
landscape, consisting of micro-applications and micro-
components
Requirements and documentation are modeled rather than
written
Applications implement a single (elementary) business
process
Components serve a single purpose and offer services
Applications and components all have their own bounded
context – a domain model
Applications and components will have an similar internal
software architecture to facilitate ease of maintenance and
allow for harvesting re-use
Communication between applications and components will
use a simple open protocol - REST
Some guiding principles
Case 1
50. @aahoogendoorn | www.ditisagile.nlMicroservices. Stairway to heaven or highway to hell? 69
Domain driven design
The paradigm of designing software based on models
of the underlying domain
The domain model helps the business and the
developers to reason about the functionality
A model needs to be unified – internally consistent
without contradictions
Bounded context
The bounded context is a central pattern in domain
driven design
When you model larger domains, it becomes
progressively harder to create this single unified model
So, instead of creating a single unified model, you create
several, all valid within their bounded context
Bounded context
57. @aahoogendoorn | www.ditisagile.nlMicroservices. Stairway to heaven or highway to hell? 79
HTTP return codes cheat sheet
1**. Hold on
2**. Here you go
3**. Go away
4**. You fucked up
5**. I fucked up
69. @aahoogendoorn | www.ditisagile.nlMicroservices. Stairway to heaven or highway to hell? 104
An approach in which teams ensure that every
change to the system is releasable, and that we
can release any version at the push of a button.
Aimed to make releases boring, so we can deliver
frequently and get fast feedback on what users
care about.
Jez Humble