Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Example Analysis of Dubbo, Zookeeper, Redis and RabbitMQ

Shulou Source: shulou.com Published: 2022-06-01 08:26:37 09月25日 Update

This article will explain in detail the sample analysis of Dubbo, Zookeeper, Redis and RabbitMQ. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

First, mainly responsible for the development of Wechat order module

Order logic: order creation, order payment, order production, order confirmation, order completion, order cancellation and other order processes. It also involves complex order status rules, order amount calculation rules, increase and decrease inventory rules and so on.

This process requires all kinds of data, so the order system is connected to the required common service module interface, and the service of docking the public system can be completed in the order system. What have you done in the process? Which processes are done by yourself?

Second, in the past, a project had multiple classes, and once one of the classes went wrong, it would lead to the downtime of the entire service. Now split a project into multiple micro-services (producers and consumers) (that is, presentation layer and service layer). Like two separate computers, we all know that two separate computers do not provide any external conditions, such as the network environment, and these two computers cannot be trusted, so return to the project. How do two separate projects, the presentation layer and the service layer, communicate? The way to realize remote communication is to use dubbo: to make remote calls using RPC protocol, and to communicate directly using socket. The transmission efficiency is high, and the call relationship and the number of calls between systems can be counted to solve this downtime problem, so Dubbo can be used to manage these micro-services.

two。 Decoupling. If you use the MQ,A system to generate a piece of data and send it to the MQ, which system needs to consume the data in the MQ. If the new system needs data, you can consume it directly from MQ; if a system no longer needs this data, you can cancel the consumption of MQ messages. In this way, system A does not need to think about who to send data to, maintain the code, or consider whether the call is successful, failure timeout, and so on.

System An is completely decoupled from other systems.

3. Async

In the past, if you synchronized, you would have to wait for the ABCD to complete the task separately before responding to the user. This process requires 3+300+450+200ms, but now it only takes 3-5 seconds. You don't have to wait for them.

This is the end of the article on "sample Analysis of Dubbo, Zookeeper, Redis and RabbitMQ". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Tags: Orders systems services data consumption two articles rules computers processes projects communications examples analysis multiple more modules processes decoupling problems Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux MySQL MariaDB Shulou Information OPPO Reno