• Distributed Message Service

  1. Help Center
  2. Distributed Message Service
  3. User Guide
  4. Introduction
  5. Application Scenarios

Application Scenarios

DMS can be used in various services, such as enterprise applications, online payments, telecommunications, e-commerce, logistics, marketing, social networking, instant messaging (IM), mobile gaming, video, Internet of Things (IoT), and Internet of Vehicles (IoV).

DMS is useful in the following scenarios:

  • Service decoupling

    In an e-commerce system, DMS can be used to provide message notifications for supplementary services that are dependent on other systems. This allows key services to proceed without waiting for other systems, decoupling them from supplementary services. For example, the order processing (OP) system puts order information in DMS message queues, and then the inventory and delivery management systems read from the queues.

  • Inter-system consistency

    In trading or payment systems, transaction status (success or failure) must be consistent across multiple subsystems and modules. Reliable message transmission channels are required between subsystems and modules to ensure service continuity. DMS can provide high-reliability data transmission between subsystems and modules, keeping transaction statuses synchronized simply and cost efficiently.

    If bank customers buy wealth management products by using bank account balance, the banking system may be momentarily inconsistent with the wealth management system. For example, the wealth management system has returned the gains of wealth management products to customers' bank accounts but customers' bank account balance does not include the gains. This is because the wealth management system usually processes transactions at the end of every day instead of immediately. By storing statistics about buying and paying wealth management products into DMS can ensure final consistency between the banking system and the wealth management system. This avoids wasting a lot of time in resolving reconciliation inconsistencies between the two systems.

  • Off-peak traffic control

    In an e-commerce system or large website, there is a capability gap between upstream and downstream systems. Traffic bursts from upstream systems with a high processing capability may have a large impact on downstream systems with lower processing capability.

    For example, online sales promotions involve a huge amount of traffic flooding into e-commerce systems. DMS can be used to buffer orders and other information, relieving pressure on downstream systems. It provides a three-day buffer for hundreds of millions of messages, allowing message consumer systems to process them during off-peak periods.

  • Log synchronization

    Applications send log messages to DMS over reliable asynchronous transmission channels. Other application components can then read log messages from queues for further analysis, either in real time or offline. In addition, DMS can be used to collect key log information for monitoring.

    The log synchronization process is usually divided into the following steps:

    1. The log collection client collects log data and sends it in the form of messages to queues.
    2. Queues receive, store, and forward log data.
    3. The log processing application subscribes to queues and retrieves log data from queues.
    Figure 1 Log synchronization process
    • Scribe, Fluent, Flume, Logstash, and Rsyslog are popular open-source tools used to collect logs.
    • Logstash, ElasticSearch, and Kibana are open-source tools used to analyze logs.