event_driven
The Event-Driven Architecture Paradigm
When to Employ This Paradigm
- For real-time or bursty workloads (e.g., IoT, financial trading, logistics) where loose coupling and asynchronous processing are beneficial.
- When multiple, distinct subsystems must react to the same business or domain events.
- When system extensibility is a high priority, allowing new components to be added without modifying existing services.
Adoption Steps
- Model the Events: Define canonical event schemas, establish a clear versioning strategy, and assign ownership for each event type.
- Select the Right Topology: For each data flow, make a deliberate choice between choreography (e.g., a simple pub/sub model) and orchestration (e.g., a central controller or saga orchestrator).
- Engineer the Event Platform: Choose the appropriate event brokers or message meshes. Configure critical parameters such as message ordering, topic partitions, and data retention policies.
- Plan for Failure Handling: Implement robust mechanisms for handling message failures, including Dead-Letter Queues (DLQs), automated retry logic, idempotent consumers, and tools for replaying events.
- Instrument for Observability: Implement comprehensive monitoring to track key metrics such as consumer lag, message throughput, schema validation failures, and the health of individual consumer applications.
Key Deliverables
- An Architecture Decision Record (ADR) that documents the event taxonomy, the chosen broker technology, and the governance policies (e.g., for naming, versioning, and retention).
- A centralized schema repository with automated CI validation and consumer-driven contract tests.
- Operational dashboards for monitoring system-wide throughput, consumer lag, and DLQ depth.
Risks & Mitigations
- Hidden Coupling through Events:
- Mitigation: Consumers may implicitly depend on undocumented event semantics or data fields. Publish a formal event catalog or schema registry and use linting tools to enforce event structure.
- Operational Complexity and "Noise":
- Mitigation: Without strong observability, diagnosing failed or "stuck" consumers is extremely difficult. Enforce the use of distributed tracing and standardized alerting across all event-driven components.
- "Event Storming" Analysis Paralysis:
- Mitigation: While event storming workshops are valuable, they can become unproductive if not properly managed. Keep modeling sessions time-boxed and focused on high-value business contexts first.
Event Driven v1.1 - Enhanced
🔄 Workflow
Kaynak: Enterprise Integration Patterns & AWS Event-Driven Guide
Aşama 1: Event Design
- Schema: Event payload'unu (JSON) tanımla ve versiyonla (
v1). - Granularity: "OrderCreated" (Fat) vs "OrderReference" (Thin) kararını ver.
- Idempotency: Her event'e unique
event_idekle.
Aşama 2: Architecture Setup
- Producer: Event fırlatma noktasını belirle (Transaction sonrası?).
- Broker: Kafka/RabbitMQ/SQS seçimini load/latency ihtiyacına göre yap.
- Consumer: Hata durumunda (DLQ) retry stratejisini kur.
Aşama 3: Monitoring
- Tracing: OpenTelemetry ile request zincirini (Producer -> Broker -> Consumer) izle.
- Lag: Consumer lag süresini monitör et (Alarm kur).
Kontrol Noktaları
| Aşama | Doğrulama |
|---|---|
| 1 | Event schema değişikliği geriye dönük uyumlu mu? |
| 2 | Aynı event iki kere gelirse sistem bozuluyor mu? |
| 3 | Sistem çöküp kalktığında kayıp mesaj var mı? |
More from vuralserhat86/antigravity-agentic-skills
skill_creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
37huggingface_transformers
Hugging Face Transformers best practices including model loading, tokenization, fine-tuning workflows, and inference optimization. Use when working with transformer models, fine-tuning LLMs, implementing NLP tasks, or optimizing transformer inference.
22responsive_design
Build responsive, mobile-first layouts using fluid containers, flexible units, media queries, and touch-friendly design that works across all screen sizes. Use this skill when creating or modifying UI layouts, responsive grids, breakpoint styles, mobile navigation, or any interface that needs to adapt to different screen sizes. Apply when working with responsive CSS, media queries, viewport settings, flexbox/grid layouts, mobile-first styling, breakpoint definitions (mobile, tablet, desktop), touch target sizing, relative units (rem, em, %), image optimization for different screens, or testing layouts across multiple devices. Use for any task involving multi-device support, responsive design patterns, or adaptive layouts.
20cache_patterns
Instruction set for enabling and operating the Spring Cache abstraction in Spring Boot when implementing application-level caching for performance-sensitive workloads.
16zustand_state
Production-tested setup for Zustand state management in React. Includes patterns for persistence, devtools, and TypeScript patterns. Prevents hydration mismatches and render loops.
14vitest_runner
Modern JavaScript/TypeScript testing with Vitest including mocking and coverage.
13