Suppose when we are placing the order, if we got msg "the product is out of stock" as some other order has booked it. Do we have a way to avoid it? where in who added to basket first will get those items.
If it's out of stock, others won't get chance to book it. If by chance due to parallel systems or some glitch it gets ordered then it will be cancelled in subsequent flows.
Asynchronous replication mechanism is used to sync data form write to read DB. lets say you have one master DB which accepts write from user and there are multiple slave DB instances which are used for user read queries. All the write requests on master are replicated to slave DB instance asynchrounously without affecting the latency on user request processing. Its worth noting that this will be Eventual consistency of data so might be some delay(not necessarily noticeable to user) to reflect to read DB instances.
why we need to copy the same data of 2 databases into another database? if ends up with data duplication? why we do that? studying CQRS for first time hence asking
Different purpose of the databases. 1. User facing databases shouldn't be used for analytics purpose 2. Data backup 3. If there are huge traffic then we have to use one db for one purpose only
you can handle read traffic separately, you can have multiple read replica to decrease response time for all read operations and only one writeable database.
Complete Course Plan - github.com/greenlearner01/Microservices-Architecture
Playlist - ruclips.net/p/PLq3uEqRnr_2EDsuxPboP9_WtVRR_TaMrF
pro tip : you can watch series on flixzone. Been using it for watching loads of movies these days.
@Trevor Luciano Yup, have been using Flixzone} for months myself =)
@Trevor Luciano Yup, I've been watching on flixzone} for since november myself :)
@Trevor Luciano yup, have been using flixzone} for since december myself :)
@Trevor Luciano yup, I have been watching on flixzone} for months myself :D
Very nice explaination
Thanks for liking
Very well explained😊
I could have heard the full video but the audio is very poor, please improve audio mic and upload a new video if possible, thanks!
The best explanation..
The best explanation, thank u so much, it would have been much better if there was a demo on implementation aswell.
Glad it was helpful!
Demo will be added soon.
Very nice explanation
You explained it so good !
Consider using a good quality mic for recording.
Nicely explained.
Working on it
Suppose when we are placing the order, if we got msg "the product is out of stock" as some other order has booked it. Do we have a way to avoid it? where in who added to basket first will get those items.
If it's out of stock, others won't get chance to book it.
If by chance due to parallel systems or some glitch it gets ordered then it will be cancelled in subsequent flows.
Thanks bro
What r tools or frameworks, to synch data between read n write dbs? so data / system could b consistent..
Asynchronous replication mechanism is used to sync data form write to read DB.
lets say you have one master DB which accepts write from user and there are multiple slave DB instances which are used for user read queries.
All the write requests on master are replicated to slave DB instance asynchrounously without affecting the latency on user request processing. Its worth noting that this will be Eventual consistency of data so might be some delay(not necessarily noticeable to user) to reflect to read DB instances.
Sir, Hindi mai bhi kuch lectures dal dein. By the way, you did explain very nicely. Thanks
improve voice quality 👍...
Good content 🙏
Sure 😊
why we need to copy the same data of 2 databases into another database? if ends up with data duplication?
why we do that?
studying CQRS for first time hence asking
Different purpose of the databases.
1. User facing databases shouldn't be used for analytics purpose
2. Data backup
3. If there are huge traffic then we have to use one db for one purpose only
Nice video sir, do you have any plan for video on cqrs implementation
Its good if you create any short api on this pattern
Yea. After this series ends, I'll try to cover the demo as much as possible.
appreciate sir.....
what is advantage of seperating ? or what is the problem if we read from same db
you can handle read traffic separately, you can have multiple read replica to decrease response time for all read operations and only one writeable database.
@@devangikacha1477 what is the exact use of having read and write DB separately ?
when you have huge data load and different amount of load on write and read then its necessary to separate both
Why use Event handlers and Database triggers . That would be too much of code handling. A better way would be synchronous replication of the database.
It's about latency. When optimization is considered then there are some operations which can be handled in async way so that user don't have to wait
@@codefarm0 But what if you have to do a read operation just after a write operation. In that case an async call will not give you updated results.
sound problem
Poor quality Audio..
Disturbing Audio....