Off late, I deal with event-driven systems and real-time data at work. It is a completely different paradigm with its own patterns — especially for someone coming from a request/response world.
In this post, I will give you an overview of these systems and value they bring to the table.
What is an event?
Anything that causes a change in state of data is an event. It could be a system event (like user clicking a link) or a business event (user places an order).
Like beauty which lies in the eyes of the beholder, the significance of an event is highly relative to an organization.
What is an event-driven system?
A software system that listens for an occurrence of events and take some actions when it occurs, is considered event-driven.
For example, a system that waits for new orders to be placed on the website and when placed, sends a SMS to delivery department is event-driven.
Why event-driven systems are becoming increasingly important?
We live in a world of speed. What used to take few days or months — can be accomplished in hours or minutes. When was the last time you ordered a DVD to watch a movie — while you can stream it instantly?
To take actions at such speed, we need systems that can anticipate events and respond instantly.
Publish-subscribe is a long-living integration pattern. But its significance has dramatically increased in recent years due to:
- Increase in real-time data volume
- Decrease in expected response times for processing such data
How even-driven systems differ from their request/response counterparts?
Here are some key differences:
- Request/response systems expect data to be pushed to them, while event-driven systems listen & pull data as they are created
- Request/response systems are mostly synchronous — the data producer waits for data processing, while event-driven systems decouple data production and processing
- Scaling request/response systems are complex and resource consuming while event-driven systems can scale independently, thanks to their decoupled integration
How are event-driven systems implemented?
Message Queues (MQ) and Apache Kafka are two popular tools that can act as backbone for event-driven systems.
Cloud providers offer their own solutions as well — like AWS Kinesis and Azure Stream Analytics. Confluent is a popular commercial solution that offers Kafka-as-a-service.
What next?
In the subsequent posts, I will go deeper into patterns and use cases related to event-driven systems. I will also touch on the tools and technologies that enable you to create such systems.
I hope you found this post useful. Stay tuned for next posts in this series.
Disclaimer: All views expressed on this site are my own and do not represent the opinions of my employer or any other entities I am affiliated with.
Leave a Reply