RTS Questionnaire · Question 36 of 52 · file: answers/q36.html
Have you worked with both transactions within a single application/database and transactions or consistency requirements spanning multiple services/databases?
TransactionsDistributedDatabases
β Yes β I handle both scopes routinely and I am explicit about where each belongs.
π§ͺ Interactive proof: this answer has its own page with a live transaction-scope workflow, the isolation choices and retry policy, the rebuildable read model and the map of which operation gets which guarantee β open the Q36 transaction-scope proof →
Technical detail
- π Single application/database transactions β ACID boundaries per use case: EF Core
DbContext+ oneSaveChangesinside an explicit transaction, ADO.NETBeginTransactionfor multi-statement operations, and Spring@Transactionalwith correct propagation and rollback rules on the JVM. I choose isolation levels deliberately (read committed by default, snapshot/serializable where invariants demand it) and know the cost of each. - π§± In-process consistency β optimistic concurrency with row versions/timestamps, unique constraints as the last line of defence, deadlock-aware retry policies, and keeping transactions short so locks are released quickly.
- π Multi-service / multi-database consistency β no distributed locks: I combine the outbox pattern for atomic "state + event", saga orchestration with compensations for business rollback, idempotent message consumers, and reconciliation to detect and repair divergence between services and their projections.
- π Read-model consistency β CQRS projections rebuilt from the event log, materialised views, and "read your own writes" handling in the UI (for example returning the accepted command id and streaming status) so users never see a confusing stale state.
π― Design principle: strong consistency inside the boundary, well-governed eventual consistency across it β with observability (correlation IDs, transaction tracing) so any divergence is detectable in minutes rather than at month-end reconciliation.
π§Ύ CV evidence: CV: layered transactional Java/JEE enterprise systems (JPA/EJB transactions), banking integrations through Oracle SOA/OSB, AWS event-driven microservices with SQS/SNS/Step Functions, and Kafka/RabbitMQ messaging across services.