Open-Host Service
This pattern addresses cases in which the power is skewed toward the consumers. The supplier is interested in protecting its consumers and providing the best service possible.
To protect the consumers from changes in its implementation model, the upstream supplier decouples the implementation model from the public interface. This decou‐ pling allows the supplier to evolve its implementation and public models at different rates, as shown in Figure 4-6.
![]() |
Figure 4-6. Integration through an open-host service
The supplier’s public interface is not intended to conform to its ubiquitous language. Instead, it is intended to expose a protocol convenient for the consumers, expressed in an integration-oriented language. As such, the public protocol is called the pub‐ lished language.
In a sense, the open-host service pattern is a reversal of the anticorruption layer pat‐ tern: instead of the consumer, the supplier implements the translation of its internal model.
Decoupling the bounded context’s implementation and integration models gives the upstream bounded context the freedom to evolve its implementation without affect‐ ing the downstream contexts. Of course, that’s only possible if the modified imple‐ mentation model can be translated into the published language the consumers are already using.
Furthermore, the integration model’s decoupling allows the upstream bounded con‐ text to simultaneously expose multiple versions of the published language, allowing the consumer to migrate to the new version gradually (see Figure 4-7).
Figure 4-7. Open-host service exposing multiple versions of the published language