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 last-mile-delivery's slice of the network context map: every relationship this context has, with the upstream (U) and downstream (D) side, the pattern and the channel.

Derived from: model.yaml → contexts[last-mile-delivery].inbound, .publishes, .consumes, .rest; the consumes of delivery-promise, order-sourcing and shipping-and-tracking; the publishes of node-topology and linehaul-transportation.

Legend: arrows point from upstream to downstream; the two actors are drawn as rounded boxes. Path parameters are written routeId inside the diagram for {routeId}. Abbreviations: OHS = Open Host Service, PL = Published Language, CF = Conformist, C/S = Customer/Supplier.

Omitted: the analytics-only events (DeliveryWaveCancelled, RoutePlanned), which have no context consumer; Postgres and Kafka as infrastructure; and the contexts with no edge to this one (below).

Relationships​

NeighbourClassificationDirectionPatternChannelMessagesWhy this pattern
node-topologySupportingUpstream (we are D)OHS + PL / ConformistKafka retailnetwork.node-topology.eventsNodeRegistered, ServiceAreaAssignedNode and service-area master data is one network-wide truth; every consumer takes it as published. The model marks the row Conformist.
linehaul-transportationSupportingUpstream (we are D)Customer/Supplier (we are the Customer)Kafka retailnetwork.linehaul-transportation.eventsLoadArrivedThe model marks it Customer/Supplier: LoadArrived carries destinationNodeId and trackingNumbers, which exist so that a station can induct. The supplier lists this context as a named consumer.
delivery-promiseCoreDownstream (we are U)OHS + PL / ConformistKafka retailnetwork.last-mile-delivery.eventsDeliveryWaveScheduled, DeliveryWaveCapacityChangedThe promise conforms to the published wave and keeps a local DeliveryWaveView. The hot path makes no synchronous call (model integration rule).
order-sourcingCoreDownstream (we are U)OHS + PL / ConformistKafka retailnetwork.last-mile-delivery.eventsDeliveryWaveScheduled, DeliveryWaveCapacityChangedSame wave facts, kept in its NetworkGraphView to pick a deliveryWaveId per candidate.
shipping-and-trackingGenericDownstream (we are U)OHS + PL / ConformistKafka retailnetwork.last-mile-delivery.eventsPackageOutForDelivery, DeliveryAttemptedThe journey conforms to our facts and turns them into scans; the model marks its row Conformist.
Station plannerpersonCalls usUI on Open HostREST POST /waves, GET /waves, POST /waves/{waveId}/induction-closures, POST /waves/{waveId}/dispatches, POST /routes, POST /partnersScheduleWave, CloseInduction, DispatchWave, PlanRoute, ContractPartner, list wavesModel relationship UI.
DSP driver appexternal organisationCalls usUI on Open HostREST POST /routes/{routeId}/starts, POST /routes/{routeId}/attemptsStartRoute, RecordAttemptModel relationship UI. A partner is an independent business using our published API.

Separate Ways​

ContextClassificationWhy no edge
customer-orderingGenericHolds the ship-to address; this context never sees PII (ADR 0006). Delivery reaches the customer through shipping-and-tracking.
offer-availabilitySupportingCatalogue and listings play no part at the station.
vendor-connectivitySupportingVendors never operate a station (ADR 0004).
node-performanceSupportingScores vendor nodes, not stations.
network-fulfillment (warehouse-systems fleet, other organization)Supporting (in the fleet)Hard boundary: the only seam is the Vendor API (WMS/WES integration).

Notes on the patterns​

  • Open Host + Published Language toward three consumers. The wave and attempt events are versioned CloudEvents (dataschema urn:retailnetwork:last-mile-delivery:events:<EventName>:v1). No consumer negotiates their shape, so they are a Published Language, not a Customer/Supplier contract.
  • Customer/Supplier with linehaul. This is the one upstream edge where the model records negotiation: the load's arrival is published with the tracking numbers so that induction can work.
  • No Shared Kernel. Identifiers such as trackingNumber and stationNodeId are carried by value. No code or table is shared.