The Art of CQRS

5,103 views

Published on

CQRS concept, concept, description and depth inside.

Published in: Technology, Business

The Art of CQRS

  1. 1. The Art of CQRS<br />Slava Pocheptsov<br />Tech Leader<br />pocheptsov<br />pocheptsov@gmail.com<br />
  2. 2. 1<br />Why?<br />Distributed System<br />Complex Enterprise Applications<br />High Load<br />Parallel Development<br />
  3. 3. 2a<br />Current Warrior's Way<br />Layered Onion Structure<br />
  4. 4. 2b<br />Current Warrior's Way<br />SOA<br />
  5. 5. 2c<br />Current Warrior's Way<br />Custom Solution<br />
  6. 6. 3a<br />Overview<br />CQRS – <br />The Cult of<br />Shiny Things<br />Command Query<br />Responsibility<br />Segregation<br />
  7. 7. Overview<br />CQRS as a concept is a way of designing disconnected solutions<br />3b<br />
  8. 8. 4<br />Reinvent the Wheel<br />C Q R S<br />
  9. 9. 5a<br />Meaning<br />
  10. 10. Meaning<br />CQRS Principle<br />CQRS Architecture<br />DDDD<br />How, What, Why?<br />5b<br />
  11. 11. 6<br />Principle<br />
  12. 12. 7<br />Architectures<br />
  13. 13. 8<br />DDDD<br />DDD - Aggregate Root<br />Event Sourcing<br />CQRS<br />Messaging System<br />
  14. 14. Queries<br />View Model instead of DTO<br />Query Data Storage<br />Scaling <br />9<br />
  15. 15. 10<br />Commands<br />Perform<br />Validation<br />Rethinking UI<br />Queue<br />Scaling<br />Independent<br />Fallacy reuse<br />
  16. 16. 11<br />Command Handler Combinations<br />
  17. 17. Domain Model<br />Aggregate Root within Command Handler<br />Context<br />Active Record<br />SPs<br />Monkey input<br />12<br />
  18. 18. 13<br />Events<br />Happened<br />
  19. 19. 14<br />Storage<br />Barrels<br />
  20. 20. 15<br />Architecture Reminder<br />
  21. 21. But…<br />
  22. 22. Caveats<br />Complexity?<br />Out of order<br />Distributed Transaction<br />Data staleness<br />Sagas<br />Domain Design<br />Focus on Domain Validation<br />Task-Based UI<br />Knowledge<br />16<br />
  23. 23. 17<br />Value<br />Saga oriented! first-one-wins, or last-one-wins<br />Team collaboration<br />Scaling<br />Simplify complex logic support<br />Part of SOA<br />BASE<br />
  24. 24. No<br /> numbers<br />or<br />charts<br />
  25. 25. Implementation<br />nCQRS<br />Axon Framework<br />Fohjin<br />Lokad.CQRS<br />BankSimplistic<br />SimpleCQRS<br />Agr.CQRS<br />JDon<br />18<br />
  26. 26. Demo<br />
  27. 27. 19<br />Production<br />LokadSalescast<br />Amazon (SOA)<br />No public available info about Enterprise systems<br />Tvene<br />
  28. 28. 20<br />Future<br />
  29. 29.
  30. 30. Answers<br />http://blog.pocheptsov.com/p/cqrs-references.html<br />http://cqrsinfo.com/http://codebetter.com/gregyoung/http://abdullin.com/http://groups.google.com/group/dddcqrshttp://blog.jonathanoliver.com/http://igor.quatrocode.com/http://cre8ivethought.com/http://www.dennisdoomen.net/http://thinkddd.com/http://www.udidahan.com/<br />
  31. 31. @pocheptsov<br />31337<br />

×