본문으로 건너뛰기
cccskills
무료GitHub에 공개

distributed-transaction-manager

Saga patterns, compensating actions, and two-phase commit for distributed transactions. Activate on: distributed transaction, saga, compensating action, two-phase commit, eventual consistency, cross-service transaction. NOT for: single-database transactions (use database-connection-pool-manager), event sourcing (use cqrs-event-sourcing-architect).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Distributed Transaction Manager

Design and implement reliable cross-service transactions using saga patterns, compensating actions, and orchestrated workflows.

Activation Triggers

Activate on: "distributed transaction", "saga pattern", "compensating action", "two-phase commit", "eventual consistency", "cross-service transaction", "Temporal workflow", "rollback across services"

NOT for: Single-database ACID transactions → database-connection-pool-manager | Event sourcing → cqrs-event-sourcing-architect | Message queue setup → event-driven-architecture-expert

Quick Start

  1. Map the transaction boundary — identify all services that must participate
  2. Choose pattern — choreography saga (event-driven) or orchestration saga (central coordinator)
  3. Define compensating actions — every forward step needs a reverse operation
  4. Implement idempotency — all steps must be safely retryable
  5. Add timeout and dead-letter handling — no saga should hang indefinitely

Core Capabilities

DomainTechnologies
OrchestrationTemporal 1.25+, Step Functions, Conductor
ChoreographyKafka events, RabbitMQ, Redis Streams
FrameworksNestJS Saga, MassTransit (.NET), Axon (JVM)
State MachinesXState 5.x, custom saga state tables
MonitoringTemporal UI, saga state dashboards

Architecture Patterns

Orchestration Saga (Temporal)

Saga Orchestrator (Temporal Workflow)
    │
    ├─→ Step 1: Reserve Inventory    ──fail──→ (no compensation needed)
    │       ↓ success
    ├─→ Step 2: Charge Payment       ──fail──→ Compensate: Release Inventory
    │       ↓ success
    ├─→ Step 3: Create Shipment      ──fail──→ Compensate: Refund Payment
    │       ↓ success                            Compensate: Release Inventory
    └─→ COMPLETE
// Temporal workflow definition
import { proxyActivities } from '@temporalio/workflow';

const { reserveInventory, releaseInventory,
        chargePayment, refundPayment,
        createShipment } = proxyActivities<Activities>({
  startToCloseTimeout: '30s',
  retry: { maximumAttempts: 3 },
});

export async function orderSaga(order: Order): Promise<OrderResult> {
  // Step 1
  await reserveInventory(order.items);
  try {
    // Step 2
    const paymentId = await chargePayment(order.payment);
    try {
      // Step 3
      const shipmentId = await createShipment(order.shipping);
      return { status: 'completed', paymentId, shipmentId };
    } catch {
      await refundPayment(paymentId);
      throw new Error('Shipment failed');
    }
  } catch {
    await releaseInventory(order.items);
    throw new Error('Order saga failed');
  }
}

Choreography Saga (Event-Driven)

Order Service         Inventory Service       Payment Service
     │                       │                       │
     ├─ OrderCreated ───────→│                       │
     │                       ├─ InventoryReserved ──→│
     │                       │                       ├─ PaymentCharged
     │←── OrderCompleted ────┤←── PaymentConfirmed ──┤
     │                       │                       │
     │  On failure at any step, each service         │
     │  listens for failure events and compensates   │

Saga State Machine

STARTED → INVENTORY_RESERVED → PAYMENT_CHARGED → SHIPMENT_CREATED → COMPLETED
    │              │                   │                  │
    └→ FAILED   COMPENSATING ←─── COMPENSATING ←─── COMPENSATING
                    │
                COMPENSATED (terminal)

Anti-Patterns

  1. Distributed two-phase commit — 2PC across microservices creates tight coupling and availability problems; use sagas instead
  2. No compensation logic — every forward action must have a defined reverse; "undo" is not optional
  3. Non-idempotent steps — network retries will duplicate calls; use idempotency keys for every saga step
  4. Ignoring partial failure — compensations can also fail; implement compensation retry with dead letter escalation
  5. Synchronous saga coordination — sagas should be async; do not block the original request on saga completion

Quality Checklist

  • Every forward step has a defined compensating action
  • All steps are idempotent with unique operation IDs
  • Saga state persisted durably (not in-memory)
  • Timeout configured for each step (no infinite waits)
  • Compensation failures route to dead letter queue with alerting
  • Distributed tracing spans the entire saga lifecycle
  • Saga state machine has clear terminal states (COMPLETED, COMPENSATED, FAILED)
  • Integration tests cover happy path AND each compensation branch
  • Temporal/orchestrator dashboard accessible for debugging stuck sagas

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Expert in 2000s-era music visualization (Milkdrop, AVS, Geiss) and modern WebGL implementations. Specializes in Butterchurn integration, Web Audio API AnalyserNode FFT data, GLSL shaders for audio-reactive visuals, and psychedelic generative art. Activate on "Milkdrop", "music visualization", "WebGL visualizer", "Butterchurn", "audio reactive", "FFT visualization", "spectrum analyzer". NOT for simple bar charts/waveforms (use basic canvas), video editing, or non-audio visuals.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 18일 업데이트

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 18일 업데이트

Expert in 3D computer vision labeling tools, workflows, and AI-assisted annotation for LiDAR, point clouds, and sensor fusion. Covers SAM4D/Point-SAM, human-in-the-loop architectures, and vertical-specific training strategies. Activate on '3D labeling', 'point cloud annotation', 'LiDAR labeling', 'SAM 3D', 'SAM4D', 'sensor fusion annotation', '3D bounding box', 'semantic segmentation point cloud'. NOT for 2D image labeling (use clip-aware-embeddings), general ML training (use ml-engineer), video annotation without 3D (use computer-vision-pipeline), or VLM prompt engineering (use prompt-engineer).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 18일 업데이트

Apply crisis decision-making research to agent routing, uncertainty triage, and coordination failure analysis in time-pressured systems. Use when diagnosing handoff failures, analytical paralysis, or expert judgment under incomplete information. NOT for routine coding, simple CRUD design, or static single-agent tasks with complete information.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 18일 업데이트

Use for insight, reframing, contradiction, impasse, and anomaly-driven problem solving when execution effort no longer helps. NOT for routine optimization, error correction, or well-specified tasks with known solution paths.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 18일 업데이트

Apply cognitive task analysis to expert work that depends on perceptual cues, branching judgment, and recurring monitoring loops. Use when decomposing expert capability into agent structure, simulation design, or validation interviews. NOT for ordinary step-by-step SOP capture or simple pipelines with no tacit cue layer.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/port-daddy32026년 10월 18일 업데이트

curiositech의 스킬 모두 보기

이 스킬의 문제 신고