1 / 18

Let’s Learn Together

Let’s Learn Together. Intro to CQRS. Ted M. Young @jitterted Developer & Agile Coach Guidewire Software, San Mateo, CA. Silicon Valley Code Camp – October 9, 2011. Creative Commons Attribution- ShareAlike ( CC BY-SA 3.0 ). What’s the Problem. CAP Consistency Availability

kana
Download Presentation

Let’s Learn Together

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Let’s Learn Together Intro to CQRS Ted M. Young @jitterted Developer & Agile Coach Guidewire Software, San Mateo, CA Silicon Valley Code Camp – October 9, 2011 Creative Commons Attribution-ShareAlike (CC BY-SA 3.0)

  2. What’s the Problem • CAP • Consistency • Availability • Partitionability

  3. Can’t Have All Three • CAP: Choose Two • Consistency + Availability • Sacrifice Partitionability • E.g., single database, clustered database • Consistency + Partitionability • Sacrifice Availability • E.g., pessimistic locking, distributed locking • Availability + Partitionability • Sacrifice Consistency • E.g., optimistic locking, merging, expirations • Many systems are like this: eventually consistent • Whether you like it or not

  4. BASE vs. ACID • Basically Available • Soft-state • Eventual consistency • Stale data is OK

  5. What’s so bad about Eventual Consistency

  6. BASE is Not New Inktomi Presentation in 1998

  7. BASE vs. ACID Not an either-or, but a spectrum

  8. CQRS Leans to BASE

  9. CQRS is Command Query Responsibility Segregation

  10. http://www.udidahan.com/2009/12/09/clarified-cqrs/

  11. Command Mutator

  12. Re-think UI Stop The Forms No more CRUD?

  13. Query Read-Only With respect to the queried data

  14. Resources: CAP, Other Background • Bertrand Meyer • Command-Query Separation, §23.1 (p. 751) • Object-Oriented Software Construction, 2nd Ed. (ISBN 0136291554) • Dr. Eric Brewer, Inktomi • Presentation (1998) • http://www09.sigmod.org/disc/disc99/disc/nsf_acad_ind/brewer/sld019.htm • Dan Pritchett • BASE and latency • http://www.infoq.com/articles/pritchett-latency • Prevayler • http://prevayler.org/old_wiki/Welcome.html

  15. Resources: CQRS-Specific • Greg Young (no relation) • CQRS and CAP • http://codebetter.com/gregyoung/2010/02/20/cqrs-and-cap-theorem/ • UdiDahan • Good overview • http://www.udidahan.com/2009/12/09/clarified-cqrs/ • Martin Fowler’s CQRS • http://martinfowler.com/bliki/CQRS.html • Axon Framework (Java) • http://www.axonframework.org

  16. Resources: CQRS-Specific • RinatAbdullin • CQRS Starting Page • http://abdullin.com/cqrs/ • More useful info from Rinat with good PDF diagram • http://abdullin.com/xlim/ • PålFossmo • Another nice blog entry on CQRS • http://blog.fossmo.net/post/Command-and-Query-Responsibility-Segregation-%28CQRS%29.aspx

  17. Thanks! Final Questions? Follow me on Twitter: @jitterted Email me: tyoung@guidewire.com [Guidewire is hiring devs and testers!]

More Related