distributed-systems

Design event-driven distributed systems with sagas, outbox, and idempotent consumers.

16|Updated Apr 30, 2026
One-click install
npx skills add https://github.com/JCETools-Petra/JCE-Opencode-Tools --skill distributed-systems-jcetools-petra
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: distributed-systems
Source: https://github.com/JCETools-Petra/JCE-Opencode-Tools/tree/main/config/skills/distributed-systems
Command: npx skills add https://github.com/JCETools-Petra/JCE-Opencode-Tools --skill distributed-systems-jcetools-petra

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you implement and debug distributed-system designs by preventing common reliability failures like lost events, duplicate processing, and brittle long-running transactions.

Core Features & Use Cases

  • Saga Pattern Guidance: Choose orchestration vs choreography sagas and define compensating steps for multi-service workflows.
  • Delivery Guarantees & Reliability: Select appropriate delivery semantics (at-most-once, at-least-once, exactly-once via outbox + idempotency) for event-driven systems.
  • Event Safety Patterns: Apply outbox, event sourcing, CQRS with projections, dead-letter handling, and idempotent consumers to make implementations testable and verifiable.
  • Verification Checklist: Ensure events, correlation IDs, retry/backoff, circuit breakers, DLQ monitoring, and rebuildable read models are covered.

Quick Start

Use the distributed-systems skill to help you design an event-driven order workflow with a transactional outbox, idempotent consumers, and a projection that can be rebuilt from the event store.

Frequently Asked Questions about distributed-systems

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent duplicate processing and lost messages in an event-driven distributed system?

To prevent duplicate processing and lost messages in an event-driven distributed system, implement a transactional outbox pattern for reliable event relay and use idempotent consumers with deduplication logic to safely handle at-least-once delivery semantics.

What is the best way to coordinate multi-service transactions using the saga pattern?

The saga pattern coordinates multi-service transactions by defining compensating steps for each workflow action. You must choose between orchestration, using a central controller, or choreography, using event-driven reactions, to manage distributed state and rollback logic reliably.

How do I implement CQRS with event sourcing and rebuildable projections?

Implement CQRS with event sourcing by persisting state as an immutable event store and generating separate read models. Ensure your projections are rebuildable by designing idempotent consumers that can replay events to reconstruct read model state without data corruption.

When should I use orchestration vs choreography for distributed workflows?

Use orchestration for complex distributed workflows requiring explicit state control and compensating transaction visibility, and choose choreography for decentralized event-driven systems where independent services react to events without a central coordinator adding coupling.

What verification gates do I need for reliable Kafka or RabbitMQ message queues?

Reliable message queues require verification gates including correlation IDs for end-to-end tracing, retry limits with exponential backoff, circuit breakers to prevent cascading failures, dead-letter queue handling, and monitored projection rebuildability to ensure consistent state.