Designing
for Autonomy
Matthias Noback
@matthiasnoback
Microservice envy
https://leanpub.com/microservices-for-everyone
A microservice architecture
can help you...
- Define team responsibilities
- Scale your development team
- Prevent big balls of mud at the code-level
- Scale horizontally
The problem is
designing for
autonomy
From imperative
To reactive
Do this.
Then do that.
Then do something else.
Do this.
When "this has happened", do that.
When "that has happened", do something else.
Process managers
Add drawing: states, events and new commands
Solving the command issue
1. Tell the user you "accepted" their command, continue
processing behind the scenes.
2. Process the first step of the process, then emit an event
about it.
3. Let other services respond to this event and take their
own step, emitting an event about it, and so on.
Insight in the process
1. Use process managers to send new commands based on
incoming events.
2. Let the process manager keep track of the current state
of each process.
What about queries?
"What's the current
state of something-
something?"
The current state is the
result of all past events
Solving the query issue
1. Services publish their events.
2. Other services subscribe to these events and update their
own state accordingly.
3. They can build up any projection they like. This gives
them the answers they need, without even asking.
Thanks!
Questions?

Designing for autonomy