Skip to main content
  1. System Design Components/

Infra Actions, Entities, and Mechanisms by Archetype Cheat Sheet

Infra Actions, Entities, and Mechanisms by Archetype Cheat Sheet #

Use this as the infra-side counterpart to the product derivation sheet.

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 note is meant for derivation, not for spoken delivery.


1. Coordination / Consensus Metadata #

  • acquire leadership/lease -> XLeaseState / XLeadershipState (state transition, quorum-backed guarded conditional update)
  • renew lease -> XLeaseState (state transition, guarded conditional update)
  • release lease -> XLeaseState (state transition, guarded conditional update)
  • watch metadata -> XRevisionedState (read source)
  • read current leader -> XLeadershipState (read source)

2. Claim / Lease / Exclusive Ownership #

  • claim resource/job -> XClaimState (state transition, claim/lease)
  • renew claim -> XClaimState (state transition, guarded conditional update)
  • release claim -> XClaimState (state transition, guarded conditional update)
  • expire stale claim -> XClaimState (state transition, expiry scan + guarded release)
  • view ownership -> XClaimState (read source)

3. Append Log + Consumer Progress #

  • append record -> XLogSegment (append, append log)
  • read log range -> XLogSegment (read source)
  • claim/consume records -> XLogSegment + XConsumerProgressState (read source + state transition)
  • commit consumer progress -> XConsumerProgressState (overwrite, versioned overwrite or guarded offset commit)
  • replay from offset -> XLogSegment + XConsumerProgressState (read source)

4. Projection / Index / Search Pipeline #

  • write source entity -> XSourceState (varies by source path)
  • index/update projection entry -> XIndexEntryState / XView (overwrite, materialized view/index update)
  • delete/tombstone projection entry -> XIndexEntryState (state transition, tombstone propagation)
  • query projection -> XView (read projection)
  • reindex from source -> XIndexEntryState (overwrite, rebuild/reindex pipeline)

5. Cache / Origin Projection / Edge Delivery #

  • populate cache entry -> XCacheEntryState (create target/overwrite, cache fill)
  • read cache entry -> XCacheEntryState (read projection)
  • invalidate/purge cache entry -> XCacheEntryState (state transition, explicit invalidation)
  • refresh cache entry -> XCacheEntryState (overwrite, refresh/reload)
  • read origin on miss -> XOriginState (read source)

6. Rate Limit / Budget / Token Accounting #

  • evaluate request budget -> XBudgetState / XTokenBucketState (state transition, atomic counter or token bucket update)
  • refill tokens/budget -> XBudgetState / XTokenBucketState (state transition, scheduled refill)
  • read current budget -> XBudgetState (read source)
  • update quota/policy -> XBudgetPolicyState (overwrite, versioned overwrite)

7. Sequence / Identifier Generation #

  • claim worker id -> XWorkerIdLeaseState (state transition, claim/lease)
  • generate id -> XSequenceState / XLastTimestampState (state transition, guarded local sequence advance)
  • renew worker id lease -> XWorkerIdLeaseState (state transition, guarded conditional update)
  • read generator health -> XGeneratorView (read projection or read source)

8. Membership / Presence / Registry #

  • register member -> XMemberState (create target, insert/create)
  • heartbeat/renew presence -> XHeartbeatState / XMemberState (state transition, guarded lease/heartbeat update)
  • expire member -> XMemberState (state transition, expiry scan + guarded removal)
  • watch membership -> XMemberState (read source)
  • read presence view -> XPresenceView (read projection)

9. Workflow + External Side Effect #

  • create workflow request -> XWorkflowState (create target, insert/create)
  • transition workflow -> XWorkflowState (state transition, guarded conditional update)
  • emit outbox event -> XOutboxEventState (create target, transactional outbox write)
  • deliver external side effect -> XDeliveryAttemptState (state transition, worker retry/idempotent delivery)
  • reconcile missed side effect -> XWorkflowState + XDeliveryAttemptState (read source + state transition)
  • view status -> XWorkflowState (read source)

10. Execution Fleet + Worker Substrate #

  • register worker -> XWorkerState (create target/overwrite, versioned overwrite)
  • heartbeat worker -> XWorkerState / XCapacityState (state transition, guarded lease/heartbeat update)
  • place runnable work -> XPlacementState + XExecutionLeaseState (create target, guarded placement + lease acquisition)
  • ack start execution -> XExecutionAttemptState + XExecutionLeaseState (state transition, guarded start/lease acknowledge)
  • renew execution lease -> XExecutionLeaseState (state transition, guarded conditional update)
  • persist completion -> XExecutionAttemptState (state transition, guarded completion write + owner fencing)
  • release capacity -> XCapacityState / XPlacementState (state transition, guarded release)
  • reconcile lost worker -> XExecutionLeaseState + XExecutionAttemptState (read source + expiry/requeue reconciliation)
  • view fleet health -> XWorkerState / XCapacityView (read source or read projection)

How to use this note #

For any infra prompt:

  1. identify the infra archetype
  2. map the operation to one of the canonical action lines
  3. derive the state touched
  4. derive the mechanism
  5. derive the failure and NFR vocabulary

This is a study note for internal reasoning, not the final spoken answer.