O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

TDC2016POA | Trilha Arquitetura - CQRS e Event Driven Architecture valem a pena? Sim ou Claro?

335 visualizações

Publicada em

CQRS e Event Driven Architecture valem a pena? Sim ou Claro?

Publicada em: Educação
  • Seja o primeiro a comentar

TDC2016POA | Trilha Arquitetura - CQRS e Event Driven Architecture valem a pena? Sim ou Claro?

  1. 1. Globalcode – Open4education CQRS and Event Driven Architecture Andre Eberhardt
  2. 2. Globalcode – Open4education whoami /in/andreeberhardt @aeberha /eberhara Software Specialist @ ADP
  3. 3. Globalcode – Open4education motivation
  4. 4. Globalcode – Open4education agenda cqrs what’s it? why does it matter? when should (or not) it be applied? event driven architecture intro usage with cqrs sample app...
  5. 5. Globalcode – Open4education what’s cqrs? Command Query Responsibility Segregation
  6. 6. Globalcode – Open4education an architectural model? NO
  7. 7. Globalcode – Open4education a pattern? YES!
  8. 8. Globalcode – Open4education it’s not this...
  9. 9. Globalcode – Open4education it could be this...
  10. 10. Globalcode – Open4education ... or even this!
  11. 11. Globalcode – Open4education so, why does it matter? Scalability Reduce complexity (domain level) Flexibility Focus on domain logic / proper technology Task-based operations / Stale data
  12. 12. Globalcode – Open4education but... and the downsides? Learning curve / fear of change Complexity Eventual consistency "Most people using CQRS (and event sourcing too) shouldn't have done so." —Udi Dahan
  13. 13. Globalcode – Open4education so when should I apply it? Decision per Bounded Context Collaborative / complex domains Multiple operations in parallel (stale data) Distributed / specialized teams Command vs Read performance
  14. 14. Globalcode – Open4education and when avoid it? Simple / static CRUD Sequential operations Non-collaborative bounded contexts Eventual consistency not acceptable
  15. 15. Globalcode – Open4education event driven architecture
  16. 16. Globalcode – Open4education what’s that now? State changes Event consumers vs producers Fire-and-forget Happens in the past “User created”, “User deleted”, ...
  17. 17. Globalcode – Open4education and why is that good? Immutable states Loosely coupled apps Fits well with some rock stars (CQRS and DDD) Async process State reproducibility
  18. 18. Globalcode – Open4education request-driven soa
  19. 19. Globalcode – Open4education event driven architecture
  20. 20. Globalcode – Open4education cqrs without events...
  21. 21. Globalcode – Open4education cqrs and events?!
  22. 22. Globalcode – Open4education lessons learned Start small and extensible Scale when you need to scale Avoid huge / complex architectures for small problems Avoid scaling when you don’t need to
  23. 23. Globalcode – Open4education gurus Greg Young Martin Fowler Udi Dahan
  24. 24. Globalcode – Open4education sample app... https://github.com/eberhara/sample-cqrs
  25. 25. Globalcode – Open4education thank you :) /in/andreeberhardt @aeberha /eberhara

×