08. Choosing the Compatibility Strategy
Keeping the monolith informed without coupling it to Fulfillment.
Installment 07 gave Fulfillment a path to owning its own data. ZibiWorks will migrate its open requests and move authority at one controlled boundary, and the monolith will keep reading a compatibility projection in its own tables: a synchronized representation of Fulfillment’s state that legacy code can read and cannot write. That arrangement lets the status screens, the reports, and the Inventory process carry on unchanged, and it keeps a fallback to the legacy implementation possible while the new service earns trust through its first peak season.
Describing the projection is easy. Keeping it true is the harder problem, and it begins with a question that sounds simpler than it is.
How current does the projection need to be, and what happens when it falls behind?
The answer is not the same for every reader, and the differences are what decide which way of maintaining the projection makes sense.
Not all data needs the same guarantees
Section titled “Not all data needs the same guarantees”Different consumers have different expectations, and those expectations should reflect how the information is used.
For example, a customer service lookup might tolerate a status that’s several minutes behind, while an operations or finance report might only need to be accurate by the following morning.
Shipment handoffs and cancellations are different. A parcel that has already been transferred to a carrier cannot be treated as though it’s still waiting in the warehouse. Inventory may need to commit or release stock, the customer may already have been notified, and the warehouse acts on the outcome. These transitions have consequences beyond Fulfillment.
Before choosing how to keep the legacy tables synchronized, we need to distinguish three things:
| Property | What it means | ZibiWorks example |
|---|---|---|
| Freshness | How current does the data need to be? | A status screen can be five minutes behind. A shipment handoff should appear within seconds. |
| Completeness | Are all expected changes present, and can we detect and repair anything missing? | A missed cancellation must be detected, even if every other record is current. |
| Recoverability | Can we restore missing information when something goes wrong? | If synchronization fails, can we identify what the legacy tables are missing and bring them back into sync? |
Being behind isn’t the same as losing data
Section titled “Being behind isn’t the same as losing data”Consider a shipment handed to a carrier at 10:00.
At 10:05, the legacy tables still show it waiting in the warehouse.
If Fulfillment is healthy, the legacy tables are simply behind. We can retrieve the missing update and catch them up.
But if Fulfillment’s database is permanently lost before that update reaches another durable location, we may have lost it for good. The legacy implementation would resume without knowing the shipment had occurred.
That’s why synchronization speed alone isn’t enough. We also need to consider what happens when synchronization or Fulfillment itself fails.
With those distinctions in mind, here are ZibiWorks’ requirements:
| Consumer | Normal operation | Failure and recovery |
|---|---|---|
| Order status screens and customer service | Within a few minutes | Detect and repair missing updates |
| Operations and finance reports | Complete and consistent by morning | Reconcile and repair overnight |
| Shipment handoffs, cancellations, and Inventory | Seconds to about a minute | Detect missing updates and recover them while authoritative data is available |
| Fallback to legacy Fulfillment | Use the latest synchronized state | Minimize the risk of losing handoffs and cancellations; routine statuses may lag up to 15 minutes |
These are illustrative requirements, not universal standards.
Lag is not loss. A projection can fall behind authoritative state for a while and still be caught up. Before any fallback, ZibiWorks has to establish whether the legacy state it has is safe for the operations being resumed, and the lag allowed for routine statuses is not permission to lose a completed business operation.
There’s an important limitation. As long as Fulfillment’s database is available, we can compare its records against the legacy tables, identify missing or outdated information, and correct it.
But if Fulfillment’s database is permanently lost before a change has been copied anywhere else, there’s nothing to compare against and no way to recover that change from the legacy tables.
For ZibiWorks, the requirements are straightforward: keep important updates moving promptly, detect and repair missing information, and minimize the risk of data loss if the business has to fall back.
Those requirements will help us choose how to maintain the compatibility projection.
What we need today and what we expect later
Section titled “What we need today and what we expect later”Before comparing options it is worth being clear about which of these requirements are real today and which are anticipated. The business wants Fulfillment to support split fulfillment across more than one warehouse, richer partial shipments, and additional carriers. None of that is running yet. What exists today is the need to keep legacy consumers working, to keep a fallback available for the workflows the legacy implementation already understands, and to propagate handoffs and cancellations promptly and recoverably.
The anticipated capabilities still matter, but in a particular way. Those capabilities will require Fulfillment’s data model to evolve, so the synchronization strategy should depend as little as possible on how Fulfillment stores its data. ZibiWorks doesn’t need to implement split fulfillment today. But it does need to choose a synchronization strategy that won’t get in the way when split fulfillment arrives. The challenge is meeting today’s requirements without making tomorrow’s changes unnecessarily difficult.
That limit is a business and architecture constraint and not only a synchronization problem, and Installment 07 framed how to think about it. A fallback may restore only a subset of what the new service does, and the business can knowingly accept that in exchange for continuity, depending on the failure. A short infrastructure outage may be better waited out, a tolerable defect may not justify leaving the new platform, and a serious operational failure may justify legacy processing with reduced capability. Introducing partial shipments, split fulfillment, or anything else beyond the legacy model changes what a fallback can accomplish, and the business has to weigh the value of those capabilities against that limitation. This installment does not decide that tradeoff or design a degraded operating mode.
What it does have to protect, however, is an important distinction. Losing the ability to perform some operations during a fallback may be an acceptable compromise. Losing or misinterpreting operational state that already exists is a data integrity problem, and the architecture cannot treat it as a business option. A compatibility projection may give legacy consumers enough to keep working without being able to represent the full internal state of the new service, so the strategy has to let ZibiWorks tell the difference between what the projection represents faithfully, what it summarizes, and what it cannot carry. That is a reason to prefer approaches that make the projection verifiable against Fulfillment’s authoritative state, and not only current.
Choosing how to maintain compatibility
Section titled “Choosing how to maintain compatibility”Whatever mechanism ZibiWorks chooses, something has to maintain the compatibility projection. That responsibility should not belong to legacy code, since the goal is to leave existing business logic largely untouched. It should not belong to Fulfillment either, because Fulfillment should not need to know the legacy tables exist.
That leaves a separate, temporary component. We will call it a migration sidecar: a process that exists only to maintain compatibility while responsibility moves from the monolith to Fulfillment, and that can be deleted once nothing depends on what it maintains. The real question is how the sidecar, or whatever replaces it, finds out what changed. There are four credible answers.
Change data capture with transformation
Section titled “Change data capture with transformation”Change data capture (CDC) reads a database’s transaction log and turns row changes into a stream. It earns its place on the list. It propagates changes reliably and with low latency, it captures a change regardless of which code path made it, so a path nobody remembered to instrument still produces a record, and with snapshots and sufficient log retention it can also handle initial loading and recovery after an outage. A team would choose it because it makes few demands on the Fulfillment code, keeps legacy read paths intact, and gives completeness a strong foundation.
CDC captures changes to Fulfillment’s physical database structures, but the legacy tables need a representation of what those changes mean to the business. That requires a transformation layer. A well-built layer can isolate everything downstream from the physical schema, but it has to change whenever Fulfillment’s persistence does, and the attraction depends heavily on who owns it.
CDC suits circumstances where the schema is expected to stay stable, where legacy consumers need row-level fidelity that no designed contract would capture, or where the organization already operates CDC with an owner behind it.
API synchronization through a migration sidecar
Section titled “API synchronization through a migration sidecar”If interpreting business meaning from rows is the worry, the second approach gives the sidecar an explicit contract instead. It periodically asks Fulfillment’s API what has changed and writes the answer into the legacy tables. The contract belongs to Fulfillment, so its persistence model can change freely behind it, and the same API that supplies routine updates can load the projection initially, compare it with authoritative state, and rebuild it after a failure, all without depending on any event having been delivered. It is also the simplest option to operate, because it needs no broker and nothing the team has not run before.
The cost is in what polling cannot promise. The projection is only as current as the polling interval, which is fine for status screens and not good enough for a handoff. Polling can also miss changes if the API’s incremental change feed is not designed to capture every committed update. That makes periodic reconciliation against authoritative state essential. Polling alone does not guarantee completeness.
This approach fits when freshness requirements are loose, when a fallback can tolerate minutes of loss for everything, and when the team would rather operate nothing new. A business without the shipment-handoff and fallback requirements would be right to stop here.
Domain-event-driven synchronization
Section titled “Domain-event-driven synchronization”Polling is straightforward, but its freshness is bounded by how often it runs, and the transitions that matter most are the ones that cannot wait. The third approach has Fulfillment publish a domain event when something happens that other capabilities care about, such as a shipment being handed to the carrier or a request being cancelled, and has the sidecar consume those events and update the legacy tables. Events express business meaning directly, in terms Fulfillment chose, so the persistence model stays private, and when the pipeline is healthy the update arrives within seconds. Handoffs and cancellations are the natural candidates, because they are the transitions whose consequences extend beyond Fulfillment.
What events give you is promptness, and promptness is a different property from completeness. A stream of newly published events carries no history for requests that existed before publishing began, so it cannot initialize the projection on its own. Nor can it tell that a change was never published, and it is only as complete as the code paths that publish it. Publishing can be made reliable, with safeguards such as writing the event in the same transaction as the state change and having consumers tolerate duplicates, but those safeguards are operational responsibilities that someone has to run. A message that keeps failing needs a recovery strategy beyond ordinary retries. Events also do not promise low latency while the pipeline is failing, because a stalled relay or an unavailable broker delays them like anything else.
Events alone fit when every state change passes through one tightly controlled write path, when the organization already runs messaging infrastructure with an owner, and when initial loading can be a one-time task and repair and rebuilding can be handled separately, as the recurring operational work they are.
Hybrid events and API synchronization
Section titled “Hybrid events and API synchronization”Polling provides a way to load and verify the complete projection, while events keep important updates moving promptly. The fourth approach combines the two. Events carry the time-sensitive transitions, and the sidecar uses Fulfillment’s API for everything events cannot do: the initial load, the periodic comparison with authoritative state, the repair of differences, and the rebuild after a failure. Both paths speak in terms Fulfillment owns, and both write the same projection.
It solves the problem the other two leave open, but it is not free. There are now two mechanisms to build, monitor, and explain to the next person on call. The sidecar has to apply changes from both paths consistently. It is the first messaging infrastructure the platform takes on. The hybrid earns its place only if the requirements demand both halves.
%%{init: {"flowchart": {"rankSpacing": 30, "nodeSpacing": 36}, "themeVariables": {"edgeLabelBackground": "#12232a", "textColor": "#f4fafb", "nodeTextColor": "#f4fafb", "tertiaryTextColor": "#f4fafb"}}}%%
flowchart TD
F["Fulfillment service<br/>Owns authoritative state"]
E["Domain events<br/>Prompt business transitions"]
A["Authoritative API<br/>Load, compare, repair"]
S["Migration sidecar (temporary)<br/>Applies updates from both paths"]
P[("Compatibility projection<br/>Monolith SQL Server tables<br/>Read-only to legacy business logic")]
C["Existing legacy consumers<br/>Screens, Reports, Inventory,<br/>Shipment confirmations"]
F --> E --> S
F -.-> A -.-> S
S -->|"maintains"| P
P -->|"read by"| C
classDef box fill:#12232a,stroke:#4fb3c7,stroke-width:1.5px,color:#f4fafb;
classDef path fill:#16303a,stroke:#4fb3c7,stroke-width:1.5px,color:#f4fafb;
classDef pathdash fill:#16303a,stroke:#8fc4d0,stroke-width:1.5px,color:#f4fafb,stroke-dasharray:5 4;
classDef derived fill:#16303a,stroke:#8fc4d0,stroke-width:1.5px,color:#f4fafb,stroke-dasharray:4 3;
class F,S,C box;
class E path;
class A pathdash;
class P derived;
linkStyle default stroke:#4fb3c7,stroke-width:1.5px;
linkStyle 2,3 stroke:#8fc4d0,stroke-width:1.5px,stroke-dasharray:5 4;
Events support prompt updates, while API-based background processing establishes and verifies completeness. Fulfillment remains the only authoritative owner, and the sidecar is temporary.
Comparing the options
Section titled “Comparing the options”The table below is ZibiWorks’ reading of its own circumstances, and a different organization would score some rows differently. It keeps only the criteria that separate the options. All four approaches preserve existing legacy read paths and minimize changes to legacy business logic. Preventing legacy code from modifying Fulfillment-owned state is a separate requirement, regardless of the synchronization strategy. Continued legacy operation and fallback readiness largely follow from the first two rows.
| Criterion | CDC | API polling | Events | Hybrid |
|---|---|---|---|---|
| Prompt updates | Strong | Interval-bound | Strong when healthy | Strong for outcomes |
| Completeness and repair | Strong* | Strong* | Limited alone | Strong* |
| Processing failure recovery | Checkpoints, retention, resnapshot | Safe checkpoints, retries, reconciliation | Durable retries, poison messages, replay | Event recovery plus API reconciliation |
| Sees every write path | Strong | Strong if discoverable | Depends on publishing | Strong via API pass |
| Business meaning | Interpreted from rows | API contract | Event contract | API and events |
| Persistence independence | Transformation-dependent | Strong | Strong | Strong |
| Reuse beyond migration | Reusable CDC infrastructure; transformation specific to consumer | Reusable domain API | Reusable event contracts | Reusable contracts and projection lifecycle |
| Operational complexity | High | Low | Moderate | Moderate to high |
* Completeness and repair depend on implementation. CDC needs snapshots and sufficient log retention, polling needs a well-designed change feed and a periodic full comparison, and the hybrid needs the same checks. The processing failure recovery row lists what each approach requires, not what it provides automatically. Recovery in every column depends on design and operational safeguards, not on the technology alone.
No option wins every row, and the hybrid’s lead over CDC is narrower than the table makes it look. The comparison alone cannot settle it. What separates the two is who is responsible for turning Fulfillment’s changes into business meaning, and what each choice builds for the rest of the platform.
Who is responsible for business meaning?
Section titled “Who is responsible for business meaning?”CDC deserves a fair hearing here. It reliably captures what changed in Fulfillment’s database, and with a transformation on top it can keep a compatibility projection current. The question is who owns that transformation, because someone has to turn physical changes into what the legacy tables expect.
One option is for Fulfillment to own it. The transformation then evolves with Fulfillment’s persistence model, so the schema coupling stays inside one team, and that is manageable. But it hands the domain we are trying to free a piece of legacy-specific compatibility logic, a temporary migration obligation it would carry until the monolith lets go. The other option is for the migration to own it. Fulfillment is then clear of legacy concerns, but the transformation reads Fulfillment’s physical schema, so the two have to coordinate every time that schema changes. Neither arrangement is wrong. But moving the coupling inside one team is not the same as putting a responsibility in the right place.
Here is the split ZibiWorks wants. Fulfillment owns the meaning of its data: what a handoff, a cancellation, or a partial shipment is, and the contracts it exposes to say so. The migration owns how that meaning is represented for legacy consumers. Under the hybrid, Fulfillment publishes domain events and an authoritative API as part of its normal job, the sidecar consumes them, and the sidecar owns the mapping into the legacy tables. When a parcel is handed to a carrier, Fulfillment says so, and the sidecar decides which legacy columns record it. Fulfillment never learns what those tables look like, and when the sidecar comes down, the contracts stay.
The important question isn’t just how changes move between systems. It’s who owns the meaning of those changes.
The decision
Section titled “The decision”ZibiWorks chooses the hybrid approach.
It meets the immediate requirements. Domain events carry consequential changes, such as shipment handoffs and cancellations, to legacy consumers promptly. API-based background processing initializes the compatibility projection, compares it with authoritative state, and repairs anything missing or inconsistent. Together, they keep legacy consumers informed and give ZibiWorks a way to check and repair the compatibility projection. That puts the business in a better position to fall back if necessary, within the limits established in Installment 07.
Events maintain freshness. Background processing establishes and verifies completeness.
That alone would justify the choice if the problem ended with the migration. It doesn’t.
As ZibiWorks extracts more domains and moves toward domain-driven design, other parts of the platform will need their own views of data those domains own. CQRS read projections are a natural fit, and they are likely to become common. Many of these projections will need the same basic capabilities: loading their initial state, keeping it current, detecting missing information, and repairing or rebuilding when necessary. Some will use events, while others may rely on APIs or different mechanisms. The migration sidecar could become just the first consumer of that reusable infrastructure, rather than a one-off synchronization solution.
ZibiWorks hasn’t standardized this pattern yet, but it’s a natural direction for the architecture. The sidecar gives the team a chance to put it to work, learn from it, and potentially reuse it elsewhere.
Building the hybrid creates a chance to build common utilities along the way: event consumption and checkpointing, idempotent processing, ordering and version handling, projection seeding, reconciliation and discrepancy detection, repair and rebuilding, and monitoring. Those are potential capabilities, not components that exist today. Each consumer would still own its projection, its mappings, and its business needs, and the shared pieces would handle only the common mechanics. Not every event consumer needs this. One that simply reacts to a business event has no projection to maintain, though it can still use the same event-processing utilities.
The compatibility projection and the sidecar are temporary, and both go when the legacy consumers no longer need them. What can outlast them is the domain-owned APIs and event contracts, the shared event-processing infrastructure, the lifecycle utilities, and the team’s experience running event-driven projections. The sidecar is temporary. The capabilities it helps establish can outlive the migration.
CDC with a suitable transformation could solve the immediate synchronization problem, and it remains a defensible choice. But it wouldn’t give ZibiWorks the same opportunity to begin building the shared projection capabilities it expects to need elsewhere. It would also introduce a separate synchronization approach alongside those emerging patterns.
The deciding question is whether the migration investment advances the architecture ZibiWorks intends to build, not simply which technology moves data most reliably.
The costs are real. ZibiWorks takes on messaging infrastructure it does not operate today, shared tooling that has to be built and maintained, and the operational complexity of combining events with background processing. And timely synchronization and reconciliation do not guarantee zero loss: if Fulfillment’s authoritative state is permanently lost before a change is preserved elsewhere, that change is gone.
ZibiWorks considers the investment justified because it serves both the current migration and the direction of the platform. The hybrid approach does more than solve the immediate compatibility problem. It gives the platform a head start on a pattern it expects to use repeatedly as more domains take ownership of their data.
What would change the decision
Section titled “What would change the decision”The reuse argument carries most of the weight, so it is also what could most easily change the outcome. If ZibiWorks already operated a mature CDC platform and meant to use CDC-based projections throughout the modernized architecture, CDC would fit the same direction and be at least as attractive. If cross-domain projections turned out to be rare, the hybrid investment would be harder to justify. Beyond that, a platform team with a stable schema and consumers that need row-level fidelity could reasonably choose CDC. If handoffs and cancellations could lag by minutes, polling would meet the requirements with far less to run. And with no fallback requirement and legacy consumers moved quickly, the projection might not live long enough to justify more than polling.
Where this leaves ZibiWorks
Section titled “Where this leaves ZibiWorks”ZibiWorks has its compatibility strategy. Domain events will keep important changes moving, while API-based background processing will load, verify, and repair the legacy projection. Fulfillment remains authoritative, and the migration sidecar owns the temporary compatibility work.
The choice also gives ZibiWorks an opportunity to develop capabilities it expects to reuse as more domains are extracted.
For any copy of Fulfillment’s data, ZibiWorks should be able to say what contract the reader depends on, who has to change when Fulfillment’s internals do, and what must be true of the copy if the system goes back.
Choosing a strategy is only the beginning. The sidecar has to be loaded and validated before anyone trusts it. Authority has to transfer without two writers appearing. Duplicate and out-of-order updates have to be harmless, missing ones have to be noticed, and the sidecar has to survive its own failures. Falling back has to be something the team can actually perform, and the whole arrangement needs a point at which it comes down. Those are engineering and operational problems, and they are where this decision gets tested.
Join the Discussion
Architecture is about tradeoffs, and reasonable architects can arrive at different conclusions.
Would you have made the same decision? What would you have done differently?
Discuss this installment on LinkedInZibiWorks is fictional. The ideas and opinions expressed throughout the series are my own and do not represent the views, positions, or practices of my employer.