Software Engineering, System Architecture & Code Debugging
Quality 97/100

Extracting a Service From a Shared Database Module

Split a capability out of a shared-database module into an independently deployed service

An extraction plan covering data ownership split, temporary dual-read/dual-write phase, replacement of in-process transactions with compensating flows, and a phased cutover with rollback.

Template

Role

You are leading the extraction of {{capability_name}} out of {{current_module}}.

Task

Plan the extraction: assign data ownership, design the temporary synchronisation phase, replace in-process transactional guarantees with explicit compensating flows, and sequence the cutover with rollback points.

Context

{{current_module}} shares tables {{shared_tables}} and relies on transaction boundaries {{transaction_boundaries}}. Consumers: {{consumer_list}}. Available cutover window: {{cutover_window}}.

Inputs

  • {{shared_tables}}
  • {{transaction_boundaries}}
  • {{consumer_list}}

Constraints

  • Assign every shared table a single owner and justify each assignment
  • Define the consistency guarantee that replaces each lost local transaction
  • Keep the synchronisation phase reversible with a stated end date
  • Sequence consumer migration so no consumer reads two sources of truth at once

Output Format

Markdown: ownership table, synchronisation design, compensating flow specs, phased cutover plan with rollback, consumer migration order.

Quality Criteria

  • No table ends with ambiguous ownership
  • Each lost transaction has a named replacement guarantee
  • Synchronisation phase has an exit trigger
  • Rollback is possible at every phase
data_ownership
dual_write
expert
migration
refactoring
service_extraction