去中心化架構(gòu)系統(tǒng)中的分布式事務(wù)機(jī)制研究
發(fā)布時(shí)間:2018-03-31 17:31
本文選題:Paxos 切入點(diǎn):分布式存儲(chǔ)系統(tǒng) 出處:《華中科技大學(xué)》2013年碩士論文
【摘要】:去中心化NoSQL系統(tǒng)的數(shù)據(jù)存儲(chǔ)服務(wù)具有高可擴(kuò)展和高可用的特點(diǎn),且無單點(diǎn)故障,無主節(jié)點(diǎn)性能瓶頸等問題。但是,此類系統(tǒng)在數(shù)據(jù)一致性方面僅提供了最終一致性保障,應(yīng)用的強(qiáng)一致性需求則由開發(fā)者在應(yīng)用設(shè)計(jì)時(shí)自行保證,從而增加了應(yīng)用開發(fā)的復(fù)雜性。因此有必要在NoSQL中提供事務(wù)的ACID特性,既保留NoSQL杰出的系統(tǒng)特性,又可利用事務(wù)機(jī)制自動(dòng)解決開發(fā)者需要在應(yīng)用層維護(hù)一致性的問題。傳統(tǒng)的分布式事務(wù)兩階段提交協(xié)議存在著可用性和性能的問題,目前的研究著重于利用Paxos協(xié)議優(yōu)秀的容錯(cuò)能力,基于Paxos完成兩階段提交。 在Paxos協(xié)議的基礎(chǔ)上,設(shè)計(jì)并實(shí)現(xiàn)了可配置的去中心化事務(wù)性NoSQL系統(tǒng)DTCassandra。該系統(tǒng)能保證寫事務(wù)的ACID特性,并提供了一致讀、快照讀以及不一致讀三種級(jí)別的讀操作。提出并在DTCassandra中實(shí)現(xiàn)了一種可配置的一致讀寫算法,通過使用多種類型的副本,分離了讀寫操作,以此為基礎(chǔ)可以配置不同數(shù)量的讀寫副本;使用日志作為載體,對各副本上的操作進(jìn)行同步,實(shí)現(xiàn)了不同類型副本的副本日志,提供了分布式狀態(tài)機(jī)的基礎(chǔ);最后,針對負(fù)責(zé)寫入的副本,使用Paxos維護(hù)其日志的一致性,,針對負(fù)責(zé)讀取的副本,使用NWR法定人數(shù)協(xié)議來保證強(qiáng)一致性,并且提供可配置的讀寫可用性。采用基于Key的范圍進(jìn)行數(shù)據(jù)分區(qū)的方法,在各分區(qū)內(nèi)利用MVCC機(jī)制,提供了局部寫事務(wù)的ACID特性。改進(jìn)了兩階段提交協(xié)議,將跨分區(qū)的全局事務(wù)劃分為多個(gè)子事務(wù),以其中的主要子事務(wù)作為控制整個(gè)全局事務(wù)的提交點(diǎn),提供了在失效發(fā)生時(shí)保證全局一致性的能力。 針對4KB大小的數(shù)據(jù)進(jìn)行了讀寫測試。測試結(jié)果表明,DTCassandra一致讀操作的最大吞吐量較之Cassandra本身提供的法定人數(shù)讀操作提高了50%,局部寫事務(wù)的最大吞吐量較之法定人數(shù)寫操作降低了60%。系統(tǒng)擴(kuò)展了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.
【學(xué)位授予單位】:華中科技大學(xué)
【學(xué)位級(jí)別】:碩士
【學(xué)位授予年份】:2013
【分類號(hào)】:TP333
【參考文獻(xiàn)】
相關(guān)期刊論文 前1條
1 楊義繁;劉丹;朱妤晴;丁貴廣;王建民;;強(qiáng)快照與強(qiáng)提交讀隔離的多鍵云事務(wù)實(shí)現(xiàn)方法[J];計(jì)算機(jī)科學(xué)與探索;2011年09期
本文編號(hào):1691729
本文鏈接:http://sikaile.net/kejilunwen/jisuanjikexuelunwen/1691729.html
最近更新
教材專著