Font Size: a A A

Research And Implementation Of Transaction Mechanism Based On MongoDB

Posted on:2019-05-01Degree:MasterType:Thesis
Country:ChinaCandidate:C XuanFull Text:PDF
GTID:2348330563454000Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
With the development of Mobile Intenet,Many popular applications face less users at the beginning,traditional databases are often the first choice due to the support of ACID.However,traditional database can not meet data storage requirements while users increase exponentially.NoSQL is widely used to solve big data problems with high avaiability,high expansion and other excellent features.Unfortunately,NoSQL weak support to ACID is frustrating.So businesses make difficult choice between ACID and mass storage.At present,the most widely used method to solve distributed transactions is the two-phase commit theory(2PC).In the Internet industry which has a large number of users,2PC does not effectively solve transaction problems.Google's failure attempt at Megastore and Percolator proves 2PC is difficult to effectively solve the distributed transaction problem in high concurrency situations.2PC has two weaknesses,(1)2PC needs to lock the resources of all participants at the same time,the overall performance of the system is limited by the barrel principle.(2)2PC may be block for a long time in case of pending resolution.In this paper,we propose an eventually consistency transaction model according to BASE and realize T-Mongo based on MongoDB which add eventually consistency transaction for MongoDB by modifying the source code.Eventually consistency transaction model can improve system performance by breaking ACID,providing eventually consistency feature,and taking full advantage of the availability of each node.In order to achieve the requirements of transaction isolation,the paper divided the transaction into IET(Independent Execution Transaction)and NET(Nonindependent Execution Transaction).The paper describes how to ensure isolation,and analyzes the support for ACID.Finally,paper tests the T-Mongo,including T-Mongo's reading and writing stress test,transaction performance test and coordinator test.The test results show that TMongo system has the similar read and write performance with MongoDB.On the other hand,T-Mongo system has a good transaction processing ability to meet the transaction needs in high concurrency scenarios.Tests show that coordinator module has superior network processing and read/write abilities.
Keywords/Search Tags:MongoDB, distributed transaction, 2PC, eventually consistency
PDF Full Text Request
Related items