Java Data across services
Each service owning its data is the point of the architecture, and it removes the join and the transaction you used to rely on.
3 concepts · 9 interview questions
What this topic covers
Every concept in data across services, and the questions each one gets asked as. Where a question links, it has a full write-up.
Sagas and compensation
A business transaction spanning services becomes a sequence of local transactions, each with a compensating action for when a later step fails.
- How do you handle a transaction that spans three services?
- Choreography or orchestration?
- What makes a good compensating action?
Consistency and CAP
During a partition a distributed system chooses between refusing requests and serving possibly stale data. Most systems choose availability and then have to explain staleness to users.
- What does CAP actually say, and how is it usually misquoted?
- What is eventual consistency, and how do you design a UI around it?
- When do you genuinely need strong consistency?