Open Host Service & Published Language
Also Known As
Open Host Service
Published Language
OHS
DDD integration
strategic DDD
TL;DR
A bounded context exposing a well-defined protocol (Published Language) for all downstream consumers — rather than custom point-to-point integrations for each.
Explanation
Open Host Service (OHS) defines a clear API contract (the Published Language) that downstream contexts use directly — typically an OpenAPI spec, event schema, or protocol buffer definition. All downstream contexts integrate using this one stable protocol rather than each negotiating a custom translation. Distinguished from Customer-Supplier: OHS publishes a general interface rather than tailoring it to each downstream. Distinguished from Shared Kernel: OHS is one-directional — upstream publishes, downstream consumes without tight coupling.
Common Misconception
✗ Open Host Service and REST API are the same concept — OHS is a DDD strategic pattern about the relationship between bounded contexts; a REST API can implement an OHS but the OHS is the architectural decision about interface ownership.
Why It Matters
Without OHS, each upstream-downstream pair negotiates a custom integration — N contexts * M consumers = N*M custom integrations to maintain. OHS reduces this to 1 well-defined protocol serving all consumers.
Common Mistakes
- Published Language tightly coupled to the internal domain model — decouple the public API representation from internal implementation
- No versioning strategy for the Published Language — breaking changes break all consumers simultaneously
- OHS shaped by one consumer's needs — the OHS should be designed for all consumers
- Treating every outbound API as OHS — reserve for contexts with multiple consumers needing a stable general interface
Code Examples
✗ Vulnerable
// No Published Language — N custom integrations:
// Orders → Billing: custom internal format
// Orders → Shipping: different custom format
// Orders → Analytics: yet another format
// Adding new consumer: negotiate a new custom integration
// N consumers = N integrations to maintain forever
✓ Fixed
// Open Host Service — one stable Published Language:
// Orders publishes OpenAPI spec v1:
// GET /orders/{id} → { order_id, status, line_items, total }
// All consumers use the same protocol:
class BillingService {
public function processOrder(int $orderId): void {
$order = $this->ordersApi->getOrder($orderId); // Published Language
// No custom translation layer needed
}
}
// Adding new consumer: read the spec, integrate directly
// 1 protocol maintains instead of N
Tags
🤝 Adopt this term
£79/year · your link shown here
Added
16 Mar 2026
Edited
22 Mar 2026
Views
38
🤖 AI Guestbook educational data only
|
|
Last 30 days
Agents 0
No pings yet today
No pings yesterday
Amazonbot 8
Perplexity 6
Ahrefs 2
Unknown AI 2
Google 2
Also referenced
How they use it
crawler 20
Related categories
⚡
DEV INTEL
Tools & Severity
🟡 Medium
⚙ Fix effort: High
⚡ Quick Fix
When other bounded contexts need your data, publish a stable public API (Open Host Service) with versioning — don't let consumers access your database or internals directly
📦 Applies To
any
web
api
🔗 Prerequisites
🔍 Detection Hints
Bounded context sharing its database with another context; no stable API contract between contexts; direct model imports across context boundaries
Auto-detectable:
✓ Yes
deptrac
phpstan
⚠ Related Problems
🤖 AI Agent
Confidence: Low
False Positives: High
✗ Manual fix
Fix: High
Context: File
Tests: Update