How to make Microservices Communicate?

Поделиться
HTML-код
  • Опубликовано: 24 дек 2024

Комментарии • 75

  • @GeraldOSullivan
    @GeraldOSullivan 3 года назад +6

    Short, sweet, and VERY informative. Loved the mad uncle example!

    • @YourTechBudCodes
      @YourTechBudCodes  3 года назад +1

      Haha! Seems like you can relate with it strongly.

  • @puneetsaneja3007
    @puneetsaneja3007 2 года назад +1

    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.

    • @YourTechBudCodes
      @YourTechBudCodes  2 года назад

      Good question. Here you'll need some kind of a service discovery mechanism. There will need to be a tool which keeps track of which microservice is running on which ec2. A good way to do that in aws would be setting up an internal zone in route53 and writing some script which updates route53 whenever an ec2 server rotates.
      Or you could just use eks (k8s) to eliminate this problem all together.

  • @onthego22
    @onthego22 Год назад

    What would subscribers do once they receive message payload from the publisher. Do you mean they store similar copy of the data maintain by the each Microservice and is that not add complexity ?

    • @YourTechBudCodes
      @YourTechBudCodes  Год назад

      I'm not sure what's the use case you are referring to here. I'm assuming it is using CDC to maintain a near cache of the target database.
      Well, that's an interesting pattern especially useful when the time it takes to perform cross microservices joins isn't acceptable. So in this case we make a local copy of the data with other concerned databases so that thry can perform native db joins which is much faster.
      Now if you are wondering why make a copy when all microservices are most likely using the same database? Well, its because having microservices read from or write to tables of other microservices is an anti pattern and causes tons of problems.
      At the end, adopt new patterns into your system design only if you have a valid use case for it. Not every pattern would suit your needs. Being aware of what other folks have done to solve similar problems definitely helps. And that's the focus of this channel.

  • @theilluminatimember8896
    @theilluminatimember8896 9 месяцев назад +1

    Finally a good explanation that is well put together and not boring as hell

  • @twitchizle
    @twitchizle 3 года назад +1

    I have some questions.
    Pretend like we have api gateway microservice and user microservice. When user send get request to api microservice api gateway will send event and user service will capture it but how do we gonna return the response to user?

    • @YourTechBudCodes
      @YourTechBudCodes  3 года назад

      That's actually a great scenario. Usually an API gateway is considered to be "transparent" so there are no events being generated.
      However if you do want to go completely event driven, you can include the API gateway instance id as the source of the event. You can later use this id to send back a response to that particular api gateway. Your api gateway will hold the request till that happens.

  • @ariseyhun2085
    @ariseyhun2085 3 года назад +3

    Thanks for the EDA videos! They're really helpful.
    One thing I'm trying to understand is how to perform complex logic, like "only create a new product if the user has less than 10 products or is on a premium account"

    • @YourTechBudCodes
      @YourTechBudCodes  3 года назад +2

      Glad you liked it.
      Good question actually. The answer lies in creating an access control layer in front of our microservices. Its a simple read before write kind of a scenario. The real question however, is where and who will perform the read.
      I'll try to make a video to answer those questions soon. A short answer would be to implement an authorisation layer preferably in the api gateway itself. This engine will fire some rest calls based on rules you define and will decide whether or not to allow the write (add new product) based on the response of those calls.
      The project I'm working on does precisely this: docs.space-cloud.io/security/how-it-works/

    • @ariseyhun2085
      @ariseyhun2085 3 года назад +2

      @@YourTechBudCodes awesome thank you so much for your reply! The way you're so passionate and giving detailed responses is so heart warming :)
      One approach I'm looking into now is the saga pattern. I think it may be a good solution to it, but of course has it's tradeoffs, like removing isolation in a way

    • @YourTechBudCodes
      @YourTechBudCodes  3 года назад +2

      Haha. Thanks. I really enjoy making these videos and sharing the lil bit of experience that i have.
      If I remember correctly, saga is for distributed transactions. A distributed transaction (especially the saga pattern) may be an overkill for the use case you shared.
      Have a look at my video on basics of event driven communication. I talk about how you can solve the distributed transaction problem in a decoupled manner.

  • @stanjockson
    @stanjockson 4 года назад +4

    You are pretty good at delivering information, great video!

    • @YourTechBudCodes
      @YourTechBudCodes  4 года назад

      Thanks buddy. Just want I needed to hear to keep going!

  • @TechEFX2
    @TechEFX2 4 года назад +2

    Awesome .. well exlained !! Keep up the good work !!

  • @DodaGarcia
    @DodaGarcia 3 года назад +3

    Very high quality content! Thank you for this overview

  • @Taragurung
    @Taragurung 4 года назад +4

    So nicely put together, Awesome! Keep rocking!

  • @AmarKumar-vt9co
    @AmarKumar-vt9co 4 года назад +1

    Simply awesome and very informative !!!

  • @vishnuvardhanreddy220
    @vishnuvardhanreddy220 3 года назад +1

    Excellent presentation. accurate examples. you just earned a life time subscriber.! 4:16 waiting for the GraphQL video.

  • @buacomgiadinh1
    @buacomgiadinh1 4 года назад +1

    Could you please make the Microservices tutorial series

    • @YourTechBudCodes
      @YourTechBudCodes  4 года назад +1

      Absolutely. Is there anything particular in mind that you would want me to cover?
      I was thinking of making a series right from "How to get started with microservices?"

    • @buacomgiadinh1
      @buacomgiadinh1 4 года назад +1

      @@YourTechBudCodes thank you for your response, it should be a practiced videos which make more attractive

    • @YourTechBudCodes
      @YourTechBudCodes  4 года назад +2

      Got it. Will try to include more hands on videos from now!

  • @nallaperumalthanthondri3817
    @nallaperumalthanthondri3817 3 года назад +1

    Fantastic explanation. Great

  • @manuelromei7639
    @manuelromei7639 4 года назад +1

    Nice one, mate! Really interesting, made me really curious on microservices. Thank you for the video!

    • @YourTechBudCodes
      @YourTechBudCodes  4 года назад +1

      Means a lot. This is exactly what keeps me going!
      Planning to make an entire series on Microservices! Stay tuned and do subscribe!

    • @manuelromei7639
      @manuelromei7639 4 года назад

      @@YourTechBudCodes You're welcome! I've just subscribed! I only saw this video, and I've yet to lurk on your channel, but I'll ask anyways lol: have you ever covered deployments with CD/CI and scaling stuff? That would be a super interesting topic for me

    • @YourTechBudCodes
      @YourTechBudCodes  4 года назад +1

      This is a fairly new channel (only 3 videos old).
      CI/CD using popular tools, K8s, Monitoring and alerts are all part of the roadmap.
      I'll make video on introduction to devops and CI/CD in a week or two for you. ;)

    • @YourTechBudCodes
      @YourTechBudCodes  3 года назад

      Just made a video live on what DevOps is. You might like it...
      ruclips.net/video/yczwWzkbFAQ/видео.html

  • @gauravkumarsingh640
    @gauravkumarsingh640 3 года назад +2

    Very well put together content, Really helpful! Thank you!

  • @khalidalasi2031
    @khalidalasi2031 3 года назад +1

    Keep going hero , informative video thank you

  • @bitlebron8801
    @bitlebron8801 Год назад +1

    Your great at explaining stuff. 😂😂 🎉🎉

  • @shubhamnazare3525
    @shubhamnazare3525 4 года назад +2

    Amazing video 💯 very well thought out 👌

  • @kps2642
    @kps2642 3 года назад +1

    Well explained!

  • @abdullahpb8066
    @abdullahpb8066 3 года назад +3

    Good content! ❤️

  • @anhquocnguyen1578
    @anhquocnguyen1578 2 года назад +1

    Thanks a lot for this amazing explanation. Please keep it up, bro

  • @asemmokllati
    @asemmokllati 2 года назад

    Great video actually, thaks

  • @shawkishor
    @shawkishor 3 года назад +2

    u r brilliant bro :)

    • @YourTechBudCodes
      @YourTechBudCodes  3 года назад +1

      Thanks a ton buddy

    • @shawkishor
      @shawkishor 3 года назад +2

      @@YourTechBudCodes you saved my interview today. Never gonna forget you. This channel deserves all respect.

    • @YourTechBudCodes
      @YourTechBudCodes  3 года назад +1

      Glad I could be helpful.

  • @melk48111
    @melk48111 Год назад +1

    well explained :)

  • @Thepokiboy95678
    @Thepokiboy95678 3 года назад +1

    Well explained.

  • @bhagwathrishikesh6051
    @bhagwathrishikesh6051 3 года назад +1

    Awesome sir!

  • @ngneerin
    @ngneerin 3 года назад +1

    Very good communication

  • @DejiAdegbite
    @DejiAdegbite 3 года назад +1

    Your WhatsApp analogy made me laugh. :D

  • @AlexanderGrauKardan
    @AlexanderGrauKardan Месяц назад +1

    Wait...how do you know about my uncle!

  • @einfacherkerl3279
    @einfacherkerl3279 2 месяца назад

    if you do less acting and focus more on content.

    • @YourTechBudCodes
      @YourTechBudCodes  2 месяца назад

      I'm afraid that is not possible... sorry about that