CN106156119A - A kind of distributed transaction communication means, system and device - Google Patents

A kind of distributed transaction communication means, system and device Download PDF

Info

Publication number
CN106156119A
CN106156119A CN201510161886.2A CN201510161886A CN106156119A CN 106156119 A CN106156119 A CN 106156119A CN 201510161886 A CN201510161886 A CN 201510161886A CN 106156119 A CN106156119 A CN 106156119A
Authority
CN
China
Prior art keywords
transaction
message
branch
transaction branch
rollback
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510161886.2A
Other languages
Chinese (zh)
Inventor
姜宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201510161886.2A priority Critical patent/CN106156119A/en
Publication of CN106156119A publication Critical patent/CN106156119A/en
Pending legal-status Critical Current

Links

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the present application discloses a kind of distributed transaction communication means, system and device.The method includes: client sends to task manager and opens transaction message;Client processes transaction message to first resource manager transmission;First resource manager sends registration transactions branch message to task manager;Transaction branch described in first resource manager processes, and return transaction branch state according to result;First resource manager reports described transaction branch status message to task manager;Client sends to task manager and submits distributed transaction or the message of rollback distributed transaction to;Task manager sends the message submitting transaction branch or rollback transaction branch to receiving successful submission transaction branch or the message of success rollback transaction branch that first resource manager sends to first resource manager.

Description

A kind of distributed transaction communication means, system and device
Technical field
The application relates to Internet communication technology field, particularly to a kind of distributed transaction communication means, system and device.
Background technology
Along with making rapid progress of Internet communication technology, some large-scale internet systems, due to reasons such as business are complicated, can go out Now a large amount of distributed transaction scenes.Distributed transaction includes being positioned at the affairs participant on the different nodes of distributed system, money Source server, task manager etc. can interact to realize a common target.
In prior art, the different nodes of distributed system interact to realize the communication means bag that distributed transaction mainly uses Include: XA two-phase commitment protocol.Use in the distributed system of XA two-phase commitment protocol, there is a node as coordination Person, other nodes are as participant.The first stage of XA two-phase commitment protocol is the voting stage: coordinator's node is to all Participant's node asks whether with the submission operation of successful execution Current transaction branch, and to start waiting for the sound of each participant's node Should;The inquiry that each participant's node response coordinator's node is initiated, the information whether can successfully submitted to by this transaction branch is fed back Issue coordinator, but the most really perform affairs.Second stage is carried out the stage: coordinator's node returns according to all participant's nodes The response message returned, notifies all participant's nodes, submits to or rollback affairs with acting in agreement in all branches.Participant Node sends, to coordinator's node, the message that affairs are submitted to or rollback completes;Coordinator's node receives all participant's node feeding back After completion message, end transaction.Concrete, when coordinator's node is all successfully from the response message that all participant's nodes obtain Time, coordinator's node sends the request of " being submitted to " to all participant's nodes;If arbitrary participant's node is in the first stage The response message returned is unsuccessful, or coordinator's node cannot obtain all participants before the inquiry time-out of first stage During the response message of node, coordinator's node sends the request of " rolling back action " to all participant's nodes.
During realizing the application, inventor finds that in prior art, at least there are the following problems:
When utilizing XA two-phase commitment protocol to realize distributed transaction in prior art, real execution affairs are second stage. And must etc. all of participant's node all whether this transaction branch can successfully be submitted to information feedback issue coordinator after, Second stage could be entered, namely real execution submits operation to.Therefore, once have arbitrary transaction branch not have in the first stage and Time whether this transaction branch can successfully be submitted to information feedback issue coordinator, all of participant's node be required for wait, And enter blocked state.Therefore, the communication means of XA two benches agreement cannot realize high performance distributed transaction communication.
Summary of the invention
The purpose of the embodiment of the present application is to provide a kind of distributed transaction communication means, system and device, with realize simple, efficiently, The distributed transaction communication of non-obstruction.
For solving above-mentioned technical problem, the embodiment of the present application provides a kind of distributed transaction communication means, system and device to be so Realize:
A kind of distributed transaction communication means, including:
Client sends to task manager and opens transaction message;
Client processes transaction message to first resource manager transmission;
First resource manager sends registration transactions branch message to task manager;
Transaction branch described in first resource manager processes, and return transaction branch state according to result;
First resource manager reports described transaction branch status message to task manager;
Client sends to task manager and submits distributed transaction or the message of rollback distributed transaction to;
Task manager sends to first resource manager submits to the message of transaction branch or rollback transaction branch to receiving the first money The successful submission transaction branch of source manager feedback or the message of success rollback transaction branch.
A kind of distributed transaction communication means, including:
Receive the process transaction message that client sends;
Registration transactions branch message is sent to task manager;
Process described transaction branch, and return transaction branch state according to result;
Described transaction branch status message is reported to task manager;
Receive submission transaction branch or the message of rollback transaction branch that task manager sends, and send successfully to task manager Submit transaction branch or the message of success rollback transaction branch to.
A kind of distributed transaction communication means, including:
Send to task manager and open transaction message;
Transaction message is processed to first resource manager transmission;
Obtain transaction branch state;
Submission distributed transaction or rollback distributed transaction is determined according to described transaction branch state;
Send to task manager and submit distributed transaction or the message of rollback distributed transaction to.
A kind of distributed transaction communication means, including:
Receive the unlatching transaction message that client sends;
Receive the registration transactions branch message that first resource manager sends;
Receive the described transaction branch status message that first resource manager sends;
Receive submission distributed transaction or the message of rollback distributed transaction that client sends;
The message sending submission transaction branch or rollback transaction branch to first resource manager is anti-to receiving first resource manager The successful submission transaction branch of feedback or the message of success rollback transaction branch.
A kind of distributed transaction communication system, including:
Client, opens transaction message for sending to task manager;Send to first resource manager and perform transaction message; Send to task manager and submit distributed transaction or the message of rollback distributed transaction to;
First resource manager, for sending registration transactions branch message to task manager;Process described transaction branch, and root Transaction branch state is returned according to result;Described transaction branch state is reported to task manager.
Task manager, for sending the message submitting transaction branch or rollback transaction branch to receiving the to first resource manager The successful submission transaction branch of one explorer feedback or the message of success rollback transaction branch.
A kind of distributed transaction communicator, including:
Process transaction message and receive unit, for receiving the process transaction message that client sends;
Registration transactions branch message sending unit, for sending registration transactions branch message to task manager;
Transaction branch state returns unit, is used for processing described transaction branch, and returns transaction branch state according to result;
Transaction branch status message transmitting element, for sending described transaction branch status message to task manager;
First issued transaction unit, for receiving submission transaction branch or the message of rollback transaction branch that task manager sends, And send successfully submission transaction branch or the message of success rollback transaction branch to task manager.
A kind of distributed transaction communicator, including:
Open transaction message transmitting element, open transaction message for sending to task manager;
Process transaction message transmitting element, for processing transaction message to first resource manager transmission;
Transaction branch state acquiring unit, is used for obtaining transaction branch state;
First determines unit, for determining submission distributed transaction or rollback distributed transaction according to described transaction branch state;
Second issued transaction unit, submits distributed transaction or the message of rollback distributed transaction to for sending to task manager.
A kind of distributed transaction communicator, including:
Open transaction message and receive unit, for receiving the unlatching transaction message that client sends;
Receive registration transactions branch units, for receiving the registration transactions branch message that first resource manager sends;
Receive transaction branch state cell, for receiving the described transaction branch status message that first resource manager sends;
3rd issued transaction unit, for receiving submission distributed transaction or the message of rollback distributed transaction that client sends;
4th issued transaction unit, submits the message of transaction branch or rollback transaction branch to extremely for sending to first resource manager Receive successful submission transaction branch or the message of success rollback transaction branch of first resource manager feedback.
The technical scheme provided from above the embodiment of the present application, a kind of distributed transaction communication party that the embodiment of the present application provides Method, system and device are after a phase transactions is opened, and explorer is to task manager registration transactions branch, and divides affairs The Zhi Jinhang process of local matter, it can be ensured that the state of affairs.When there being multiple transaction branch, between each transaction branch Need not mutually etc..Namely explorer without etc. after all of transaction branch is ready to, the carrying out acted in agreement reports thing Business bifurcation state.The complete transaction branch of resource manager processes can report the state of this transaction branch, and reports the business that finishes After state, it is possible to release resource, efficiently solve the obstructing problem of existing communication method.Compared with prior art, make to lead to Letter process obstruction simple, efficient, non-, and various complex distributions formula transactional applications business scenario can be met.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present application or technical scheme of the prior art, below will be to embodiment or prior art In description, the required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is only to remember in the application Some embodiments carried, for those of ordinary skill in the art, on the premise of not paying creative work, it is also possible to Other accompanying drawing is obtained according to these accompanying drawings.
Fig. 1 is the flow chart of an embodiment of the application a kind of distributed transaction communication means;
Fig. 2 is the flow chart of a kind of transaction process of the application a kind of distributed transaction communication means;
Fig. 3 is the flow chart of a kind of transaction process of the application a kind of distributed transaction communication means;
Fig. 4 is the flow chart of a kind of rollback transaction branch of the application a kind of distributed transaction communication means;
Fig. 5 is a kind of flow chart submitting transaction branch to of the application a kind of distributed transaction communication means;
Fig. 6 is the flow chart of a kind of rollback transaction branch of the application a kind of distributed transaction communication means;
Fig. 7 is the flow chart of an embodiment of the application a kind of distributed transaction communication means;
Fig. 8 is the flow chart of an embodiment of the application a kind of distributed transaction communication means;
Fig. 9 is the flow chart of an embodiment of the application a kind of distributed transaction communication means;
Figure 10 is the flow chart of an embodiment of the application a kind of distributed transaction communication system;
Figure 11 is the flow chart of an embodiment of the application a kind of distributed transaction communicator;
Figure 12 is the flow chart of an embodiment of the application a kind of distributed transaction communicator;
Figure 13 is the flow chart of an embodiment of the application a kind of distributed transaction communicator.
Detailed description of the invention
The embodiment of the present application provides a kind of distributed transaction communication means, system and device.
For the technical scheme making those skilled in the art be more fully understood that in the application, below in conjunction with in the embodiment of the present application Accompanying drawing, the technical scheme in the embodiment of the present application is clearly and completely described, it is clear that described embodiment is only It is some embodiments of the present application rather than whole embodiments.Based on the embodiment in the application, ordinary skill people The every other embodiment that member is obtained under not making creative work premise, all should belong to the scope of the application protection.
Implementing of the embodiment of the present application is described in detail below with several specific examples.
In the embodiment of the present application, a distributed transaction system can include one or more task manager (Transaction Manager, TM), one or more explorer (Resource Manager, RM), the several part of client, also Other affairs participant can be included.Wherein, task manager, namely the coordinator of affairs, it is responsible for coordinating distributed transaction; Explorer is responsible for the management of resource;Resource can include data base and message-oriented middleware;Client is usually transaction initiator.
Hereinafter the embodiment of the application a kind of distributed transaction communication means is first introduced.In conjunction with accompanying drawing 1, this embodiment includes:
S100: client sends to task manager and opens transaction message.
In the embodiment of the present application, if needing to open affairs, it is possible to use client sends to task manager and opens affairs Message.Concrete, such as client performs update/insert/delete SQL statement by JDBC.Here JDBC (Java Data Base Connectivity, java data base connects) it is how Java language accesses data for specification client-side program The application programming interfaces in storehouse, it is provided that the method for data in such as inquiry and more new database.Further, SQL here (Structured Query Language) refers to SQL, is a kind of programming language, the standard in data base Data query language.
Further, task manager can open successful message to client feedback affairs, and described message can comprise the overall situation Affairs ID, described global transaction ID can be as the mark of this business communications process.
Additionally, typically before sending unlatching transaction message, the explorer of client and its correspondence can be first to affairs pipe Reason device sends registration message, carries out the registration of client and explorer.
S200: client processes transaction message to first resource manager transmission.
After client successfully starts affairs, client can carry out local matter, sends to first resource manager and performs Transaction message.
Further, first resource manager described here can refer to the explorer of client deployment.And it is distributed at one In system, a client can dispose a corresponding explorer, it is also possible to disposes multiple explorer.
Further, described first resource manager can be and client explorer in a process.
S300: first resource manager sends registration transactions branch message to task manager.
In the embodiment of the present application, the associative operation of one affairs when client executing.Client can be after local matter be opened By corresponding first resource manager to task manager registration transactions branch;Accordingly, task manager can be to the first money The message that source manager feedback transaction branch succeeds in registration, contains transaction branch ID, described transaction branch ID and makees in described message Mark for this transaction branch communication process.
In S200, client is after first resource manager transmission processes transaction message, and described first resource manager can be registered One or more transaction branch, the number of transaction branch can determine according to concrete affairs.In actual application, a general distribution Formula affairs at least two transaction branch, otherwise lose the meaning of distributed transaction.
Further, client can also be called preset service by the way of sending message call to preset service and perform thing here Business operation, described message call includes the global transaction ID currently opening affairs.Accordingly, described preset service can dispose one Individual with described preset service at the explorer of same process, it is also possible to dispose multiple with described preset service in same process Explorer.And when client needs to call preset service execution transaction operation, preset service can first call Secondary resource Manager sends registration message to task manager;Accordingly, task manager feeds back Secondary resource pipe to Secondary resource manager After the message that reason device succeeds in registration, preset service can call Secondary resource manager and divide to task manager transmission registration transactions Propping up message, this transaction branch can be as global transaction a transaction branch.
Further, preset service here can include remote procedure call protocol (Remote Procedure Call Protocol, RPC), but the embodiment of the present application is not limited thereto.
Further, Secondary resource manager here refers to and described preset service explorer in a process.
S400: transaction branch described in first resource manager processes, and return transaction branch state according to result.
In the embodiment of the present application, after step S300, after first resource manager successful registration transaction branch, in the first thing Under business pattern, in conjunction with accompanying drawing 2, transaction branch described in first resource manager processes, and return transaction branch according to result State specifically includes:
S411: first resource manager judges whether described transaction branch can perform.
S412: when described being judged as YES, performs described transaction branch, and records the state before described transaction branch performs and institute State the state after transaction branch performs, return successful transaction bifurcation state.
S413: when described being judged as NO, return unsuccessfully transaction branch state.
Further, when described being judged as YES, first resource manager performs current local matter.Specifically include:
1, Save Undo refers to preserve front mirror image, i.e. preserves the state before affairs perform.
2, Exec SQL refers to really perform affairs.
3, mirror image after Save Redo refers to preserve, i.e. preserves the state after affairs perform.
4, Local Commit refers to submit affairs to.
Return successful transaction bifurcation state.
When described being judged as NO, return unsuccessfully transaction branch state.
As a example by " A account number is to B account number remittance money " these affairs, in step S300, first resource manager needs to affairs pipe Reason device two transaction branch of registration.The execution process of the most above-mentioned local matter, may include that
Article 1, the execution process of the local matter of transaction branch includes:
Will the remit money remaining sum of front A account of Save Undo is saved in daily record, can be figuratively to preserve the remaining sum in A account number.
A account number is i.e. done subtraction by Exec SQL.
Save Redo is i.e. saved in the result of subtraction in daily record, can be figuratively that the result of subtraction is preserved A In account number.
Local Commit i.e. this locality completes A account number to B account number remittance money.
The execution process of the local matter of Article 2 transaction branch includes:
Will the remit money remaining sum of front B account of Save Undo is saved in daily record, can be figuratively to read the remaining sum in B account number.
B account number is i.e. done add operation by Exec SQL.
Save Redo is i.e. saved in the result of add operation in daily record, can be figuratively that the result of add operation is saved in In B account number.
Local Commit i.e. this locality completes A account number to B account number remittance money.
Further, if client call preset service, Secondary resource manager is receiving the thing of task manager feedback After the message that business branch succeeds in registration, local matter can be performed.
Under the second transaction mode, in conjunction with accompanying drawing 3, transaction branch described in first resource manager processes, and according to processing knot Fruit returns transaction branch state and specifically includes:
S421: first resource manager judges whether described transaction branch can perform.
S422: when described being judged as YES, the default resource of reserved described transaction branch, and arrange default to described transaction branch Mark, returns successful transaction bifurcation state.
S423: when described being judged as NO, return unsuccessfully transaction branch state.
When described default mark can ensure that if other apply Current transaction to be operated, find that this default mark then returns mistake Lose.Therefore, even if when processing local matter, really perform Current transaction, when also can guarantee that follow-up real execution, Affairs can be completed.
As a example by " buying the lottery ticket of 10 yuan by C account, this lottery ticket includes 2 numerals, and each numeral is 5 yuan ", this transaction packet Include two transaction branch.First transaction branch is: buy 5 yuan of first digit button;Second transaction branch is: buy the 5 yuan of two-digit button,
The processing procedure of first transaction branch specifically includes:
Whether the first task manager needs the remaining sum judging in C account more than or equal to 5 yuan.When described being judged as YES, resource pipe Reason device only need to first carry out the operation of resource reservation, namely reserved currently 5 yuan in C account, and these 5 yuan can be as reserved resource. And default mark is set to this Current transaction, described default mark can ensure that if other application to operate this 5 yuan of reserved resources Time, find that this default mark then returns failure.Therefore, even if when processing local matter, really do not perform to C account Number 5 yuan of button, also can guarantee that follow-up the most enough when really withholing.
Additionally, process described transaction branch described in the embodiment of the present application, and return transaction branch state not according to described result Being only limitted to the processing mode of above two transaction mode, can also is that other forms in practice, the embodiment of the present application is not with this It is limited.
S500: first resource manager reports described transaction branch status message to task manager.
In the embodiment of the present application, after first resource manager has performed local matter, first resource manager can be to affairs pipe Reason device reports the state of Current transaction branch.When there being multiple transaction branch, first resource manager can be on task manager Report the state of each transaction branch.So task manager can get a distributed transaction several branch, and each point Prop up and whether run succeeded.Accordingly, task manager needs to first resource manager feedback transaction branch state reporting successful Message.
Further, the Global ID comprising affairs in transaction branch status message and transaction branch ID, described Global ID are reported described in With described transaction branch ID as the mark of transaction branch communication process.
Further, if client call preset service, after Secondary resource manager has performed local matter, clothes are preset Business can be called Secondary resource manager and be reported transaction branch status message to task manager.Accordingly, task manager is permissible The successful message of transaction branch state reporting is fed back to Secondary resource manager.
S600: client sends to task manager and submits distributed transaction or the message of rollback distributed transaction to.
In the embodiment of the present application, after step S500, client can to task manager send submit to distributed transaction or The message of rollback distributed transaction.Concrete, client can send the message submitting distributed transaction to task manager;Visitor Family end can send the message of rollback distributed transaction to task manager.
Further, a distributed transaction can only be finally to submit to or rollback, has the situation of multiple transaction branch affairs Under, either to submit to or rollback, each branch must be consistent, and all branches can all submit to or all rollbacks.Concrete, When all transaction branch states be all successfully time, client can to task manager send submit to distributed transaction message;Phase Answering, task manager can receive the message submitting distributed transaction to client feedback.When any one transaction branch shape State be unsuccessfully time, client can to task manager send rollback distributed transaction message, task manager can be to client End feedback receives the message of rollback distributed transaction.
Further, if client sends the message submitting distributed transaction to task manager, and at least affairs are divided State be unsuccessfully time, task manager can be to the failure of client feedback transaction branch, please the message extremely receipts of rollback transaction branch Message to the rollback distributed transaction that client sends.
In a preferred embodiment, client can send the distributed thing of submission according to transaction branch state to task manager Business or the message of rollback distributed transaction.Concrete, submit to distributed transaction or rollback to divide in client to task manager transmission Can also include before the message of cloth affairs: client can obtain the shape of current all transaction branch from first resource manager State, client determines submission distributed transaction or rollback distributed transaction according to the state of described transaction branch.Such as, when all Transaction branch state be all successfully time, client may determine that submit to distributed transaction message;As long as there being any one affairs to divide State be unsuccessfully time, client may determine that the message of rollback distributed transaction.So determine submission distribution according to transaction status Formula affairs or rollback distributed transaction can effectively prevent have transaction branch state be unsuccessfully time, have sent of user error Submit the message of distributed transaction to.
As a example by above-mentioned " A account number is to B account number remittance money " these affairs, if first transaction branch completes local matter, and Second transaction branch does not complete local matter, then arises that and has detained money in A account, but B account does not import money Mistake, as long as all, to have any one transaction branch state be unsuccessfully, and client just can send rollback distribution to task manager The message of formula affairs.
Further, task manager needs to receive submission or the message of rollback distributed transaction to client feedback.
Above-mentioned steps S100 to S600 can be as a stage, and a stage achieves the process of local matter.The application introduced below The two-stage of the communication means that embodiment provides.
S700: task manager sends the message submitting transaction branch or rollback transaction branch to receiving the to first resource manager The successful submission transaction branch of one explorer feedback or the message of success rollback transaction branch.
In the embodiment of the present application, the submission of the distributed transaction that task manager sends according to client or rollback message, to accordingly First resource manager send the submission of transaction branch or rollback message.Namely when client sends submission point to task manager During the message of cloth affairs, task manager sends the submission message of transaction branch to receiving the to corresponding first resource manager The message of the successful submission transaction branch of one explorer feedback;When client sends rollback distributed transaction to task manager Message time, task manager to corresponding first resource manager send transaction branch rollback message to receiving first resource pipe The message of the successful rollback transaction branch of reason device feedback.
Further, if client call preset service, task manager needs to send affairs to Secondary resource manager and divides Submission or rollback message to receive first resource manager feedback to receive first resource manager feedback successful submission Transaction branch or the message of success rollback transaction branch.
Further, in the case of distributed transaction is finally rollback, if in the case of multiple transaction branch, it is not necessary to return Rolling transaction branch state is failed transaction branch, as long as rollback transaction branch state is successful transaction branch.
As a example by the first transaction mode described in step S400, transaction branch is submitted to specifically include:
Owing to, under transaction mode in first, first resource manager has been carried out Current transaction, when task manager is to the first money After source manager sends the message submitting transaction branch to, first resource manager sends to task manager successfully submits to affairs to divide The message propped up, end transaction.
As a example by the first transaction mode described in step S400, in conjunction with accompanying drawing 4, rollback transaction branch specifically includes:
S711: task manager sends the message of rollback transaction branch to first resource manager.
State after S712: first resource manager performs according to the state before the execution of described transaction branch and described transaction branch is returned Rolling transaction branch state is successful transaction branch.
S713: first resource manager sends the message of successfully rollback transaction branch to task manager.
As a example by " A account number is to B account number remittance money ": assume that the state after the process of Article 1 transaction branch is successfully namely local It is successfully completed A account number to B account number remittance money;And the state after Article 2 transaction branch processes is unsuccessfully, namely this locality does not complete A account number is to B account number remittance money.Rollback transaction branch specifically includes:
Rollback Article 1 transaction branch: log-on message and corresponding branch ID according to transaction branch find corresponding daily record, root According to log recording, it is thus achieved that the remaining sum in A account after the remit money remaining sum in front A account and remittance.More than in A account before remittance After volume and remittance, the remaining sum in A account carries out respective handling to the A account balance after remittance, makes the remaining sum in A account revert to converge Remaining sum before money, i.e. completes rollback.
Do not become owing to Article 2 transaction branch does not complete A account number remaining sum in B account number remittance money, namely B account, That does not just have the needs of rollback.
Further, in step S100, to the unlatching transaction message that task manager sends, client can include that is preset a time-out Time message.Arrange described default time-out time be because when client delay machine etc. abnormal time, if having the completeest in client The affairs become, then these affairs are bound to eventually time-out, namely Current transaction bifurcation state is unsuccessfully.In order to avoid resource is grown Time takies, according to described default time-out time, task manager can judge that Current transaction is the most overtime.If overtime, affairs Manager can notify that first resource manager carries out the rollback of affairs.
As a example by the second transaction mode described in step S400, in conjunction with accompanying drawing 5, transaction branch is submitted to specifically include:
S721: task manager sends the message submitting transaction branch to first resource manager.
S722: first resource manager utilizes described reserved default resource to perform described transaction branch.
S723: first resource manager sends the message successfully submitting transaction branch to task manager.
As a example by " buying the lottery ticket of 10 yuan by C account, this lottery ticket includes 2 numerals, and each numeral is 5 yuan ", work as thing After business manager sends the message submitting transaction branch to first resource manager, first resource manager: according to transaction branch ID find corresponding daily record, according to log recording, it is thus achieved that reserved default resource.Then described reserved default money is utilized Source " 5 yuan " performs described transaction branch, namely gives 5 yuan of C account button;Then, first resource manager is to task manager Send the message successfully submitting transaction branch to.
As a example by the second transaction mode described in step S400, in conjunction with accompanying drawing 6, rollback transaction branch specifically includes:
S731: task manager sends the message of rollback transaction branch to first resource manager.
The default mark that described transaction branch state is successful transaction branch cancelled by S732: first resource manager.
S733: first resource manager sends the message of successfully rollback transaction branch to task manager.
As a example by " buying the lottery ticket of 10 yuan by C account, this lottery ticket includes 2 numerals, and each numeral is 5 yuan ", it is assumed that The state of the first transaction branch is successfully, and the state of the first transaction branch is unsuccessfully.When task manager is to first resource manager After sending the message of rollback transaction branch, namely without again C account being withholdd, then can discharge reserved resource Locking, first resource manager can cancel the default mark of the first transaction branch according to log-on message and corresponding ID so that it is Reserved resource can be operated by he in application.Owing to the state of the first transaction branch is unsuccessfully, namely first resource manager is also Do not process the first transaction branch, therefore without carrying out rollback process.Then, first resource manager sends into task manager The message of merit rollback transaction branch, end transaction.
Further, submitting distributed transaction to can only be that client is initiated, because only that client just can decide whether all branches Perform.Rollback distributed transaction can be that client is initiated, it is also possible to is that task manager is initiated, because as visitor Family end is delayed machine or do not complete for a long time affairs and submit to, and transaction time exceedes default time-out time, and task manager is permissible The corresponding explorer of proactive notification carries out rollback to branch, to avoid resource to be taken for a long time.
Further, multiple explorer can be disposed due to client, it is assumed that explorer place machine is delayed machine, affairs Manager can find its another explorer alternative to complete transaction branch submit to according to the log-on message of explorer Or rollback, do not interfere with global transaction.
Further, multiple task manager can be included due to a distributed transaction system, it is assumed that task manager is delayed machine, Can substitute for it with other task managers of group and complete new affairs.
Further, after first resource manager completes to submit transaction branch or rollback transaction branch to, first resource manager needs To report to task manager and successfully to submit transaction branch or the message of success rollback transaction branch, end transaction to.
Further, if task manager is sending submission transaction branch or rollback transaction branch to first resource manager After message, in Preset Time, do not receive successful submission transaction branch or the success rollback affairs of first resource manager feedback The message of branch, task manager may proceed to send disappearing of submission transaction branch or rollback transaction branch to first resource manager Cease to successful submission transaction branch or the message of success rollback transaction branch receiving first resource manager feedback.
As can be seen here, the technical scheme of the embodiment of the present application is after a phase transactions is opened, and explorer is noted to task manager Volume transaction branch, and transaction branch has been carried out the process of local matter, it can be ensured that the state of affairs.Divide when there being multiple affairs Zhi Shi, need not mutually etc. between each transaction branch.Namely explorer without etc. after all of transaction branch is ready to, The carrying out acted in agreement reports transaction branch state.The complete transaction branch of resource manager processes can report this transaction branch State, and after having reported transaction status, it is possible to release resource, efficiently solve the obstructing problem of existing communication method. And by calling preset service, the explorer making preset service dispose can participate in distributed transaction, and application scenarios is wider General.Compared with prior art, make communication process obstruction simple, efficient, non-, and various complex distributions formula transactional applications can be met Business scenario.
Consider that first resource manager is main step, in conjunction with accompanying drawing 7, the enforcement of the application a kind of distributed transaction communication means Example, specifically includes:
S810: receive the process transaction message that client sends.
S820: send registration transactions branch message to task manager.
S830: process described transaction branch, and return transaction branch state according to result.
S840: report described transaction branch status message to task manager.
S850: receive submission transaction branch or the message of rollback transaction branch that task manager sends, and send out to task manager Send and successfully submit transaction branch or the message of success rollback transaction branch to.
As can be seen here, in the technical scheme of the embodiment of the present application, explorer is to task manager registration transactions branch, and to thing Business branch has carried out the process of local matter, it can be ensured that the state of affairs.When there being multiple transaction branch, each transaction branch Between need not mutually etc..Namely explorer without etc. after all of transaction branch is ready to, on the carrying out acted in agreement Report transaction branch state.The complete transaction branch of resource manager processes can report the state of this transaction branch, and reports After transaction status, it is possible to release resource, efficiently solve the obstructing problem of existing communication method.Compared with prior art, Make communication process obstruction simple, efficient, non-, and various complex distributions formula transactional applications business scenario can be met.
Consider that client is main step, in conjunction with accompanying drawing 8, the embodiment of the application a kind of distributed transaction communication means, specifically Including:
S910: send to task manager and open transaction message.
S920: process transaction message to first resource manager transmission.
S930: obtain transaction branch state.
Here transaction branch state includes the result whether transaction branch is successfully processed.
S940: determine submission distributed transaction or rollback distributed transaction according to described transaction branch state.
S950: send to task manager and submit distributed transaction or the message of rollback distributed transaction to.
As can be seen here, the technical scheme of the embodiment of the present application is processing after transaction message to first resource manager transmission, resource Manager is to task manager registration transactions branch, and transaction branch has carried out the process of local matter, and such client is permissible Obtain transaction branch state accurately.And can effectively determine submission distributed transaction or rollback divides according to transaction branch state Cloth affairs.Compared with prior art, make communication process simple, efficient, and various complex distributions formula transactional applications industry can be met Business scene.
Consider that task manager is main step, in conjunction with accompanying drawing 9, the embodiment of the application a kind of distributed transaction communication means, Specifically include:
S1100: receive the unlatching transaction message that client sends.
S1200: receive the registration transactions branch message that first resource manager sends.
S1300: receive the described transaction branch status message that first resource manager sends.
S1400: receive submission distributed transaction or the message of rollback distributed transaction that client sends.
S1500: send to first resource manager and submit to the message of transaction branch or rollback transaction branch to receiving first resource pipe The successful submission transaction branch of reason device feedback or the message of success rollback transaction branch.
As can be seen here, in the technical scheme of the embodiment of the present application, task manager is receiving the distributed thing of submission that client sends After the message of business or rollback distributed transaction, can send to first resource manager and submit transaction branch or rollback transaction branch to Message to successful submissions transaction branch or the message of successful rollback transaction branch receiving first resource manager feedback.As long as the Successful submission transaction branch that one explorer does not feed back or the message of success rollback transaction branch, task manager can be always Think that first resource manager sends and submit transaction branch or the message of success rollback transaction branch to, final thing has thus been effectively ensured Business is bound to submit to or rollback.Compared with prior art, make communication process simple, efficient, and various complex distributions formula can be met Transactional applications business scenario.
The embodiment of the application a kind of distributed transaction communication system.In conjunction with accompanying drawing 10, this system 1000 includes:
Client 1001 opens transaction message for sending to task manager;Send execution affairs to first resource manager to disappear Breath;Send to task manager and submit distributed transaction or the message of rollback distributed transaction to.
First resource manager 1002 is for sending registration transactions branch message to task manager;Process described transaction branch, And return transaction branch state according to result;Described transaction branch state is reported to task manager.
Task manager 1003 for sending the message submitting transaction branch or rollback transaction branch to receiving to first resource manager Successful submission transaction branch or the message of success rollback transaction branch to first resource manager feedback.
In a preferred embodiment, described client 1001 is additionally operable to:
Obtain transaction branch state;
Submission distributed transaction or rollback distributed transaction is determined according to described transaction branch state.
In a preferred embodiment, when client sends message call to preset service, this system 1000 also includes:
Secondary resource manager, for sending registration message to task manager;Registration transactions branch is sent to task manager Message;Process described transaction branch, and return transaction branch state;Described transaction branch status message is reported to task manager.
The embodiment of the application a kind of distributed transaction communicator.In conjunction with accompanying drawing 11, this device includes:
Process transaction message and receive unit 1110, for receiving the process transaction message that client sends.
Registration transactions branch message sending unit 1120, for sending registration transactions branch message to task manager.
Transaction branch state returns unit 1130, is used for processing described transaction branch, and returns transaction branch shape according to result State.
Transaction branch status message transmitting element 1140, for sending described transaction branch status message to task manager.
First issued transaction unit 1150, for receiving the submission transaction branch of task manager transmission or disappearing of rollback transaction branch Breath, and send successfully submission transaction branch or the message of success rollback transaction branch to task manager.
The embodiment of the application a kind of distributed transaction communicator.In conjunction with accompanying drawing 12, this device includes:
Open transaction message transmitting element 1210, open transaction message for sending to task manager.
Process transaction message transmitting element 1220, for processing transaction message to first resource manager transmission.
Transaction branch state acquiring unit 1230, is used for obtaining transaction branch state.
First determines unit 1240, for determining submission distributed transaction or the distributed thing of rollback according to described transaction branch state Business.
Second issued transaction unit 1250, submits disappearing of distributed transaction or rollback distributed transaction to for sending to task manager Breath.
The embodiment of the application a kind of distributed transaction communicator.In conjunction with accompanying drawing 13, this device includes:
Open transaction message and receive unit 1310, for receiving the unlatching transaction message that client sends.
Receive registration transactions branch units 1320, for receiving the registration transactions branch message that first resource manager sends.
Receive transaction branch state cell 1330, for receiving the described transaction branch status message that first resource manager sends.
3rd issued transaction unit 1340, for receiving the submission distributed transaction of client transmission or disappearing of rollback distributed transaction Breath.
4th issued transaction unit 1350, submits disappearing of transaction branch or rollback transaction branch to for sending to first resource manager Cease to successful submission transaction branch or the message of success rollback transaction branch receiving first resource manager feedback.
As can be seen here, the technical scheme of the embodiment of the present application provides a kind of distributed transaction communication means, system and device are one After phase transactions is opened, explorer is to task manager registration transactions branch, and transaction branch has been carried out local matter Process, it can be ensured that the state of affairs.When there being multiple transaction branch, need not mutually etc. between each transaction branch.Namely money Source manager without etc. after all of transaction branch is ready to, the carrying out acted in agreement reports transaction branch state.Resource pipe Reason device has processed a transaction branch and can report the state of this transaction branch, and after having reported transaction status, it is possible to release Put resource, efficiently solve the obstructing problem of existing communication method.And by calling preset service, make the money that preset service is disposed Source manager can participate in distributed transaction, and application scenarios is more extensive.Compared with prior art, make communication process simple, high Effect, non-obstruction, and various complex distributions formula transactional applications business scenario can be met.
In the nineties in 20th century, can clearly distinguish for the improvement of a technology is that the improvement on hardware is (such as, to two The improvement of the circuit structures such as pole pipe, transistor, switch) or software on improvement (for the improvement of method flow).But, Along with the development of technology, the improvement of current a lot of method flows can be considered as directly improving of hardware circuit.Design Personnel nearly all obtain corresponding hardware circuit by being programmed in hardware circuit by the method flow of improvement.Therefore, no Can say that the improvement of a method flow cannot realize by hardware entities module.Such as, PLD (Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate Array, FPGA)) it is exactly such a integrated circuit, device programming is determined by its logic function by user.By designer Member's programming voluntarily comes a digital display circuit " integrated " on a piece of PLD, without chip maker please designing and make Make special IC chip 2.And, nowadays, replacing and manually make IC chip, this programming changes the most mostly Realize with " logic compiler (logic compiler) " software, software compiler phase used when it is write with program development Similar, and the most handy specific programming language of source code before compiling is write, this is referred to as hardware description language (Hardware Description Language, HDL), and HDL the most not only has one, but have many kinds, such as ABEL (Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、 Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language) etc., that commonly use most is VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog2.Those skilled in the art also it should also be apparent that, it is only necessary to by method flow with above-mentioned Several hardware description languages are slightly made programming in logic and are programmed in integrated circuit, it is possible to be readily available and realize this logical method stream The hardware circuit of journey.
Controller can be implemented in any suitable manner, such as, controller can take such as microprocessor or processor and Storage can by this (micro-) processor perform computer readable program code (such as software or firmware) computer-readable medium, Gate, switch, special IC (Application Specific Integrated Circuit, ASIC), FPGA Controller and the form of embedding microcontroller, the example of controller includes but not limited to following microcontroller: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, Memory Controller can also quilt It is embodied as a part for the control logic of memorizer.
It is also known in the art that in addition to realizing controller in pure computer readable program code mode, the most permissible Make controller with gate, switch, special IC, FPGA control by method step carries out programming in logic The form of device processed and embedding microcontroller etc. realizes identical function.The most this controller is considered a kind of Hardware Subdivision Part, and the structure in hardware component can also be considered as to include in it for the device realizing various function.Or even, may be used To be considered as the device being used for realizing various function being not only the software module of implementation method but also can be the knot in hardware component Structure.
System, device, module or the unit that above-described embodiment illustrates, specifically can be realized by computer chip or entity, or Realized by the product with certain function.
For convenience of description, it is divided into various unit to be respectively described with function when describing apparatus above.Certainly, the application is being implemented Time the function of each unit can be realized in same or multiple softwares and/or hardware.
As seen through the above description of the embodiments, those skilled in the art it can be understood that to the application can be by soft Part adds the mode of required general hardware platform and realizes.Based on such understanding, the technical scheme of the application is the most in other words The part contributing prior art can embody with the form of software product, and in a typical configuration, calculating sets For including one or more processor (CPU), input/output interface, network interface and internal memory.This computer software product is permissible Including some instructions with so that a computer equipment (can be personal computer, server, or the network equipment etc.) is held Each embodiment of row the application or the method described in some part of embodiment.This computer software product can be stored in internal memory In, internal memory potentially includes the volatile memory in computer-readable medium, random access memory (RAM) and/or non-volatile The forms such as property internal memory, such as read only memory (ROM) or flash memory (flash RAM).Internal memory is the example of computer-readable medium.Meter Calculation machine computer-readable recording medium includes that removable media permanent and non-permanent, removable and non-can be realized by any method or technology Information stores.Information can be computer-readable instruction, data structure, the module of program or other data.The storage of computer The example of medium includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), dynamic randon access Memorizer (DRAM), other kinds of random access memory (RAM), read only memory (ROM), electrically erasable Read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read only memory (CD-ROM), numeral Multifunctional optical disk (DVD) or other optical storage, magnetic cassette tape, tape magnetic rigid disk storage other magnetic storage apparatus or appoint What his non-transmission medium, can be used for the information that storage can be accessed by a computing device.According to defining herein, computer can Read medium and do not include of short duration computer readable media (transitory media), such as data signal and the carrier wave of modulation.
Each embodiment in this specification all uses the mode gone forward one by one to describe, and between each embodiment, identical similar part is mutual Seeing, what each embodiment stressed is the difference with other embodiments.Especially for system embodiment Speech, owing to it is substantially similar to embodiment of the method, so describe is fairly simple, relevant part sees the part of embodiment of the method Illustrate.
The application can be used in numerous general or special purpose computing system environments or configuration.Such as: personal computer, server Computer, handheld device or portable set, laptop device, multicomputer system, system based on microprocessor, top set Box, programmable consumer-elcetronics devices, network PC, minicomputer, mainframe computer, include any of the above system or equipment Distributed computing environment etc..
The application can be described in the general context of computer executable instructions, such as program module. Usually, program module include perform particular task or realize the routine of particular abstract data type, program, object, assembly, Data structure etc..The application can also be put into practice in a distributed computing environment, in these distributed computing environment, by passing through Communication network and connected remote processing devices performs task.In a distributed computing environment, program module may be located at bag Include storage device in interior local and remote computer-readable storage medium.
Although depicting the application by embodiment, it will be appreciated by the skilled addressee that the application have many deformation and a change and Without departing from spirit herein, it is desirable to appended claim includes that these deformation and change are without deviating from spirit herein.

Claims (32)

1. a distributed transaction communication means, it is characterised in that including:
Client sends to task manager and opens transaction message;
Client processes transaction message to first resource manager transmission;
First resource manager sends registration transactions branch message to task manager;
Transaction branch described in first resource manager processes, and return transaction branch state according to result;
First resource manager reports described transaction branch status message to task manager;
Client sends to task manager and submits distributed transaction or the message of rollback distributed transaction to;
Task manager sends the message submitting transaction branch or rollback transaction branch to successful submission transaction branch or the message of success rollback transaction branch receiving first resource manager feedback to first resource manager.
Method the most according to claim 1, it is characterised in that in client before task manager sends the message of submission distributed transaction or rollback distributed transaction, the method also includes:
Client obtains transaction branch state;
Client determines submission distributed transaction or rollback distributed transaction according to described transaction branch state.
Method the most according to claim 2, it is characterised in that according to described transaction branch state, described client determines that submission distributed transaction or rollback distributed transaction include:
When described transaction branch state be successfully time, client determine submit to distributed transaction message;
When described transaction branch state be unsuccessfully time, client determines the message of rollback distributed transaction.
Method the most according to claim 1, it is characterised in that in client before task manager sends the message of submission distributed transaction or rollback distributed transaction, the method also includes:
Client sends message call to preset service;
Secondary resource manager sends the message of registration transactions branch to task manager;
Transaction branch described in Secondary resource manager processes, and return transaction branch state;
Secondary resource manager reports described transaction branch status message to task manager.
5. according to the arbitrary described method of Claims 1-4, it is characterised in that transaction branch described in described first resource manager processes, and include according to result return transaction branch state:
Judge whether described transaction branch can perform;
When described being judged as YES, perform described transaction branch, and record the state before described transaction branch performs and the state after the execution of described transaction branch, return successful transaction bifurcation state.
Method the most according to claim 5, it is characterised in that transaction branch described in described first resource manager processes, and also include according to result return transaction branch state: when described being judged as NO, return unsuccessfully transaction branch state.
Method the most according to claim 6, it is characterized in that, described task manager includes to the message of the successful submission transaction branch or success rollback transaction branch receiving first resource manager feedback to the message of first resource manager transmission submission transaction branch or rollback transaction branch:
Described task manager sends the message submitting transaction branch to the message receiving the successful submission transaction branch that first resource manager feeds back to first resource manager;
Described task manager sends the message message to the successful rollback transaction branch receiving first resource manager feedback of rollback transaction branch to first resource manager.
Method the most according to claim 7, it is characterised in that described task manager sends the message submitting transaction branch to the message receiving the successful submission transaction branch that first resource manager feeds back and includes to first resource manager:
Task manager sends the message submitting transaction branch to first resource manager;
First resource manager sends the message successfully submitting transaction branch to task manager.
Method the most according to claim 7, it is characterised in that message to the message receiving the successful rollback transaction branch that first resource manager feeds back that described task manager sends rollback transaction branch to first resource manager includes:
Task manager sends the message of rollback transaction branch to first resource manager;
State rollback transaction branch state after first resource manager performs according to the state before the execution of described transaction branch and described transaction branch is successful transaction branch;
First resource manager sends the message of successfully rollback transaction branch to task manager.
10. according to the arbitrary described method of Claims 1-4, it is characterised in that transaction branch described in described first resource manager processes, and include according to result return transaction branch state:
Judge whether described transaction branch can perform;
When described being judged as YES, the default resource of reserved described transaction branch, and default mark is set to described transaction branch, return successful transaction bifurcation state.
11. methods according to claim 10, it is characterised in that transaction branch described in described first resource manager processes, and also include according to result return transaction branch state: when described being judged as NO, return unsuccessfully transaction branch state.
12. methods according to claim 11, it is characterized in that, described task manager includes to the message of the successful submission transaction branch or success rollback transaction branch receiving first resource manager feedback to the message of first resource manager transmission submission transaction branch or rollback transaction branch:
Described task manager sends the message submitting transaction branch to the message receiving the successful submission transaction branch that first resource manager feeds back to first resource manager;
Described task manager sends the message message to the successful rollback transaction branch receiving first resource manager feedback of rollback transaction branch to first resource manager.
13. methods according to claim 12, it is characterised in that described task manager sends the message submitting transaction branch to the message receiving the successful submission transaction branch that first resource manager feeds back and includes to first resource manager:
Task manager sends the message submitting transaction branch to first resource manager;
First resource manager utilizes described reserved default resource to perform described transaction branch;
First resource manager sends the message successfully submitting transaction branch to task manager.
14. methods according to claim 12, it is characterised in that message to the message receiving the successful rollback transaction branch that first resource manager feeds back that described task manager sends rollback transaction branch to first resource manager includes:
Task manager sends the message of rollback transaction branch to first resource manager;
The default mark that described transaction branch state is successful transaction branch cancelled by first resource manager;
First resource manager sends the message of successfully rollback transaction branch to task manager.
15. 1 kinds of distributed transaction communication means, it is characterised in that including:
Receive the process transaction message that client sends;
Registration transactions branch message is sent to task manager;
Process described transaction branch, and return transaction branch state according to result;
Described transaction branch status message is reported to task manager;
Receive submission transaction branch or the message of rollback transaction branch that task manager sends, and send successfully submission transaction branch or the message of success rollback transaction branch to task manager.
16. methods according to claim 15, it is characterised in that the described transaction branch of described process, and include according to result return transaction branch state:
Judge whether described transaction branch can perform;
When described being judged as YES, perform described transaction branch, and record the state before described transaction branch performs and the state after the execution of described transaction branch, return successful transaction bifurcation state.
17. methods according to claim 16, it is characterised in that the described transaction branch of described process, and also include according to result return transaction branch state: when described being judged as NO, return unsuccessfully transaction branch state.
18. methods according to claim 17, it is characterized in that, what described reception task manager sent submit to transaction branch or the message of rollback transaction branch, and sends to task manager and successfully submit to the message of transaction branch or successful rollback transaction branch to include:
Receive the message submitting transaction branch to that task manager sends, and send the message successfully submitting transaction branch to task manager.
19. methods according to claim 18, it is characterized in that, what described reception task manager sent submit to transaction branch or the message of rollback transaction branch, and sends to task manager and successfully submit to the message of transaction branch or successful rollback transaction branch also to include:
Receive the message of the rollback transaction branch that task manager sends;
State before performing according to described transaction branch and the state rollback transaction branch state after the execution of described transaction branch are successful transaction branch;
The message of successfully rollback transaction branch is sent to task manager.
20. methods according to claim 15, it is characterised in that the described transaction branch of described process, and include according to result return transaction branch state:
Judge whether described transaction branch can perform;
When described being judged as YES, the default resource of reserved described transaction branch, and default mark is set to described transaction branch, return successful transaction bifurcation state.
21. methods according to claim 20, it is characterised in that the described transaction branch of described process, and also include according to result return transaction branch state: when described being judged as NO, return unsuccessfully transaction branch state.
22. methods according to claim 21, it is characterized in that, what described reception task manager sent submit to transaction branch or the message of rollback transaction branch, and sends to task manager and successfully submit to the message of transaction branch or successful rollback transaction branch to include:
Receive the message submitting transaction branch to that task manager sends;
Described reserved default resource is utilized to perform described transaction branch;
The message successfully submitting transaction branch to is sent to task manager.
23. methods according to claim 22, it is characterized in that, what described reception task manager sent submit to transaction branch or the message of rollback transaction branch, and sends to task manager and successfully submit to the message of transaction branch or successful rollback transaction branch also to include:
Receive the message of the rollback transaction branch that task manager sends;
Cancel the default mark that described transaction branch state is successful transaction branch;
The message of successfully rollback transaction branch is sent to task manager.
24. 1 kinds of distributed transaction communication means, it is characterised in that including:
Send to task manager and open transaction message;
Transaction message is processed to first resource manager transmission;
Obtain transaction branch state;
Submission distributed transaction or rollback distributed transaction is determined according to described transaction branch state;
Send to task manager and submit distributed transaction or the message of rollback distributed transaction to.
25. 1 kinds of distributed transaction communication means, it is characterised in that including:
Receive the unlatching transaction message that client sends;
Receive the registration transactions branch message that first resource manager sends;
Receive the described transaction branch status message that first resource manager sends;
Receive submission distributed transaction or the message of rollback distributed transaction that client sends;
The message submitting transaction branch or rollback transaction branch to is sent to successful submission transaction branch or the message of success rollback transaction branch receiving first resource manager feedback to first resource manager.
26. according to the method described in claim 24 or 25, it is characterised in that described transaction branch state includes: the result whether transaction branch is successfully processed.
27. 1 kinds of distributed transaction communication systems, it is characterised in that including:
Client, opens transaction message for sending to task manager;Send to first resource manager and perform transaction message;Send to task manager and submit distributed transaction or the message of rollback distributed transaction to;
First resource manager, for sending registration transactions branch message to task manager;Process described transaction branch, and return transaction branch state according to result;Described transaction branch state is reported to task manager;
Task manager, for sending the message submitting transaction branch or rollback transaction branch to successful submission transaction branch or the message of success rollback transaction branch receiving first resource manager feedback to first resource manager.
28. systems according to claim 27, it is characterised in that described client is additionally operable to:
Obtain transaction branch state;
Submission distributed transaction or rollback distributed transaction is determined according to described transaction branch state.
29. systems according to claim 27, it is characterised in that when client sends message call to preset service, this system also includes:
Secondary resource manager, for sending the message of registration transactions branch to task manager;Process described transaction branch, and return transaction branch state;Described transaction branch status message is reported to task manager.
30. 1 kinds of distributed transaction communicators, it is characterised in that including:
Process transaction message and receive unit, for receiving the process transaction message that client sends;
Registration transactions branch message sending unit, for sending registration transactions branch message to task manager;
Transaction branch state returns unit, is used for processing described transaction branch, and returns transaction branch state according to result;
Transaction branch status message transmitting element, for sending described transaction branch status message to task manager;
First issued transaction unit, for receiving submission transaction branch or the message of rollback transaction branch that task manager sends, and sends successfully submission transaction branch or the message of success rollback transaction branch to task manager.
31. 1 kinds of distributed transaction communicators, it is characterised in that including:
Open transaction message transmitting element, open transaction message for sending to task manager;
Process transaction message transmitting element, for processing transaction message to first resource manager transmission;
Transaction branch state acquiring unit, is used for obtaining transaction branch state;
First determines unit, for determining submission distributed transaction or rollback distributed transaction according to described transaction branch state;
Second issued transaction unit, submits distributed transaction or the message of rollback distributed transaction to for sending to task manager.
32. 1 kinds of distributed transaction communicators, it is characterised in that including:
Open transaction message and receive unit, for receiving the unlatching transaction message that client sends;
Receive registration transactions branch units, for receiving the registration transactions branch message that first resource manager sends;
Receive transaction branch state cell, for receiving the described transaction branch status message that first resource manager sends;
3rd issued transaction unit, for receiving submission distributed transaction or the message of rollback distributed transaction that client sends;
4th issued transaction unit, for sending the message submitting transaction branch or rollback transaction branch to successful submission transaction branch or the message of success rollback transaction branch receiving first resource manager feedback to first resource manager.
CN201510161886.2A 2015-04-07 2015-04-07 A kind of distributed transaction communication means, system and device Pending CN106156119A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510161886.2A CN106156119A (en) 2015-04-07 2015-04-07 A kind of distributed transaction communication means, system and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510161886.2A CN106156119A (en) 2015-04-07 2015-04-07 A kind of distributed transaction communication means, system and device

Publications (1)

Publication Number Publication Date
CN106156119A true CN106156119A (en) 2016-11-23

Family

ID=57338626

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510161886.2A Pending CN106156119A (en) 2015-04-07 2015-04-07 A kind of distributed transaction communication means, system and device

Country Status (1)

Country Link
CN (1) CN106156119A (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009027A (en) * 2017-11-23 2018-05-08 北京百度网讯科技有限公司 Implementation method, device, equipment and the storage medium of queue message uniformity
CN108279986A (en) * 2017-12-29 2018-07-13 亿阳安全技术有限公司 A kind of distributed transaction processing method and device
CN108415758A (en) * 2018-03-27 2018-08-17 深圳市买买提信息科技有限公司 Distributed transaction coordination approach and device
CN108563693A (en) * 2018-03-16 2018-09-21 阿里巴巴集团控股有限公司 A kind of processing method of affairs, device and equipment
CN108924184A (en) * 2018-05-31 2018-11-30 阿里巴巴集团控股有限公司 data processing method and server
CN109725987A (en) * 2018-12-15 2019-05-07 深圳壹账通智能科技有限公司 A kind of distributed transaction consistency solution and relevant device
CN110019443A (en) * 2017-09-08 2019-07-16 阿里巴巴集团控股有限公司 Non-relational database transaction methods, device and electronic equipment
CN110351140A (en) * 2019-07-12 2019-10-18 苏州浪潮智能科技有限公司 A kind of method, system, equipment and the computer readable storage medium of Single Point of Faliure processing
CN110532068A (en) * 2019-07-18 2019-12-03 政采云有限公司 A kind of management method of distributed transaction
CN110716793A (en) * 2019-10-10 2020-01-21 腾讯科技(深圳)有限公司 Execution method, device, equipment and storage medium of distributed transaction
CN111225012A (en) * 2018-11-27 2020-06-02 阿里巴巴集团控股有限公司 Transaction processing method, device and equipment
CN111259083A (en) * 2020-02-13 2020-06-09 神州数码融信软件有限公司 Distributed transaction processing method and device
CN111984665A (en) * 2020-09-10 2020-11-24 上海优扬新媒信息技术有限公司 Distributed transaction processing method, device and system
CN113138840A (en) * 2021-04-25 2021-07-20 中国工商银行股份有限公司 Low-intrusion compensation method and device for distributed transactions
CN113296896A (en) * 2020-06-09 2021-08-24 阿里巴巴集团控股有限公司 Distributed transaction processing method, device and equipment
CN113872781A (en) * 2020-06-30 2021-12-31 阿里巴巴集团控股有限公司 Transaction processing method, device, equipment and storage medium
CN117234670A (en) * 2023-08-21 2023-12-15 泽拓科技(深圳)有限责任公司 Distributed transaction processing method, system, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073540A (en) * 2010-12-15 2011-05-25 北京新媒传信科技有限公司 Distributed affair submitting method and device thereof
CN102306197A (en) * 2011-09-22 2012-01-04 用友软件股份有限公司 Device and method for guaranteeing consistency of data-source-crossing operation results
CN103473318A (en) * 2013-09-12 2013-12-25 中国科学院软件研究所 Distributed transaction security method for memory data grid
CN103514028A (en) * 2012-06-14 2014-01-15 北京新媒传信科技有限公司 Method and device for processing distributed transactions
CN103546440A (en) * 2012-07-16 2014-01-29 上海宝信软件股份有限公司 Transaction implementation method and system for initiating transactions by client
CN103902560A (en) * 2012-12-25 2014-07-02 中国移动通信集团福建有限公司 Distributed transaction processing method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073540A (en) * 2010-12-15 2011-05-25 北京新媒传信科技有限公司 Distributed affair submitting method and device thereof
CN102306197A (en) * 2011-09-22 2012-01-04 用友软件股份有限公司 Device and method for guaranteeing consistency of data-source-crossing operation results
CN103514028A (en) * 2012-06-14 2014-01-15 北京新媒传信科技有限公司 Method and device for processing distributed transactions
CN103546440A (en) * 2012-07-16 2014-01-29 上海宝信软件股份有限公司 Transaction implementation method and system for initiating transactions by client
CN103902560A (en) * 2012-12-25 2014-07-02 中国移动通信集团福建有限公司 Distributed transaction processing method and system
CN103473318A (en) * 2013-09-12 2013-12-25 中国科学院软件研究所 Distributed transaction security method for memory data grid

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11620277B2 (en) 2017-09-08 2023-04-04 Alibaba Group Holding Limited Transaction processing at non-relational databases
CN110019443A (en) * 2017-09-08 2019-07-16 阿里巴巴集团控股有限公司 Non-relational database transaction methods, device and electronic equipment
CN110019443B (en) * 2017-09-08 2023-08-11 阿里巴巴集团控股有限公司 Non-relational database transaction processing method and device and electronic equipment
CN108009027A (en) * 2017-11-23 2018-05-08 北京百度网讯科技有限公司 Implementation method, device, equipment and the storage medium of queue message uniformity
CN108009027B (en) * 2017-11-23 2019-09-20 北京百度网讯科技有限公司 Implementation method, device, equipment and the storage medium of queue message consistency
CN108279986B (en) * 2017-12-29 2023-10-03 亿阳安全技术有限公司 Distributed transaction processing method and device
CN108279986A (en) * 2017-12-29 2018-07-13 亿阳安全技术有限公司 A kind of distributed transaction processing method and device
CN108563693A (en) * 2018-03-16 2018-09-21 阿里巴巴集团控股有限公司 A kind of processing method of affairs, device and equipment
CN108415758B (en) * 2018-03-27 2020-11-27 深圳市融壹买信息科技有限公司 Distributed transaction coordination method and device
CN108415758A (en) * 2018-03-27 2018-08-17 深圳市买买提信息科技有限公司 Distributed transaction coordination approach and device
CN108924184A (en) * 2018-05-31 2018-11-30 阿里巴巴集团控股有限公司 data processing method and server
CN111225012A (en) * 2018-11-27 2020-06-02 阿里巴巴集团控股有限公司 Transaction processing method, device and equipment
CN109725987A (en) * 2018-12-15 2019-05-07 深圳壹账通智能科技有限公司 A kind of distributed transaction consistency solution and relevant device
CN110351140A (en) * 2019-07-12 2019-10-18 苏州浪潮智能科技有限公司 A kind of method, system, equipment and the computer readable storage medium of Single Point of Faliure processing
CN110532068A (en) * 2019-07-18 2019-12-03 政采云有限公司 A kind of management method of distributed transaction
CN110716793B (en) * 2019-10-10 2023-09-15 腾讯科技(深圳)有限公司 Method, device, equipment and storage medium for executing distributed transaction
CN110716793A (en) * 2019-10-10 2020-01-21 腾讯科技(深圳)有限公司 Execution method, device, equipment and storage medium of distributed transaction
CN111259083A (en) * 2020-02-13 2020-06-09 神州数码融信软件有限公司 Distributed transaction processing method and device
CN113296896A (en) * 2020-06-09 2021-08-24 阿里巴巴集团控股有限公司 Distributed transaction processing method, device and equipment
CN113872781A (en) * 2020-06-30 2021-12-31 阿里巴巴集团控股有限公司 Transaction processing method, device, equipment and storage medium
CN111984665B (en) * 2020-09-10 2023-07-25 度小满科技(北京)有限公司 Distributed transaction processing method, device and system
CN111984665A (en) * 2020-09-10 2020-11-24 上海优扬新媒信息技术有限公司 Distributed transaction processing method, device and system
CN113138840A (en) * 2021-04-25 2021-07-20 中国工商银行股份有限公司 Low-intrusion compensation method and device for distributed transactions
CN117234670A (en) * 2023-08-21 2023-12-15 泽拓科技(深圳)有限责任公司 Distributed transaction processing method, system, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106156119A (en) A kind of distributed transaction communication means, system and device
US11314754B2 (en) Data processing method, apparatus, and device
US20200145228A1 (en) Blockchain consensus method and device
CN108346028B (en) Business approval processing method, device and system
US11410166B2 (en) Systems and methods for automated decentralized multilateral transaction processing
US20190303367A1 (en) Automated data analysis using combined queries
CN103782573B (en) Server is covered to client and application to stop transport
JP2019535065A (en) Data serialization in distributed event processing systems
CN107688500A (en) A kind of distributed task scheduling processing method, device, system and equipment
CN109146638A (en) The recognition methods of abnormal financial transaction group and device
WO2021204041A1 (en) Data processing
WO2019143979A2 (en) Method, apparatus, and electronic device for regulatory inspection
CN108647950A (en) A kind of transfer request processing method, device and equipment
CN110992040A (en) Transaction processing method, device and equipment
US11650830B2 (en) Techniques for modifying a compute instance
US8463755B2 (en) System and method for providing collaborative master data processes
CN109615379B (en) Generating method and device of rejection processing system
US11379191B2 (en) Presentation oriented rules-based technical architecture display framework
CN110264213A (en) A kind of processing method of information, device and equipment
CN111522840B (en) Label configuration method, device, equipment and computer readable storage medium
CN106156050A (en) A kind of data processing method and device
EP1259891A2 (en) Multi-environment scalable business system
US11949735B2 (en) Centralized approach for managing cross-service data of cloud resources
CN108924184A (en) data processing method and server
US9342541B1 (en) Presentation oriented rules-based technical architecture display framework (PORTRAY)

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20161123

RJ01 Rejection of invention patent application after publication