Data and states
What identity deduplicates an event?
An append-only event history feeds a protected shipment projection.
Starting point Use device, route, version and sequence.
Assumptions for the example case
Illustrative design: 100,000 shipments per day, 50 events per shipment, 250 bytes of raw data per event, 500 events/s peak. This yields 5 million events and 1.25 GB of raw data per day. Retention, indices and replication are added.
Data and state model
Conditions and protection
| Object | State | Rule |
|---|---|---|
| S-17 | out_for_delivery → delivered | delivery_failed → returned | terminal does not reset |
| R-17 | Version 4 is active | v3 events superseded |
| N-17 | Tied to delivered | Reject delivered without proof type |
S-17
- State
- out_for_delivery → delivered | delivery_failed → returned
- Rule
- terminal does not reset
R-17
- State
- Version 4 is active
- Rule
- v3 events superseded
N-17
- State
- Tied to delivered
- Rule
- Reject delivered without proof type
Terms in this step
- Projection
- State derived from a course of events, which can be read quickly.
Try it yourself
Form the key for sequence 43.
A hint for your attempt
Four parts determine the device sequence.
Compare with a possible solution
- Keys
- D-17/R-17/v4/43.
- Content
- The fingerprint protects shipment, event type, evidence type and event time.
Apply to your project
Form a key for a second device.