Thinking In Events

What Is An Event?

An event is an action recognized by software, that may be handled by the software

https://en.wikipedia.org/wiki/Event_(computing)#Description

An Event is the encapsulation of a recorded action within an application

Me, probably plagiarising someone...

Advantages of using events

Decoupling

Additional flexibility

Scalability

Disadvantages of Event Driven Systems

Additional "Plumbing"

no centralised rules for system behaviour

Complexity

Thinking In Events

As Developers we...

  • Think in Commands
  • Want to know the result of a request

thinking in events is hard!

Mindset change from "will" to "has"

Think In Reactions, Not Actions

Treat events As first class citizens

MAP TO THINGS THAT REALLY HAPPEN IN YOUR ORGANISATION

Domain Event

Command

Actor

Aggregate

Event Storming

Event Sourcing

Events used to Build state

State becomes

re-playable

Create alternative state with new "faked" events

Complete application history

You don't think of an audit log until you're audited

Recap

Events allow for a decoupled platform

thinking in events exposes side effects

using events opens many architectural doors

Questions?

Thinking In Events - Flyt May 2020

By Scott Pringle

Thinking In Events - Flyt May 2020

  • 313