Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
hello!
@pieterkoornhof
sneakycode.net
Assume Complex
Problems
accidental
complexity
3 Choices
#1
sql
#1
orm
logic
sql
#1
orm
logic
dto
+
service
ddd
entities
sql
#1
orm
logic
sql
#1
orm
logic
views
sql
#1
views
sql
#1
#1 Confused Models
#2
Full Text
Searching
Related
Items
Data
Blobs
Reporting
Fancy
Database
#2
Graph
Relational
Fancy
Database
#2
Search
Index
Document
App
#2
Graph
Relational
Search
Index
Document
#2 Wrong Models
( Sucky Database )
#3
#3
Cart
Product
Customer
*
Peets Cart
#3
++++
++++ + -
Peets Cart
#3
Cart
Product
Customer
*
1. Added Apple
2. Added Apple
3. Added Rocket
4. Added Camera
5. Removed Rocket
6. Added Bike
7. P...
Cart
Product
Customer
*
Removed
Item
*
#3
1. Added Apple
2. Added Apple
3. Added Rocket
4. Added Camera
5. Removed Rocket
6. Added Bike
7. Paid
Cart
Product
Custome...
#3 Data Loss
#1 Confused Models #2 Wrong Models #3 Data Loss
accidental complexity
data Graph
Relational
Fancy
Database
Search
Index
Document
#1 Confused Models #2 Wrong Models #3 Data Loss
1. Added Apple
...
Event Sourcing
event store
Stores Events
removedFromCart {
cartId: 2134-DSF3-SDFW,
item : Rocket,
quanity: 1
}
1. Added Apple
2. Added Ap...
event store
Append Only
Immutable
No Updates No Deletes
I want
to Pay
Command
(write)
App
pay {
cartId: 2134-DSF3-SDFW,
discount: 31%,
cardDetails: Visa
}
Command
(write)
App
event
store f(events) => state
f(state, command) => event(s)
1. Added Apple
2. Added Apple
3. Added Ro...
Command
(write) read
App
event
store
sql
neo4j
f(events) => viewState
command eventLogic View
command eventLogic View
store
Just Messages
No Data
Loss!
command eventLogic View
Things Happend
Replay!
command eventLogic View
Scale!
command eventLogic View
app.Handle( Command )
store.Load<T>( Id ) store.Save( T )
Minimal Boilerplate!
command eventLogic View
input
output
Testing!
events, command => event(s)
command eventLogic View
jake
sas
Workload!
rob
Characteristics
Multiple Databases
Operational Complexity
Eventual Consistency
3 Choices
geteventstore.com
github.com/SneakyPeet/EasyEventSourcing
thanx!
@pieterkoornhof
sneakycode.net
Credits
Special thanks to all the people who made and released
these awesome resources for free:
✘ Presentation template b...
Upcoming SlideShare
Loading in …5
×

Event Sourcing and Combating Accidental Complexity

532 views

Published on

These are the slides for my Entelect DevDay 2016 talk about how Event Sourcing can solve the accidental complexity we as developers add to software systems daily.

Published in: Engineering
  • Be the first to comment

Event Sourcing and Combating Accidental Complexity

  1. 1. hello! @pieterkoornhof sneakycode.net
  2. 2. Assume Complex Problems
  3. 3. accidental complexity
  4. 4. 3 Choices
  5. 5. #1
  6. 6. sql #1 orm logic
  7. 7. sql #1 orm logic dto + service ddd entities
  8. 8. sql #1 orm logic
  9. 9. sql #1 orm logic views
  10. 10. sql #1 views
  11. 11. sql #1
  12. 12. #1 Confused Models
  13. 13. #2
  14. 14. Full Text Searching Related Items Data Blobs Reporting Fancy Database #2
  15. 15. Graph Relational Fancy Database #2 Search Index Document
  16. 16. App #2 Graph Relational Search Index Document
  17. 17. #2 Wrong Models ( Sucky Database )
  18. 18. #3
  19. 19. #3 Cart Product Customer *
  20. 20. Peets Cart #3
  21. 21. ++++ ++++ + - Peets Cart #3
  22. 22. Cart Product Customer * 1. Added Apple 2. Added Apple 3. Added Rocket 4. Added Camera 5. Removed Rocket 6. Added Bike 7. Paid #3
  23. 23. Cart Product Customer * Removed Item * #3
  24. 24. 1. Added Apple 2. Added Apple 3. Added Rocket 4. Added Camera 5. Removed Rocket 6. Added Bike 7. Paid Cart Product Customer * Removed Item * #3
  25. 25. #3 Data Loss
  26. 26. #1 Confused Models #2 Wrong Models #3 Data Loss accidental complexity
  27. 27. data Graph Relational Fancy Database Search Index Document #1 Confused Models #2 Wrong Models #3 Data Loss 1. Added Apple 2. Added Apple 3. Added Rocket 4. Added Camera 5. Removed Rocket 6. Added Bike 7. Paid CQRS Polyglot Data Event Sourcing
  28. 28. Event Sourcing
  29. 29. event store Stores Events removedFromCart { cartId: 2134-DSF3-SDFW, item : Rocket, quanity: 1 } 1. Added Apple 2. Added Apple 3. Added Rocket 4. Added Camera 5. Removed Rocket 6. Added Bike 7. Paid
  30. 30. event store Append Only Immutable No Updates No Deletes
  31. 31. I want to Pay
  32. 32. Command (write) App pay { cartId: 2134-DSF3-SDFW, discount: 31%, cardDetails: Visa }
  33. 33. Command (write) App event store f(events) => state f(state, command) => event(s) 1. Added Apple 2. Added Apple 3. Added Rocket 4. Added Camera 5. Removed Rocket 6. Added Bike 7, Paid Cart Product Customer *
  34. 34. Command (write) read App event store sql neo4j f(events) => viewState
  35. 35. command eventLogic View
  36. 36. command eventLogic View store Just Messages No Data Loss!
  37. 37. command eventLogic View Things Happend Replay!
  38. 38. command eventLogic View Scale!
  39. 39. command eventLogic View app.Handle( Command ) store.Load<T>( Id ) store.Save( T ) Minimal Boilerplate!
  40. 40. command eventLogic View input output Testing! events, command => event(s)
  41. 41. command eventLogic View jake sas Workload! rob
  42. 42. Characteristics Multiple Databases Operational Complexity Eventual Consistency
  43. 43. 3 Choices
  44. 44. geteventstore.com
  45. 45. github.com/SneakyPeet/EasyEventSourcing
  46. 46. thanx! @pieterkoornhof sneakycode.net
  47. 47. Credits Special thanks to all the people who made and released these awesome resources for free: ✘ Presentation template by SlidesCarnival ✘ Photographs by Unsplash

×