event sourcing - goto conferencegotocon.com › dl › goto-aar-2014 › slides ›...

41
Event Sourcing Greg Young

Upload: others

Post on 23-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Event SourcingGreg Young

Page 2: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”
Page 3: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”
Page 4: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”
Page 5: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Event Sourcing says all state is transient and you

only store facts.

Page 6: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Purchase Order

Line Items (n)

Shipping Information

Page 7: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Cart Created

3 Items Added

Shipping Information Added

Page 8: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”
Page 9: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Cart Created

3 Items Added

1Item Removed

Shipping Information Added

Page 10: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”
Page 11: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

6

5

4

3

2

1

7

Page 12: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

5

snap

4

3

2

1

6

Page 13: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”
Page 14: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

I can’t query a series of events

Page 15: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Focus on strategic design first.

Page 16: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Focus on strategic design first.

Page 17: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

There is no “Best” storage

Page 18: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Focus on strategic design first.

Page 19: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Focus on strategic design first.

Id ParentId Data

1 0 Parent

2 1 Child1

3 1 Child2

Page 20: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Focus on strategic design first.

Id ParentId0 ParentId1 ParentId2 ParentId3 ParentId4 Data

1 0 0 0 0 0 Parent

2 1 0 0 0 0 Child1

3 1 2 0 0 0 Child2

Page 21: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Wrong models cause accidental complexity

Page 22: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Client

Domain

OLAP

GraphDb

StreamProcessing

Events

Hibernate

Page 23: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Event Sourced Systems need a service bus

Page 24: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Client

Domain

Bus

OLAP

GraphDb

StreamProcessing

publish

3nf

Hibernate

Page 25: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Client

Domain

Bus

OLAP

GraphDb

StreamProcessing

publish

3nf

Hibernate

Page 26: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Client

Domain

Bus

OLAP

GraphDb

StreamProcessing

publish

3nf

Hibernate

New Model?

Page 27: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Client

Domain

OLAP

GraphDb

StreamProcessing

Events

Hibernate

Page 28: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Client

Domain

OLAP

GraphDb

StreamProcessing

Events

Hibernate

New Model?

Page 29: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Event Sourcing is more complex!

Page 30: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

What big companies are using Event Sourcing?Because obviously we make our decisions this way!

Page 31: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Event Sourced systems must be slow

Page 32: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Event Sourced systems must be object oriented

Page 33: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

What is the “bestest” Event Sourcing

framework ever?Cirqus of course, at least the guys are local when it

sucks

Page 34: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

But what about all my data with Event Sourcing

it must be huge!If it fits on a micro-SD its not big data.

Page 35: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

CQRS is just a teaching pattern!

Page 36: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Event Sourced systems must be slow

Page 37: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Event Sourced systems must be object oriented

Page 38: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

But what about all my data with Event Sourcing

it must be huge!

Page 39: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Event Sourcing isn’t “enterprisey”

Page 40: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

Event Sourcing isn’t “enterprisey”

THANKS!

Page 41: Event Sourcing - GOTO Conferencegotocon.com › dl › goto-aar-2014 › slides › GregYoung_EventSourcing.… · Event Sourced systems must be object oriented. What is the “bestest”

No really Thanks!