Skip to main content

Context Map

As built

Derived from network/model/model.yaml. This context's service is built; the model carries its as-built contracts, and identifiers (Err... names, routes, CloudEvents types) are the names the service uses.

Following ddd-crew Context Mapping. This is delivery-promise's slice of the domain context map: every relationship this context has, with the upstream (U) and downstream (D) side, the pattern and the channel.

Delivery Promise is downstream of six data owners, from which it builds local read models, and upstream of the three contexts that act on a promise. Two neighbours, customer-ordering and order-sourcing, are both: each relationship has one direction per message flow.

Upstream: the data the promise is built from​

Derived from: model.yaml → contexts[delivery-promise].inbound (rows with relationship: Conformist), .consumes, .read_models.

Partners in the order flow, and downstream​

Derived from: model.yaml → contexts[delivery-promise].inbound (rows with relationship: Customer/Supplier and OHS), .publishes[*].consumers; contexts[customer-ordering].sync_calls; contexts[order-sourcing].inbound; contexts[node-performance].inbound.

Legend: ==> event flow over Kafka, --> synchronous REST, -.-> published with no consuming context. Arrows point from upstream to downstream; for REST the upstream is the server (delivery-promise serves the quote and the promise). Entity names on the arrows stand for every event of that entity this context consumes (full list in the table).

Omitted: infrastructure (Postgres, Kafka); this context's own analytics topic; contexts with no relationship (below).

Relationships​

NeighbourDirectionPatternChannelMessagesWhy this pattern
node-topology (Supporting)U → D (DP downstream)Open Host + Published Language / ConformistKafka retailnetwork.node-topology.eventsNodeRegistered, NodeOperationalProfileDeclared, NodeActivated, NodeSuspended, NodeRetired, LaneOpened, LaneClosed, ServiceAreaAssigned, RegionDefinedMaster data with many consumers. DP takes the node, lane and service-area vocabulary as published and builds NodeProfileView, LaneView, RegionAndServiceAreaView.
offer-availability (Supporting)U → DOHS + PL / ConformistKafka retailnetwork.offer-availability.eventsCatalogItemCreated, CatalogItemDiscontinued, ListingCreated, ListingAvailabilityChanged, ListingSuppressed, ListingRestoredAvailability per listing is used as published, basis included (AvailabilityView); DP never re-derives it.
linehaul-transportation (Supporting)U → DOHS + PL / ConformistKafka retailnetwork.linehaul-transportation.eventsDepartureScheduled, DepartureCapacityChanged, DepartureCancelledDepartures and remaining capacity are the edges of the search graph (DepartureView). A cancelled departure on a witness path triggers RepromiseOnRisk.
last-mile-delivery (Supporting)U → DOHS + PL / ConformistKafka retailnetwork.last-mile-delivery.eventsDeliveryWaveScheduled, DeliveryWaveCapacityChangedWaves give the promise window and stop capacity (DeliveryWaveView).
node-performance (Supporting)U → DOHS + PL / ConformistKafka retailnetwork.node-performance.eventsNodeScorecardUpdatedThe grade is used as published (ScorecardView); the handicap rule is DP's own.
shipping-and-tracking (Generic)U → DOHS + PL / ConformistKafka retailnetwork.shipping-and-tracking.eventsPackageDelivered, PackageExceptionRaisedDelivery and exception facts drive JudgeOnDelivery and RepromiseOnRisk.
customer-ordering (Generic)DP U → CO DCustomer/Supplier (CO is the Customer)REST POST /delivery-quotes, POST /promises (in-org); Kafka retailnetwork.delivery-promise.eventsQuoteDeliveryOffers, MakePromise; PromiseAtRisk, PromiseRevised, PromiseKept, PromiseBrokenCheckout needs an answer inside the shopper's request (the only synchronous calls into DP, listed in customer-ordering.sync_calls), and CO's order status depends on promise changes. The contract is negotiated for this one customer.
customer-ordering (Generic)CO U → DP DCustomer/SupplierKafka retailnetwork.customer-ordering.eventsCustomerOrderPlaced, CustomerOrderCancelledPlacing the order confirms the provisional promises; cancelling releases them.
order-sourcing (Core)OS U → DP DCustomer/SupplierKafka retailnetwork.order-sourcing.eventsFulfillmentUnsourceable, FulfillmentLockedAn unsourceable group comes back to DP to re-promise; sourcing never breaks a promise silently (ADR 0002).
order-sourcing (Core)DP U → OS DCustomer/SupplierKafka retailnetwork.delivery-promise.eventsPromiseRevised, PromiseBookExhaustedA revised deliverByLatest changes the sourcing constraint; an exhausted book raises the cost of that cutoff in sourcing's AssignmentCost.
Shopper / storefrontDP U → storefront DOpen HostREST POST /delivery-quotesQuoteDeliveryOffersAny client may ask for a quote; no contract is negotiated per client.
node-performance (Supporting)DP U → NP DOHS + PL / ConformistKafka retailnetwork.delivery-promise.eventsPromiseKept, PromiseBrokenNP counts kept and broken promises per node in promiseKeptRate and conforms to DP's events.
analytics (no context)DP U → nonePublished LanguageKafka retailnetwork.delivery-promise.eventsPromiseMade, PromiseConfirmed, PromiseReleased, PromiseCancelledPublished for the record; the model names no consuming context ("analytics only").
vendor-connectivity (Supporting)noneSeparate Ways——DP never sees a purchase order or a vendor; the vendor side starts after order-sourcing releases a group.
network-fulfillment (warehouse-systems fleet, other organization; Supporting in the fleet)noneSeparate Ways (hard boundary)——No retail-network context reads a warehouse.* topic or calls a fleet service; the only seam is the Vendor API, which DP does not use.

Notes on the patterns​

  • Conformist, with no ACL, toward the data owners. Every upstream publishes the vocabulary this context needs (nodes, cutoffs, departures, waves, grades) under the same domain language. Translating it would add nothing; the read models store it as published. A Shared Kernel is explicitly avoided: order-sourcing builds its own NetworkGraphView from the same events, and the two contexts share no code or table.
  • Customer/Supplier, both ways, with the two order-flow contexts. The contracts were shaped for each other: PromiseMade's fields are what checkout needs, CustomerOrderPlaced carries each group's promiseId, and FulfillmentUnsourceable carries the promiseId back. That is negotiation, not conformity. It is not a Partnership: each side can release its half on its own schedule because every message is versioned (dataschema ...:v1).
  • No synchronous call out. Every input of the promise hot path is a local read model (conventions.integration_rules). A neighbour that is down slows freshness, not quotes.