Distributed Database System-Implementation of business travel booking system (8)

Source: Internet
Author: User
Transaction Manager Design

The design of this module mainly targets atomic operation standards, transaction storage, transaction processing, and coordination among various transactions. The most involved method in this module is the enumeration method. The enumeration method is used to list and uniformly number each operation on a data table, and define a specification, some users only need to list numbers according to certain conventions and pass appropriate parameters to wait for the Information replied by the terminal.

Overall Structure Design

In this design, we need to use a key design model.-----In Singleton mode, we also need Singleton mode in Data Set construction. No matter how many customers connect to the server and instantiate the operation, the interface implementation class stored on the server is instantiated only once, ensure the uniqueness of the data so that the data changed by others will be global.

InGlobalserviceThis method accepts a transaction request, executes the transaction operation, and finally returns the results required by the customer. BecauseGlobalserviceIs for a transaction, so the server needs to setSingcallThat is to say, each time someone requests a new instantiated object, they must be given to ensure that their operations do not conflict.

Request mode example

The customer instantiated himselfGlobalserviceThen, each client can assemble its own transaction entity,GlobaserviceIt will help you execute it as appropriate. In actual coding, the customer mainlyQueueserviceDeal.

Relationship between request mode and Server

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.