计算机科学 ›› 2026, Vol. 53 ›› Issue (9): 124-135.doi: 10.11896/jsjkx.260100146

• 数据库&大数据&数据科学 • 上一篇    下一篇

面向物联网场景的分布式时序数据库共识协议框架

谷新豪1, 许京奕2, 李永瑾2, 赵馨逸3, 乔嘉林3   

  1. 1 清华大学软件学院 北京 100084
    2 北京大数据先进技术研究院 北京 100085
    3 天谋科技(北京)有限公司 北京 100085
  • 收稿日期:2026-01-25 修回日期:2026-04-30 出版日期:2026-09-15 发布日期:2026-09-10
  • 通讯作者: 赵馨逸(xinyi.zhao@timecho.com)
  • 作者简介:(guxh23@mails.tsinghua.edu.cn)
  • 基金资助:
    国家重点研发计划(SQ2024YFB3300117);国家重点实验室项目(231-HF-D01-01);中国气象局气象软件重点开放实验室开放研究课题(KLMS-OK-202506)

Consensus Protocol Framework of Distributed Time-series Database for Internet of Things Scenarios

GU Xinhao1, XU Jingyi2, LI Yongjin2, ZHAO Xinyi3, QIAO Jialin3   

  1. 1 School of Software,Tsinghua University,Beijing 100084,China
    2 Advanced Institute of Big Data,Beijing 100085,China
    3 Timecho Technology(Beijing) Co.,Ltd.,Beijing 100085,China
  • Received:2026-01-25 Revised:2026-04-30 Published:2026-09-15 Online:2026-09-10
  • About author:GU Xinhao,born in 2001,Ph.D candidate,is a member of CCF(No.J8265G).His main research interests include distributed system and machine learning system.
    ZHAO Xinyi,born in 1993,master.Her main research interest is time series management.
  • Supported by:
    National Key Research and Development Program of China(SQ2024YFB3300117),Project of National Key Laboratory(231-HF-D01-01) and Open Research Project of Key Laboratory of Meteorological Software,China Meteorological Administration(KLMS-OK-202506).

摘要: 随着物联网的飞速发展,设备状态监控数据逐渐发挥越来越大的价值。这些数据主要包括不随时间变化的静态属性信息以及随时间变化的动态时序数据。然而,这两类数据的读写负载、价值密度存在显著差异。传统分布式时序数据库通常采用单一的共识协议来管理不同数据,未充分考虑不同数据的特点和价值,因而导致系统的整体表现受限。针对此问题,提出了一种面向物联网异构数据的分布式共识协议框架。该框架通过模块解耦和标准化接口定义提供多样的共识协议选择,即允许根据不同的应用场景和特定的数据类型来集成不同的共识协议。具体而言,该框架可让系统为价值高、容错低的静态属性信息配置强一致性共识协议,以保证其准确性和可靠性;同时为体量大、冲突少的动态时序数据配置弱一致性共识协议,以增强其写入性能。为验证该框架的灵活性和普适性,基于开源分布式时序数据库Apache IoTDB进行了实现,并评估了它在不同共识协议中的差异化表现。基于恰到好处的共识协议集成,该框架使IoTDB集群的写入吞吐量提升了2.5倍,能够充分满足物联网异构数据对共识协议的不同需求。该研究提升了分布式时序数据库处理物联网异构数据的灵活性和适应性,为不同价值的数据提供了定制化的共识保障,也为不同共识协议的对比提供了可靠平台,具有重要的理论意义和实用价值。

关键词: 物联网, 时序数据库, 共识协议, 统一框架, 可配置一致性, 异构数据

Abstract: With the rapid development of the Internet of Things(IoT),device status monitoring data is becoming increasingly va-luable.This data primarily includes static attribute information,which does not change over time,and dynamic time-series data,which varies with time.These two types of data exhibit significant differences in read/write workloads and value density.Traditional distributed time-series databases typically employ a single consensus protocol to manage all data,which limits overall system performance by failing to adequately consider the distinct characteristics and value of different data types.To address this issue,this paper proposes a distributed consensus protocol framework for heterogeneous IoT data.This framework offers diverse consensus protocol options through module decoupling and standardized interface definitions,allowing for the integration of different consensus protocols based on various application scenarios and specific data types.Specifically,the framework enables the system to configure strong consistency consensus protocols for high-value,low-fault-tolerance static attribute information,ensuring its accuracy and reliability.Simultaneously,it allows for the configuration of weak consistency consensus protocols for large-volume,low-conflict dynamic time-series data to enhance write performance.To validate the flexibility and universality of this framework,it is implemented based on the open-source distributed time-series database Apache IoTDB and evaluated its differentiated performance with various consensus protocol implementations.By integrating appropriate consensus protocols,the framework improves the write throughput of the IoTDB cluster by 2.5 times,effectively meeting the diverse consensus protocol requirements of heterogeneous IoT data.This research enhances the flexibility and adaptability of distributed time-series databases in handling heterogeneous IoT data,provides customized consensus guarantees for data of different values,and offers a reliable platform for comparing different consensus protocols,thus holding significant theoretical importance and practical value.

Key words: Internet of Things, Time-series database, Consensus protocol, Unified framework, Configurable consistency, Heterogeneous data

中图分类号: 

  • TP311
[1] IDC.Worldwide Data and Analytics Software Forecast,2024-2028:Market Trends and Opportunities[R/OL].2024.[Accessed 2025-01-20].https://www.idc.com/getdoc.jsp?containerId=US51667324.
[2] LIU S,QIAO Y,LUO X F,et al.A Survey of Key Technologies for Time Series Databases[J].Journal of Computer Research and Development,2024,61(3):614-638.
[3] WANG J M.A Survey of Industrial Big Data Technologies(Part Three)[EB/OL].https://mro.thss.tsinghua.edu.cn/Content/2021/12-19/1535400039_8.html.
[4] JENSEN S K,THOMSEN C.Holistic analytics of sensor data from renewable energy sources:a vision paper[C] //European Conference on Advances in Databases and Information Systems.Cham:Springer Nature Switzerland,2023:360-366.
[5] KLEPPMANN M.Designing data-intensive applications:Thebig ideas behind reliable,scalable,and maintainable systems[M].Sebastopd?O’Reilly Media,2015.
[6] HERLIHY M P,WING J M.Linearizability:A correctness condition for concurrent objects[J].ACM Transactions on Programming Languages and Systems,1990,12(3):463-492.
[7] LAMPORT.How to make a multiprocessor computer that correctly executes multiprocess programs[J].IEEE Transactions on Computers,1979,100(9):690-691.
[8] BAILIS P,GHODSI A,HELLERSTEIN J M,et al.Bolt-oncausal consistency[C] //Proceedings of the 2013 ACM SIGMOD International Conference on Management of Data.2013:761-772.
[9] BRZEZINSKI J,SOBANIEC C,WAWRZYNIAK D.From session causality to causal consistency.[C] //PDP.2004:152-158.
[10] DEMERS A,GREENE D,HAUSER C,et al.Epidemic algorithms for replicated database maintenance[C] //Proceedings of the sixth annual ACM Symposium on Principles of distributed computing.1987:1-12.
[11] LAMPORT L.Paxos made simple[J].ACM SIGACT News(Distributed Computing Column),2001,32(4):51-58.
[12] LIANG Z,JABRAYILOV V,CHARAPKO A,et al.Multipaxos made complete[J].arXiv:2405.11183,2024.
[13] MORARU I,ANDERSEN D G,KAMINSKY M.There is more consensus in egalitarian parliaments[C] //Proceedings of the Twenty-Fourth ACM Symposium on Operating Systems Principles.2013:358-372.
[14] ONGARO D,OUSTERHOUT J.In search of an understandable consensus algorithm[C] //2014 USENIX Annual Technical Conference(USENIX ATC14).2014:305-319.
[15] What is etcd? a distributed,reliable key-value store for the most critical data of a distributed system [EB/OL].https://etcd.io.
[16] Apache Ratis.an open source java implementation for raft consensus protocol[EB/OL].https://ratis.apache.org.
[17] JUNQUEIRA F P,REED B C,SERAFINI M.Zab:High-performance broadcast for primary-backup systems[C] //2011 IEEE/IFIP 41st International Conference on Dependable Systems & Networks(DSN).IEEE,2011:245-256.
[18] Apache ZooKeeper[EB/OL].https://zookeeper.apache.org.
[19] DECANDIA G,HASTORUN D,JAMPANI M,et al.Dynamo:Amazon’s highly available key-value store[J].ACM SIGOPS Operating Systems Review,2007,41(6):205-220.
[20] LAKSHMAN A,MALIK P.Cassandra:a decentralized structured storage system[J].ACM SIGOPS Operating Systems Review,2010,44(2):35-40.
[21] What is riak?[EB/OL].https://riak.com/products/riak-overview.
[22] YANG Z,YANG C,HAN F,et al.Oceanbase:a 707 milliontpmc distributed relational database system[J].Proceedings of the VLDB Endowment,2022,15(12):3385-3397.
[23] HUANG D,LIU Q,CUI Q,et al.Tidb:a raft-based htap database[J].Proceedings of the VLDB Endowment,2020,13(12):3072-3084.
[24] Tdengine.a high-performance and distributed industrial big data platform[EB/OL].https://www.taosdata.com.
[25] JIMÉNEZ-PERIS R,PATIÑO-MARTÍNEZ M,ALONSO G,et al.Are quorums an alternative for data replication?[J].ACM Transactions on Database Systems(TODS),2003,28(3):257-294.
[26] Dolphindb,a high-performance time series databases [EB/OL].2016.https://dolphindb.cn.
[27] Time series starts with influxdb[EB/OL].2013.https://www.influxdata.com.
[28] KRASKA T,HENTSCHEL M,ALONSO G,et al.Consistency rationing in the cloud:Pay only when it matters[J].Proceedings of the VLDB Endowment,2009,2(1):253-264.
[29] MAHFOUD Z,NOUALI-TABOUDJEMAT N.Enhancing data consistency via a context-aware dynamic adaptive model[J].International Journal of Computing and Digital Systems,2024,16(1):543-554.
[30] VILAYANNUR M,NATH P,SIVASUBRAMANIAM A.Providing tunable consistency for a parallel file store.[C] //FAST:Vol.5.2005:2-2.
[31] BRONSON N,AMSDEN Z,CABRERA G,et al.{TAO}:{Facebook’s} distributed data store for thesocial graph[C] //2013 USENIX Annual Technical Conference(USENIX ATC 13).2013:49-60.
[32] SHI X,PRUETT S,DOHERTY K,et al.{FlightTracker}:Consistency across {Read-Optimized} online stores at facebook[C] //14th USENIX Symposium on Operating Systems Design and Implementation(OSDI 20).2020:407-423.
[33] LAMPORT L.Time,clocks,and the ordering of events in a distributed system[M] //Concurrency:the Works of Leslie Lamport.2019:179-196.
[34] Apache iotdb,a data management system for time series data[EB/OL].2018.https://github.com/apache/iotdb.
[35] WANG C,QIAO J,HUANG X,et al.Apache iotdb:A time series database for iot applications[J].Proceedings of the ACM on Management of Data,2023,1(2):1-27.
[36] Fastiot,a hith performance consensus protocol for iot scenario[EB/OL].2023.https://github.com/apache/iotdb/tree/master/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot.
[37] O’NEIL P,CHENG E,GAWLICK D,et al.The log-structured merge-tree(lsm-tree)[J].ActaInformatica,1996,33:351-385.
[38] POESS M,NAMBIAR R,KULKARNI K,et al.Analysis oftpcx-iot:The first industry standard benchmark for iot gateway systems[C] //2018 IEEE 34th International Conference on Data Engineering(ICDE).IEEE,2018:1519-1530.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!