Analysis of IoTDB Principles

1. Introduction

IoTDB (Internet of Things Database) is a software system that integrates the collection, storage, management and analysis of time series data of the Internet of Things. Apache IoTDB adopts a lightweight architecture with high performance and rich functions.
IoTDB sorts time series from storage, indexes and chunk block storage, which greatly improves the query performance of time series data. Data consistency is ensured through the Raft protocol. For time series scenarios, precalculate and store stored data to improve the performance of analysis scenarios. According to the characteristics of time series data, it has powerful data encoding and compression capabilities, and its own copy mechanism also ensures data security, and has been deeply integrated with Apache Hadoop and Flink, etc., which can meet the massive data storage in the field of industrial Internet of things , high-speed data reading and complex data analysis requirements.

2. IoTDB structure

The IoTDB suite consists of several components, which together form a series of functions such as data collection, data writing, data storage, data query, data visualization, and data analysis.
The figure below shows the overall application architecture formed by using all the components of the IoTDB suite. IoTDB specifically refers to the time series database component.
insert image description here

  • Users can import time series data collected from device sensors, system status data such as server load, CPU memory, time series data in message queues, time series data of applications, or time series data in other databases to local or remote through JDBC/Session IoTDB. Users can also directly write the above data to a local (or on HDFS) TsFile file.
  • Users can write TsFile files to HDFS to realize data processing tasks such as anomaly detection and machine learning on Hadoop or Flink data processing platforms.
  • For TsFile files written to HDFS or local, TsFile-Hadoop or TsFile-Flink connectors can be used to allow Hadoop or Flink to perform data processing.
  • For the analysis result, it can be written back into a TsFile file.
  • IoTDB and TsFile also provide corresponding client tools to meet the various needs of users to view and write data in SQL form, script form and graphical form. The IoTDB service includes two roles: IoTDBServer (DataNode) and ConfigNode. Since the community edition role name DataNode has the same name as the HDFS role, the DataNode name is changed to IoTDBServer, as shown in the following figure.
  • ConfigNode: Management role, responsible for DataNode data fragmentation, load balancing, etc.
  • IoTDBServer (DataNode): storage role, responsible for data storage, query and writing functions.
    insert image description here

3. Principle of IoTDB

According to the attribute hierarchy, attribute coverage and the affiliation between data, we can express the IoTDB data model as the attribute hierarchy organization structure shown in the figure below, that is, "power group layer-power plant layer-equipment layer-sensor layer". Among them, ROOT is the root node, and each node of the sensor layer is a leaf node. The syntax of IoTDB stipulates that the path from the ROOT node to the leaf node is connected with ".", and this complete path is used to name a time series in IoTDB. For example, the time series name corresponding to the leftmost path in the figure below is "ROOT.ln.wf01.wt01.status".

insert image description here

Four. Summary

IoTDB stores data locally, so it does not depend on any other components for storage.

Guess you like

Origin blog.csdn.net/weixin_43114209/article/details/132164462