Event sourcing in Javascript

  Рет қаралды 7,434

Fredrik Christenson

Fredrik Christenson

Күн бұрын

Пікірлер
@stangeorge6893
@stangeorge6893 5 жыл бұрын
I've looked on so many articles for the event sourcing in order to understand it better. You explained it perfectly in 16min.
@mti2fw
@mti2fw 3 жыл бұрын
Great video! Simple to understand and apply!
@akashpandya313
@akashpandya313 2 жыл бұрын
Thank you 🙂 Easy to understand.
@victorbouffier3580
@victorbouffier3580 2 жыл бұрын
Great video Fredrik! Very easy to follow. I see you are also storing the finalized order in a separate table, not only the events to build the order. This as necessary in case you want to query two tables through a join (such as orders by customer). I am trying to visualize how to best build the model with several tables to build queries with. Is this the way you would recommend doing it? That is, to have an event store for orders plus a store for the built orders? And is such a way, also have an event store for customers, plus a store for the finalized customer entry? Thanks for your input.
@felipequintero122
@felipequintero122 4 жыл бұрын
Thanks for sharing, it was very useful 🙏
@Andrei_Calazans
@Andrei_Calazans 6 жыл бұрын
Great video, short but precise.
@Andrei_Calazans
@Andrei_Calazans 6 жыл бұрын
After watching this video, I found that mongodb 3.6 has change streams which we could use to listen to change events and do something similar to what you have accomplished there.
@FredrikChristenson
@FredrikChristenson 6 жыл бұрын
Glad you enjoyed it m8! Streams are a great fit for event sourcing, it brings a bit more complexity by using this approach but it has some very nice benefits to it as well. Have a great day and thank you so much for watching!
@nikolabozic3918
@nikolabozic3918 4 жыл бұрын
Thanks a log sharing his video was very useful. Can you make some video implementing CQRS, Event sourcing and RabbitMQ with microservices please. I read a lot of DDD CQRS, but never seen some real project example?
@FredrikChristenson
@FredrikChristenson 4 жыл бұрын
Sure m8 that could be fun.
@RayCh
@RayCh 5 жыл бұрын
Great, best of all videos I have seen so far. Few doubts: 1. What if event source is saved but data isn’t stored assuming mongoDB crashed. As it’s not in a single transaction. 2. What if I repeat the last step without deleting the data?
@FredrikChristenson
@FredrikChristenson 5 жыл бұрын
As long as you have the events you can recreate the state of your view so it becomes transactional even if the database crashes. Think of the events as a long list and the view as what you are left with if you repeat all the steps in the list, even if the view is broken or gone you can always just replay all the steps in the list and be left with the same view. If you didn't delete the data before you replay the events you would be left with two identical views but that is less of an issues since in order to recreate a clean state you simply drop your view database and run your events again to create them. Have a great day and thank you so much for watching!
@RayCh
@RayCh 5 жыл бұрын
Fredrik Christenson But in production there might be billions of records. It’s not that easy to bulk insert so many events.
@RayCh
@RayCh 5 жыл бұрын
kzbin.info/www/bejne/favVi6qlp62jf80
@FredrikChristenson
@FredrikChristenson 5 жыл бұрын
Bulk insert would be very hard when using event sourcing yes and when I do this at work we do it by streaming the events over the course of an hour or two. This works for any size of dataset it just takes time to do it.
@handerson171
@handerson171 5 жыл бұрын
What's the name of your vscode theme?
@FredrikChristenson
@FredrikChristenson 5 жыл бұрын
github.com/fChristenson/fc-configs/blob/master/vsc_settings.json Have a great day and thank you so much for watching!
@geraldcampana9296
@geraldcampana9296 5 жыл бұрын
Hi, great video. I have a question. What happen when error occurs in the middle of creating events?
@FredrikChristenson
@FredrikChristenson 5 жыл бұрын
The reducer should at no point contain code that can fail but if there is an issue with the database connection we will simply ignore the event and either crash or return the unmodified view and logout the error depending on preference. Have a great day and thank you so much for watching!
@geraldcampana9296
@geraldcampana9296 5 жыл бұрын
​@@FredrikChristenson Thanks! Is it okay to use transaction? When events creation fail, it will rollback.
@FredrikChristenson
@FredrikChristenson 5 жыл бұрын
ofc, as long as the replaying of the events will result in the same view your data is consistent.
@geraldcampana9296
@geraldcampana9296 5 жыл бұрын
got it, thank you so much!
@kaushikmani
@kaushikmani 6 жыл бұрын
Can't you put it on github and share link, so we guys can give a deep look to code. If you can, it would be very good for us. well anyways Thanks for the tutorial
@FredrikChristenson
@FredrikChristenson 6 жыл бұрын
Sure m8 here is the code: github.com/fChristenson/A-case-for-event-sourcing Have a great day and thank you so much for watching!
@kaushikmani
@kaushikmani 6 жыл бұрын
@@FredrikChristenson Thanks i am trying to watch your videos one by one in my spare time i sent you connect request on linkedin
MicroServices, RabbitMQ, CQRS and Event sourcing with Node
34:48
Fredrik Christenson
Рет қаралды 16 М.
Gopherfest 2017 | Event Sourcing - Architectures and Patterns with Matt Ho
38:50
The Go Programming Language
Рет қаралды 24 М.
How to have fun with a child 🤣 Food wrap frame! #shorts
0:21
BadaBOOM!
Рет қаралды 17 МЛН
Event Sourcing in NodeJS / Typescript - ESaucy
33:16
Thomas Watson
Рет қаралды 3,7 М.
DDD, event sourcing and CQRS - theory and practice
1:05:18
International JavaScript Conference
Рет қаралды 46 М.
How To Create A Search Bar In JavaScript
14:28
Web Dev Simplified
Рет қаралды 430 М.
Introduction to Event Sourcing in TypeScript and NodeJS with EventStoreDB
1:48:32
Kurrent (formerly Event Store)
Рет қаралды 6 М.
Writing a good Javascript function
24:13
Fredrik Christenson
Рет қаралды 4,1 М.
6. Introduction to CQRS - Event Sourcing, Distributed Systems & CQRS
14:37
Sebastian Daschner
Рет қаралды 85 М.
How to have fun with a child 🤣 Food wrap frame! #shorts
0:21
BadaBOOM!
Рет қаралды 17 МЛН