Talk in English - US at ZgPHP meetup #78 2018/02
View Slides: https://speakerdeck.com/robertbasic/all-aboard-the-service-bus-at-zgphp
Short URL: https://joind.in/talk/3ebe6
(QR-Code (opens in new window))
We deal with complicated and complex applications on a daily basis, codebases that are filled with classes that do too many things. One design pattern that can help us with this is CQRS, Command Query Responsibility Seggregation. The idea behind CQRS is to split our models in two - the Command for writing, and the Query for reading. Applying CQRS can lead us to a more maintainable code, code that follows the SOLID principles more closely.
At the heart of CQRS lies the Service Bus - a transport mechanism responsible for dispatching our command, event, and query messages to their destinations.
This talk will give an overview of the CQRS pattern and take a closer look at the different types of service buses - command, event, and query ones. Main takeaway will be practical information on why, when, and how to use them, with emphasis on their differences. We'll also take a look at some of the PHP libraries out there that help us work with service buses like Prooph Service Bus, Simple Bus, Tactician, to name a few.
Comments
Comments are closed.
Only times I noticed Robert being nervous was when he had short brakes telling us he was nervous :) , it's so nice to see you confident on the outside just need to work on the inner confidence.
Pace was good, neither slow nor fast, slides were just right.
I have few small suggestions for the code on the slides:
- put suffixes to class names (instead of UpdatePriceAction call it UpdatePriceActionController, UpdateProductPriceCommand instead of UpdateProductPrice so it would be more clear to the audience what class represents)
- use Money instead of doubles for price hints (or at least integers) so people avoid floating point round-off errors
- I would not suggest using Entities in commands, as handler could change the values inside and controller/service sending the command would be aware of it -> they reference same instance
Nice talk. Maybe . the intro part could be shorten a bit in favor of the "meat" of the talk though.
Flawless English, but it was a bit boring for me, intro was long and examples were too simple and I just didn't catch the benefit over using some other pattern (repositories, services).
First of all, thanks for coming to Zagreb to talk about this topic. I find it personally very interesting and it is always a pleasure to hear more about CQRS.
The talk was great, well rehearsed and I really enjoyed examples of bad and best practice.
I've never heard of query bus before, and the example of throttling queries by using the bus was eye-opening.
Nice talk, but the intro could be shorter with more concrete examples.
Intro was too long and not so relevant, slides need more work, and in the end I still don't understand how or why would I use a service bus.