In this blog post, we will discuss the Event concept in software engineering. This is the first part in our series dedicated to Event-Driven Architecture. We will learn the benefits of using events, examples of application of this paradigm, where it’s more suitable to build your systems’ architecture on events rather than traditional API-based approaches, and, most importantly, how to start thinking the event-driven way.
The audience of this guide are software engineers involved in the software design process, or anyone who is interested in software architectures and already has some background in this area. Without further ado, let’s dive in)
What exactly is an Event?
An event is a significant occurrence or change in state that a system can detect and respond to. In other words, an event is something that has happened and requires our attention. Here are a few examples of such happenings:
- A button was clicked by a user;
- A message has arrived in a queue;
- A file was modified;
- An order has been placed in an online store;
Events originate from a specific source: user actions, system operations, external services, etc. They can carry data — we call this event payload, and, usually, they are handled asynchronously.
Understanding of events comes best when comparing it with a more traditional concept called commands.
Commands vs Events
In traditional web development, we are dealing with commands. It’s also called an API-driven or Request / Response approach. It is simple, and its сause and effect relationships are easily taken by our brains.
Here’s an example:
We want to build an online chess game. After each game, each user’s rating is updated. Let’s think about how this can be implemented using commands vs events









