Skip to main content

Context map

Following ddd-crew Context Mapping. This is Node Performance's slice of the network-wide context map: every relationship this context has, with the upstream (U) and downstream (D) side, the pattern and the channel. Arrows point from upstream to downstream.

Upstream: what node-performance conforms to​

Source: internal/adapters/inbound/kafka/handlers.go (NewConsumers: the six topics and 15 types).

Downstream: who depends on node-performance​

Source: internal/adapters/outbound/kafka/encoder.go (EventsTopic, AnalyticsTopic), apis/openapi.yaml (the vendor-connectivity caller), and the consumers' configuration in warehouse-infra helm-values (order-sourcing-node-performance group, nodePerformanceUrl).

Legend: CF Conformist, C/S Customer/Supplier, PL Published Language. A dotted arrow is a published event with no in-organization consumer; a dotted line without a head means no relationship.

Relationships​

NeighbourDirectionPatternChannelMessagesWhy
vendor-connectivityU to D (NP downstream)ConformistKafka retailnetwork.vendor-connectivity.eventsPurchaseOrderIssued, PurchaseOrderAccepted, PurchaseOrderRejected, PurchaseOrderExpired, VendorShipmentConfirmed, InboundReceiptSubmitted, VendorOnboarded, SubmissionProcessedThe purchase-order protocol and its clock belong to vendor-connectivity; this context takes the facts as published and translates nothing.
vendor-connectivityU to D (NP upstream)Customer/Supplier, NP is SupplierREST GET /scorecards/{nodeId}GetScorecardThe only synchronous edge: vendor-connectivity needs an answer inside a vendor's request. If NP is down only that route fails.
shipping-and-trackingU to DConformistKafka retailnetwork.shipping-and-tracking.eventsPackageHandedOverThe handover instant is defined by the producer's policy; NP accepts it.
delivery-promiseU to D (NP downstream)ConformistKafka retailnetwork.delivery-promise.eventsPromiseKept, PromiseBrokenThe judgement against deliverByLatest is the producer's; NP counts it.
delivery-promiseU to D (NP upstream)Conformist (delivery-promise conforms)Kafka retailnetwork.node-performance.eventsNodeScorecardUpdated, NodeTierEligibilityChangeddelivery-promise keeps a local scorecard view and applies its handicap; no sync call on the promise hot path. It also keeps a local fast-tier eligibility copy and drops an ineligible node from the SAME_DAY and NEXT_DAY candidates of future quotes and estimates (ADR 0013).
offer-availabilityU to DConformistKafka retailnetwork.offer-availability.eventsInventoryFeedAppliedConsumed as published.
node-topologyU to DConformistKafka retailnetwork.node-topology.eventsNodeRegistered, NodeOperationalProfileDeclaredThe master of node identity and the declared profile; consumed without effect.
seller-inboundU to DConformistKafka retailnetwork.seller-inbound.eventsInboundShipmentShippedThe shipped instant starts the inbound timeliness metric.
order-sourcingU to DConformist (order-sourcing conforms)Kafka retailnetwork.node-performance.eventsNodeScorecardUpdatedFeeds its scorecard view and assignment cost.
Analytics (not a context)U to DPublished LanguageKafka retailnetwork.node-performance.analyticsNodeThresholdBreachedAnalytics only.
network-fulfillment (warehouse-systems fleet)noneSeparate WaysnonenoneThe hard boundary: the fleet reaches the network only through the vendor-connectivity Vendor API.

Notes on the patterns​

  • Conformist everywhere upstream. Every fact is published once by its owner for several consumers; an anti-corruption layer would have nothing to protect, because the vocabulary (poNumber, nodeId, requiredShipBy, deliverByLatest) is already the network's.
  • A two-way relationship with delivery-promise, by events only. It is upstream for promise judgements and downstream for grades; neither calls the other, so there is no runtime cycle.
  • Customer/Supplier with vendor-connectivity for the read. The two teams agree the shape; vendor-connectivity re-exposes it in its own Published Language.
  • No Shared Kernel. nodeId and poNumber are values copied from events, not shared code.
  • Contexts with no edge: customer-ordering, linehaul-transportation, last-mile-delivery.