Тёмный

MICROSERVICES ARCHITECTURE | INTER MICROSERVICES COMMUNICATION | PART - 7 

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

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

 

3 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 106   
@naveengoyal5243
@naveengoyal5243 2 года назад
First time in life I am binge watching an educational video series. There are 100s of beginner tutorials on RU-vid and no one talks about these extremely important concepts which we actually use in our projects. Thanks you so much for the hard work and efforts you have put in to bring up these videos to us 🙂🤗
@pubgbattleground9208
@pubgbattleground9208 2 года назад
aap jaise logon ki bahut zarrurat hai jo apni knowledge sabko dete hai wo bhi free me, thanks bro
@animeshudawat7310
@animeshudawat7310 3 года назад
How to ensure high availability in case a queue goes down? also, if you can also point out the latest tools and libraries that are used to achieve these concepts, it will be really nice for the audience to do a hands on.
@neerajcrespo
@neerajcrespo 3 года назад
It's not okay to use a Queue if you want to send an update to multiple microservice, we use PUB/SUB. like kafka is a pubsub where multiple consumer group can read the same message but SQS or rabbitMQ is a queue where a message can be retrieved only once unless you send it to multiple queue for each microservice which is a overhead for the producer microservice
@swathik5692
@swathik5692 4 года назад
Hi, sir your explanation is soo good.i understood perfectly. Interaction of microservices. Thanks a lot
@ravitejadendukuri4000
@ravitejadendukuri4000 4 года назад
I went to many videos but this is the ultimate video thank you very much
@smk8880
@smk8880 4 года назад
WOW! First video of yours that I have watched and it’s Nice (explanation). Please keep adding more videos on SpringBoot Microservices (with detailed architectural explanation on the board).
@shreyashpokale218
@shreyashpokale218 3 года назад
Thanks for your videos. They also act as a good refresher. Although i have to understand one point: How will having Async Comm make "API faster" ?
@skblabla
@skblabla 2 года назад
Hi I am concerned about how MS1 gets data back from the dependent microservices? Should MS3, MS4, MS5 have an output queue too, or is it going to be a HTTP call? Please reply
@gibsosmart
@gibsosmart 3 года назад
how does the data come back from requested services? is it coming back in same way they will write to MS1 queue? How do we handle responses if we have to return data immediately?
@mukeshmahadev7419
@mukeshmahadev7419 2 года назад
docs.microsoft.com/en-us/azure/architecture/patterns/async-request-reply The above link might help in understanding how the response may come from other microservice( say microserviceN) after the microservice1 adds it to queue of microserviceN.
@Neosam01
@Neosam01 Год назад
wow !!!! this was so well taught...really awesome video...this is actually what i was looking for...thanks mate..
@rahulprajapati8052
@rahulprajapati8052 2 года назад
i really liked how you explained the concept. Thanks
@BiharGaurav
@BiharGaurav 2 года назад
Is separate queue is required for each service? And what is the issue with using single clustered HA database, that I didn't get it, can you provide any disadvantage article link?
@my3m
@my3m 4 года назад
When we send messages through topics in Apache Kafka, are messages persisted? In other words, say if one of our micro services was not available when the message was sent, will it be able to get the same message from the topic when it becomes available again? How do you ensure that a message in queue is persisted / put back in queue, when micro service fails due to a network failure during processing of a message? How are you returning the response back by using queues? MS1 puts in a message in a queue, and MS2 processes it, but how does MS1 know processing is complete? How does original request get handled from the client ?
@vaibhavbhardwaj2244
@vaibhavbhardwaj2244 4 года назад
though its late , but still ...try reading about consumer delivery semantics : dzone.com/articles/kafka-consumer-delivery-semantics . Its a simple config that needs to be changed .
@volodymyrliashenko1024
@volodymyrliashenko1024 3 года назад
Good explanation! BUT! I think there is some misunderstanding. Even we have all this queues in the system we still can do synchronous requests. 1. There is no a good explaination why it's really async. It became async depends on how MS1 is implemented but not how communication between services is implemented. 2. Why API became faster? If we take a single request it will take more time, just because we have extra components (like queues) in the system and that is why we will have extra latency. So, a single request will take more time. But if we are talking about 1000 request per sec it may be faster because while MS1 is waiting for response from MS2 it can handle second request in parallel. And in this case to have all this queues is not required. 3. If we are talking the case when we put a message into the queue and do not waiting for the response - in this case it is faster. Yes, it will be faster, but without response. But we need a response. That's a point, we anyway needs to wait for a response the same as sync request and it does not depend how communication is implemented. I'm a .net developer and thinking about async/await approach (similar you have in javascript). It does not require any queue or even second microservice. It depends how actual function makes a request.
@Lokeshsanapalli1729
@Lokeshsanapalli1729 3 года назад
Even in case of async/await approach, the remaining code of MS1depends on MS2 response, then it doesn't make sense to implement async await right! it should be synchronous. But, if remaining code of MS1 doesn't depends, then it makes sense to implement async await.
@akhil406
@akhil406 2 года назад
@@Lokeshsanapalli1729 If the code should should be synchronous then the queue approach won't work as well as you don't know when you get the response from the other microservice.
@TimBee100
@TimBee100 3 года назад
It's nice to say that you should use asynchronous services and that the calling service is not dependent on the ones it's calling but what if it is? Isn't that why they have circuit breakers with fallback procedures? You can't say a banking app that is calling a microservice to determine the bank balance can just wait until some service reads a queue and decides to process the request. It needs the information before it can proceed.
@abhimalvekr127
@abhimalvekr127 3 года назад
Loved your way of explanation brother. It was easy to understand
@bluex217
@bluex217 2 года назад
Thank you for the video! I have a question though! What about the sharing between 2 different microservices in terms of foreign keys, join tables and etc.? If 1 microservice for 1 entity/table needs to have a foreign key on another, it needs a direct reference to that table and so they should be in the same database
@bluex217
@bluex217 2 года назад
So I've been taking a CQRS design course using Axon and the default message broker which Axon uses for inter microservice communication. The answer to my question is simple, but questionable to me, albeit used in enterprise applications. Basically, in Axon-centric architecture with CQRS, we have references to ID's/primary keys of another table, but they are NOT foreign keys. Instead of using foreign keys to ensure dta integrity on the side of the DB, we rely solely on our code/axon to ensure that the value entered in the column which holds foreign id's is storing only ID's that truly exist in that other table, if that makes sense. Seems fundamentally flawed from the perspective of DB management, IMO. I personally do not think this is a perfect solution, but it's apparently used a lot now due to the overwhelming call for "de-coupling"...
@nicholas_obert
@nicholas_obert 3 года назад
Nice explaination. It was a bit hard though to distinguish between you saying "synchronous" and "asynchronous"
@MeMe-xw9lk
@MeMe-xw9lk 2 года назад
Thank you for your explanation. You said that Microservice 1 is waiting for the answer from Microservice 2 in the first architecture, but in the 2 you don't. What if you need an answer from 2 Microservice than you can't use 2 pattern or what?
@ncjanardhan
@ncjanardhan 3 года назад
Simply superb and cogent explanation
@vaishnavi-jk9ve
@vaishnavi-jk9ve 4 месяца назад
good video
@ya105pa
@ya105pa 4 года назад
Hi Naren! Thanks for your videos always. I really appreciate it. One question. You mentioned that one of the advantage of messaging queues are "no service discovery" because we can hard code the address of the queues. But it's possible that queue instances can be taken down and spun up again. it seems like there seems to be some kind of entity to let the services know the address of the queues. Can you share more thoughts about this?
@akashkesarwani2633
@akashkesarwani2633 2 года назад
excellent explanation Naren!!
@willnguyendev
@willnguyendev 2 года назад
Thanks guy, how does it work if a service needs info from another service. For exam, payment needs credit card info to purchase. Or when we request a "course" we also want "teacher" info included in response.
@ravithapa-programming
@ravithapa-programming 2 года назад
To the point of no nonsense 👍
@hasanulislam3112
@hasanulislam3112 3 года назад
Great explanation! What would be the case if I need some response from other microservices, but those microservices might response with 500 or delay?
@comrade4664
@comrade4664 3 года назад
Great explanation, now it finally makes sense. Thanks dude!
@pubgbattleground9208
@pubgbattleground9208 2 года назад
ek number bhai, bahut acha bataya aapne
@cvetkovicslobodan
@cvetkovicslobodan 3 года назад
Thanks, very nice explanation. I am wondering if we can have only one centralized queue and than services to respond to it if they are subscribed to that event type.
@nobytes2
@nobytes2 2 года назад
Can't really have a central queue because if one service goes down then you can't deque it, you'll be creating a bottleneck for the rest of the ms that are up.
@shawnkim6324
@shawnkim6324 4 года назад
It's strange that you're showing availability benefits of queues by comparing the request/response pattern between micro service 1 & 2 where 1's response to the client depends on the response from 2 to 1 and the message queue pattern where no such relationship exists. In the latter, what happens to micro service 1's response to the client if micro service 2 is down? Wouldn't there be a timeout?
@daveg6019
@daveg6019 4 года назад
Yes..there will be timeout but that can be handled by Hystrix. He mentioned circuit breaker pattern in another video.
@SivaKumar89
@SivaKumar89 4 года назад
If you look at the diagram he draws,he doesn't get a response from microservice 2, that can be acted on by microservice 1. Microservice 1 should just return a 202 status code as response.
@anamikadeshmukh
@anamikadeshmukh Год назад
How do you achieve atomicity of the transaction with this architecture??
@chris.w391
@chris.w391 2 года назад
One thing to add, if there are too many internal communication between to micro services, those two micro services should not be breakdown into 2 micro services in the first place.
@bluex217
@bluex217 2 года назад
does this include if 1 table needs foreign key on another? How to have CQRS pattern with database per service if the 2 tables require foreign keys, or, join table ?
@puneetsaneja3007
@puneetsaneja3007 2 года назад
How Synchronous microservices talk to each other on cloud i.e AWS. Suppose there are 2 microservices A& B which are deployed on AWS ec2 instance. I cant hardcode B endpoint in A microservice. Bcz everytime Ec2 instance started , the IP gets changed.
@tagorebabu1085
@tagorebabu1085 2 года назад
Not explained about negative scenarios...if any queue/service is down then how to handle dependent calls...
@omar_benaidy
@omar_benaidy 3 года назад
i feel like mqtt could be a solution over http since it has the publish subscribe model
@colinw9908
@colinw9908 4 года назад
Really like this series!
@vishaljodwal9647
@vishaljodwal9647 2 года назад
One query related to microservices pipelines - how to run functional job in different 2 pipeline , if i want to run only one time
@JohnDoe-xi6df
@JohnDoe-xi6df 2 года назад
Good work! Thanks
@akalrove4834
@akalrove4834 2 года назад
Nice
@pallavkan
@pallavkan 4 года назад
Ek number explication!!
@madhavareddy580
@madhavareddy580 3 года назад
Synchronous comm.: uses http calls Asynchronous comm.: how it calls/ invokes a Queue to write or consume data?
@ichangemynameregularly
@ichangemynameregularly 2 года назад
U R AWESOME!!!
@sagarsuri8726
@sagarsuri8726 3 года назад
Hi Narendra, thanks for the video. One question - For async / queue type of communication, you place an order and the order is created. But after that, I want to show the bill to the user immediately. But billing task has been posted to the queue. Should one poll to get the billing details? I am thinking about from the UI / API call perspective. I make a network call to place the order and then how do I get a response with billing details?
@mukeshmahadev7419
@mukeshmahadev7419 2 года назад
I got the exact same doubt about the response to the current api call. Can you please comment here in case you found the answer to your question by now.
@hamadalihaadi888
@hamadalihaadi888 2 года назад
@@mukeshmahadev7419 same question
@EchoVids2u
@EchoVids2u 2 года назад
So basically use pub-sub for microservice intercommunication.
@kdakan
@kdakan Год назад
Several gaps in this video: 1) Asynchronous communication using queues, is fault tolerant, because the called service (or the queue consumer) can die and the new instance can continue without error or data loss. However, this can also be achieved by using a retry policy with synchronous http/rpc service calls. 2) Queues can also be used for call and response pattern, using a send queue and receive queue, instead of a single send queue. Masstransit library implements this pattern using Rabbitmq. 3) Lags in making http calls can be mitigated by making async http/rpc calls. Several languages/runtimes like C# and Node/Javascript already have this built in, the async/await pattern. This pattern can achieve huge throughput performance gains.
@akshaybabar4448
@akshaybabar4448 4 года назад
I don't understand how aync call will help to MS1 to get data from MS2. Can you please explain.
@trueseeker5559
@trueseeker5559 4 года назад
Using MessageBroker...
@SanjeevMega
@SanjeevMega 4 года назад
Well explained
@Miguel-ym2rr
@Miguel-ym2rr 3 года назад
How do you make sure Atomic Transactions in order to have consistent data? For example Service A stores data and publishes an event (order.created) to the Message Broker, but the MS is not available, what happens here, should I do a rollback in my transaction or store the events in my DB and try again? Thanks.
@khatiwwaraa
@khatiwwaraa 3 года назад
fantastic demo!!! thank you
@JamesMuldrow
@JamesMuldrow 3 года назад
Great explanation! Thank you.
@madhavareddy580
@madhavareddy580 3 года назад
Nice!
@hisoka500
@hisoka500 4 года назад
dude so much respect finally i get it xD
@punyabikash3624
@punyabikash3624 3 года назад
Nice explanation
@nobounds7563
@nobounds7563 3 года назад
Isnt RPC over http? So arnt they the same?
@prathameshvinchurkar
@prathameshvinchurkar 3 года назад
Can't we keep same database for all microservices? Is there any specific reasons to choose different database for different services
@kamisettylaxman9136
@kamisettylaxman9136 2 года назад
hi bro is this related to accessing microservice?
@thiharajayathunga5283
@thiharajayathunga5283 4 года назад
I don't understand how we should handle asynchronous communication when a response is expected. :-O
@SivaKumar89
@SivaKumar89 4 года назад
Asynchronous communication does not solicite a response from the downstream service. Expecting a response is a synchronous activity and must use synchronisation communication.
@RayanRal
@RayanRal 4 года назад
That's pretty tricky, but usually, if you have async calls, and expect information to be returned some time later (maybe hours or days later), you would send some kind of correlation or transaction id. When receiver will pick up your message (from some queue), process it and send you the response, it will add such correlation id, so that receiving service knows, to what user/transaction to "attribute" that response. After receiving it, your "initial caller" service could continue executing transaction, as it was intended. But you'll have to handle some kind of persistence between your initial async call, and response to it, and recovery after response has been received.
@altereago1
@altereago1 4 года назад
I also didn't understand that. It seems 2 completely different uses case are being compared. First one was how Microservice 1 and 2 will talk to each other , and the second is just if Microservice 2 wants a notification. How do 1 and 2 talk to each other asynchronously?
@abhicsmnnit
@abhicsmnnit 4 года назад
​@@altereago1 there can be multiple ways for 2 services to talk asynchronously. *1. Through message brokers like Apache Kafka:* Here, Service 1 (S1) doesn't talk directly to Service 2 (S2). Instead, it puts some event in the message broker. When S2 processes the event by consuming what S1 produced, it can produce another (response) event in the message broker. This response event would then be consumed by S1. *2. Through callbacks:* S1 places a callback in the API call. This callback would be called by S2 when it wants to return back the response.
@TimBee100
@TimBee100 3 года назад
Microservice 1 still has to wait for the response from microservice 2 because it is waiting for the data, according to the arrows on the synchronous diagram. If you are just sending it info to be consumed and, maybe, written to persistence memory, then that is a different story.
@glennmglazer
@glennmglazer Год назад
Came here to say that exact same thing. Even if MS1 is not waiting on data, it might well be waiting on a 200 that says that it is okay to proceed.
@Miguel-ym2rr
@Miguel-ym2rr 3 года назад
Awesome!! Thanks!
@premchandyadav5013
@premchandyadav5013 4 года назад
Superb
@melk48111
@melk48111 4 года назад
Excellent
@shashankpandey1019
@shashankpandey1019 4 года назад
I have a question. That you are saying that "no need of service discovery" , but i thing service discovery is used by LB(AG) in case of asynchronous call also ? (how can you identify the services replicas (nodes) address).
@zion495
@zion495 4 года назад
Yes. What he is saying is each service do not need to use service discovery be aware of the network addresses of the other services. That is taken care of by the message queues
@bryantle6564
@bryantle6564 4 года назад
is there a place where I can learn how monitoring works?
@fatemehhoseinpoorbeji9856
@fatemehhoseinpoorbeji9856 2 года назад
Thank you so much
@swagatochatterjee7104
@swagatochatterjee7104 3 года назад
Hi Narendra, how do you monitor state here then? Eg. when I call the billing service, I need to store some of the computation I did during that flow somewhere. Now when the response event comes back, I have to pick up the data and continue the computation. How to do that here?
@neerajcrespo
@neerajcrespo 3 года назад
if your service are still coupled like this then its not the correct abstraction and you're still trying a monolithic paradigm. Basically a microservice should be as independent as it can and should have a defined responsibility
@swagatochatterjee7104
@swagatochatterjee7104 3 года назад
@@neerajcrespoyep I recently learnt about async microservices. Those need a different data pattern.
@sreenivasamajji68
@sreenivasamajji68 Год назад
Big no no when you are giving actual interview is 'hard coded' values.
@GauravKumar-qb5ve
@GauravKumar-qb5ve 2 года назад
Dear All, Can anybody tell me how we can stabilize the one to many relationship between two microservices ? like service 1 : user microservice; service 2 : contacts microservice. and I want one user can have many contacts in arrayform.
@LoveQwertying
@LoveQwertying Год назад
this is event driven architecture
@betulozer9738
@betulozer9738 2 года назад
Thank you :)
@devang.prajapati
@devang.prajapati 3 года назад
Any live example of this ??
@cloud_architector
@cloud_architector 4 года назад
do you have any udemy or other courses?
@mettlus
@mettlus 4 года назад
What queues are used for notifications? Examples in Windows
@TechDummiesNarendraL
@TechDummiesNarendraL 4 года назад
Distributed FIFO queues, Kafka/SQS/Rabbitmq etc
@louis18071957
@louis18071957 3 года назад
How we can implement this queues? Is it a database?
@nobounds7563
@nobounds7563 3 года назад
You use a cloud message broker service generally, search for rabbitmq, kafka
@TheTasumanj
@TheTasumanj 3 года назад
Thank you
@sreenivasamajji68
@sreenivasamajji68 Год назад
Please do not use middle finger while pointing on whiteboard, its very offensive if you want to reach international audience. You use middle finger, pinky and index finger, pick one style and stick with it.
@hyperborean72
@hyperborean72 Год назад
Your explanation is bad. Why exchanging data via queue is asynchronous? what is the advantage if we still wait for the result produced by another microservice whatever the protocol is - REST, RPC, or queue? And you blindly say that the communication over queue is faster while it is not at all necessary faster
@vikaspanwar2537
@vikaspanwar2537 2 года назад
here's my perspective on why micro services may not be the right choice for you - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-LZPsyX0J9DM.html
@javasoccernut
@javasoccernut 4 года назад
In 2020 I am shocked at how many people don't know or understand this. I've been doing for 20 years. Microservices make it a more important pattern.
@faizanfareed9076
@faizanfareed9076 4 года назад
Then why are you here? 😂
@ronaldmusula3851
@ronaldmusula3851 4 года назад
for 20 years doing microservice ?? and still watching a youtube video to know how microservices communicate
@javasoccernut
@javasoccernut 4 года назад
No I've been doing that kind of process. And I watched it to see if it was something I could share with other people. Lighten up
@javasoccernut
@javasoccernut 4 года назад
Fyi ... a single topic would probably be better. But the concept is the same.
Далее
MICROSERVICES ARCHITECTURE | API GATEWAY | PART - 5
17:16
Китайка нашла Метиорит😂😆
00:21
Microservices with Databases can be challenging...
20:52
Microservices explained - the What, Why and How?
18:30
Просмотров 864 тыс.
Authentication as a Microservice
50:26
Просмотров 216 тыс.
What is an API Gateway?
10:19
Просмотров 314 тыс.
Design Microservice Architectures the Right Way
48:30
Просмотров 713 тыс.