去中心化架构系统中的分布式事务机制研究
发布时间:2018-03-31 17:31
本文选题:Paxos 切入点:分布式存储系统 出处:《华中科技大学》2013年硕士论文
【摘要】:去中心化NoSQL系统的数据存储服务具有高可扩展和高可用的特点,且无单点故障,无主节点性能瓶颈等问题。但是,此类系统在数据一致性方面仅提供了最终一致性保障,应用的强一致性需求则由开发者在应用设计时自行保证,从而增加了应用开发的复杂性。因此有必要在NoSQL中提供事务的ACID特性,既保留NoSQL杰出的系统特性,又可利用事务机制自动解决开发者需要在应用层维护一致性的问题。传统的分布式事务两阶段提交协议存在着可用性和性能的问题,目前的研究着重于利用Paxos协议优秀的容错能力,基于Paxos完成两阶段提交。 在Paxos协议的基础上,设计并实现了可配置的去中心化事务性NoSQL系统DTCassandra。该系统能保证写事务的ACID特性,并提供了一致读、快照读以及不一致读三种级别的读操作。提出并在DTCassandra中实现了一种可配置的一致读写算法,通过使用多种类型的副本,分离了读写操作,以此为基础可以配置不同数量的读写副本;使用日志作为载体,对各副本上的操作进行同步,实现了不同类型副本的副本日志,提供了分布式状态机的基础;最后,针对负责写入的副本,使用Paxos维护其日志的一致性,,针对负责读取的副本,使用NWR法定人数协议来保证强一致性,并且提供可配置的读写可用性。采用基于Key的范围进行数据分区的方法,在各分区内利用MVCC机制,提供了局部写事务的ACID特性。改进了两阶段提交协议,将跨分区的全局事务划分为多个子事务,以其中的主要子事务作为控制整个全局事务的提交点,提供了在失效发生时保证全局一致性的能力。 针对4KB大小的数据进行了读写测试。测试结果表明,DTCassandra一致读操作的最大吞吐量较之Cassandra本身提供的法定人数读操作提高了50%,局部写事务的最大吞吐量较之法定人数写操作降低了60%。系统扩展了Cassandra,能保证ACID语义,具有高可用性。
[Abstract]:The data storage service of the decentralized NoSQL system has the characteristics of high scalability and high availability, and there are no single point failures, no performance bottlenecks of the master node, etc. However, this kind of system only provides the final consistency guarantee in the aspect of data consistency. The requirement of strong consistency of application is guaranteed by the developer in application design, which increases the complexity of application development. Therefore, it is necessary to provide the ACID feature of transaction in NoSQL, which is to retain the outstanding system characteristic of NoSQL. Transaction mechanism can also be used to automatically solve the problem that developers need to maintain consistency in the application layer. The traditional distributed transaction two-phase commit protocol has the problems of availability and performance. The current research focuses on using the excellent fault-tolerant ability of Paxos protocol to complete two-phase commit based on Paxos. On the basis of Paxos protocol, a configurable decentralized transactional NoSQL system is designed and implemented. The system can guarantee the ACID characteristics of write transactions and provide uniform reading. This paper proposes and implements a configurable uniform read and write algorithm in DTCassandra, which separates the read and write operations by using multiple types of replicas. On this basis, we can configure different numbers of read-write replica, use log as carrier, synchronize the operation on each replica, realize the replica log of different types, and provide the foundation of distributed state machine. For the copy responsible for writing, use Paxos to maintain the consistency of its log, for the copy that is responsible for reading, use the NWR quorum protocol to ensure strong consistency. The method of data partitioning based on Key range is used to provide the ACID feature of local write transactions by using MVCC mechanism in each partition. The two-phase commit protocol is improved. The cross-partition global transaction is divided into several sub-transactions, and the main sub-transaction is used as the commit point to control the whole global transaction, which provides the ability to ensure global consistency in the event of failure. The test results show that the maximum throughput of 4KB Cassandra consistent reading operation is 50% higher than that of quorum read operation provided by Cassandra itself, and the maximum throughput of local write transaction is higher than that of quorum read operation. The system extends Cassandra to ensure ACID semantics. High availability.
【学位授予单位】:华中科技大学
【学位级别】:硕士
【学位授予年份】:2013
【分类号】:TP333
【参考文献】
相关期刊论文 前1条
1 杨义繁;刘丹;朱妤晴;丁贵广;王建民;;强快照与强提交读隔离的多键云事务实现方法[J];计算机科学与探索;2011年09期
本文编号:1691729
本文链接:https://www.wllwen.com/kejilunwen/jisuanjikexuelunwen/1691729.html