event-driven architecture

23
Event Driven Architecture A short overview of Andrew Easter

Upload: andrew-easter

Post on 05-Aug-2015

48 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: Event-driven architecture

Event Driven ArchitectureA short overview of

Andrew Easter

Page 2: Event-driven architecture

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

Page 3: Event-driven architecture

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

Wikipedia says...

Page 4: Event-driven architecture

“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...

Page 5: Event-driven architecture

Pub/Sub Pattern Revisited

Model View2

View1

View3

Page 6: Event-driven architecture

“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”

Page 7: Event-driven architecture

Example: Entity changes as events

BankAccount

DepositMade

AccountCreated

WithdrawalMade

Page 8: Event-driven architecture

AccountCreated

Send Bank Card

Send Welcome

Email

UpsellReminder

Page 9: Event-driven architecture

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

Page 10: Event-driven architecture

Separation of concerns

Single responsibility principle

Extensibility

Page 11: Event-driven architecture

...what does this enable?

But...

Page 12: Event-driven architecture

aka webhooks

The Evented Web

Page 13: Event-driven architecture

Business intelligence

Big Data (yuck)

Page 14: Event-driven architecture

Sexy dashboards

System Monitoring

Page 15: Event-driven architecture

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

Log File Analysis

Page 16: Event-driven architecture

Given, When, Then

Behaviour-driven Development (BDD)

Page 17: Event-driven architecture

And finally...

Page 18: Event-driven architecture

Eventsourcing

Page 19: Event-driven architecture

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

Page 20: Event-driven architecture

AccountCreated

DepositMade

DepositMade

DepositMade

WithdrawalMade

InterestCredited

Time Replay BankAccount(current state)

Page 21: Event-driven architecture

● 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

Page 22: Event-driven architecture

Any questions?

Page 23: Event-driven architecture

Contact me@DrewEaster

http://www.dreweaster.com