返回顶部
e

event-driven

Deep event-driven architecture workflow—events vs commands, ordering and idempotency, sagas, outbox pattern, observability, and failure modes. Use when designing async systems, event buses, or refactoring synchronous chains.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
132
下载量
0
收藏
概述
安装方式
版本历史

event-driven

# Event-Driven Architecture Event-driven design trades **tight coupling** for **asynchronous** workflows—and introduces **ordering**, **duplicates**, **schema evolution**, and **distributed tracing** challenges. ## When to Offer This Workflow **Trigger conditions:** - Replacing long chains of synchronous HTTP calls - Adopting Kafka, Pub/Sub, EventBridge, NATS, etc. - Need for sagas, compensating transactions, or cross-service workflows **Initial offer:** Use **six stages**: (1) identify events, (2) contracts & versioning, (3) delivery semantics, (4) orchestration vs choreography, (5) observability, (6) failure & replay). Assume at-least-once delivery unless proven otherwise. --- ## Stage 1: Identify Events **Goal:** Distinguish **domain events** (facts that happened) from **commands** (requests). Assign owning bounded context per event type. **Exit condition:** Event catalog: name, schema, producers, consumers, SLAs. --- ## Stage 2: Contracts & Versioning **Goal:** Schema registry or equivalent; backward-compatible evolution; consumers ignore unknown fields; deprecation policy for old versions. --- ## Stage 3: Delivery Semantics **Goal:** Partition keys for per-entity ordering; idempotent consumers; dedupe keys when exactly-once illusion is needed. --- ## Stage 4: Orchestration vs Choreography **Goal:** Central orchestrator (saga coordinator) vs decentralized choreography—trade visibility vs coupling. ### Practices - Transactional outbox when DB write and event publish must align --- ## Stage 5: Observability **Goal:** Correlation ids on events; traces spanning HTTP → broker → consumer; lag and DLQ depth metrics. --- ## Stage 6: Failure & Replay **Goal:** Dead-letter queues, replay tooling, poison message handling, and idempotent replays. --- ## Final Review Checklist - [ ] Event inventory with clear ownership - [ ] Versioned contracts and compatibility rules - [ ] Idempotent consumers; partition strategy documented - [ ] Saga/outbox where transactional consistency required - [ ] Tracing and replay operationalized ## Tips for Effective Guidance - Choreography can hide flows—document critical sequences as diagrams. - Pair with **message-queues** and **idempotency** for implementation detail. ## Handling Deviations - Low volume: start with a simple queue before full Kafka topology.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 event-driven-1776028590 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 event-driven-1776028590 技能

通过命令行安装

skillhub install event-driven-1776028590

下载 Zip 包

⬇ 下载 event-driven v1.0.0

文件大小: 1.9 KB | 发布时间: 2026-4-13 10:11

v1.0.0 最新 2026-4-13 10:11
- Initial release of the event-driven architecture workflow.
- Covers events vs commands, ordering, idempotency, sagas, outbox pattern, observability, and failure modes.
- Provides a six-stage process: event identification, contracts & versioning, delivery semantics, orchestration/choreography, observability, failure & replay.
- Includes practical tips, review checklist, and guidance for handling deviations and special cases.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部