Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Begin Event Sourcing with Lagom

Begin Event Sourcing with Lagom

Ola Petersson

October 23, 2017
Tweet

More Decks by Ola Petersson

Other Decks in Programming

Transcript

  1. CMD

  2. { addBurger } { food: [], drinks: [] } {

    burgerAdded } commands Events AGGREGATE
  3. { addBurger } { food: [burger], drinks: [] } {

    burgerAdded } commands Events AGGREGATE
  4. { addBurger } { food: [burger], drinks: [] } {

    addBeer } { burgerAdded } commands Events AGGREGATE
  5. { addBurger } { food: [burger], drinks: [] } {

    addBeer } { burgerAdded } { beerAdded } commands Events AGGREGATE
  6. { addBurger } { food: [burger], drinks: [beer] } {

    addBeer } { burgerAdded } { beerAdded } commands Events AGGREGATE
  7. { addBurger } { food: [burger], drinks: [beer] } {

    addSalad } { addBeer } { burgerAdded } { beerAdded } commands Events AGGREGATE
  8. { addBurger } { food: [burger], drinks: [beer] } {

    addSalad } { addBeer } { burgerAdded } { saladAdded } { beerAdded } commands Events AGGREGATE
  9. { addBurger } { food: [burger, salad ], drinks: [beer]

    } { addSalad } { addBeer } { burgerAdded } { saladAdded } { beerAdded } commands Events AGGREGATE
  10. { addBurger } { food: [burger, salad ], drinks: [beer,

    water] } { addSalad } { addBeer } { addWater } { burgerAdded } { saladAdded } { beerAdded } { waterAdded } commands Events AGGREGATE
  11. .