Тёмный

Do you know Distributed transactions? 

Tech Dummies Narendra L
Подписаться 157 тыс.
Просмотров 226 тыс.
50% 1

#distributedtransactions #concensus #2phasecommit #saga #r3phasecommit #transactions
#systemdesigntips #systemdesign #computerscience #learnsystemdesign #interviewpreperation #amazoninterview #googleinterview #uberinterview #micrsoftinterview
A distributed transaction is a database transaction in which two or more network hosts are involved. Usually, hosts provide transactional resources, while the transaction manager is responsible for creating and managing a global transaction that encompasses all operations against such resources.
A consensus algorithm is a process in computer science used to achieve agreement on a single data value among distributed processes or systems. Consensus algorithms are designed to achieve reliability in a network involving multiple unreliable nodes.
What happens if few commits in commit phase fails?
stackoverflow.com/questions/1...

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

 

19 июн 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 215   
@amartinsn
@amartinsn 2 года назад
"Monolithic architecture is old and gone". Be careful when you say that, because that's wrong. Well modularized and encapsulated monoliths can be better than having a miscroservices architecture. It all depends on the use case.
@manishghoshi3861
@manishghoshi3861 2 года назад
exactly
@mdmozammilkhan4957
@mdmozammilkhan4957 2 года назад
e.g. stackoverflow is still monolith and scales well
@TheLaucomm
@TheLaucomm 2 года назад
In fact, for 99% of applications out there, a microservices architecture is the wrong approach as it comes with a lot of downsides (especially its high complexity and the fact that it is hard to debug as most distributed apps are) that are only worth dealing with if the very limited upside makes a huge difference for you (as for streaming services or extremely large websites like Amazon etc.). For the vast majority of apps out there, some kind of simple architecture, with or without layers, is still the way to go. Microservices are fascinating and hotly talked about and many people think because of that, that they should implement a microservice architecture, which is not the case. Introduce only as many abstractions/components/layers etc. as you actually need.
@chessmaster856
@chessmaster856 2 года назад
Yes. Breaking database has a lot of consequences that may nor be worth the effort
@sasuki479
@sasuki479 Год назад
jus chill dude
@palpek1544
@palpek1544 4 года назад
These videos of yours are so good, and easy to understand, it's insane! You are a great teacher!
@DattatrayaTembare
@DattatrayaTembare 3 года назад
Apricate your efforts to put all this information together! I like your style of explaining the things using comparison. Most (old) people know how things work in monolith and it's easier for then to understand how it works differently in microservices. Thanks! for all these videos on microservices, keep doing your good work.
@nagadityapenumerthy9951
@nagadityapenumerthy9951 3 года назад
Thank you for explaining the distributed transaction management in various ways.
@shivamvishwakarma1475
@shivamvishwakarma1475 3 года назад
12:46 when I am in an interview. BTW, nice explanation.
@VasileSurdu
@VasileSurdu 3 года назад
nullpointer exception
@nammi895
@nammi895 3 месяца назад
🤣🤣🤣🤣 man u really have an eye of eagle & good sense of humour
@adamhughes9938
@adamhughes9938 3 года назад
A great example of the tradeoffs one makes w/ microservices. Wish tech executives would understand this before they just decide that every system in a company is now going to be microservices.
@numbergame4414
@numbergame4414 5 лет назад
Narendra, Thanks for producing unique and original content
@ashishburnwal9010
@ashishburnwal9010 4 года назад
You have explained so clearly. Thanks.
@lonelym13
@lonelym13 2 года назад
12:20 - "I'm not going to recommend anything as I haven't applied these on my projects yet, but this is what I've learned so far" That ladies and gentlemen, is a clear sign of an honest and generous person. Thank you.
@rplusgdj
@rplusgdj 5 лет назад
Nice video, thanks a ton. For next video, can you please pickup this subject "How to protect your distributed system, or how to protect your endpoints from DDOS, i.e. security aspects of system design."
@ravitiwari2160
@ravitiwari2160 3 года назад
Hey, Thank you so much all your knowledge sharing. I am able to perform very nice in all my interviews. Keep up the good work. More power to you. Keep rocking!!!
@phssyk2
@phssyk2 3 года назад
Thanks so much for the videos, really good explanation on a very complex topic
@vaibhavsrivastava4645
@vaibhavsrivastava4645 2 года назад
Awesome content. Thanks for sharing knowledge. Appreciating your hard work.
@chrsitina5363
@chrsitina5363 3 года назад
This is a great video, thanks for sharing!
@eliseumds
@eliseumds 4 года назад
Oh, that's interesting. I had no idea about this extra microservice to deal with roll-backs for a saga. Makes sense.
@yousuffmalik
@yousuffmalik 4 года назад
The extra service is not really needed as the order service can also listen to the failure events on the queue
@amitmhatre35
@amitmhatre35 4 года назад
What is the point of creating new microservice which will eventually point to same db
@milindkhurd
@milindkhurd 3 года назад
@@amitmhatre353rd ms will make it anti pattern, wound'nt it?
@sreddy8141
@sreddy8141 2 года назад
@@amitmhatre35 may be jus to meintain the single responsibility design principle, jus guessing, im not sure though 🙂
@nreed7718
@nreed7718 Год назад
Thanks, I was unaware of how distributed transactions are handled in microservices because quite honestly, I've never seen any of these in the systems I've worked on. Either transactions were handled in a relational database or there was no need for transactions. In the last scenario (sagas), I think we can imagine what might happen after a successful wallet check: Create a message that can be used to fulfill the order (eg. sufficient funds). Presumably, there are workers that pull these messages from the queue, and there is another set of services for order fulfillment, inventory, etc.
@shabbir5638
@shabbir5638 3 года назад
Thank you Sir. For making these videos and helping us.
@friohao5398
@friohao5398 4 года назад
Excellent job!Learned a lot from your video!
@kumarc4853
@kumarc4853 3 года назад
that knife attack on order microservice was a killer move!. Exxcellent video sir
@toabhijeetsingh
@toabhijeetsingh 3 года назад
@Tech Dummies : Wonderful video. You have a very easy explaining style. Keep it up.
@raghuvardhansaripalli9636
@raghuvardhansaripalli9636 3 года назад
superb video thammudu.. @RU-vidrs: THIS IS A MUST WATCH VIDEO for distributed transactions basics related to microservices.
@vipinkoul9129
@vipinkoul9129 3 года назад
Thanks for the nice video. I have a few questions: 1) Does each micro-service commit to their DB or it is done by the Co-ordinator? 2) For the "commit" part, assume CustomerWallet MS give "ok commit" whereas Order MS didn't report commit/fails; how does it work then?/ 3) Is Co-ordinator a generic component or custom made? who is providing it? I am aware of, in the context of the J2EE, it is provided by the Application server. Since we may not be using Application-Server all the time, who' providing the co-ordinator?
@HLTSoftwareSolutions
@HLTSoftwareSolutions 2 года назад
Very practical understandable enjoyable thanks
@micamsr1
@micamsr1 4 года назад
Congratulations about this video!!! Thanks so much, man!!!
@arunsinghk1
@arunsinghk1 2 года назад
Great explanation. Thank you
@SANDIPKUMAR-es7qh
@SANDIPKUMAR-es7qh 3 года назад
Nice explanation... Thank you !!
@raedbarouki5163
@raedbarouki5163 5 лет назад
Thanks, keep going 👍
@IshantSharma29
@IshantSharma29 3 года назад
@Narendra Nice video. One correction though: In 2PC, If Prepare Phase is successful and then during Commit phase one of the parties cannot commit it, the co-ordinator retries that. The service that is not able to perform commit has lost it's right to say NO to this transaction. The Coordinator will keep on pushing the transaction to this service. Even if the service went down, when it comes up, it will be forced to apply this commit. This is one of the drawbacks as well.
@vijayrajan5792
@vijayrajan5792 2 года назад
Thats why one has timeouts.
@nreed7718
@nreed7718 Год назад
@@vijayrajan5792 I would imagine you can define a retry policy, too (num attempts, timeout).
@gibsonchikafa6520
@gibsonchikafa6520 4 года назад
Thank you!
@anbesivamkamal
@anbesivamkamal 4 года назад
Excellent!!!
@nreed7718
@nreed7718 Год назад
Kudos on a great overview and explanation.
@saikumarnakirekanti1982
@saikumarnakirekanti1982 4 года назад
superb .. nice explanation
@shubhamvardaan3576
@shubhamvardaan3576 5 лет назад
excellent video
@funnybugsbunny
@funnybugsbunny 3 года назад
very good topic. Well covered
@lamanaghabayova2704
@lamanaghabayova2704 2 года назад
Great explanation, thanks!
@jpnr8
@jpnr8 5 лет назад
Thanks bro. Good video
@Jason-be2cy
@Jason-be2cy 4 года назад
Nice video, I looked a lot of your videos, You are doing good things to us, what I recommend is could you share some famous papers such as GFS, HDFS, Zookper, Paxos etc. in thefuture
@parthec1
@parthec1 2 года назад
thanks for making video,,,
@iitgupta2010
@iitgupta2010 5 лет назад
Great bro..so fast
@sayantanray9595
@sayantanray9595 4 года назад
Good Explanation!!!
@narendrakumariitb
@narendrakumariitb 2 года назад
Great explanation thanks 🤗
@makixie9151
@makixie9151 3 года назад
First, I very much appreciate the video, but with 2 suggestions: I don't think the advantages of 3PC over 2PC are well-elaborated, and it would be better if the comparisons (pros and cons) of the 3 patterns are compared.
@pubgbattleground9208
@pubgbattleground9208 2 года назад
ek number bro, maza aagya, so simple and detailed explanation
@SANDIPKUMAR-es7qh
@SANDIPKUMAR-es7qh 3 года назад
Awesome
@aatifnazar8203
@aatifnazar8203 3 года назад
I was recently asked in an interview how do you rollback transaction in a microservice architecture and my answer was to wait for the response for an interval and if you don't get it it means your transaction has failed and use another microservice to roll back. Turns out thats what Saga actually does! I feel pretty cool now bcos i knew nothing about saga before this video!
@keerthikanthchowdary2676
@keerthikanthchowdary2676 3 года назад
sagas actually rely on eventing mechanism, not timeouts. In case of a failure downstream, you will get a failed event over message broker, which is then consumed by the service to take an appropriate action (which is roll back in our case). Sagas increase the overall application complexity, but the problem of distributed transactions is solved.
@madhurimamondal9756
@madhurimamondal9756 4 года назад
Thank you so much !
@shivraj777
@shivraj777 4 года назад
Content is good. Would like to see this simple code example of order using saga or 2/3PC.
@ashwinsingh1561
@ashwinsingh1561 2 года назад
Good Content!
@dataguy7013
@dataguy7013 4 года назад
Narendra, great video. Keep it up.
@dineshchandgr
@dineshchandgr 3 года назад
amazing video
@MaxPicAxe
@MaxPicAxe 2 года назад
What a great video!
@tarvindersingh1928
@tarvindersingh1928 2 года назад
Thanks its really helped me to understand the concept
@dataguy7013
@dataguy7013 4 года назад
Narendra, in an Microservice ecosystem, will you have multiple coordinator services for say a 3 phased commits that are needed for more than say 4 services?
@arjunprajapati7503
@arjunprajapati7503 4 года назад
@Narendra, Nice explanation. In saga pattern explained, In case of failure of Wallet MS, rollback event is pushed to rollback event bus to get order rolled back. But the chances are that meanwhile a customer could read the above transaction from order MS but later on it was rolled back and then it won't appear in further reads. How do we solve this? Is there any way in SAGA pattern to solve that?
@bharatchouhan9710
@bharatchouhan9710 4 года назад
Nice video , I want to know how the amazon flash sale works? .can you make video on it in details? .Thanks in advance.
@ameynaik1755
@ameynaik1755 2 года назад
Can you please make a video on Coupon Management System? Thanks!
@deeproy2719
@deeproy2719 Год назад
for the saga pattern if there are more than one instance of microservice M1 listening to the event... it is very critical to maintain the order in this case (maybe those events were required to be in sequence, like we have partition keys for kafka) . What are your thoughts on this?
@shivaakrish
@shivaakrish 2 года назад
Thanks for the nice explanation. Question : why cant order service call customer wallet serivce through api call and do the processing instead of having distributed transactions ?
@adamhughes9938
@adamhughes9938 3 года назад
Not super clear how Saga solves the distributed transaction problem since the example only considered a single microservice, but solid information. I can learn more myself now, thanks.
@yogeshkumbhare2453
@yogeshkumbhare2453 4 года назад
Hi Narendra, videos are awesome, can you please make the video with Oauth level with two level Authentication .
@abhaysoni8631
@abhaysoni8631 2 года назад
can u please make a video over grpc , why and when to use it, its pro ad cons and how is it compare to rest api
@johnchenault7933
@johnchenault7933 2 года назад
One note on your SAGA example. I opine that a decline message from Wallet goes to the original Order service ( not some other new service). The order service likely needs to understand creating, deleting, modifying, etc orders. You don't build a separate microservice for each function about orders, you have a service that understands all of the 'order' function. In the same way, I question the Wallet service responding to a successful order by replying to the caller. How does the wallet service know enough information to talk to the caller? All it should understand is how much money is in the wallet, and be able to add / subtract amounts. An 'OK' message should go to the Order service and let it tell the user that the order was successful.
@Dave0Grave
@Dave0Grave 4 года назад
in the last example shouldn't the customer wallet publish a rollback message that is consumed by the Order MS? Otherwise how does the record in the Order MS get rolled back (or updated to be in some sort of failure state)? If it is eventually rolled back by a message that is published by the Rollback MS what is the purpose of the Rollback MS? Would love to understand the benefits of an additional service if there is one:) one more nit: from what I understand only certain message/queue technologies such as Kafka have the capability of processing messages in order out of the box. do you know of many others or is there typically a way to add-on in-order processing to any queueing system? thanks for you videos!
@venkatprasad465
@venkatprasad465 4 года назад
Good video,could you please make a video about banking system design
@tamilcloudzone
@tamilcloudzone 5 лет назад
Great tutorial...! Very useful for all..! #tamilcloudzone
@rettipatti
@rettipatti 3 года назад
Nice explanation. Thanks. A question- The co-ordinator we are talking about for 2 phase and 3 phase commit is nothing but doing orchestation work. Correct ? Or do we see any difference between co-ordinator and orchestrator?
@VarunKeshav
@VarunKeshav 2 года назад
One difference that comes to mind is that an orchestrator doesn't directly involve itself in data processing. It only "manages" the services assigned to/created by it. The co-ordinator on the other hand actually gets involved with some level of business logic implemented into it.
@smritiverma8990
@smritiverma8990 4 года назад
Please elaborate more on SAGA, which is most popular and useful.
@rockingdude8383
@rockingdude8383 3 года назад
Thanks Narendra for this wonderful explanation. I have a question, What happens in 2phasecommit if let say in your example the commit order fails? Is the customer wallet rolled back?
@vineettalashi
@vineettalashi Год назад
Same question
@SaifulIslam-fs2li
@SaifulIslam-fs2li 3 года назад
What will happen if the ok wallet commit returns "ok" but the ok order commit doesn't return "ok" ? How do you undo the ok wallet commit as it is already committed ?
@snehasharma4601
@snehasharma4601 2 года назад
I think they are keeping a count for the number of commits on the basis of prepare statements, if the count matches(in this case it would be 2) then complete the txn else rollback. This is just my assumption, I could be wrong also.
@hrishabhg
@hrishabhg 3 года назад
Microservices and Queue Servers need to be highly available in order to make the isolation work. For example, if the rollback message is stuck in the queue or not processed by the consumer microservice, there will be an inconsistent state for the system.
@tuanva6484
@tuanva6484 Год назад
total agree
@CiceronFelix
@CiceronFelix Год назад
If you are using kafka then message is considered idempotentally consumed only after brocker had recieved and commited ack from service.
@karan6551
@karan6551 3 года назад
Awesome bro.. ❤️❤️
@nikunev
@nikunev 4 года назад
One of the best videos on this topic I have seen on youtube, very good explainations!
@muqiturrehman6577
@muqiturrehman6577 3 года назад
great explanation, but I did not understand how response will send back to UI/client when we use second(queue) based approach. I mean suppose I am one micro service receives https request from browser and this micro service pass on the request other micro service than which micro service will respond to browser ?
@ashishjaiswal1090
@ashishjaiswal1090 3 года назад
explanation is very nice .can you share 2 PC /SAGA implementation in microservice?
@soudaminipanda
@soudaminipanda 3 года назад
You explain really well. It is very rare for somebody to explain so clearly going through the ideas step by step.
@demidrek-heyward
@demidrek-heyward 4 года назад
Thaannksss
@revanthsamavedam7562
@revanthsamavedam7562 2 года назад
Great explanation. there are some library implementations of saga pattern if anyone is interested in the implementation Camunda: java based Apache Camel
@sinishawtadele
@sinishawtadele 3 года назад
perfect
@shreyashosur9578
@shreyashosur9578 2 месяца назад
Hi Narendra, You have explained it very well. I have few doubts here. I browsed these doubts all over the internet and I did not get proper answer in GPT as well. 1. What if the paricipants have multiple replicas ? How co-ordinator will make sure the prepare and commit request will always hit the same replica ? 2. I am thinking out this doubt in Java/Spring Implementation. I know transactions can be created using Transaction Annotation and a same thread will work until the transaction is committed. Once participant creates local transaction, it must be in a new transaction thread. So how this transaction thread is stopped from committing and how it commits after receiving the external request(http thread) from co-ordinator since both threads are different. In simple terms, how the two different threads are communicated ? one is new http thread(prepare or commit) and already created transaction thread ? I hope the understanding of doubt is clear. Please let me know if there is a problem. I will elaborate maybe. I am badly searching for the doubts.
@ThePradeep2010
@ThePradeep2010 2 года назад
I have a project with choreographed event driven microservuce architecture (Kafka for communicating these events). We have a need to have transaction across database and kafka (eventually other services). We plan to use transactional outboxing pattern. Do you have better alternative?
@rahulsinghai3033
@rahulsinghai3033 5 лет назад
Please explain how transaction happens in Cassandra. I mean read write in Cassandra.
@snowy0110
@snowy0110 4 года назад
Narendra, isn't microservices and SOA defined by different authors differently? As I tried to investigate the differences between SOA and microservices, I came to the conclusion that there is no common agreement on what SOA is. Moreover, some people don't see the difference between SOA and microservices. Moreover, from my perspective, ideas are actually the same. Decoupled services that are part of a system and provide small pieces of functionality. To be honest, software development in 2019 is full of not-strictly-defined terms which really bugs me.
@pengli7213
@pengli7213 3 года назад
In saga patter, what if customer wallet ms also talks to a database and put the money into the database before sending message to next queue? I think the sequence should be like: 1. customer wallet ms writes to DB successfully. 2. customer wallet ms send message to output queue. 3. customer wallet ms commits offset in previous queue. Could you elaborate the failure model when a database is involved here?
@ShohraAfaque
@ShohraAfaque 4 года назад
In the SAGA example, what happens if - There are multple `Customer Wallet MS` hosts, scaled horizontally. - And two different Orders from message queue (q) for same customer is received by two different `Customer Wallet MS` hosts at the same time. - I guess we are again back to the same lock situation where same customer wallet will be tried to be read-write and may result in data coruption.
@sanketpatel4350
@sanketpatel4350 4 года назад
I think that's why he mentioned that messages in the Queue are sequential, let say, for example there were 10 shirts in the inventory, Customer 1 placed an order to buy 1 shirt, so Message will be placed in the queue (bought:1, remaining: 9) this message will be picked by Wallet service 1 and processed. In the mean time Customer places another order to buy 1 more shirt, at this time, 2nd message will be placed in the queue (bought:1, remaining 8) and this messages will be picked by Wallet service 2 and processed. This still will work without locks. In case of failures in Wallet Service, the service which handles failures will update the inventory by (failed:1, remaining: 9). does this make sense ?
@ShohraAfaque
@ShohraAfaque 4 года назад
@@sanketpatel4350 Lets assume 2 customer place order at the same time (eg: 02:10:33 AM) two messages will be placed in the queue (bought: 1, remaining: 9), (bought: 1, remaining: 9). And then two different Wallet service host comsumes these two message independently. How this situation will be handled?
@sanketpatel4350
@sanketpatel4350 4 года назад
@@ShohraAfaque good point, this won't be possible though as Order micro service will use transactions for the DB it manages. so only one order can go through at any given time, one of those requests will win. in the end, it will put 2 messages (bought:1, remaining:9) and (bought:2, remaining:8). does it make sense ?
@ShohraAfaque
@ShohraAfaque 4 года назад
@@sanketpatel4350 Going with transaction lock on db will have some consequences. Lets consider the scale of Amazon, there 1000s of host in Order service. Each time you are placing an order you cannot make a transaction lock on the db table. It will have very bad consequences as there are more than thousands order placed every second. If you make a transaction lock at every db entry the latency of placing order will shoot up like crazy. The solution for this can be using a distributed lock, hashed on product ID but isn't it similar to 2 phase or 3 phase commit, my question is how saga help without placing a lock? We already have 2 or 3 phase commit which uses lock.
@sanketpatel4350
@sanketpatel4350 4 года назад
@@ShohraAfaque first of all, databases are shareded, Also, secondly doesn't lock the entire table, it just locks a single row in a single table. companies like visa, mastercard and other banks processes thousands of transactions as well.
@krishind99
@krishind99 3 года назад
Saga, does solve the complexity in 2 or phase commit. But if a front-end is waiting to update the customer on an order, will it be polling a Queue/Datastore for update directly or indirectly through another microservice? Either ways, that also seems to be problematic????
@stoneshou
@stoneshou 4 года назад
what are typical choices for the sagas queues?
@bowang1825
@bowang1825 4 года назад
whats your point of adding three phase commits? seems the whole point is message queue which hands the problem very gracefully.
@serenachan413
@serenachan413 3 года назад
Hey Narendra, thanks for sharing this! But I still haven't 100% consumed the part of difference between 2-phase commit protocol and 3-phase commit protocol. Would you mind educating a little bit more on it?
@patdubus1
@patdubus1 Год назад
From what I understood, the difference is with the canCommit and preCommit, so a new coordinator can decide to move forwards or roll back. canCommit tells the new coordinator how many are in the cohort (how many commits across nodes do we need to coordinate). When new coordinator checks the log, if number of canCommit == number of preCommit and at least one commit was sent, we can roll forwards from the last commit we sent since we know which direction we decided to go in. Otherwise, we should roll back (abort).
@CiceronFelix
@CiceronFelix Год назад
​@@patdubus1 so on a lock phase everything went good and then on commit phase something failed. Why bringing 1 more extra step solves a problem?
@CiceronFelix
@CiceronFelix Год назад
Also instances of coordinator suppose to share a log storage which is mentioned as an anti-pattern.
@sundergopalsingh
@sundergopalsingh 3 года назад
Thanks for sharing the great information.I have a small question that why a third microservice would be required to rollback in case of SAGA pattern as you mentioned in your tutorial that no 2 microservices should share the same database and if we need a different service to rollback wouldn't it be calling the same database that was used by the 1st service in order to rollback?
@pranjalsingi9966
@pranjalsingi9966 3 года назад
Someone has to consume the events published to the rollback queue so in his example it can be a 3rd microservice that will use the 1st microservice exposed endpoints to roll back the order. Also, it's not necessary that every microservice should have a database. A microservice does one thing well which could be anything. I hope this helps.
@bahmani00
@bahmani00 2 года назад
to have sequential events which guarantees isolation(i comes from ACID)
@ayeshatahreem5479
@ayeshatahreem5479 4 года назад
In 2PC, why are you first checking customer wallet and then you are going for order creation? You should first create order and then check wallet like u did in SAGA Pattern.
@sandeepk9640
@sandeepk9640 3 года назад
Thank u 🙏🙏
@kanglei7807
@kanglei7807 2 года назад
Hello, is there any book or paper recommendation on database storage/engine/transaction design? thanks?
@yashwantsingh6424
@yashwantsingh6424 3 года назад
Hello brother , thanks for such type of videos but i have a question can you resolve it please. Suppose i have three table A,B,C and i am inserting data in all the three tables sequently. first in A then in B then in C . Now suppose while inserting data in C there comes an issue so the transacation will rollback. But I want that in table A and B data should be committed . So how can we do that ??? it will be thank full if you reply on the same :-)
@hyperborean72
@hyperborean72 2 года назад
Does SAGA really brings any advantage in speed considering that if some service fails all other participants must rollback previously committed transactions?
@87SharmaRahul
@87SharmaRahul 4 года назад
Very interesting, one question, In saga what if Order MS also looks up queue message to rollback order rather that new MS?
@danglingmind1807
@danglingmind1807 3 года назад
great video, but for those who have just started to learn
@maven7650
@maven7650 Месяц назад
I recently implemented SAGA pattern, can you kindly implement the 2-phase commit with example
@rahulmalviya1585
@rahulmalviya1585 4 года назад
How rollback works in participant's failure in two phase commit??
@chessmaster856
@chessmaster856 2 года назад
If resources are not locked means dependent actions can happen before rollback is issued. So if you buy 100 ,before it is completed, sell of 50 is issued. How do we make sure that sell of 50 is not processed without waiting for distributed completion of previous action.that means something has to be synchronous. Some things can not be asynchronius.. commit or rollback must be synchronous or in the same queue in the same sequence before next sale of the same. Or before any dependent action. You can't have a rollback k in some async fashion without preventing dependent actiobs
@mayikx
@mayikx 4 года назад
My friend, your videos of 10 or 15 minutes are much better. Because we can learn more fast the concepts and start with a new one
@a.yashwanth
@a.yashwanth 4 года назад
Yes. His videos are great but long and slow. 15-20min would've been better.
Далее
Data Consistency and Tradeoffs in Distributed Systems
25:42
Must-have gadget for every toilet! 🤩 #gadget
00:27
ИСПОЛНЯЮ МЕЧТУ Анастасиз
34:51
Просмотров 871 тыс.
Обзор ЛЮКС вагона в поезде
01:00
Просмотров 638 тыс.
Проверил на логику певца L’one
00:17
Redis system design | Distributed cache System design
34:10
what is OPTIMISTIC LOCK?
18:41
Просмотров 57 тыс.
Distributed Systems 7.1: Two-phase commit
18:45
Просмотров 59 тыс.
Microservices with Databases can be challenging...
20:52
Must-have gadget for every toilet! 🤩 #gadget
00:27