- My Development Notes/
- System Design Components/
- Actions, Entities, Write Shapes, and Mechanisms by Archetype Cheat Sheet/
Actions, Entities, Write Shapes, and Mechanisms by Archetype Cheat Sheet
Actions, Entities, Write Shapes, and Mechanisms by Archetype Cheat Sheet #
Use this as an internal derivation note.
Each line follows this form:
action -> entity touched (write shape, base mechanism)
For reads:
action -> entity touched (read source)action -> entity touched (read projection)
This is useful because one line often gives you:
- the entity model
- the API shape
- the HLD owner
- the NFR posture
- the failure vocabulary
1. Current-Value Entity #
create X -> XState (create target, insert/create)edit X -> XState (overwrite, versioned overwrite)delete/archive X -> XState (state transition, guarded conditional update)view X -> XState (read source)
2. Relation / Edge #
add relation -> XRelationState (state transition, guarded add/remove)remove relation -> XRelationState (state transition, guarded add/remove)view relation list -> XRelationState (read source)view relation count -> XCountView (read projection)
3. Append-Only Child Object #
create child -> XChildState (append, append log/table)edit child -> XChildState (overwrite, versioned overwrite)delete/moderate child -> XChildState (state transition, guarded conditional update)view thread/log -> XChildState or XThreadView (read source or read projection)
4. Workflow / Lifecycle State #
create request -> XWorkflowState (create target, insert/create)approve/reject/cancel/start/complete -> XWorkflowState (state transition, guarded conditional update)view status -> XWorkflowState (read source)
5. Derived Projection #
source write -> XSourceState (varies by source path)update projection -> XView (overwrite, counter/projection update or materialized view update)read projection -> XView (read projection)
6. Catalog + Scoped Relation #
create/update catalog entry -> XDefinitionState (create target/overwrite, insert/create or versioned overwrite)attach X to parent -> ParentXRelationState (state transition, guarded add/remove)remove X from parent -> ParentXRelationState (state transition, guarded add/remove)search/top X -> XView (read projection)
7. Inventory / Constrained Resource #
view availability -> XInventoryState (read source)reserve/allocate/release -> XInventoryState (state transition, guarded conditional update)
8. Critical Transaction Process #
start request -> XRequestState (create target, insert/create)validate/approve/commit -> XTransactionState (state transition, guarded conditional update)execute side effect -> XMovementState (state transition, outbox/worker or idempotent side-effect orchestration)view status -> XTransactionState (read source)
9. Time-Bounded Exclusive Allocation #
create hold -> XHoldState + XInventoryState (state transition, guarded exclusive hold)expire hold -> XHoldState + XInventoryState (state transition, expiry scan + guarded release)confirm booking -> XBookingState + XInventoryState (state transition, guarded confirm/commit)cancel booking -> XBookingState + XInventoryState (state transition, guarded release/restore)view availability -> XInventoryState (read source)
10. Future Constraint + Claimable Run #
schedule work -> XScheduleState (create target, insert/create)materialize due run -> XRunnableJobState (create target, due scan + create runnable job)claim run -> XRunnableJobState (state transition, claim/lease)complete/fail run -> XExecutionState or XRunnableJobState (state transition, guarded conditional update)view history -> XHistoryView (read projection)
11. Frontier + Claimable Run #
initialize frontier -> XFrontierState (create target, insert/create)materialize batch -> XBatchRunState (create target, guarded frontier advance + insert/create)claim/process batch -> XBatchRunState (state transition, claim/lease)advance checkpoint/frontier -> XCheckpointState / XFrontierState (state transition, guarded frontier advance)view progress -> XProgressView (read projection)
12. Control Plane + Local Snapshot #
write config/policy -> XConfigState (overwrite, versioned overwrite)publish snapshot -> XSnapshotState (create target/overwrite, snapshot publication)apply snapshot locally -> XAppliedVersionState (state transition, monotonic version apply)evaluate request -> XSnapshotState (read source from local snapshot)
13. Matching / Assignment #
create request -> XRequestState (create target, insert/create)propose assignment -> XAssignmentState (state transition, guarded assignment/claim)accept/reject/expire assignment -> XAssignmentState (state transition, guarded conditional update)start/complete execution -> XExecutionState (state transition, guarded conditional update)view current state -> XRequestState / XAssignmentState / XExecutionState (read source)
14. Ranking / Leaderboard / Current Best #
append submission -> XSubmissionState (append, append log/table)update best/aggregate -> XBestState / XAggregateState (overwrite, counter/projection update)serve leaderboard -> XLeaderboardView (read projection)
15. Realtime Fanout #
append message/comment -> XMessageState (append, append log/table)fanout delivery -> XDeliveryState (create target/state transition, async fanout worker)ack delivery -> XDeliveryState (state transition, guarded conditional update)replay recent window -> XRecentWindowView (read projection)
16. Search-First Product #
create/update listing -> XListingState (create target/overwrite, insert/create or versioned overwrite)index/update search doc -> XIndexEntryState (overwrite, materialized view/index update)search -> XSearchView (read projection)view detail -> XListingState (read source)
17. Auction / Competitive Window #
create auction -> XAuctionState (create target, insert/create)place bid -> XBidState (append, append log/table)update current best -> XBestBidState (overwrite, guarded best-state update)close auction/commit winner -> XAuctionState + XWinnerState (state transition, guarded close/commit)view current best -> XBestBidState (read source)view history -> XHistoryView (read projection)
18. Shared Mutable Subject #
apply edit/operation -> XOperationLog + XSubjectState (append + overwrite/state transition, ordered apply/OT/CRDT/guarded version update)reconcile concurrent ops -> XVersionState / XSubjectState (state transition, merge/order logic)snapshot state -> XSnapshotState (create target, snapshot publication)view current state -> XSubjectState (read source)
19. Versioned Namespace + Immutable Content Units #
upload blob -> XBlobState (create target, insert/create/content-addressed write)update namespace/version -> XNamespaceState + XVersionState (state transition, CAS/versioned overwrite)advance sync cursor -> XSyncCursorState (overwrite, versioned overwrite)detect/store conflict -> XConflictState or XVersionState (create target/state transition, conflict materialization)sync/read namespace -> XNamespaceState (read source)
How to use this note #
For any prompt:
- find the matching archetype
- map the user action to one of the canonical action lines
- derive the entity touched
- derive the API shape
- derive the HLD ownership and NFR posture
This is a study note, not the final spoken interview format.