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

Event Driven Development

carnage
March 09, 2018

Event Driven Development

carnage

March 09, 2018
Tweet

More Decks by carnage

Other Decks in Technology

Transcript

  1. Event Driven Development
    Christopher Riley
    ConFoo 2018
    1

    View Slide

  2. Introduction

    View Slide

  3. Introduction
    • Event sourcing
    2

    View Slide

  4. Introduction
    • Event sourcing
    • Event Driven Architecture
    2

    View Slide

  5. Introduction
    • Event sourcing
    • Event Driven Architecture
    • Task Based UI
    2

    View Slide

  6. Introduction
    • Event sourcing
    • Event Driven Architecture
    • Task Based UI
    • Event storming
    2

    View Slide

  7. What is an event?
    2

    View Slide

  8. What is an event?
    • Something which has happened in the past
    3

    View Slide

  9. What is an event?
    • Something which has happened in the past
    • Relevant to a domain expert
    3

    View Slide

  10. What is an event?
    • Something which has happened in the past
    • Relevant to a domain expert
    • Not technical
    3

    View Slide

  11. What is an event?
    • Something which has happened in the past
    • Relevant to a domain expert
    • Not technical
    • Raised in response to an input
    3

    View Slide

  12. Task based UI

    View Slide

  13. A CRUD UI
    4

    View Slide

  14. A Task Based UI
    5

    View Slide

  15. Everything a company does is part of a
    process
    5

    View Slide

  16. Why are task based UI’s helpful to event
    based systems?
    5

    View Slide

  17. Event sourcing

    View Slide

  18. A familiar model
    6

    View Slide

  19. Event sourcing example
    7

    View Slide

  20. What does an event sourced system actually
    look like?
    7

    View Slide

  21. Event sourcing architecture
    8

    View Slide

  22. Handling a command
    9

    View Slide

  23. Inside the model
    10

    View Slide

  24. Inside the model
    11

    View Slide

  25. Handling Events
    12

    View Slide

  26. Projections

    View Slide

  27. Projections
    • Turn events into read models
    13

    View Slide

  28. Projections
    • Turn events into read models
    • Can be eventually consistent
    13

    View Slide

  29. Projections
    • Turn events into read models
    • Can be eventually consistent
    • Can be rebuilt
    13

    View Slide

  30. A projection
    14

    View Slide

  31. Process Managers

    View Slide

  32. Process managers
    • Handle business logic around events
    15

    View Slide

  33. Process managers
    • Handle business logic around events
    • A state machine
    15

    View Slide

  34. Process managers
    • Handle business logic around events
    • A state machine
    • Keep track of failures
    15

    View Slide

  35. Process managers
    • Handle business logic around events
    • A state machine
    • Keep track of failures
    • Be careful with replays
    15

    View Slide

  36. A Process Manager
    16

    View Slide

  37. Event Driven Architecture

    View Slide

  38. Event Driven Architecture
    17

    View Slide

  39. Cross System Process
    18

    View Slide

  40. Conclusions

    View Slide

  41. Thanks
    • @giveupalready
    • https://github.com/carnage
    • https://carnage.github.io
    19

    View Slide