IoTDB Application Development Overview
Introduction to IoTDB
IoTDB is a data management engine that integrates collection, storage, and analysis of time series data. It features lightweight, high performance, and ease of use. It perfectly interconnects with the Hadoop and Spark ecosystems and meets the requirements of high-speed write and complex analysis and query on massive time series data in industrial IoT applications.

This document applies only to MRS 3.2.0 or later.
Basic Concepts
The following uses an electric power scenario as an example to describe how to create a correct data model in IoTDB.
Figure 1 shows the power group layer, power plant layer, device layer, and sensor layer. ROOT is a root node, and each node at the sensor layer is a leaf node. According to the IoTDB syntax, the path from ROOT to a leaf node is separated by a dot (.). The complete path is used to name a time series in the IoTDB. For example, the time series name corresponding to the path on the left in the figure is ROOT.ln.wf01.wt01.status.
- Device
A device is a machine equipped with sensors in actual scenarios. In IoTDB, all sensors must have their corresponding devices.
- Sensor
A sensor is a detection machine in actual scenarios. It can sense the information to be measured, and can transform the sensed information into an electrical signal or other desired form of information output and send it to IoTDB. In IoTDB, all data and paths stored are organized in units of sensors.
- Storage group
You can set any prefix path as a storage group. If there are four time series, for example, root.vehicle.d1.s1, root.vehicle.d1.s2, root.vehicle.d2.s1, and root.vehicle.d2.s2, two devices d1 and d2 in the path root.vehicle may belong to the same owner or manufacturer, so d1 and d2 are closely related. In this case, the prefix path root.vehicle can be designated as a storage group, which will enable IoTDB to store the data of all devices under it in the same folder. Newly added devices in root.vehicle will also belong to this storage group.
- A proper number of storage groups can improve performance. There is neither the slowdown of the system due to frequent I/O switching (which will also take up excessive memory and result in frequent memory-file switching) caused by too many storage files or folders, nor the block of write commands caused by too few storage files or folders (which reduces concurrency).
- You need to balance the storage group settings of storage files according to their own data size and usage scenarios to achieve better system performance.
- Time series
Time series is a core concept in IoTDB. The time series can be considered as the complete path of the sensor that generates the time series data. In IoTDB, all time series must start with root and end with the sensor.
IoTDB Sample Project
To obtain an MRS sample project, visit https://github.com/huaweicloud/huaweicloud-mrs-example and switch to the branch that matches the MRS cluster version. Download the package to the local PC and decompress it to obtain the sample project of each component.
Sample Project Location |
Description |
---|---|
iotdb-examples/iotdb-flink-example |
Program for using Flink to access IoTDB data, including FlinkIoTDBSink and FlinkIoTDBSource data. FlinkIoTDBSink can use Flink jobs to write time series data to IoTDB. FlinkIoTDBSource reads time series data from IoTDB through Flink jobs and prints the data. |
iotdb-examples/iotdb-jdbc-example |
Java sample program for IoTDB JDBC to process data This example demonstrates how to use JDBC APIs to connect to IoTDB and run IoTDB SQL statements. |
iotdb-examples/iotdb-kafka-example |
Sample program for accessing IoTDB data through Kafka This program demonstrates how to send time series data to Kafka and then use multiple threads to write the data to IoTDB. |
iotdb-examples/iotdb-session-example |
Java sample program for IoTDB Session to process data This example demonstrates how to use Session to connect to IoTDB and run IoTDB SQL statements. |
iotdb-examples/iotdb-udf-exmaple |
This sample program describes how to implement a simple IoTDB user-defined function (UDF). |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot