Top Banner
Query or Command (Short) Introduction to CQRS Zbyszko Papierski Solutions Architect @ allegro.pl Twitter: @ZPapierski Linkedin: https://www.linkedin.com/in/zbyszko http://allegrotech.io/authors/zbyszko
21

Query or Command - (short) introduction to CQRS

Feb 14, 2017

Download

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Query or Command - (short) introduction to CQRS

Query or Command(Short) Introduction to CQRS

Zbyszko PapierskiSolutions Architect @ allegro.plTwitter: @ZPapierskiLinkedin: https://www.linkedin.com/in/zbyszkohttp://allegrotech.io/authors/zbyszko.papierski/

Page 2: Query or Command - (short) introduction to CQRS

C.R.U.D.

Page 3: Query or Command - (short) introduction to CQRS

CommandQueryResponsibilitySegregation

Greg Young

Bertrand Meyer

Martin Fowler

Page 4: Query or Command - (short) introduction to CQRS

Command (vs) Query

Page 5: Query or Command - (short) introduction to CQRS

Responsibility Segregation

Page 6: Query or Command - (short) introduction to CQRS
Page 7: Query or Command - (short) introduction to CQRS
Page 8: Query or Command - (short) introduction to CQRS
Page 9: Query or Command - (short) introduction to CQRS

NOT one style to rule them all

Page 10: Query or Command - (short) introduction to CQRS

scalable but

eventually consistent

Page 11: Query or Command - (short) introduction to CQRS

more elasticbut

more (globally) complex

Page 12: Query or Command - (short) introduction to CQRS

What’s next?

Page 13: Query or Command - (short) introduction to CQRS

Event Sourcing

Page 14: Query or Command - (short) introduction to CQRS

Task Based UI

Google says you don’t need that save button...

Page 15: Query or Command - (short) introduction to CQRS

Technology Stack?

Page 16: Query or Command - (short) introduction to CQRS

Axon Framework

Jdon

Anything you like

Page 17: Query or Command - (short) introduction to CQRS

Stack Example - communication

● Kafka - distributed pub/sub● AngularJS - js framework with good

ansychronous mechanisms● Vert.X - asynchronous web

communication● RxJava - Reactive view changes

Page 18: Query or Command - (short) introduction to CQRS

Stack Example - db solutions

● any db you need ● Cassandra - extremely fast writes and

pretty fast reads● MongoDB - fast document store● Akka Persistence - great

implementation of Event Sourcing

Page 19: Query or Command - (short) introduction to CQRS

Key Takeaways

● As always - “right tool for the job”● Build your views asynchronously● Consider what is the best model for

each query and each command● Consider your consistency and

performance requirements

Page 20: Query or Command - (short) introduction to CQRS

Mandatory Links Slide

● https://cqrs.wordpress.com/ - not updated, but interesting read

● http://martinfowler.com/bliki/CQRS.html - Martin Fowler on CQRS

● http://www.axonframework.org/ ● http://en.jdon.com/

Page 21: Query or Command - (short) introduction to CQRS

???