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

Begin EventSourcing with Lagom - Javaforum Q4 2017

Begin EventSourcing with Lagom - Javaforum Q4 2017

Relational databases are great! They are well proven powerhouses in persisting state, but are they always the best solution to your problems?

Join me as we explore a more functional approach to how we deal with state in our systems. We'll start by covering the basis of EventSourcing and continue to take a hands-on look on the Lagom framework and Akka. You will hopefully leave with a stepping stone to start to implement EventSourced systems on the JVM.

Ola Petersson

November 23, 2017
Tweet

More Decks by Ola Petersson

Other Decks in Programming

Transcript

  1. .

  2. CMD

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

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

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

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

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

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

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

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

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

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

  13. • lagom - lagomframework.com/ • Akka - https://akka.io/ • reactive

    microsystems - https://t.co/dm4wLJKV6f by Jonas Bonér • develop reactive microservices - https://www.lightbend.com/blog/developing-reactive-microservi ces-free-oreilly-mini-book-by-java-champion-markus-eisele by Markus Eisele • Event Sourcing - https://martinfowler.com/eaaDev/EventSourcing.html by Martin Fowler •