View
4
Download
0
Category
Preview:
Citation preview
&
Domain logic
Projections
Client
Events
Commands Queries
WalletId: 123Owner: StevenBalance: €1000
WalletCreatedEvent: Id: 123, Owner: Steven> Balance: €0
CashDepositedEvent: €1500> Balance: €1500
CashWithdrawnEvent: €500> Balance: €1000
CashWithdrawnEvent: €500> Balance: €500
CashDepositedEvent: €500> Balance: €1000
"Event" and “Message" are not the same thing!
Publ
ic A
PI
Commands
Route to single handlerUse consistent hashing
Return a result
Events
Distribute to all event handlersConsumers express ordering req’s
Return no resultCan be persisted
Can be a ‘source’ of agg. stateCan be used to build projections
Queries
Route with load balancingSometimes scatter/gather
Return a result
code
➢ “cf create-service”○○○
➢ “cf bind-service”○○
➢ “cf push”
○○○○○○○○○○
cf push | cf create-service | cf bind-service
Start with a Monolith
It’s easier to design & build
cf push | cf create-service | cf bind-service
Strangle the Monolithusing location transparency and adding services
cf push | cf create-service | cf bind-service
Separate into Microservicesmakes it easier to maintain and scale
$> cf create-service axon-server
Recommended