Event-driven architecture

Preview:

Citation preview

Event Driven ArchitectureA short overview of

Andrew Easter

Who am I?

● Former Platform Architect at Gumtree.com● Specialise in JVM (Java/Scala) development● Currently contracting/freelancing/consulting

whilst validating startup ideas● CTC Tech Specialist● CTC Agile & Scrum Workshop Facilitator

“Event-driven architecture (EDA) is a software architecture pattern promoting the production, detection,consumption of, and reaction to events”

Wikipedia says...

“The art of designing a system around the principle of using events – concise descriptions of state changes or significant occurrences in the system – to drive behaviour both within and between the applications that make up an entire system”

Andrew Easter says...

Pub/Sub Pattern Revisited

Model View2

View1

View3

“To be successful with EDA, it needs to become a fundamental mindset that drives all design decisions, rather than just a pattern that is used in some isolated parts of a wider system”

Example: Entity changes as events

BankAccount

DepositMade

AccountCreated

WithdrawalMade

AccountCreated

Send Bank Card

Send Welcome

Email

UpsellReminder

Why do this?(other than it just being cool)

Separation of concerns

Single responsibility principle

Extensibility

...what does this enable?

But...

aka webhooks

The Evented Web

Business intelligence

Big Data (yuck)

Sexy dashboards

System Monitoring

“Logs as event streams” (http://12factor.net/logs)

Log File Analysis

Given, When, Then

Behaviour-driven Development (BDD)

And finally...

Eventsourcing

Eventsourcing is an approach to persistence that means the state of an entity is made up

of all the events (state changes) it has emitted over time

AccountCreated

DepositMade

DepositMade

DepositMade

WithdrawalMade

InterestCredited

Time Replay BankAccount(current state)

● Very scalable. An event store can be as simple as an append only log file

● Full history of every state change - great for auditing and debugging

● Very BDD compatible● Plays real nice with the CQRS pattern

Benefits

Any questions?

Contact me@DrewEaster

http://www.dreweaster.com

Recommended