Standalone conceptRelationshipChapter I · Domain · Building block 14 of 18

Open Host Service

An upstream designs and publishes an explicit service contract for multiple consumers.

  1. ProviderPublishes contract and version.
  2. ConsumersUse shared capability.
  3. ProtocolGoverns integration and compatibility.

Context

Why this is important

Provide a reusable upstream capability as a stable contract for several consumers.

A relationship between Bounded Contexts in strategic Domain-Driven Design.

Shop example · Mapping

Shared service and bespoke integration

The shop remains a modular monolith with seven modules and a shared deployment; this relationship describes model ownership.

This is how you read the picture

  1. Provider Upstream
  2. Consumers Downstream
  3. Protocol Published contract
Shared service and bespoke integration
AspectOpen Host ServicePoint-to-point
ConsumersMany use shared contractCoordinate each connection separately
ChangeVersioned and documentedMultiple bespoke cases
Domain modelTranslate when neededOften directly coupled
A shared contract reduces parallel integration agreements.

Benefits & limitations

Helps if:

  • Several consumers need a shared capability with clear ownership.
  • Contract, versioning and compatibility can be documented openly within the organisation.

Boundaries

  • A shared service becomes a bottleneck when every consumer demands bespoke contracts or changes.
  • A technical API contract does not replace business translation between different models.

In practice

  1. Identify recurring capabilities and consumers before defining a shared contract. Record which needs are common to all consumers and which they translate at their own boundary.
  2. Document operations, semantics, error responses, versioning, and compatibility rules in a service contract accessible to all consumers. Have owners announce changes and deprecations early.
  3. Test the contract with at least two consumers and observe shared needs as well as special cases. Evolve the offer based on real integrations without adding every local model to the upstream contract.
Read the detailed explanation

Open Host Service is a Context Map pattern for a reusable upstream capability. The provider publishes an explicit service contract with protocol, versioning, and operational ownership for multiple downstream contexts to integrate against. The offer reduces individual point-to-point agreements when consumers can work with a shared contract.

Published Language is a separate Context Map pattern: it defines a shared language or exchange format for integration and can be combined with an Open Host Service. Consumers translate that format into their own model when needed. A service contract alone does not unify domain models.

The pattern names an upstream capability for many clients in the Context Map; an Anti-Corruption Layer protects a consumer from foreign domain language.

Check your understanding

Test yourself in three stages

  1. ReadingCheck in the picture

    Who owns versioning of the shared service?

    View the solution with justification

    The upstream provider documents and owns its published contract.

  2. ApplyingTransferred to a new situation

    Wie kann die Ordering den Katalogvertrag nutzen und ihr Modell schützen?

    View the solution with justification

    It uses needed contract fields and translates them into its index model.

  3. EvaluateWeighing an alternative

    When does a shared service become a bottleneck?

    View the solution with justification

    When bespoke demands from many consumers dominate shared evolution.

Explore further

These building blocks continue the thoughts of this page.

Continue on the learning path

Next in Domain Modelling & DDD: Conformist.

18 Building blocks

Continue withConformist