In many scenarios, you must process the data that is reported by devices or use the data for business applications. You can forward device data by either using the IoT Platform service subscription or the rules engine data forwarding function. This topic compares the various data forwarding solutions and application scenarios that are supported by IoT Platform to help you select a forwarding solution that best suits your needs.

Data forwarding solutions

IoT Platform supports the following functions for data forwarding:

  • Rules engine data forwarding: Provides basic data filtering and processing capabilities. You can configure forwarding rules to filter and process device data and then forward the data to other Alibaba Cloud services.
  • Service subscription: Obtains device data directly from HTTP/2 clients. You can quickly obtain device data without being filtered and processed. This function is simple, easy to use, and efficient.

Compare rules engine data forwarding and service subscription

Forwarding function Scenarios Advantages and disadvantages Restrictions
Rules engine data forwarding
  • Complex scenarios
  • High-throughput scenarios

Advantages:

  • Full fledged.
  • Allows you to modify forwarding rules while the rules are running.
  • Supports data filtering and processing.
  • Allows you to forward data to other Alibaba Cloud services.

    The following table "Rules engine-based solutions" briefly compares solutions that use the rules engine for forwarding data to different Alibaba Cloud services.

Disadvantages:

  • Complex to use. Users must write SQL expressions and configure forwarding rules.
See Limits for data forwarding.
Service subscription
  • The service clients only receive data, cannot send data.
  • The service clients receive all device data.

Advantages: Easy to use.

Disadvantages:

  • Lack of the filtering capability.
  • Limited language support for the SDK.
-
Table 1. Rules engine-based solutions
Forwarding destination Scenarios Advantages Disadvantages
Message Service (MNS) Device data requires complex or refined processing.

Scenarios where the transmit rate is slower than 1,000 QPS.

  • Uses the HTTPS protocol.
  • Allows IoT Platform to forward data on the Internet with high performance.
Provides performance slightly lower than MQ for RocketMQ.
ApsaraDB for RDS Data storage scenarios. Writes data directly to databases. N/A
Table Store Data storage scenarios. Writes data directly into Table Store instances. N/A
Function Compute Scenarios where the device development process must be simplified and device data must be processed in a flexible way.
  • Great flexibility in data processing.
  • Multiple functions.
  • Do not require deployment.
Higher costs.

Forward data to Message Service

The rules engine enables IoT Platform to forward messages in specific topics to the topics in Message Service. Message Service can then receive these messages by using the Message Service SDK. Message Service allows access from the public network but it provides a lower performance than RocketMQ. We recommend that you use Message Service for scenarios where the transmit rate is lower than 1,000 QPS.

Restrictions Guidelines References
When a message fails to be forwarded by using the rules engine after making the maximum retries, the message will be dropped. Message-oriented services may have delay issues. Make sure that you are fully aware of the impacts of data loss or delay on your business.

Forward data to Function Compute

The rules engine enables IoT Platform to forward messages in specific topics to Function Compute. Developers can then further process the messages. Function Compute does not require deployment, which simplifies business development.

Restrictions Guidelines References
See Function Compute limits.
  • Applicable to scenarios where users can customize data processing or are required to simplify the development and operation processes.
  • When a message fails to be forwarded by using the rules engine after making the maximum retries, the message will be dropped. Make sure that you are fully aware of any impacts of data loss or delay on your business.