When we move from a monolith to microservices we abandon integrating via a shared database, as each service must own its own data to allow them it to be autonomous. But now we have a new problem, our data is distributed. What happens if I need one service needs to talk to another about a shared concept such as a product, a hotel room, or an order? Does every service need to have a list of all our users? Who knows what users have permissions to the entities within the micro service? What happens if my REST endpoint needs to include data from a graph that includes other services to make it responsive? And I am not breaking the boundary of my service when all of this data leaves my service boundary in response to a request?
Naive request-based solutions result in chatty calls as each service engages with multiple other services to fulfil a request, or in large message payloads as services add all the data required to process a message to each message. Neither scale well.
In 2005, Pat Helland wrote a paper ‘Data on the Inside vs. Data on the Outside’ which answers the question by distinguishing between data a service owns and reference data that it can use. Martin Fowler named the resulting architectural style; Event Driven Collaboration. This style is significant because it shifts the pattern from request to receiver-driven flow control.
YOU MAY ALSO LIKE:
- ProgNET London 2019 (in London on 11th - 13th September 2019)
- Event Driven Collaboration (SkillsCast recorded in May 2019)
- Fast Track to Chaos Engineering with Russ Miles (in London on 1st - 3rd July 2019)
- Software Architecture for Developers Workshop with Robert Smallshire (in London on 9th - 10th September 2019)
- Infiniteconf 2019 - A one-day community celebration of Big Data, Machine Learning and AI (in London on 4th July 2019)
- Keynote by Kris Nova on The Power of Linux Virtualization with Cloud Native (in London on 19th June 2019)
- Hands-on: Fractal art with Fable and WebGL (in London on 20th June 2019)
- Securing microservices in a serverless world (SkillsCast recorded in June 2019)
- Solving 5 typical Issues in API development with Domain Driven Design (SkillsCast recorded in June 2019)