As Fulfillment separates from the monolith, supporting capabilities appear that don't fit neatly inside it. Which deserve a boundary of their own, and which are just shared code?
This article is part of ZibiWorks, an ongoing fictional modernization case study. The ZibiWorks site is the canonical home of the series, with the full company context, starting architecture, and related installments. Explore the full series at ZibiWorks.
In Installment 04: Boundaries and Meaning we identified the business boundaries inside ZibiWorks. In Installment 05: The First Seam we established the first technical seam around Fulfillment, giving us a way to evolve its implementation without forcing the rest of the monolith to change alongside it.
Identifying boundaries is only part of the problem.
The next boundary problem
As we separate Fulfillment from the monolith, we keep running into functionality that doesn't sit cleanly inside its core business responsibilities. Some of it supports several domains. Some of it talks to external systems. Some of it just looks like code we ought to share.
The temptation is to turn each of those capabilities into another service. If we are decomposing a monolith into services anyway, why not create one for every reusable capability?
Because reuse tells us little about where a boundary belongs. Shared functionality may justify a utility package, but a separate domain needs a responsibility of its own. Creating a service without that responsibility only replaces an in-process dependency with a distributed one. Before extracting more functionality, ZibiWorks needs a way to tell business domains, utility domains, and utility packages apart.
A familiar problem: Handle With Care
ZibiWorks already works with Handle With Care, a shipping partner that specializes in transporting robots. That arrangement has worked well, but the business is expanding, and accessories and other product types may need different shipping providers. Fulfillment now has to support more than one carrier.
At first glance this is a straightforward integration problem: introduce an interface, write an adapter per provider, and select the right implementation. The harder question is where that capability should live.
The options
- Keep shipping integration inside Fulfillment
- Extract the integration code into a shared library
- Establish Shipping Integration as a utility domain exposing a stable capability API
- Treat shipping as a ZibiWorks business domain that owns shipping itself
Each option draws a different kind of boundary, with different responsibilities and tradeoffs. One of them turns on a question worth asking early: does ZibiWorks own shipping, or does it depend on businesses that do? Before choosing, we need to understand what we are actually separating.
Three kinds of architectural responsibility
It helps to separate three categories that are easy to conflate.
Business domain
A business domain owns a recognizable business capability. It has its own vocabulary, rules, decisions, and lifecycle, and it is often the authoritative source of truth for business entities or state. Inventory determines what stock exists, what is available, and what has been reserved. Fulfillment owns the process of fulfilling an order. Those responsibilities carry business meaning independent of how they happen to be implemented.
A business domain does not automatically require its own microservice. Its boundary can live inside the monolith first, exactly as Fulfillment's does today.
Utility domain
A utility domain provides a supporting capability that benefits from independent operation without assuming authority over the business rules or entities it supports. Integration processing, notification delivery, document generation, managed file transfer, and specialized media processing all fit here. A utility domain may have its own APIs, workers, persistence, deployment lifecycle, and scaling needs.
Data ownership can also be misleading. Consider an integration capability that maintains read projections of information owned by Fulfillment and Inventory. Its database serves integration processing, but the business domains remain the sources of truth. Keeping a local copy does not give it authority over the business meaning of that data. The same holds for delivery attempts, retry state, and processing history: that is operational state the capability owns, not ownership of the business entities being exchanged.
A utility domain exists because the supporting capability benefits from an independent operational boundary, not merely because several consumers could reuse it.
"Utility domain" is a practical architectural classification here, not a formal Domain-Driven Design category.
Utility package
A utility package encapsulates reusable implementation functionality without needing a runtime of its own. In a .NET codebase that might be a NuGet package for serialization, validation, API clients, retry helpers, or provider adapters. It can establish a useful code-level abstraction without introducing another independently operated component.
That does not make a package free of coupling. A shared library carrying evolving business models can force otherwise independent domains to coordinate their releases. The question is never whether code can be reused. It is whether sharing that code preserves the independence we are trying to create.
The smell of a domain
Classification rarely comes down to a single characteristic. Having a database doesn't make something a business domain. Being used by several applications doesn't justify a service. Owning a recognizable business capability doesn't necessarily mean it needs its own deployment. Instead of any one test, it is worth reading the signals together.
| Architectural signal | Business domain | Utility domain | Utility package |
|---|---|---|---|
| Owns meaningful business rules and decisions | Strong signal | Supporting or operational policy only | Not independently |
| Source of truth for business data (within ZibiWorks) | Strong signal | Uncommon | No |
| Owns a distinct business lifecycle | Strong signal | Usually an operational lifecycle | No independent lifecycle |
| Has its own business vocabulary | Strong signal | Usually technical or integration terms | Implementation terms |
| Maintains CQRS read projections | Possible | Possible | Not independently |
| Persists operational state | Possible | Common | Not independently |
| Benefits from independent scaling | Often desirable | Often desirable | No independent scaling |
| Benefits from failure isolation | Often desirable | Often desirable | Shares the host's failure boundary |
| Benefits from an independent deployment lifecycle | Often desirable | Often desirable | Ships with its consumers |
| Used by multiple domains | Possible | Common | Common |
| Primarily encapsulates reusable functions | Weak signal | Sometimes | Strong signal |
These are signals, not requirements. The one worth stating plainly is that authoritative business data is a strong indicator of a business domain, but owning a database is not. A service can own operational records or derived projections without owning the business entities those records describe. Business authority can also sit outside ZibiWorks entirely. In those cases, a capability that primarily provides access to an external provider may be better treated as a utility domain, particularly when it does not own business rules or decisions within ZibiWorks. Scaling, failure isolation, and deployment apply to both kinds of domain, so they do not classify a capability on their own.
The same reading works as a quick decision order.
Business authority first, cohesive operational responsibility second, and reusable implementation functionality third. If none justifies a separate boundary or package, the functionality stays in an existing domain. The goal is not to maximize extraction, but to introduce boundaries only where they provide value.
The first question is scoped to ZibiWorks. A capability can rest on real business rules that belong to someone else, as shipping does, and still be a utility domain here when ZibiWorks owns the integration rather than the underlying business. The order is deliberately conservative, and the default is to leave functionality where it is. The test classifies architectural responsibility; it does not decide deployment. It is a heuristic, not an automatic microservice or package generator, and an architect still has to confirm a new boundary solves a real problem.
Applying the test to shipping
Back to Handle With Care. The immediate requirement is modest: Fulfillment must support the existing robot-shipping provider while allowing additional carriers for other products, and provider-specific terminology, data structures, APIs, and behavior must stay out of Fulfillment's business model. That points to an anti-corruption layer (ACL): a translation boundary so Fulfillment never has to understand Handle With Care's particular request format, status codes, or error conventions.
š” Pattern versus ownership
An ACL is a pattern, though, not a place. It tells us translation has to happen somewhere; it does not tell us who owns it or where it lives.
Run the ownership question through the options.
A. Fulfillment-owned ACL
- A provider-independent shipping contract with provider-specific adapters behind it, inside Fulfillment
- Clear ownership, minimal operational complexity, no new network dependency
- Other domains needing similar integration would need their own adapters or an explicit sharing strategy
B. Shared integration package
- The integration code extracted into a reusable library, perhaps a NuGet package
- Reuse without another deployed service; a way to standardize stable integration mechanics
- Consumers depend on the package's contracts; business models in the library would reconnect the domains
C. Shipping Integration utility domain
- A cohesive integration capability exposing a stable, capability-oriented API to Fulfillment
- Owns provider translation, carrier selection, credentials, retries, processing history, and failure isolation
- Isolates partner identities and changes from Fulfillment; serves it today, other domains later if needed
D. Shipping as a ZibiWorks business domain
- ZibiWorks would own shipping itself: transportation, logistics, delivery execution
- The providers already own those capabilities; ZibiWorks consumes them, it does not run them
- Specialized handling from one provider does not move that ownership inside ZibiWorks
Options A and B keep shipping inside a boundary Fulfillment already owns, as code. Option C gives the integration its own cohesive boundary and a stable contract, which is what isolates Fulfillment from the particulars of each provider. Option D is the one to be careful with, and not for the reason it first appears. The shipping business capability is real, but today ZibiWorks does not own it. Handle With Care and the other carriers do. They run transportation, logistics, and delivery as their business. ZibiWorks owns the requirement to get products shipped, and that requirement belongs to Fulfillment.
That is a statement about where ZibiWorks is now, not a rule that outsourcing transportation forecloses an internal Shipping domain forever. ZibiWorks could one day own substantial shipping business of its own: logistics planning, delivery commitments, carrier contract policy, exception workflows distinct from any single provider. If that capability grows distinct enough to own decisions and data in its own right, a Shipping business domain would be worth establishing then. It is not there yet. For now the business requirements sit in Fulfillment and the integration responsibility sits in Shipping Integration, and adding carriers is more integration, not a new ZibiWorks business domain.
If ZibiWorks eventually establishes its own Shipping domain, it could participate through the same capability-oriented contract as external providers. Shipping Integration could select it based on supported capabilities, regions, and service levels, without Fulfillment needing to know whether the shipping capability is internal or external.
The decision
ZibiWorks establishes Shipping Integration as a utility domain. The split of responsibility is the point. Fulfillment keeps the business authority: what needs to ship, the handling requirements, and which capability or service level is acceptable. Shipping Integration owns the integration itself: translating to each provider's API, selecting an eligible carrier that satisfies the requested capability, and managing credentials, retries, execution, and the record of what happened. The external providers run the transportation and logistics. Fulfillment defines the business requirements. Shipping Integration determines how to satisfy them without exposing provider-specific interfaces or behavior.
Handle With Care is one provider among potentially many, specialized in robots, but a provider, not a ZibiWorks business domain. Adding carriers adds integration work, not business-domain responsibility.
Option A could also isolate provider-specific concerns; a Fulfillment-owned ACL is a reasonable choice for a simpler standalone application with one or two fixed carriers. The reason ZibiWorks draws the stronger boundary is that the integration has become a cohesive responsibility in its own right, and the business wants to leave the door open to productization. That is what justifies a distinct boundary here, not an assumption that the other options cannot abstract anything.
Drawing the boundary is an architectural decision, not an immediate deployment. ZibiWorks establishes the boundary now, with a clear contract and clear ownership, without committing to a separate deployment. Whether and when to extract it into its own service is a decision for a later stage of modernization.
In practice, Fulfillment asks the boundary what is possible rather than naming a carrier. A capability request carrying destination, product characteristics, and handling constraints returns business-friendly options. Fulfillment applies its policy and chooses an acceptable capability, then sends a shipment request back through the same boundary. Shipping Integration resolves that choice to an eligible carrier and manages execution. Fulfillment depends on a stable shipping contract rather than provider-specific interfaces, terminology, or behavior.
ā¹ļø Leaving the door open to productization
ZibiWorks has not committed to productization, and this boundary does not require it. It keeps the option open. If the platform did become a product, different customers, regions, and deployments might need different providers, protocols, and capabilities. With Shipping Integration owning that variability behind a stable contract, those differences would evolve in the integration layer instead of becoming repeated changes to Fulfillment and the rest of the business logic. Partners could be added, replaced, or selected on capability, geography, or commercial terms, and the business domains would keep asking for the same thing.
The goal is not to make every partner interchangeable. It is to make partner variability independent of the core product.
Sharing without recreating coupling
There is a quiet failure mode in modernization work. We separate tightly coupled business capabilities, then reconnect them through shared libraries, shared models, or centralized services, and end up back where we started with more moving parts.
A common package of technical helpers can be harmless. A common package of business entities, validation rules, and assumptions about how several domains operate is something else: a shared dependency every domain has to accommodate, and a reason they must now coordinate releases. The same caution applies to services. Putting a reusable function behind an API does not automatically make an architecture more modular. Sometimes it only trades an in-process dependency for a distributed one.
The objective is not maximum reuse, and not maximum separation.
A boundary should provide more independence than the complexity it introduces. The goal is clear ownership and capabilities that can evolve on their own.
Closing Part II: knowing what to separate
Three related decisions now sit behind us. Installment 04 discovered the business boundaries. Installment 05 established the first technical seam around Fulfillment. Here we decided how the supporting capabilities around those boundaries should be organized: ZibiWorks business domains, utility domains that provide shared capabilities without taking ownership of business decisions, and plain reusable code.
The monolith still holds the existing behavior, business data is still entangled with legacy assumptions, external partners still depend on the current system, and the new Fulfillment implementation will have to coexist with the old one while responsibilities move across the boundary a piece at a time.
Next: Part III, pulling apart safely
Part II defined where the boundaries belong. Part III takes on the mechanics of making them real while the legacy system keeps running: separating shared data, managing migration and coexistence, routing requests across old and new implementations, and isolating external partners. The next installment starts with the hardest of these, the shared data that still crosses the boundaries we just drew. A later installment, Untangling the Partners, returns to Handle With Care to implement the Shipping Integration boundary while legacy and modernized paths run side by side.
The boundaries are defined. Now ZibiWorks has to separate the data and behavior behind them without disrupting the system that still runs the business.
ZibiWorks 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.

Top comments (0)