$30 off During Our Annual Pro Sale. View Details »

Data Strategies for Microservice Architectures

Data Strategies for Microservice Architectures

[ Presented together with Edson Yanaga at Microservices Day Atlanta, January 23, 2018
https://www.redhat.com/en/events/red-hat-microservices-day-atlanta#event-tab-1 ]

Marius Bogoevici

January 23, 2018

More Decks by Marius Bogoevici

Other Decks in Programming


  1. Data Strategies for Microservice Architectures Edson Yanaga Director of Developer

    Experience @yanaga Marius Bogoevici Chief Architect, Data Streaming @mariusbogoevici
  2. Code is easy, state is hard

  3. POJOs as an (Anemic) Domain Model

  4. ‘Traditional’ application design

  5. Applying Domain Driven Design

  6. Persistent Data

  7. Strategy: One Database per Microservice

  8. Virtualization: where physical separation is hard

  9. Volatile data: caching and sharing state

  10. Reducing latency via caching

  11. Sharing state - replication and partitioning

  12. Propagating state change: Event Sourcing & CDC

  13. Communication: synchronous/asynchronous 1: ship 2: update state 3: update state

    update state update state OrderCreated
  14. Event Sourcing OrderCreated Id: 1 OrderUpdated Id: 1 OrderCreated Id:

  15. Change Data Capture

  16. CQS (Command-Query Separation)

  17. “Asking a question should not change the answer” (Bertrand Meyer)

  18. CQRS (Command Query Responsibility Segregation)

  19. Join developers.redhat.com 19 CQRS (Command Query Responsibility Segregation)

  20. Join developers.redhat.com 2 0 CQRS with separate data stores

  21. CQRS & Event Sourcing

  22. Why CQRS?

  23. Performance

  24. Distribution Availability Integration Analytics

  25. Join developers.redhat.com 2 5 Canonical Source of Information (Write Data

  26. Join developers.redhat.com 26 Canonical Source of Information (Write Data Store)

    Read Data Store Read Data Store
  27. Join developers.redhat.com 27 Canonical Source of Information (Write Data Store)

    Read Data Store Read Data Store Events Events
  28. Different choices of technology depending on the requirements

  29. Latency Size Staleness Ownership Security Type?

  30. Join developers.redhat.com 30 http://infinispan.org/ In-memory Data Grids

  31. Join developers.redhat.com 31 http://teiid.jboss.org/ Data Virtualization

  32. Join developers.redhat.com 32 http://debezium.io/ Change Data Capture

  33. Join developers.redhat.com Feedback welcome! @mariusbogoevici @yanaga

  34. plus.google.com/+RedHat linkedin.com/company/red-hat youtube.com/user/RedHatVideos facebook.com/redhatinc twitter.com/RedHatNews Thank you!