Synchronizing a Cross-Service Data Edit Atomically
Made an edit to an organizational node in the asset hierarchy propagate consistently across denormalized copies in seven tables and two services, via a single atomic transaction with post-commit events, the work that made me the team's reference for cross-service synchronization.
Context
This is the experience that established me as the go-to person for cross-service data consistency on my team, a reputation I then carried across several related pieces of work. It is strong evidence that I can hold a consistency boundary in my head across services that don't share a transaction, decompose a large epic into tracked, reviewable work, and reason about event ordering rather than just "make the write happen".
It also taught me to see a bloated use case as a design smell: the follow-up refactor, where I pulled apart an oversized use case and uncovered a real dependency-injection bug, is part of why this changed how I think about domain boundaries.
Problem
The product lets users reorganize their asset hierarchy: rename an organizational node, edit its description, or move it to a different position in the tree. For performance, data about that node was denormalized, with copies and derived references living across roughly seven tables, split between two independently deployed backend services.
A single user edit therefore had to fan out into many coordinated writes across a service boundary. If only some of those writes landed, the product would display inconsistent data: a node named one thing here and another there, or attached to the wrong branch of the tree. There was no shared transaction spanning the two services to lean on.
03Constraints
Decision
I decomposed the epic into a sequence of tracked subtasks and treated the consistency guarantee, rather than the individual writes, as the thing I was actually building.
05Trade-offs
Impact
07Lessons Learned
Reusable engineering knowledge I carry forward from this: