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 linehaul-transportation's slice of the network context map: every relationship it has, with the upstream (U) and downstream (D) side, the pattern and the channel. Abbreviations: OHS = Open Host Service, PL = Published Language, CF = Conformist, C/S = Customer/Supplier.

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

Legend: arrows point from upstream to downstream. Solid = events or commands; dotted = synchronous query. order-sourcing and shipping-and-tracking appear twice because they are on both sides: they feed this context and they consume from it. People are rounded boxes.

Omitted: Kafka and Postgres as infrastructure; the analytics-only events (DepartureDeparted, DepartureArrived, LoadClosed), which have no in-org consumer. Separate Ways (no edge at all): offer-availability, customer-ordering, vendor-connectivity, node-performance. The warehouse-systems fleet's network-fulfillment (Supporting in the fleet) has no relationship with this context: the only channel between the two organizations is the Vendor API of vendor-connectivity.

Relationships​

NeighbourDirectionPatternChannelMessagesWhy this pattern
node-topology (Supporting)UpstreamOHS + PL; this context is ConformistKafka retailnetwork.node-topology.eventsNodeRegistered, NodeOperationalProfileDeclared, NodeActivated, NodeSuspended, NodeRetired, LaneOpened, LaneClosednode-topology is the registry for every context; it publishes one language for all of them and does not adapt to this one. Cutoffs, time zones and lanes are taken as given into NodeProfileView and LaneView.
order-sourcing (Core)UpstreamCustomer/Supplier (this context is the Customer)Kafka retailnetwork.order-sourcing.eventsFulfillmentReleasedToNode, FulfillmentReassigned, FulfillmentLocked, FulfillmentCancelledThe model lists this context among the named consumers of these events, and FulfillmentLocked carries pickupDepartureId so BookOnLock can book. The supplier shapes its events for this consumer.
shipping-and-tracking (Generic)UpstreamOHS + PL; this context is ConformistKafka retailnetwork.shipping-and-tracking.eventsLabelIssuedLabels are a generic capability; this context takes trackingNumber, assignmentId and packageNo as given into ExpectedVolumeView. No address crosses.
Network-ops plannerUpstream (person)UI on this context's RESTREST POST /lane-schedules, POST /lane-schedules/{laneId}/retirements, POST /departures/{departureId}/cancellationsDefineLaneSchedule, RetireLaneSchedule, CancelDepartureHuman planning of templates and cancellations.
Sort-centre and station operatorsUpstream (person / scanner)UI on this context's RESTREST POST /loads, POST /loads/{loadId}/packages, /closures, /dispatches, /receiptsOpenLoad, AddPackage, CloseLoad, DispatchLoad, ReceiveLoadPhysical consolidation is recorded by the people doing it.
delivery-promise (Core)DownstreamOHS + PL; delivery-promise is ConformistKafka retailnetwork.linehaul-transportation.eventsDepartureScheduled, DepartureCapacityChanged, DepartureCancelleddelivery-promise builds DepartureView from these events and makes no synchronous call on its hot path. DepartureCancelled triggers its RepromiseOnRisk policy.
order-sourcing (Core)DownstreamOHS + PL; order-sourcing is ConformistKafka retailnetwork.linehaul-transportation.eventsDepartureScheduled, DepartureCapacityChanged, DepartureCancelledFeeds its NetworkGraphView; the same published language as for delivery-promise.
shipping-and-tracking (Generic)DownstreamOHS + PL; shipping-and-tracking is ConformistKafka retailnetwork.linehaul-transportation.eventsLoadDeparted, LoadArrivedLoad movements become scans on each package's journey; the first PICKUP-load departure is the handover instant (HandoverOnFirstScan).
last-mile-delivery (Supporting)DownstreamCustomer/Supplier (last-mile-delivery is the Customer)Kafka retailnetwork.linehaul-transportation.eventsLoadArrivedLoadArrived at a delivery station drives InductOnArrival; the station needs destinationNodeId and trackingNumbers in the payload.
Any contextDownstreamOHSREST GET /departures?origin=&destination=&from=&to=, GET /departures/{departureId}ListDeparturesRead access for tools and diagnostics; no context depends on it for a decision (the decision paths use events).
offer-availability, customer-ordering, vendor-connectivity, node-performance—Separate WaysnonenoneNo message in the model connects them to this context.

Notes on the patterns​

  • Conformist upstream, Open Host downstream. This context conforms to node-topology's and shipping-and-tracking's languages, and in turn offers its own departure and load events as a published language that delivery-promise, order-sourcing and shipping-and-tracking conform to.
  • No Anti-Corruption Layer. All neighbours are in the same organization and share the CloudEvents standard; translation is limited to projecting events into local read models.
  • No Shared Kernel. Identifiers such as nodeId, laneId and trackingNumber are values copied from events, not shared code or shared tables.