14. 4 . 2
What is ES
Event Sourcing
Event describes the state change of aggregate
Event is saved in event store
Events can be replayed to re-create the current state.
19. 4 . 7
Consistency
Key feature for the Event Store
Without transactions, much work needed to make as
reliable
Versioning / timestamps
Eventual consistency
20. 4 . 8
Error Handling
Distinguish between business faults and errors.
Errors can be re-tried.
Business faults should have pre-determined
reaction.
21. 4 . 9
Other disadvantages
Many moving parts, makes it hard to debug the
system as a whole
CQRS not for every bounded context
23. 4 . 11
Advantages
Auditing and historical tracing
Read and write side can be optimized separately
Debug in local environment
Small components which are easy to update / fix
No ORM impedance mismatch
36. 7 . 2
Lessons learned
Conventions make setup easy
Framework on top of many layers
37. ...
[INFO] Service locator is running at http://localhost:8000
[INFO] Service gateway is running at http://localhost:9000
...
[INFO] (Service started, press enter to stop and go back to the console...)
[error] c.l.l.i.s.ServiceRegistrationModule$RegisterWithServiceRegistry
- Service name=[hello] couldn't register itself to the service locator.
com.lightbend.lagom.javadsl.api.transport.TransportException: <head>
...
[error] a.c.s.PersistentShardCoordinator - Persistence failure when replaying
events for persistenceId [/sharding/HelloEntityCoordinator]. Last
known sequence number [0]
com.lightbend.lagom.javadsl.api.transport.PolicyViolation: <head>
...