Gof Command

Command in modern Java: turning an invocation into an object so it can be queued, logged, scheduled, retried or undone — and the distinction from an event, which is a fact rather than a request. Covers when reifying a call earns its cost and when a method reference is enough, undo through inverses versus mementos versus compensation, what changes when a command is persisted or sent to a broker (versioning, at-least-once delivery, idempotency), and the captured-state hazard when a command executes later than it was created. Use when an operation must be deferred, queued, audited or undone, when a command bus is proposed, when a class is created per method with no queue or undo behind it, or when commands and events are being used interchangeably. Does not cover domain and integration events and the outbox (event-driven-architecture), broker delivery semantics (delivery-semantics), executor and task lifecycle (executors-and-task-lifecycle), or algorithm selection (gof-strategy).

robsonkades fd9e073 4 files · 30.5 KB Updated

File contents

robsonkades/agent-skills/tree/main/skills/gof-command commit fd9e073fc6

Frequently asked questions

npx skillmds@latest add robsonkades/gof-command