3 Side notes JAX London 2016
Quick notes from session 3 of JAX London 2016. Developing microservices with aggregates, talk preseneted by Chirs Richardson.
· Q.Assistance · 1 minutes·
Overview
Session link 11th Oct — 10:00 to 10:50 Developing microservices with aggregates By Chirs Richardson
Notes
- Jax Center articles about this session:
- The service boundary enforces modularization:
“2 phase commit is not an option in Micro-service solutions.”
- An aggregate of micro-services is a cluster of objects treated like a unit.
- An Aggregate has a root service and it is treated like one module of the domain model.
- Aggregate rules:
- Reference other aggregates via identity (primary key), instead of via object reference.
- One command by one aggregate. One transaction is contained within a service/aggregate.
- Atomic actions happen inside one aggregate/service.
- Consistency across aggregates is achieved via an Event Driven Architecture:
- Publish events when things happen.
- The events trigger the next step.
- Multi-step workflows.
- Event sourcing is event-centric persistence:
- Events become the first class citizens.
- Store events in persistence layer as a long history.
- Fold / Reduce the list of events to get the current state.
- Command Query Responsibility Segregation (CQRS) used to maintain views for querying.
- Audit log by definition of the solution.
- Event store solution http://eventuate.io/
- Documentation on event sourcing and Micro-services
- Documented examples here.
- Micro-services are not easy! It is fervently advised to review all the drawbacks of this new concept:
- Required to rewrite the application.
- Required considerable learning curve.
- Events evolve and change business requirements. Then a version system to work with legacy events will be required.
- Querying is challenging because it is required to maintain views for each kind of query by using CQRS.
That was all for this session.
Many thanks for reading, please leave a comment if you have any quality hint.
Keep on testing, better!
More posts
-
AI-Driven Parallel Dev Infrastructure at Home
Secure VM isolation, remote access anywhere, and parallel project execution with convenient Wake-on-LAN startup.
-
Handling error details in Node.js
This post explores how to manage errors in node js and bubble up the important error detials necessary for higher layers of abstraction.
-
The CIA triad in Information Security
In the vast and complex world of cybersecurity, these three terms help people communicate better using common and more conventional terminology.