节点文献
流程工业分布式实时数据库事务管理的研究与开发
Research and Development of Transaction Management in Distributed Real-time Database for Process Industry
【作者】 李龙;
【作者基本信息】 浙江大学 , 控制科学与工程, 2014, 硕士
【摘要】 随着流程工业的迅速发展,传统的单机实时数据库已经无法满足大型流程工业对规模、拓展性、容错性的要求。具有高容量、高伸缩性、高容错性的分布式实时数据库成为实时数据库领域的新方向。传统的实时数据库事务处理缺少对流程工业相关需求的针对性研究,没有充分考虑分布式事务处理面临的事务分解、事务合并、数据一致性等问题。本文通过深入分析流程工业实时数据库的业务特点,建立流程工业实时数据库的事务模型,应用查询事务优化、实时事务调度、分布式事务提交、分布式一致性服务等关键技术,研究并开发了一个分布式实时数据库的事务管理模块。本文深入分析流程工业分布式实时数据库中内部和外部请求的实时性特征、数据操作类型、原子性需求和重要程度等特征,根据相应的指标建立实时事务模型。基于该模型,采用具有准入控制的优先级调度算法对数据库事务进行混合调度,对具有较近截止期事务和内部事务赋予较高优先级,保证内部事务在截止期内完成的情况下提高系统的吞吐量。针对传统两阶段锁中出现的优先级倒置现象和抢占锁中出现的循环抢占现象,设计基于事务执行时间估计的优先级两阶段锁算法。该算法根据事务执行时间来决定是否抢占资源,以减少高优先级事务错失几率和不必要的资源抢占。为保证事务处理的实时性,创造性地提出无阻塞两阶段提交协议,在传统两阶段提交协议中增加候选协调者角色,解决了两阶段提交协议中协调者故障引起的阻塞问题。同时,本文设计基于多重副本的智能查询机制对于查询事务进行优化以提高查询效率。本文最后搭建测试平台,对事务管理模块的功能、性能和可靠性进行测试验证。测试结果表明:事务管理模块能正确处理历史数据查询、实时数据推送、实时数据订阅等各类请求;模块在半数以上节点存活的情况下能正常工作;并发查询规模、查询响应时间、数据一致性等性能指标满足设计需求。结果表明事务管理模块能够达到设计预期目标和性能要求。
【Abstract】 With the rapid development of process industry, traditional stand-alone real-time database has been unable to meet the scalability and fault tolerance requirements of large-scale process industry. Distributed real-time database with high capacity, high scalability and high fault tolerance ability has become a new research branch in the field of real-time database. The traditional real-time database is lack of specific research targeted on requirements of process industry and distributed transaction processing issues such as transaction decomposition, transaction amalgamation and data consistency. Through in-depth analysis on the business features of process industrial real-time database, this thesis presents a transaction management module for real-time database using key technologies including query transaction optimization, real-time transaction scheduling and distributed transaction commit.In this thesis, a real-time transaction model is presented through in-depth analysis on indicators of internal and external requests in real-time database such as data type of operation, atomic requirement and real-time requirement. Based on this model, the transaction management module uses priority scheduling algorithm with access control to schedule real time transactions, assigning higher priority to transactions with close deadline and internal transactions. For the priority inversion problem in traditional two-phase locking algorithm and cycle seize problem in preemptive locking algorithm, this thesis presents a priority two-phase locking algorithm based on transaction execution time estimation. The algorithm decides whether high-priority transactions seize the resources according to dead time and execution time estimation to reduce high-priority transactions missing ratio and unnecessary seize. In order to ensure real-time requirement of transactions, this thesis proposes a non-blocking two-phase commit protocol. A candidate coordinator is introduced in the protocol to avoid blocking problem caused by coordinator failure. Meanwhile, this thesis presents an intelligent query mechanisms base on multiple copies mechanisms to speed up historical data query.In the end of this thesis, a test platform was introduced to verify function, performance and reliability of transaction management module. Test results show that:the transaction management module is able to deal with requests such as historical data queries, real-time data feeds and real-time data push. The module works when the number of live nodes is no less than half of total number. Performance indicators including concurrent number of queries, query responding time and data consistency meet design requirements. The results show that the transaction management module can meet the design requirements on function, performance and reliability.