Skip to main content

Context map

This context's slice of the retail network's context map, following Context Mapping. The network-wide map is on warehouse-docs. Every edge is asynchronous (Kafka) except the two human or app clients; the producer and consumer sides of each edge were found in the sibling repositories on develop.

Source: internal/adapters/inbound/kafka/consumers.go, internal/adapters/outbound/kafka/encoder.go, internal/adapters/inbound/http/server.go, apis/asyncapi.yaml. Legend: arrows point from upstream to downstream. OHS = Open Host Service, PL = Published Language, CF = Conformist, C/S = Customer/Supplier. Omitted: RoutePlanned on the analytics topic (read only by this context's own projector), and Postgres and Kafka as infrastructure.

Relationships​

NeighbourClassDirectionPatternChannelMessages
node-topologySupportingupstream (we are downstream)OHS + PL / ConformistKafka retailnetwork.node-topology.eventsNodeRegistered, ServiceAreaAssigned
linehaul-transportationSupportingupstreamCustomer/Supplier, we are the CustomerKafka retailnetwork.linehaul-transportation.eventsLoadArrived
shipping-and-trackingGenericupstream for labelsOHS + PL / ConformistKafka retailnetwork.shipping-and-tracking.eventsLabelIssued
delivery-promiseCoredownstream (we are upstream)OHS + PL / ConformistKafka retailnetwork.last-mile-delivery.eventsDeliveryWaveScheduled, DeliveryWaveCapacityChanged, DeliveryWaveCancelled, PackageInductionDeferred
order-sourcingCoredownstreamOHS + PL / ConformistsameDeliveryWaveScheduled, DeliveryWaveCapacityChanged, DeliveryWaveCancelled, WaveCostDeclared
shipping-and-trackingGenericdownstream for factsOHS + PL / ConformistsamePackageOutForDelivery, StopEtaWindowAssigned, DeliveryAttempted, PackageReturnInitiated, DeliveryPointFlagged
Station plannerpersoncalls usUI on Open HostRESTScheduleWave, CloseInduction, DispatchWave, CancelWave, PlanRoute, ContractPartner, DeactivatePartner, list and read
DSP driver appexternal organisationcalls usUI on Open HostRESTStartRoute, RecordAttempt

shipping-and-tracking is both an upstream (its LabelIssued gives the stop grouping) and a downstream (it turns our out-for-delivery and attempt facts into journey scans); the two edges use different topics.

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:<stream>:<EventName>:v1). No consumer negotiates their shape.
  • Customer/Supplier with linehaul. LoadArrived carries destinationNodeId and trackingNumbers precisely so that a station can induct; the supplier names this context as a consumer.
  • Conformist toward node-topology and shipping-and-tracking. This context takes the published events as they are and keeps only the fields it needs, ignoring the rest (tolerant reader), in its own read models. It never calls back.
  • Anti-corruption by local copy. rm_stations, rm_station_service_areas, rm_package_stops and rm_inbound_packages are the translation layer; no aggregate points at them.

Separate ways​

ContextWhy no edge
customer-orderingHolds the ship-to address; this context never sees PII. Delivery reaches the customer through shipping-and-tracking.
offer-availabilityCatalogue and listings play no part at the station.
vendor-connectivityVendors never operate a station.
node-performanceScores vendor nodes, not stations.
warehouse-systems fleet (for example network-fulfillment)Hard organisational boundary: the only seam is the Vendor API; a delivery station is network-operated.

See Integration for the failure behaviour of each edge.