An event-oriented model is a system that is driven from an event point of view, not from a state point of view. Ie:
- when an event occurs,
- transformation happens to the entities
- that change their states.
An event is a state change, or an update, like adding a shopping item to a cart on an e-commerce website.
An event-oriented model is also known as an Event-Driven Architecture (EDA).
This type of architecture is commonly used in microservices to communicate between services.
This model is based on async requests that communicate or inform that something happened.
- events in a graphical user interface (GUI) application, such as keyboard actions, mouse actions, and scroll actions
Instead of focusing on the current state, you focus on the events (changes) that occurred over time.
The event (that starts the flow/chain) must get the system moving by changing its state (ie which event will get the system moving).
In an event-driven architecture:
- the events are facts, not the state.
The events are clustered to create a chain of transformations based on their relationship. They are not grouped based on the state of the entity as in a process oriented model.
The model starts with an event and describes all transformations on the entities. ie the model system's behavior is described in terms of a sequence of transformation (not in a sequence of state).
Activities are not modeled directly as in a life-cycle model. Rather they are implied by scheduling an event for the point in simulation time they will be finished.
How do you visualize an event-driven model?
What is the Main Entry ?
The main entry in an event-driven system is called:
- an event loop, for code execution
- or a broker, for reporting/analytics
Identify the relevant entities
To build an event-based model, we must identify all relevant objects and their properties.
Describe the behavior of the system
- Description of Behavior (Events)
- identify the events that “drive” our model (ie the events that change the state of the system)
- Write down the types of events that occur in the system