去中心化架構系統(tǒng)中的分布式事務機制研究
發(fā)布時間:2018-03-31 17:31
本文選題:Paxos 切入點:分布式存儲系統(tǒng) 出處:《華中科技大學》2013年碩士論文
【摘要】:去中心化NoSQL系統(tǒng)的數據存儲服務具有高可擴展和高可用的特點,且無單點故障,無主節(jié)點性能瓶頸等問題。但是,此類系統(tǒng)在數據一致性方面僅提供了最終一致性保障,應用的強一致性需求則由開發(fā)者在應用設計時自行保證,從而增加了應用開發(fā)的復雜性。因此有必要在NoSQL中提供事務的ACID特性,既保留NoSQL杰出的系統(tǒng)特性,又可利用事務機制自動解決開發(fā)者需要在應用層維護一致性的問題。傳統(tǒng)的分布式事務兩階段提交協議存在著可用性和性能的問題,目前的研究著重于利用Paxos協議優(yōu)秀的容錯能力,基于Paxos完成兩階段提交。 在Paxos協議的基礎上,設計并實現了可配置的去中心化事務性NoSQL系統(tǒng)DTCassandra。該系統(tǒng)能保證寫事務的ACID特性,并提供了一致讀、快照讀以及不一致讀三種級別的讀操作。提出并在DTCassandra中實現了一種可配置的一致讀寫算法,通過使用多種類型的副本,分離了讀寫操作,以此為基礎可以配置不同數量的讀寫副本;使用日志作為載體,對各副本上的操作進行同步,實現了不同類型副本的副本日志,提供了分布式狀態(tài)機的基礎;最后,針對負責寫入的副本,使用Paxos維護其日志的一致性,,針對負責讀取的副本,使用NWR法定人數協議來保證強一致性,并且提供可配置的讀寫可用性。采用基于Key的范圍進行數據分區(qū)的方法,在各分區(qū)內利用MVCC機制,提供了局部寫事務的ACID特性。改進了兩階段提交協議,將跨分區(qū)的全局事務劃分為多個子事務,以其中的主要子事務作為控制整個全局事務的提交點,提供了在失效發(fā)生時保證全局一致性的能力。 針對4KB大小的數據進行了讀寫測試。測試結果表明,DTCassandra一致讀操作的最大吞吐量較之Cassandra本身提供的法定人數讀操作提高了50%,局部寫事務的最大吞吐量較之法定人數寫操作降低了60%。系統(tǒng)擴展了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
本文鏈接:http://www.sikaile.net/kejilunwen/jisuanjikexuelunwen/1691729.html