From the course: Node.js: Microservices
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Using queues for decoupling - Node.js Tutorial
From the course: Node.js: Microservices
Using queues for decoupling
- [Instructor] One goal in microservice architectures is to avoid tight coupling. It's hard to decouple actions that are needed to show data on the website instantly, but when it comes to posting data to a service in a file-and-forget way, doing that asynchronously through some intermediate service removes any dependency between caller and receiving service. Queues are a common way to accomplish that, and the basic principle is very simple. Basically, they provide a way to publish messages to it. In our shopper app, we store orders. Right now, the order functionality is still part of the monolith, but we will change that. When a customer clicks on Buy, there are several actions performed, and eventually an order is created. This is typically a file-and-forget call. I don't need any feedback by the order-service at this point. If you use a queue, these Create Order messages are stored in this queue regardless…
Contents
-
-
-
-
-
-
-
-
-
(Locked)
What's your goal for this chapter?2m 27s
-
(Locked)
Chaos testing4m 18s
-
(Locked)
Adding caching to reduce load and bridge outages2m 40s
-
(Locked)
Using queues for decoupling1m 43s
-
(Locked)
Installing up RabbitMQ1m 24s
-
(Locked)
Setting up the order service3m 2s
-
(Locked)
Producing orders6m 47s
-
(Locked)
Consuming orders9m 3s
-
(Locked)
-