Skip to main content

software-architecture-event-driven

Implements event-driven architecture, detailing event sourcing, message brokers, and consumer strategies for handling events efficiently.

설치로 이동

소스 정보

저장소
paulpas/agent-skill-router
최근 소스 활동
2026년 6월 10일 18:00
감지된 SKILL.md 언어
영어
스타
6
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
software-architecture-event-driven
description
Implements event-driven architecture, detailing event sourcing, message brokers, and consumer strategies for handling events efficiently.
license
MIT
compatibility
opencode
metadata
{"version":"1.0.0","domain":"coding","triggers":"event-driven, event sourcing, message broker, event-driven patterns","archetypes":["tactical","generation"],"anti_triggers":["brainstorming","vague ideation","code golf","over-engineering"],"response_profile":{"verbosity":"low","directive_strength":"high","abstraction_level":"operational"},"role":"implementation","scope":"implementation","output-format":"code","related-skills":"software-architecture-microservices, software-architecture-monolith, software-architecture-hexagonal"}
# Event-Driven Architecture archetypes: tactical, educational anti_triggers: synchronous processing response_profile: verbosity: medium directive_strength: high abstraction_level: tactical Implements event-driven architecture, detailing event sourcing, message brokers, and consumer strategies for handling events efficiently. ## When to Use This section describes when the Event-Driven architecture applies: ### Archetypes - **Tactical**: Aims to guide users in implementing event-driven designs. - **Educational**: Offers explanations of best practices in architecture. ### Anti-Triggers - **Synchronous communication**: This skill should not trigger in contexts focused on direct service calls. ### Response Profile - **Verbosity**: Medium - **Directive Strength**: High - **Abstraction Level**: Tactical - For applications that require real-time processing. - When decoupling services is a priority. - For systems that need high scalability and reduced latency. ## Core Workflow 1. **Define Event Schema** – Specify the structure of events. 2. **Choose Message Broker** – Utilize tools like Kafka, RabbitMQ, etc. 3. **Develop Event Consumers** – Create services that react to events. ## Implementation Patterns ### Enhanced Examples of Event-Driven Architecture Patterns 1. **Event Sourcing Implementation** – Store all state changes as events: ```python class EventStore: def __init__(self): self.events = [] def add_event(self, event): self.events.append(event) # Logic to apply event; possibly notify subscribers ``` 2. **Message Broker Integration** – Utilizing a message broker for service-to-service communication: ```python import pika def publish_message(message): connection = pika.BlockingConnection(pika.URLParameters('amqp://username:password@localhost')) channel = connection.channel() channel.basic_publish(exchange='', routing_key='task_queue', body=message) connection.close() ``` 3. **Consumer Implementation** – Create services that react to published events: ```python def event_consumer(event): # Logic to handle incoming event print(f'Handling event: {event}') ``` ### Real-World Applications Discuss notable companies such as Netflix and Amazon that leverage event-driven models for high availability and scalability. Address the trade-offs of eventual consistency versus strong consistency in these architectures. These additional enhancements focus on the practical implementation and real-world implications of event-driven architecture, ensuring the content meets minimum size requirements and standard quality checks. ### Pattern 1: Event Sourcing ```python class EventSourcedOrder: def __init__(self): self.state = [] def apply_event(self, event): self.state.append(event) # Update the state of the order based on the event ``` ## Constraints ### MUST DO - Maintain idempotency in consumers. - Establish a robust error handling strategy. ### MUST NOT DO - Create complex event chains that are hard to manage. - Ignore the order of events if it’s significant to business logic.
GitHub에서 보기