cool hit counter Distributed Things of xa protocol two-stage commit_Intefrankly

Distributed Things of xa protocol two-stage commit

The XA protocol was first proposed by tuxedo and handed over to the X/Open organization as the interface standard between the resource manager (database) and the transaction manager. XA is currently supported by major database manufacturers such as Oracle, informix, DB2, and Sybase. The XA protocol uses two-phase commit to manage distributed transactions. The XA interface provides a standard interface for communication between the resource manager and the transaction manager.

Today I read an article on mysql pipe network, I feel it is well written, I used to have a half understanding of xa things, but now I feel much clearer, for mysql, XA makes each mysql server act as a resource manager for xa things in the global things, and client applications connected to the mysql server act as thing managers.

Applications that use global things involve one or more resource managers and thing managers.

Resource Manager (RM):The Resource Manager provides access to thing-based resources. The database is really a kind of resource manager, necessary to commit or roll back things that have RM management.

Thing Manager (TM): The primary coordination is as part of the global thing. It acts as the coordinator of every thing in the RMS.

The process of executing a global thing uses a two-stage commit (2PC), where the global thing occurs after the operation executed by the branch.

Phase 1: All branch actions are ready, and each branch is told by the TM that it is ready to commit, at which point each RM in the global thing as a global thing records the action in stable storage (that is, records this action as ready).

Phase 2: TM tells RMS whether to commit or roll back, if all branches indicate they are ready to commit, RMS is told to commit, and if any of the RMs indicate that they are not ready or cannot commit, all rollbacks are made.

There are now many ways to solution the distribution of things, there are many ways to implement each solution, and second, to use atomikos' open source class thing manager as Demo.

Loading dependencies.

Configure Thing Manager (springboot is recommended, not used here):

Add something note:

The global thing manager plays a pivotal role as the coordinator for the entire two-phase commit process, and if the server where the coordinator is located goes down, then it affects the normal operation of the entire database cluster. For example, in the second phase, if the coordinator fails to send a transaction commit or rollback notification properly, the participants will remain blocked and the entire DB cluster will not be able to provide services.

So, this implementation is not used in most distributed environments to handle distributed things, compared to more likely mq+local persistence to handle them.

2、The Institute joins hands with the National School of Administration to promote the evaluation system of government affairs weibo
3、The Nature of the Mobile Internet
5、Vue custom popup box component similar to Taobao selection specification

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送