Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

CQRS without event sourcing

2 675 vues

Publié le

An introduction to CQRS (without Event Sourcing) made at MS experiences days in Paris (and translated in english)

Publié dans : Logiciels

CQRS without event sourcing

  1. 1. Thomas PIERRAIN @tpierrain Bruno BOUCARD @brunoboucard Tomasz JASKULA @tjaskula Eric VERNIE @EricVernie CQRS (without Event Sourcing)
  2. 2. Why CQRS
  3. 3. Scalability issues?
  4. 4. The Pareto Principle 80-20 Root cause 0%0% 80% reading 20% writing
  5. 5. …only one central component to deal with a wide range of constraints. With…
  6. 6. Do you have those constraints in mind while designing your architectures? A question (for you)
  7. 7. How to optimize an app that has to scale for massive read accesses? So…
  8. 8. This is where CQRS is…
  9. 9. CQRS (short version)
  10. 10. CQRS splits the 80s and the 20s
  11. 11. CQRS splits the 80s and the 20s 20 % of time 80 % of time
  12. 12. C Q R S Behind the acronym ( powered by Greg YOUNG - @gregyoung )
  13. 13. Command Query Responsibility Segregation Behind the acronym
  14. 14. Command Query Responsibility Segregation Behind the acronym
  15. 15. CQRS illustrated
  16. 16. CQRS illustrated
  17. 17. CQRS illustrated
  18. 18. CQRS illustrated
  19. 19. CQRS illustrated
  20. 20. CQRS illustrated
  21. 21. CQRS illustrated
  22. 22. CQRS illustrated
  23. 23. CQRS illustrated
  24. 24. CQRS illustrated
  25. 25. CQRS illustrated
  26. 26. CQRS illustrated
  27. 27. CQRS illustrated
  28. 28. CQRS illustrated
  29. 29. CQRS illustrated
  30. 30. Classical transactional databases RDBMS (ACID) « ready-to-eat data », Caches, non-normalized models, (no SQL) CQRS illustrated
  31. 31. Command TRIGGERS AN ACTION Modify the state of the system >> Don’t return data ! << Imperative Verb Ex: BookARoom Query ASKS FOR AN INFORMATION Read-only! Get back data Imperative Verb Ex: GetAvailableRooms Event ALREADY HAPPENED (Immutable) Past-tense Ex: RoomBooked
  32. 32. Demo
  33. 33. Open Source Implementation available on GitHub 2 main parts: CoreClr (Runtime execution) (C++) CoreFx (including classes, collections, file systems, xml, etc.) (C#) ASP.NET Core 1.0 framework relies on it Classic deployment or Container deployment (Linux or Windows) .NET Core // Licensed to the .NET Foundation under one or more agreements.
  34. 34. Live coding
  35. 35. Wrap-up
  36. 36. Warning!
  37. 37. …a top-level architecture pattern Use it for components under stress Do not generalize its usage for all the components of your platform! CQRS is not…
  38. 38. Event Sourcing Also, CQRS is not…
  39. 39. CQRS Event Sourcing but CQRS != Event Sourcing
  40. 40. To conclude…
  41. 41. Well-separated read and write concerns CQRS is mostly Queries Caches, Ready- to-eat data (no SQL) Commands Transactionnal ACID
  42. 42. Merci aussi à Rui CARVALHO, Mendel MONTEIRO-BECKERMAN, Olivier COANET et Clément BOUDEREAU ainsi que Greg YOUNG pour leurs feedbacks et idées pour ce talk.
  43. 43. CQRS origins
  44. 44. Origine de CQRS
  45. 45. Origine de CQRS
  46. 46. Origine de CQRS
  47. 47. Wanna play the lab @home? Follow the white rabbit here: https://github.com/tpierrain/CQRS/blob/master/LabInstructions. md
  48. 48. @microsoftfrance @Technet_France @msdev_fr @tpierrain @brunoboucard @tjaskula @EricVernie

×