E-Commerce Microservice with NodeJS and RabbitMQ | NodeJS Microservice | Microservice Architecture

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ก.ย. 2024

ความคิดเห็น • 103

  • @sitcomrave
    @sitcomrave 3 ปีที่แล้ว +4

    Came here for message queue ,impressed by vim skills.

  • @naveenkumarhr3864
    @naveenkumarhr3864 3 หลายเดือนก่อน

    simple and straight forward approach i ever seen for micro-services tutorial and more helpful than others. Thank you🖤

  • @Reel_InsightYT
    @Reel_InsightYT 7 หลายเดือนก่อน

    Gratitude for the incredible Node.js microservices architecture integrated with RabbitMQ for TH-cam! This innovative approach has revolutionized the way we handle our platform's complexity, enabling seamless communication and scalability. With Node.js' agility and RabbitMQ's reliability, we've been empowered to deliver a top-notch user experience while efficiently managing our growing audience. Huge thanks to the brilliant minds behind this architecture for providing us with the tools to thrive in the dynamic world of online content creation. 🚀🙏 #Grateful #NodeJS #RabbitMQ #TH-cam"

  • @svnesh2558
    @svnesh2558 9 หลายเดือนก่อน

    Excellent tutorial, clearly explained with code & errors also, very much appreciated. Thanks a lot

  • @mjjuneja
    @mjjuneja 3 ปีที่แล้ว +7

    Hello, @ManoSriram eventually what you did was right apart from creating another queue for response in the same route. The major purpose of using queues is to get asynchronous nature. Apparently, you destroyed that purpose by defining the response queue at the same spot.
    Even if your queue would have worked fine in a sync manner, if we look for a rather scaled and bigger architecture you will start receiving wrong responses because of ill order acknowledgments.

    • @manosriram
      @manosriram  3 ปีที่แล้ว

      I agree with you, this is just a sample or demo application, so I think those problems are negligible.

    • @mjjuneja
      @mjjuneja 3 ปีที่แล้ว +1

      @@manosriram no doubt, rather easy and straightforward explanation! Good work mate.

  • @pramodkharade5373
    @pramodkharade5373 3 ปีที่แล้ว +2

    @ManoSriram : worth to watching video and simple way to understand the Microservice with Rabbitmq. Could you please create application with Kafka as well

    • @manosriram
      @manosriram  3 ปีที่แล้ว

      Thank you Pramod, there is already a video on Kafka on my channel. You can check that out.

  • @ADITYAKUMARking
    @ADITYAKUMARking 3 ปีที่แล้ว

    this channel is underrated.

    • @manosriram
      @manosriram  3 ปีที่แล้ว

      Thank you Aditya🙂

  • @ramiworkstation
    @ramiworkstation 4 หลายเดือนก่อน

    Thank you very much for sharing such a great tutorial. 👍

  • @vasurangpariya8492
    @vasurangpariya8492 2 ปีที่แล้ว +2

    Very informative video but if you create big project and explain pros and cons of rabbitmq about scalability and how to use it in production and about security things it will be great

  • @codedestiny6955
    @codedestiny6955 3 ปีที่แล้ว +1

    Thanks for your time, I will use this project to develop logging system using elk stack

    • @manosriram
      @manosriram  3 ปีที่แล้ว

      Thank you, glad this video is useful for you :)

    • @codedestiny6955
      @codedestiny6955 3 ปีที่แล้ว

      @@manosriram what if our queue goes down ?? How do we ensure our service availability

    • @manosriram
      @manosriram  3 ปีที่แล้ว

      @@codedestiny6955 Usually, the messages in the queue will be persisted and when the queue is up, will be consumed which I have demonstrated at the end of the video.

  • @prabinlamsal74
    @prabinlamsal74 ปีที่แล้ว

    I love seeing you use vim while doing these tutorials. hahaha. great.

    • @manosriram
      @manosriram  10 หลายเดือนก่อน

      Thanks a lot :)

  • @selvabalajis3924
    @selvabalajis3924 3 ปีที่แล้ว

    I understood how It works clearly. Thanks for your nice explanation

    • @manosriram
      @manosriram  3 ปีที่แล้ว

      Thank you Selva 🙂

  • @DarknessDescend
    @DarknessDescend 2 ปีที่แล้ว

    I loved this tutorial! Thank's for sharing, man!

  • @chandanchhajervlogs1051
    @chandanchhajervlogs1051 2 ปีที่แล้ว

    Awesome tutorial video! I just loved it.

  • @Viralstuffzworld
    @Viralstuffzworld 2 ปีที่แล้ว

    you make easier microservice understanding using node js

  • @AnthonyFinix
    @AnthonyFinix 3 ปีที่แล้ว +3

    Your video is very informative and thank you very much. But it does introduces further problem of dependency among services. And response is essentially waiting for the whole saga to be completed. Can you please publish a video about how to mitigate these problems

    • @manosriram
      @manosriram  3 ปีที่แล้ว

      Yes, thank you. Will make a video on this.

  • @blitzkreig4887
    @blitzkreig4887 ปีที่แล้ว

    How does RabbitMQ compare to Kafka , when you consider a Ecommerce application ?

  • @alshojamikbal8510
    @alshojamikbal8510 3 ปีที่แล้ว

    Good Info Man Keep going

  • @kk-kw7yx
    @kk-kw7yx 3 ปีที่แล้ว

    You are a life saver.

  • @nitindhiman2607
    @nitindhiman2607 3 ปีที่แล้ว

    This was very informative. Thanks

    • @manosriram
      @manosriram  3 ปีที่แล้ว +1

      Glad it helped 🙂

  • @thisissharief7651
    @thisissharief7651 2 ปีที่แล้ว

    wounderfull
    and very very thanks for the github link

  • @AwakeningofAI
    @AwakeningofAI 3 ปีที่แล้ว

    great stuff mate.

    • @manosriram
      @manosriram  3 ปีที่แล้ว

      Thank you Drake.

  •  3 ปีที่แล้ว

    I got the concepts, thks bro

    • @manosriram
      @manosriram  3 ปีที่แล้ว

      Thank you, glad it helped.

  • @amacodes7347
    @amacodes7347 2 ปีที่แล้ว

    Thanks very informative

  • @sina-qh8wm
    @sina-qh8wm ปีที่แล้ว

    just Perfect...

  • @RahulAhire
    @RahulAhire 3 ปีที่แล้ว

    At what scale using message queue make sense? I have known that queues can be utmost helpful during really high amount of traffic when managing throughput is essential and also has retry feature. For eg. AWS lambda has a its own throughput limit was can be balanced by SQS, step function, etc. How helpful is it for small scale where I just want to handle basic crud app? What's your view?
    Edit: small suggestion, treat your audio in adobe audition with denoise filter and parametric EQ during editing to remove background noise and it will sound better.

    • @manosriram
      @manosriram  3 ปีที่แล้ว +1

      Message queues are most useful in microservices. Microservices are used at Scale (Huge codebases).
      For small-scale apps, it can still help you to handle your application if it is scaling steadily.
      Thank you, I have found the audio bug and will fix it from next video :)

  • @nagashishsv843
    @nagashishsv843 3 ปีที่แล้ว +3

    Amazing video bro, but small issue..
    at the first time u hit the route, u got an empty response (at 42:32 )
    again next time u hit the route then a response came, (at 42:34 )
    Is this correct?
    Actually we are getting wrong response for the current hit to that route((I,e we are getting response of the previous hit)
    At very first time, before the queue consumes the message, the call back returns order, where it is undefined still, so u got no output. By this time your queue will consume message and assigns it to order, so that in the next hit to the route, this order value is coming, which was supposed to come in the before hit itself.
    So to get the correct output, we need to hit the route twice…
    So how to solve this issue.???
    Can we write return res.json(order) inside the consume function itself?
    (I did like this, the 1st hit gave me correct output, but while in the 2nd hit, the server is getting crashed, saying Error: Can't set headers after they are sent, )
    Please Correct me if I am wrong..

    • @manosriram
      @manosriram  3 ปีที่แล้ว +1

      Yeah, you cannot return inside a consume function. So, I tried returning outside the function. I think the problem might be like, it always waits to consume and you cannot return all of a sudden, maybe we can have some callback fn which helps us to return after consuming. Will try to do a video on this if I find a suitable solution.
      Thank you for watching :)

    • @harishkumark9010
      @harishkumark9010 2 ปีที่แล้ว

      yes sending request twice returns the response back any solution for this

    • @boubaker86
      @boubaker86 ปีที่แล้ว

      @@manosriram you can simply use await to wait for the consumption first then you can send a response

  • @lancerdonnie
    @lancerdonnie 3 ปีที่แล้ว

    Awesome content 👍. Just when I was looking for how to connect services with message brokers.

    • @manosriram
      @manosriram  3 ปีที่แล้ว +1

      Glad it helped you :)

  • @kumar_sanjeevdutta1069
    @kumar_sanjeevdutta1069 2 หลายเดือนก่อน

    Great

  • @djamaatul
    @djamaatul 4 หลายเดือนก่อน

    i not understand , its weird, api /product/buy channel consume no have await, but got response with data from consumer, it code syncron and blocking ?

    • @djamaatul
      @djamaatul 4 หลายเดือนก่อน

      can you explain?

  • @techtravis5610
    @techtravis5610 3 ปีที่แล้ว

    Sir, i have to add frontend to this, what will entry point from browser and all can u explain . Thank you

  • @kalkidan.t
    @kalkidan.t 2 ปีที่แล้ว

    great tutorial but why do you have to use vim to write the code? I find my self wanting to see the full folder structure a lot in the video.

    • @manosriram
      @manosriram  ปีที่แล้ว +1

      i usually write code in vim; but i'll try to show the file tree from now on.

  • @rocketbox9
    @rocketbox9 2 ปีที่แล้ว

    Hello :) how are you, a query ... if in the case I want to add another function called UpdateOrder in the order service then I add it but how did you call it from Auth for example? because I see that the example is when you have a single createOrder function and you call it by the "ORDER", as it would be when you want to call a new UpdateOrder function with Income Parameters.

  • @riteshthakur9250
    @riteshthakur9250 3 ปีที่แล้ว

    Let's say we are deploying this whole application in aws so how we will configure nginx for order service because this service is not getting any api request or response it's just getting data from message broker and using it to make orders but it's running on a port to do all these tasks so when we will deploy it to aws how we will configure it for nginx proxy pass or location for api we can upstream it for server ip which we will get from aws instance and port of the server but what about location and proxy pass please give a suggestion

  • @mikejames6452
    @mikejames6452 ปีที่แล้ว

    Hi anyone can explain why /product/buy we need to hit api twice for correct answer .Also if i shift res.json in consume method than error occurs

  • @023PrashantSharma
    @023PrashantSharma 2 ปีที่แล้ว

    you should show folder structure, it will help

  • @mdazimbabu5001
    @mdazimbabu5001 ปีที่แล้ว

    we can also use the kafka insted of rebbitmq ?

  • @sivaganeshchitti
    @sivaganeshchitti 3 ปีที่แล้ว

    Awesome video.can you please advise. is it possible separate each micro services in different languages like PHP,golang. Each micro services connect to one nodejs api.like grpc

    • @manosriram
      @manosriram  3 ปีที่แล้ว

      Yes, it is possible to have different microservices in different languages. Only the API matters.

  • @fyargat
    @fyargat 3 ปีที่แล้ว

    Thank you!

  • @guruprabakaran5168
    @guruprabakaran5168 2 ปีที่แล้ว

    It's really helpful. Could you please help me to achieve this approach in Python or Flask python?

  • @kk-kw7yx
    @kk-kw7yx 3 ปีที่แล้ว

    Can you make a video on kafkajs in node microservices app soon sir? I am waiting to implement in my project. TQ!

    • @manosriram
      @manosriram  3 ปีที่แล้ว

      Sure, will do very very soon :)

  • @hoseinmirian
    @hoseinmirian 2 ปีที่แล้ว

    big thanks. great video. one question';' in a actual prod ver I saw ur github code, so how each service which have separated repo can have auth service or isAuthenticated service shared among them without repeating the code? tnx

    • @younesizeria4375
      @younesizeria4375 9 ชั่วโมงที่ผ่านมา

      You can take all common code and put it a seperate project ( called "common" e.g) then publish it to npm using npm publish u can look about this online to get more info... Then u can import your common code to any project by running npm install common-module that u have already published. It will like any other module like express, etc...

  • @socialcatalyst2608
    @socialcatalyst2608 2 ปีที่แล้ว

    Thanks.
    Use please rtx voice.

  • @rajatgupta6409
    @rajatgupta6409 3 ปีที่แล้ว

    Nice Man, thanks. But just one question. Clear and Simple question or you can say it's my doubt only that For Microservices, we do not need docker (compulsory) right? we can only use Rabbit MQ and node js and other stuff right ?

    • @manosriram
      @manosriram  3 ปีที่แล้ว

      Yes, you can install rabbitmq locally and connect it with the application.

  • @mohitsoni8951
    @mohitsoni8951 3 ปีที่แล้ว +1

    Nice, good info.
    Can you structure all these using typescript and make routes, controller, db connection and db model in different class file.

  • @johncarter4091
    @johncarter4091 3 ปีที่แล้ว

    How we create relationship between 2 microservices like products and order?

    • @codingintelugu8820
      @codingintelugu8820 2 ปีที่แล้ว

      By raising events! we can use kafka or rabbitmq to consume & emit these events, where products & orders handle that event data accordingly

  • @zulqadarabbas7567
    @zulqadarabbas7567 2 ปีที่แล้ว

    I am wondering, cant you make the isAuthenticated function into a separate middleware that isn't in the project dir?

    • @manosriram
      @manosriram  2 ปีที่แล้ว

      Sure, we could do that.

  • @patrickboahene1449
    @patrickboahene1449 3 ปีที่แล้ว

    @Mano Sriram I need a little clarification please. Why did you send data back from the order service to the product queue

    • @manosriram
      @manosriram  3 ปีที่แล้ว +1

      Because the client called the Product API. We have to return a response from that exact api. So after finishing the job in the order service, we return back data to finish and respond to the client.

    • @patrickboahene1449
      @patrickboahene1449 3 ปีที่แล้ว

      @@manosriram ​ ok...Thank you so much

  • @bushranikhat2326
    @bushranikhat2326 3 ปีที่แล้ว

    How to write from rabbit mq to mongodb?

  • @YOitsBA
    @YOitsBA 2 ปีที่แล้ว

    How did rabbitmq know which order to return to which request? I'm imagining a case where hundreds of people are hitting that route and adding items to the order queue, how would the consumer of new order know which order to return with which request?

    • @gilo16-f3z
      @gilo16-f3z 2 ปีที่แล้ว

      thanks for asking, am stuck right now doing something like this

  • @developpementdigital1036
    @developpementdigital1036 2 ปีที่แล้ว

    Thank you for this video, it war very clear,
    I want to dockerise this services and use nginx as reverse proxy, can you please tell me how can i handle with middlware isAuthenticate, should i make its own container ?

    • @manosriram
      @manosriram  2 ปีที่แล้ว

      I don’t think you need to dockerfile the middleware. You can just use it without separately containerising it

    • @developpementdigital1036
      @developpementdigital1036 2 ปีที่แล้ว

      @@manosriram thank you for your response. The solution i found is integrating the middlware in each service. I don't know if it's the best approch or not but i can't use the middlware separately because i'm using docker-compose for managing my containers.

  • @kk-kw7yx
    @kk-kw7yx 3 ปีที่แล้ว

    Can you make a video on kafkajs in node microservices app?

    • @manosriram
      @manosriram  3 ปีที่แล้ว +2

      Sure, will do it in the very near future.

    • @piyushmahapatra5402
      @piyushmahapatra5402 3 ปีที่แล้ว

      @@manosriram Please do this bro,your channel is going to be my new hangout

  • @abhijeetshikharvlog1444
    @abhijeetshikharvlog1444 3 ปีที่แล้ว

    Can you make video microsevices without rabbit mq like i want api gateway

    • @manosriram
      @manosriram  3 ปีที่แล้ว +1

      Yes, I am thinking of doing a Gateway for microservices very soon. Do subscribe to stay updated :)

    • @abhijeetshikharvlog1444
      @abhijeetshikharvlog1444 3 ปีที่แล้ว

      Can u help me create microsevices i will send mail

  • @amanullahghouri1149
    @amanullahghouri1149 2 ปีที่แล้ว

    thaks subscribed too

  • @riteshthakur9250
    @riteshthakur9250 3 ปีที่แล้ว +1

    Bro what in this world you are not using visual studio code

    • @manosriram
      @manosriram  3 ปีที่แล้ว

      I prefer Vim over VsCode.

    • @mohitharshan9388
      @mohitharshan9388 3 ปีที่แล้ว

      @@manosriram why do you prefer Vim?

  • @chandanSINGHIIMS
    @chandanSINGHIIMS 3 ปีที่แล้ว

    please make same program with kafka Pleaseeeeeeeeeee

    • @manosriram
      @manosriram  3 ปีที่แล้ว

      I already have a video on Kafka, do check that out 😄

  • @windwardhive7363
    @windwardhive7363 3 ปีที่แล้ว

    github repo link please

    • @manosriram
      @manosriram  3 ปีที่แล้ว

      Updated link with github link :)

  • @MukeshSharma-lo1vv
    @MukeshSharma-lo1vv ปีที่แล้ว

    Please use vs code with good theme, and also the file structure should be visible

  • @subhampanja4590
    @subhampanja4590 ปีที่แล้ว +1

    Where is your pain bro?
    You are teaching people in a very complicated manner.
    I know you are a good coder and you are committed to using a vim editor for your learning means remember the Syntex.
    But just think people here are coming to learn something .why you are making it complicated.

  • @Looneytune
    @Looneytune 2 ปีที่แล้ว

    No ESLint, no TS, not real microservices, RabbitMQ doesn't any sense here, why did you go for gRPC, Kafka or something, would be a better fit. I don't wanna be mean, but nobody should take this as an example.

    • @amacodes7347
      @amacodes7347 2 ปีที่แล้ว

      what have u done? Dumb ass u're already mean. Give ur opinion as in pros and cons and state ur preference pussy