Event Basics
Why “this happened” often beats “do this now”
Events, publish/subscribe and message brokers explained visually, and when events are the better choice than synchronous REST calls.
Intermediate · 9 slides · 8 min
What is an event?
An event is a fact: something happened. Named in the past tense (OrderPlaced, UserRegistered) and never changed afterwards.
Calling everyone directly
When one service calls all others synchronously, one failure can break everything, and the customer waits for all of them.
Publish & subscribe
The sender publishes one event to a broker. Every interested service subscribes and gets its own copy. New ones can join any time.
Event brokers
Kafka, RabbitMQ, cloud services, Salesforce Platform Events and webhooks: the post offices between systems.
When a service goes down
If a subscriber is offline, events wait safely in the queue and are processed as soon as it is back.
The trade-offs
Eventual consistency, duplicates, harder debugging and one more system to run: what events cost.
Events or REST?
Use a synchronous call when you need the answer to continue, and an event when others just need to know.
Check yourself
What should happen after a customer registers?
Recap
Events, publish/subscribe, brokers and trade-offs: event-driven systems in five sentences.