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 node-topology's slice of the domain-wide context map. Node Topology is upstream of every relationship it has: it consumes nothing and calls nobody.

Event relationships​

Synchronous relationships and Separate Ways​

Derived from: model.yaml → contexts[node-topology].inbound, .publishes, .consumes (empty), .sync_calls (empty); contexts[vendor-connectivity].sync_calls; the consumes lists of the seven consumers; meta.hard_boundary; external.

Legend: arrows point from upstream (U) to downstream (D). Solid = command or event, dotted with an arrow head = query, dotted without an arrow head = no relationship (Separate Ways). Pattern abbreviations: OHS = Open Host Service, PL = Published Language, CF = Conformist, C/S = Customer/Supplier. Path parameters are written without braces inside the diagrams.

Omitted: Kafka and Postgres as infrastructure; the analytics topic (the model names no analytics event for this context); the future contexts (customer-returns, customer-notification, payments-and-invoicing), which have no edge in the model.

Relationships​

NeighbourDirectionPatternChannelMessagesWhy this pattern
offer-availability (Supporting)NT upstream, OA downstreamOHS + PL / ConformistKafka retailnetwork.node-topology.eventsNodeRegistered, NodeActivated, NodeSuspended, NodeRetiredOA only needs to know whether a listing's node is sellable (NodeStatusView, SuppressOnNodeUnavailable). It takes the node vocabulary as published.
delivery-promise (Core)NT upstream, DP downstreamOHS + PL / ConformistKafka retailnetwork.node-topology.eventsall nine eventsDP builds NodeProfileView, RegionAndServiceAreaView and LaneView locally because its hot path makes no synchronous call. The topology is a given for the promise, not a negotiation.
order-sourcing (Core)NT upstream, OS downstreamOHS + PL / ConformistKafka retailnetwork.node-topology.eventsall nine eventsOS builds NodeProfileView and NetworkGraphView to re-optimise assignments. Same reasoning as DP.
linehaul-transportation (Supporting)NT upstream, LH downstreamOHS + PL / ConformistKafka retailnetwork.node-topology.eventsNodeRegistered, NodeOperationalProfileDeclared, NodeActivated, NodeSuspended, NodeRetired, LaneOpened, LaneClosedLH turns lanes into departures and cutoffs into pickup departures (PickupFromCutoffs). It conforms to the lane and cutoff definitions.
last-mile-delivery (Supporting)NT upstream, LM downstreamOHS + PL / ConformistKafka retailnetwork.node-topology.eventsNodeRegistered, ServiceAreaAssignedLM's StationView needs the stations and the prefixes each serves.
node-performance (Supporting)NT upstream, NP downstreamOHS + PL / ConformistKafka retailnetwork.node-topology.eventsNodeRegistered, NodeOperationalProfileDeclaredNP measures a node against what it declared; it needs the declaration as published.
vendor-connectivity (Supporting)NT upstream, VC downstreamOHS + PL / ConformistKafka retailnetwork.node-topology.eventsNodeRegistered, NodeActivated, NodeSuspended, NodeRetiredVC's VendorNodeView lets it answer vendors about their nodes without calling this context.
vendor-connectivity (Supporting)NT upstream (Supplier), VC downstream (Customer)Customer/SupplierREST in-org POST /nodes, PUT /nodes/{nodeId}/operational-profileRegisterNode, DeclareOperationalProfileVC needs an answer inside the processing of a vendor submission. The routes exist for this customer; the Supplier keeps the invariants (ErrOperatorNotAllowedForNodeType, ErrStaleProfileRevision) and VC turns a refusal into a failed submission.
network-ops planner (person)NT upstreamUIREST /nodes, /lanes, /service-areas, /regionsRegisterNode (network node), DeclareOperationalProfile (declaredBy NETWORK_OPS), ActivateNode, SuspendNode, RetireNode, OpenLane, CloseLane, AssignServiceArea, DefineRegionA person drives the network's shape; there is no upstream system for it.
any context or clientNT upstreamOpen Host ServiceREST GET /nodes/{nodeId}, GET /nodes?type=&region=&status=, GET /lanes?origin=&destination=, GET /service-areas/{postalPrefix}GetNode, ListNodes, ListLanes, ResolveServiceAreaOne public read protocol for everyone. No neighbour declares these as a sync_call; they serve tools, planners and diagnosis.
network-fulfillment (warehouse-systems fleet, Supporting in the fleet, external)noneSeparate WaysnonenoneThe hard boundary: the fleet reaches the network only through the Vendor API of vendor-connectivity (model meta.hard_boundary; ADR 0007, WMS/WES integration).
customer-ordering (Generic)noneSeparate WaysnonenoneIt works with promises and postal prefixes, never with nodes.
shipping-and-tracking (Generic)noneSeparate WaysnonenoneScans name a nodeId as a value; it keeps no node read model in the model.

Notes on the patterns​

  • Open Host Service + Published Language, every consumer Conformist. One topic, nine CloudEvents types, one schema per type (urn:retailnetwork:node-topology:events:<EventName>:v1). With seven consumers, negotiating a model per consumer would cost more than it gives. The vocabulary is small and stable, so conforming is cheap.
  • Customer/Supplier with vendor-connectivity, not Conformist. The two write routes exist because vendor-connectivity needs them, and their error contract (a 409 or 422 that becomes a failed vendor submission) is agreed between the two.
  • No Anti-Corruption Layer here. The fleet's vocabulary (siteCode, siteRole, CPT) never arrives in this context. Translation happens twice, outside it: in the fleet's network-fulfillment (Conformist + ACL to the Vendor API) and in vendor-connectivity's Published Language.
  • No Shared Kernel. Consumers re-declare the few node fields they need in their own read models.

Seller inbound​

Built, ADR 0009 as realized by node-topology ADR 0007 (inbound limits on the operational profile). This section is the delta the seller-inbound design added to this page; where the service decided differently, the text below says so. Not built: the INBOUND capability of FULFILLMENT_CENTER and the capability gate ErrInboundLimitsNotAllowed; the service value-checks the limits (ErrValidation) on any node type (gap G64).

NeighbourDirectionPatternChannelMessagesWhy
seller-inboundU → DConformistKafka retailnetwork.node-topology.eventsNodeRegistered, NodeOperationalProfileDeclared, NodeActivated, NodeSuspended, NodeRetiredA node's status, INBOUND capability and carton limits are this context's facts. seller-inbound keeps a local NodeInboundView.