Retail network · Supporting domain · EventStorming board

node-topology

Owns the physical shape of the retail network: its buildings (nodes), the lanes between them, the regions, and which delivery station serves each postal prefix.

GitHub ↗ · Documentation ↗ · Architecture check · Briefings

events published
11
commands
11
policies
33
read models
6
hot spots
4

The board, row by row

11 rows, in the order the business story happens: the main path first, then how this context reacts to the others, then the clock. Rows are small stories; read each one left to right.

  • Event
  • Command
  • Actor
  • Aggregate
  • Policy
  • Read model
  • External system
  • Hot spot
  • Opportunity
  1. Define a region

    A planner names a region with a short unique code. Every node and every postal-prefix assignment must belong to a region that exists.

    ActorNetwork-ops planner
    CommandDefineRegionPOST /regions
    AggregateRegion
    EventRegionDefined
    Systemdelivery-promise
    PolicyKeeps a copy of the region
    Systemorder-sourcing
    PolicyKeeps a copy of the region

    Source: application/usecases/regions.go · domain/region/region.go

  2. Register a node

    A planner, or the vendor-connectivity service for a vendor's building, registers a building. It starts as Proposed. The kind of building decides who may run it and what it can do.

    ActorNetwork-ops planner
    Read modelRegions
    Read modelVendor node codes already taken
    CommandRegisterNodePOST /nodes
    AggregateNode
    EventNodeRegistered
    Systemoffer-availability
    PolicyStarts tracking the node as Proposed, so no listing is suppressed yet
    Systemdelivery-promise
    PolicyKeeps a copy of the node's type and region
    Systemlast-mile-delivery
    PolicyKeeps the node only if it is a delivery station
    Systemlinehaul-transportation
    PolicyKeeps the node and re-plans pickups on lanes that end at it
    Systemshipping-and-tracking
    PolicyNotes the node when it is a pickup point

    Source: application/usecases/nodes.go · domain/node/node.go · domain/node/types.go

  3. Declare how a node operates

    The vendor or a planner declares opening hours, handling time, pickup cutoffs and a throughput cap. Each declaration is a new numbered revision that never overwrites an earlier one.

    ActorNetwork-ops planner
    CommandDeclareOperationalProfilePUT /nodes/{nodeId}/operational-profile
    AggregateNode
    EventNodeOperationalProfileDeclared
    Systemlinehaul-transportation
    PolicyRe-plans pickup departures from the node's cutoffs
    Systemdelivery-promise
    PolicyKeeps handling time, cutoffs and cap when the revision is newer
    Systemseller-inbound
    PolicyKeeps the node's carton limits to check shipments against
    Systemnode-performance
    PolicyAcknowledges the event and changes nothing

    Source: application/usecases/nodes.go · domain/node/profile.go · 0007-inbound-limits-on-the-operational-profile.md

  4. Put a node into service

    A planner activates a Proposed or Suspended node. A fulfillment centre must first have a cutoff and a handling time above zero.

    ActorNetwork-ops planner
    CommandActivateNodePOST /nodes/{nodeId}/activations
    AggregateNode
    EventNodeActivated
    Systemoffer-availability
    PolicyMarks the node sellable and restores listings suppressed for it
    Systemlinehaul-transportation
    PolicyGenerates the node's pickup departures
    Systemdelivery-promise
    PolicyMarks the node active for promising
    Systemshipping-and-tracking
    PolicyKeeps the node's state

    Source: application/usecases/nodes.go · domain/node/node_lifecycle.go

  5. Suspend a node

    A planner pauses an active node and must give a reason. Its lanes and postal prefixes are left as they are; other contexts must treat them as unusable.

    ActorNetwork-ops planner
    CommandSuspendNodePOST /nodes/{nodeId}/suspensions
    AggregateNode
    EventNodeSuspended
    Systemoffer-availability
    PolicySuppresses the node's live listings
    Systemlinehaul-transportation
    PolicyCancels the node's future pickups
    Systemdelivery-promise
    PolicyMarks the node suspended
    Systemshipping-and-tracking
    PolicyKeeps the node's state

    Source: application/usecases/nodes.go · domain/node/node_lifecycle.go · 0003-no-consumed-contracts-and-ohs-reads.md

  6. Retire a node for good

    A planner retires an active or suspended node. Retired is final: any later command on that node is refused.

    ActorNetwork-ops planner
    CommandRetireNodePOST /nodes/{nodeId}/retirements
    AggregateNode
    EventNodeRetired
    Systemoffer-availability
    PolicySuppresses the node's live listings
    Systemlinehaul-transportation
    PolicyCancels the node's future pickups
    Systemseller-inbound
    PolicyMarks the node retired in its copy
    Systemshipping-and-tracking
    PolicyKeeps the node's state

    Source: application/usecases/nodes.go · domain/node/node_lifecycle.go

  7. Open a lane between two nodes

    A planner opens a ground or air lane. Both ends must be active, the pair of building types must be allowed, and no identical lane may already be open.

    ActorNetwork-ops planner
    Read modelOrigin and destination nodes
    Read modelOpen lanes
    CommandOpenLanePOST /lanes
    AggregateLane
    EventLaneOpened
    Systemlinehaul-transportation
    PolicyKeeps the lane and re-plans pickups at its origin
    Systemdelivery-promise
    PolicyAdds the lane to the network graph it searches
    Systemorder-sourcing
    PolicyAdds the lane to the network graph it searches

    Source: application/usecases/lanes.go · domain/lane/lane.go

  8. Declare what a lane costs

    A planner states the cost, in cents, of moving one package across an open lane. A newer declaration replaces the previous one. A lane never declared on publishes nothing.

    ActorNetwork-ops planner
    CommandDeclareLaneCostPOST /lanes/{laneId}/cost-declarations
    AggregateLane
    EventLaneCostDeclared
    Systemorder-sourcing
    PolicyKeeps the latest cost per lane and prices candidate paths in cents

    Source: application/usecases/lanes.go · domain/lane/lane.go · 0014-lane-cost-declaration.md

  9. Declare the carbon a lane emits

    A planner states the carbon, in grams of CO2-equivalent, of moving one package-unit across an open lane on one departure. A newer declaration replaces the previous one. Nothing reads it yet.

    ActorNetwork-ops planner
    CommandDeclareLaneEmissionPOST /lanes/{laneId}/emission-declarations
    AggregateLane
    EventLaneEmissionDeclared

    Source: application/usecases/lanes.go · domain/lane/lane.go · 0018-lane-emission-declaration.md

  10. Close a lane

    A planner closes an open lane. A closed lane is never reopened; a new lane gets a new identity.

    ActorNetwork-ops planner
    CommandCloseLanePOST /lanes/{laneId}/closures
    AggregateLane
    EventLaneClosed
    Systemlinehaul-transportation
    PolicySchedules no new departure on the lane
    Systemdelivery-promise
    PolicyMarks the lane closed in its network graph

    Source: application/usecases/lanes.go · domain/lane/lane.go

  11. Assign a postal prefix to a delivery station

    A planner decides which delivery station serves a postal prefix. A later assignment must carry a higher version; the prefix takes the station's region.

    ActorNetwork-ops planner
    Read modelThe delivery station
    Read modelIts region
    CommandAssignServiceAreaPUT /service-areas/{postalPrefix}
    AggregateServiceArea
    EventServiceAreaAssigned
    Systemlast-mile-delivery
    PolicyKeeps the assignment when its version is higher
    Systemdelivery-promise
    PolicyKeeps the assignment when its version is higher
    Systemorder-sourcing
    PolicyKeeps the prefix-to-station assignment
    Systemshipping-and-tracking
    PolicyKeeps the postal area's delivery mode and carrier options

    Source: application/usecases/servicearea.go · domain/servicearea/servicearea.go

Hot spots and opportunities

Open questions and known gaps, each taken from a decision record or a document in the repository, never invented. Opportunities are improvements the documentation already names.

Opportunities

  • OpportunityA declared lane cost is the first step toward costing paths in money. A measured cost per departure could later refine it.

    Source: adr/0014-lane-cost-declaration.md

This board is a reconstruction from the code and documentation of node-topology at origin/develop, not a workshop output. Roles are the ones the documentation names. How the boards were made.