Event-driven architecture (EDA) คือการออกแบบที่องค์ประกอบต่าง ๆ สื่อสารกันด้วยการสร้างและตอบสนองต่อ events (สิ่งที่เกิดขึ้น) — แทนที่จะเรียกกันโดยตรง มันทำให้เกิด loose coupling, ความสามารถในการขยายขนาด และความรวดเร็วในการตอบสนอง และพบบ่อยในระบบกระจายสมัยใหม่
event-driven architecture คืออะไร
Components communicate via EVENTS (a notification that something happened):
→ PRODUCERS emit events ("order placed", "user signed up") without knowing who handles them
→ CONSUMERS react to events they care about (asynchronously)
→ an event BROKER/bus (Kafka, message queue) routes events
→ components are DECOUPLED → they react to events, not call each other directly.
