Тёмный

MicroServices, RabbitMQ, CQRS and Event sourcing with Node 

Fredrik Christenson
Подписаться 26 тыс.
Просмотров 16 тыс.
50% 1

In "MicroServices, RabbitMQ, CQRS and Event sourcing with Node" I try to showcase how CQRS and Event sourcing can be used together.
A podcast version of the channel can be found here: anchor.fm/fred...

Опубликовано:

 

15 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 41   
@TightyWhities94
@TightyWhities94 2 года назад
You are equally amazing as developer and a teacher. you need to do more tutorials like this
@trevorasargent
@trevorasargent 3 года назад
This is the best freakin explanation of these 3 topics I have yet to find. Thank you so much!!!!
@williezayn7516
@williezayn7516 3 года назад
dont know if anyone gives a shit but if you are stoned like me atm then you can stream all of the new movies on instaflixxer. Have been watching with my gf for the last couple of months :)
@willcassius5917
@willcassius5917 3 года назад
@Willie Zayn yea, I have been watching on instaflixxer for years myself :)
@dufferzzzzz
@dufferzzzzz 3 года назад
Sat here staring at the screen thinking.. Isn't this just like redux? Then you mentioned it too.. Fascinating video thankyou! Definitely helped me understand things more clearly than the 'talks' on these subjects
@tgrem
@tgrem 3 года назад
Can I have access to the repo?
@travelyzx
@travelyzx 3 года назад
Guys, I'm a product person. I've worked with developers who used this approach on my products. I just can't relate how things listen to each other in events backbone, rabbit mq? That's fine. You throw a command to rabbit mq to do something. Then how other services learn the result of your command? The question is simply command triggers queries or queries listen to the rabbit mq and find relevant events there. How is this working? : )
@travelyzx
@travelyzx 3 года назад
I see that you use dispatcher service to check events and direct them to relevant service. Is this the general approach or am I wrong?
@nikolabozic3918
@nikolabozic3918 4 года назад
Thanks mate
@sariksiddiqui6059
@sariksiddiqui6059 3 года назад
In StoreService ,in the IF condition, you are finding record by event.id in the View Model. How is this possible, given all event ids would be unique(generated for command/write) .Finding by something like bidder would still make sense since an already existing record could be there for a bidder which could be reduced .Or it's just to take care in case same event flows into the read model more than once
@MeetSingh-jl9ts
@MeetSingh-jl9ts 4 года назад
thanks for the video. it would be great if you could share the source code
@fuadnafiz98
@fuadnafiz98 4 года назад
Can I make Just 1 tiny request??? Please use a monospace font in code
@vikas2426
@vikas2426 4 года назад
Can you push this code to GitHub and provide link
@ankitrathore3946
@ankitrathore3946 3 года назад
You can use mongodb changestreams for updated data ..
@maksimsergeevich5939
@maksimsergeevich5939 4 года назад
Hello, Fredrik! Which framework you can advice for API event-sourcing service running on Node.js?
@FredrikChristenson
@FredrikChristenson 4 года назад
No sorry, never used a framework for event sourcing.
@maksimsergeevich5939
@maksimsergeevich5939 4 года назад
@@FredrikChristenson Thanks
@jithin_zac
@jithin_zac 4 года назад
Hey brother, thanks for sharing such valuable contents, I have a doubt regarding the placeBid function in the app.js which doesnot wait for the actual process to complete inorder to sent the response back to the user.What if something goes wrong. The user still will get a status 200 right. How is it handled.Please pardon me if the question is too dumb. Thank you.!
@FredrikChristenson
@FredrikChristenson 4 года назад
It's a great question actually because it comes down to a problem that is not possible to solve and that is the choice of accuracy or availability. When the user is placing bids and there is an error with the bid 2 things can happen. 1. Another bid comes in and that makes the failed bid meaningless 2. The bidding window closes and the users winning bid is not registered In scenario 1 the user is non the wiser that something went wrong and as long as the issue is a temporary one the system works as intended. In scenario 2 the previous bid will win and although there is a loss in profit the system is still working. Should the user be the only bidder they will call the company and be able to resolve the problem and remember that all of this is very unlikely to happen. If we tried to go for accuracy the overall performance of the application will go down and sometimes that is ok but if we have thousands of bids every second the cost of running that system "perfectly" will often outweigh the occasional failed bid so if we can save cost by making everything run faster and always be available we will actually make more money.
@jithin_zac
@jithin_zac 4 года назад
@@FredrikChristenson Got it.! Thank you for the clear explanation.
@synthesiakin2543
@synthesiakin2543 4 года назад
Is there a book / resource you recommend to learn cqrs?
@FredrikChristenson
@FredrikChristenson 4 года назад
This is .NET specific but the talk shows some really interesting ideas on CQRS: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-_lwCVE_XgqI.html For learning the basics any blog article will do.
@sariksiddiqui6059
@sariksiddiqui6059 3 года назад
Awesome tutorial..any chance I can see the source code?Also how would aggregating state work once the event logs become too big?We cant keep building the final state from the initial state forever
@FredrikChristenson
@FredrikChristenson 3 года назад
github.com/fChristenson/cqrs-sourcing The event queue needs to be emptied at an arbitrary point but that doesn't matter in this case since the message has already been delivered. As for the events stored in the database the assumption of event sourcing is that you have infinite storage space. This works since you only need to recreate the views on rare occasions.
@sariksiddiqui6059
@sariksiddiqui6059 3 года назад
@@FredrikChristenson thanks man..so as far as i get, if I have to spin up a elastic search for a search functionality,Ill have to keep pushing the events to it everytime the command/write is issued(and acknowledged, and maybe an offset is set so it can replay in case of non acknowledgment).So the elastic search will be working on its current state at any point of time and only when it crashes, we need to rebuild it from the initial state .Also write to db being read will always be same as the actual writes, we can only chose dbs suited for both. Maybe cassandra for write(only insert) and relational(denormalized)/graph/elastic for read
@mohamedbocarsemega9309
@mohamedbocarsemega9309 3 года назад
is there an article going on details about this. great content
@adam-bt5xo
@adam-bt5xo 4 года назад
Lovely, thanks!
@onkar9155
@onkar9155 4 года назад
Hello sir, I am your Big Fan! Your videos are always motivational sir, It would be great if you shortly explain what is SOAP/Microservices/Rest APi which is widely used in industries? #AspiringSoftwareDeveloper
@FredrikChristenson
@FredrikChristenson 4 года назад
I have a video about that already iirc
@aleksajovanovic4900
@aleksajovanovic4900 3 года назад
git repo with code please? by the way great video, subscribed, liked, keep on with good work please i wish there was a love button for this clip :D
@FredrikChristenson
@FredrikChristenson 3 года назад
github.com/fChristenson/cqrs-sourcing
@aleksajovanovic4900
@aleksajovanovic4900 3 года назад
​@@FredrikChristenson hey :D i was thinking something.. This is cqrs, command and query segregation :D. 1) Commands should work only with events, updating just BidEventModel. 2) Query should work with BidViewModel, getting data from it. 3) app.dispatcher should be a technique to communicate between event model and view model. Listening if any new events occurred and update the view database every 5 seconds. So in StoreService class you should not call BidViewModel.findOne(event.id) on line 12 to get the current state of bid. Instead you should call BidEventModel.findAll(event.id) and reduce all the events to the current state of bid. What do you think about this?
@erenbagc7485
@erenbagc7485 3 года назад
I have once got put on a project. A finished project. It was about betting and lots of money was getting processed. When I looked at the code I remember not seeing 'anything' in the routes. There was no code in the mother fucking routes. It was a system just like this. They paid me a lot of money for 2 months. I couldnt understand the architechure and got fired. 😂 Now by time I am starting to understand. Weakest point of mine was nginx/proxy knowledge.
Далее
A Beginner's Guide to Event-Driven Architecture
37:28
Собираю Маню к осени ✨
00:48
Просмотров 946 тыс.
Event Sourcing   You are doing it wrong by David Schmitz
43:05
RabbitMQ Crash Course
42:53
Просмотров 203 тыс.
DDD, event sourcing and CQRS - theory and practice
1:05:18
Собираю Маню к осени ✨
00:48
Просмотров 946 тыс.