Jonas Bonér, Founder & CTO at Lightbend, talked about event driven services and how event driven architectures (EDA) and event stream processing (ESP) technologies are helping with designing the modern applications based on distributed systems. He gave the keynote presentation at the recent Reactive Summit 2017 Conference.
Bonér started the presentation with a background on how event driven systems evolved over time, using the examples of Tuxedo, Terracotta and Staged Event Driven Architecture (SEDA). It's important to know what it means to be event driven because events represent facts.
Events drive autonomy in the system as well as help reduce risk. They also increase loose coupling, scalability, resilience, and traceability. The event driven services approach basically inverts the control flow in the system which helps to minimize coupling and increase autonomy. Event driven solutions focus on the behavior of systems as opposed to the structure of systems.
He recommended developers to not focus on just the "things" in the system (Domain Objects), but rather focus on what happens (Events). He talked about the Promise Theory proposed by Mark Burgess and to use the events to define the Bounded Context through the lense of promises.
Bonér also said that events allow us to manage time, and quoted Greg Young:
Modeling events forces you to have a temporal focus on what’s going on in the system. Time becomes a crucial factor of the system.
Event Logging allows us to model time by treating event as a snapshot in time and event log as our full history. It also allows for time travel in the sense that we can replay the log for historic debugging as well as for auditing & traceability. We can replay it on system failures and for data replication.
Bonér discussed the following patterns for event driven architecture:
- Event Loop
- Event Stream
- Event Sourcing
- CQRS for temporal decoupling
- Event Stream Processing
Event stream processing technologies like Apache Flink, Spark Streaming, Kafka Streams, Apache Gearpump and Apache Beam can be used to implement these design patterns.