NOTE

Event-Driven Architecture

What event-driven architecture is, why it is needed, its real-time trade-off, and publisher-subscriber and event-stream design patterns.

Software Architecture & EngineeringCreated Updated 1 min readhistorical

This is a historical learning note and may contain outdated or incomplete understanding.

1. What Is Event-Driven Architecture

A software architecture pattern based on events.

When a system changes from state A -> state B, it publishes a message to notify other parts of the system.

2. Why Event-Driven Architecture Is Needed

Decoupling: the event initiator does not know which event consumers are listening to the event, and the event itself does not know the subsequent results it produces.

Asynchrony.

3. Event-Driven Architecture

Compared with the request-driven model, real-time performance is worse.

4. How to Design Event-Driven Architecture

4.1. Publisher-Subscriber Pattern

Publisher-Subscriber Pattern.md

4.2. Event-Stream Pattern

The event initiator writes events into a log. Event consumers do not need to subscribe to the event stream; instead, they can read from any part of the stream and join the stream at any time.

5. References

Discussion

Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub