Event-Driven Architecture
Software design pattern where systems communicate through events (state changes) rather than direct API calls, enabling loose coupling and real-time automation.
Event-Driven Architecture (EDA) is a software design pattern in which system components communicate by producing and consuming events — signals that represent meaningful state changes in the business domain.
How It Differs from Request-Response
In a traditional request-response architecture, System A calls System B directly and waits for a response. In an event-driven architecture, System A publishes an event ("deal was won") and any number of downstream systems can react to that event independently. The publisher does not need to know what the subscribers will do.
CaveauCRM Implementation
CaveauCRM uses event-driven architecture extensively. Eight business events (client.created, ticket.created, ticket.closed, deal.won, invoice.overdue, invoice.paid, appointment.booked, health.check) are published as HMAC-signed HTTP webhooks. The n8n workflow engine subscribes to these events and executes appropriate automation chains.
Benefits
- Loose coupling — Systems can be added, removed, or modified without affecting the event producers
- Scalability — Events can be processed asynchronously and in parallel
- Auditability — Every event is logged with timestamp, source, and payload
- Extensibility — New workflows can subscribe to existing events without modifying source systems
Key Concepts
- Event — A record of something that happened (e.g., "invoice.overdue")
- Producer — The system that generates the event (e.g., FOSSbilling)
- Consumer — The system that reacts to the event (e.g., n8n workflow)
- Webhook — HTTP callback used to deliver events between systems
- HMAC signing — Cryptographic verification that the event payload has not been tampered with