@geteventstore

from zero to dev in 15 mins

Mirosław Pragłowski / @mpraglowski

event sourcing

  • An event is something that has happened in the past.
  • Saving & loading objects
  • There is no Delete
  • Business Value of the Event Log

create order #1

Order created


  OrderNo     : 425345/01/2014
  InvoiceDate : 2014-01-20
  CustomerId  : 813-319-28-24
    

create order #2

Item added


  OrderNo     : 425345/01/2014
  ProductId   : MBA138GBRAM
  Amount      : 1
    

create order #3

Item added


  OrderNo     : 425345/01/2014
  ProductId   : TRACKPAD
  Amount      : 1
    

create order #4

Item added


  OrderNo     : 425345/01/2014
  ProductId   : CINDISP27
  Amount      : 1
    

create order #5

Shipment details added


  OrderNo     : 425345/01/2014
  ShipTo      : ......
    

create order #6

Item removed


  OrderNo     : 425345/01/2014
  ProductId   : TRACKPAD
  Amount      : 1
    

create order #7

Order approved


  OrderNo     : 425345/01/2014
    

event store

setup dev evnironment

Post BuildStuff work by Paul Stack (@stack72): https://github.com/stack72/vagrant-geteventstore.

Setup instructions in my blog post Setup EventStore with Vagrant

why ?

A single model cannot be appropriate for reporting, searching,
and transactional behaviors…

@gregyoung at BuildStuff 2013

projections

Left Fold: function(state, event) → state



  when([SomePatternMatch],
    function(state, event) { return new state; });

  

projections

  • use JavaScript to configure a left fold
  • can query historical data and then continue running into the future
  • everything is a stream
  • to be released out of beta Jan 2014

here should be dragons...

... but I f**ked up my EventStore installation 2h ago

Available at

https://talks.praglowski.com/get-event-store/