CN114860740A - Distributed transaction processing method, device and system based on programmable switch - Google Patents

Distributed transaction processing method, device and system based on programmable switch Download PDF

Info

Publication number
CN114860740A
CN114860740A CN202110075634.3A CN202110075634A CN114860740A CN 114860740 A CN114860740 A CN 114860740A CN 202110075634 A CN202110075634 A CN 202110075634A CN 114860740 A CN114860740 A CN 114860740A
Authority
CN
China
Prior art keywords
transaction processing
message
programmable switch
processing stage
distributed
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
CN202110075634.3A
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.)
Tsinghua University
Original Assignee
Tsinghua University
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 Tsinghua University filed Critical Tsinghua University
Priority to CN202110075634.3A priority Critical patent/CN114860740A/en
Publication of CN114860740A publication Critical patent/CN114860740A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2336Pessimistic concurrency control approaches, e.g. locking or multiple versions without time stamps
    • G06F16/2343Locking methods, e.g. distributed locking or locking implementation details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computer And Data Communications (AREA)
  • Multi Processors (AREA)

Abstract

The application provides a distributed transaction processing method, a device and a system based on a programmable switch, wherein the method comprises the following steps: the method comprises the steps that a programmable switch receives first messages sent by at least one service node of a distributed transaction, wherein the service node participates in a current transaction processing stage, the programmable switch sends second messages to a target node if the programmable switch receives first messages aiming at a non-last transaction processing stage, the number of the first messages is equal to a message number threshold value, and type information in each first message indicates success, or the programmable switch sends a distributed transaction processing result to a client node if the programmable switch receives first messages aiming at the last transaction processing stage, the number of the first messages is equal to a corresponding message number threshold value, and the type information in each first message indicates success, or the programmable switch receives type information in the first messages of the current transaction processing stage, and indicates failure. Thus, the performance of distributed transactions can be greatly improved.

Description

Distributed transaction processing method, device and system based on programmable switch
Technical Field
The present application relates to the field of distributed transaction technologies, and in particular, to a method, an apparatus, and a system for processing distributed transactions based on a programmable switch.
Background
The transaction is an operation unit for a user to access the database concurrently, and the operation unit has the characteristics of atomicity, consistency, isolation and durability. As the amount of data for various applications increases, the data must be partitioned into different service nodes, and transactions involving the participation of multiple service nodes are referred to as distributed transactions. Distributed transactions can ensure consistency of data among multiple service nodes.
Currently, in the process of executing a distributed transaction, a plurality of service nodes participating in the transaction need to directly perform network interaction with a client node in a plurality of transaction processing phases to complete the transaction. In the network interaction of each transaction processing stage, the client node needs to initiate the network interaction of the next transaction processing stage according to the network interaction result of the current transaction processing stage. Each transaction phase is initiated and terminated by a client node, increasing the delay of distributed transactions, resulting in poor performance of distributed transactions.
Disclosure of Invention
The application provides a distributed transaction processing method, a device and a system based on a programmable switch, which aim to solve the problem of low performance of distributed transaction processing.
In a first aspect, the present application provides a distributed transaction processing method based on a programmable switch, which is applied to a distributed transaction processing system, where the distributed transaction processing system includes a programmable switch, a client node, and a plurality of service nodes, and the method includes:
the programmable switch receives a first message sent by at least one service node participating in a current transaction processing stage of the distributed transaction, wherein the current transaction processing stage is one transaction processing stage of a plurality of transaction processing stages processed in sequence in the distributed transaction, and the first message comprises an identifier of the distributed transaction, a message number threshold, type information used for indicating that a processing result of the current transaction processing stage is successful or failed, and an identifier of a target node.
If the programmable switch receives the number of the first messages aiming at the non-last transaction processing stage and is equal to the message number threshold, the type information in each first message indicates success, the identification of the target node in each first message is the identification of at least one service node participating in the next transaction processing stage, the programmable switch sends a second message to the at least one service node participating in the next transaction processing stage according to the identification of the at least one service node participating in the next transaction processing stage, and the second message is used for indicating the next transaction processing stage.
And if the number of the first messages received by the programmable switch and aiming at the last transaction processing stage is equal to the corresponding message number threshold value and the type information in each first message indicates success, or if the programmable switch receives the type information in the first message of the current transaction processing stage and indicates failure, the programmable switch sends the distributed transaction processing result to the client node.
Optionally, if the current transaction processing stage is a last transaction processing stage of the multiple sequentially processed transaction processing stages, the identifier of the target node in the first message is an identifier of the client node.
The programmable switch sends the distributed transaction result to the client node, including:
the programmable switch sends the distributed transaction result to the client node based on the identification of the client node included in the first message.
Optionally, the method for distributed transaction processing based on the programmable switch further includes:
and if the type information in the first message received by the programmable switch indicates failure and the identification of the target node in the first message is the identification of at least one service node participating in the rollback transaction processing stage, the programmable switch sends a third message to the at least one service node participating in the rollback transaction processing stage, wherein the third message is used for indicating the rollback transaction processing stage.
Optionally, the multiple transaction processing phases processed in sequence are a lock holding phase, a version check phase, and a data writing phase.
Optionally, the programmable switch includes a plurality of switching processing units, and at least one of the plurality of switching processing units is respectively configured to receive a first message sent by at least one service node participating in the current transaction processing stage.
In a second aspect, the present application provides a distributed transaction processing method based on a programmable switch, which is applied to a distributed transaction processing system, where the distributed transaction processing system includes a programmable switch, a client node, and a plurality of service nodes, and the method includes:
the client node sends a fourth message to each service node, the fourth message includes an identifier of the distributed transaction, identifiers of a plurality of sequentially processed transaction processing stages in the distributed transaction, an identifier of at least one service node participating in each transaction processing stage, and a message number threshold corresponding to each transaction processing stage, and the fourth message is further used for indicating that the first transaction processing stage is started.
And the client node receives the distributed transaction processing result sent by the programmable switch after the last transaction processing stage is completed or when the type information in the first message of the current transaction processing stage indicates failure.
Optionally, the fourth message is further used to indicate at least one service node that needs to execute the rollback transaction processing phase after the processing result of each transaction processing phase is a failure.
In a third aspect, the present application provides a distributed transaction processing method based on a programmable switch, which is applied to a distributed transaction processing system, where the distributed transaction processing system includes a programmable switch, a client node, and multiple service nodes, and the method includes:
the service node receives a fourth message sent by the client node, wherein the fourth message comprises an identifier of the distributed transaction, identifiers of a plurality of transaction processing stages processed in sequence in the distributed transaction, an identifier of at least one service node participating in each transaction processing stage, and a message number threshold corresponding to each transaction processing stage, and the fourth message is further used for indicating that the first transaction processing stage is started.
And the service node sequentially processes the current transaction processing stage according to the fourth message and sends a first message to the programmable switch, wherein the current transaction processing stage is one of a plurality of sequentially processed transaction processing stages in the distributed transaction, and the first message comprises the identifier of the distributed transaction, a message number threshold, type information for indicating that the processing result of the current transaction processing stage is successful or failed, and the identifier of the target node.
And when the current transaction processing stage is a non-last transaction processing stage and the type information in the first message indicates success, the identifier of the target node is the identifier of at least one service node participating in the next transaction processing stage.
The identification of the target node is the identification of the client node when the current transaction phase is the last transaction phase and the type information in the first message indicates success.
Optionally, after sending the first message to the programmable switch, the method further includes:
the service node receives a second message sent by the programmable switch, wherein the second message is used for indicating the next transaction processing stage; the service node processes the next transaction processing phase.
Optionally, the fourth message is further used to indicate at least one service node that needs to execute the rollback transaction processing phase after the processing result of each transaction processing phase is a failure.
The identification of the target node is the identification of at least one serving node participating in the rollback transaction phase when the type information in the first message indicates a failure.
Optionally, the method for distributed transaction processing based on the programmable switch further includes:
the service node receives a third message sent by the programmable switch, wherein the third message is used for indicating a rollback transaction processing stage; the service node processes the rollback transaction processing phase.
In a fourth aspect, the present application provides a distributed transaction processing apparatus based on a programmable switch, applied to a distributed transaction processing system, where the distributed transaction processing system includes a programmable switch, a client node, and a plurality of service nodes, and the distributed transaction processing apparatus is included in the programmable switch, and the apparatus includes:
the receiving module is used for receiving a first message sent by at least one service node participating in a current transaction processing stage of the distributed transaction, wherein the current transaction processing stage is one transaction processing stage of a plurality of transaction processing stages processed in sequence in the distributed transaction, and the first message comprises an identifier of the distributed transaction, a message number threshold, type information used for indicating that a processing result of the current transaction processing stage is successful or failed, and an identifier of a target node.
A sending module, configured to send a second message to at least one service node participating in a next transaction processing stage according to an identifier of the at least one service node participating in the next transaction processing stage if the number of the first messages received by the receiving module for the non-last transaction processing stage is equal to a message number threshold, and the type information in each first message indicates success, and the identifier of the target node in the first message is an identifier of the at least one service node participating in the next transaction processing stage, where the second message is used to indicate that the next transaction processing stage is performed; and if the number of the first messages received by the receiving module aiming at the last transaction processing stage is equal to the corresponding message number threshold value and the type information in each first message indicates success, or if the type information in the first message received by the receiving module aiming at the current transaction processing stage indicates failure, sending a distributed transaction processing result to the client node.
Optionally, if the current transaction processing stage is a last transaction processing stage of the multiple sequentially processed transaction processing stages, the identifier of the target node in the first message is an identifier of the client node.
A sending module, specifically configured to:
and sending the distributed transaction processing result to the client node according to the identification of the client node included in the first message.
Optionally, the sending module is further configured to:
if the type information in the first message received by the receiving module indicates failure and the identifier of the target node in the first message is the identifier of at least one service node participating in the rollback transaction processing phase, sending a third message to the at least one service node participating in the rollback transaction processing phase, wherein the third message is used for indicating to perform the rollback transaction processing phase.
Optionally, the multiple transaction processing phases processed in sequence are a lock holding phase, a version check phase, and a data writing phase.
Optionally, the programmable switch includes a plurality of switch processing units, and each switch processing unit includes a distributed transaction processing apparatus based on the programmable switch.
In a fifth aspect, the present application provides a distributed transaction processing apparatus based on a programmable switch, which is applied to a distributed transaction processing system, where the distributed transaction processing system includes a programmable switch, a client node, and a plurality of service nodes, and the distributed transaction processing apparatus is included in the client node, and the apparatus includes:
and the sending module is used for sending a fourth message to each service node, the fourth message comprises an identifier of the distributed transaction, identifiers of a plurality of transaction processing stages processed in sequence in the distributed transaction and identifiers of at least one service node participating in each transaction processing stage, the number threshold of messages corresponding to each transaction processing stage is set, and the fourth message is also used for indicating the start of the first transaction processing stage.
And the receiving module is used for receiving the distributed transaction processing result sent by the programmable switch after the processing in the last transaction processing stage is completed or when the type information in the first message in the current transaction processing stage indicates failure.
Optionally, the fourth message is further used to indicate at least one service node that needs to execute the rollback transaction processing phase after the processing result of each transaction processing phase is a failure.
In a sixth aspect, the present application provides a distributed transaction processing apparatus based on a programmable switch, which is applied to a distributed transaction processing system, where the distributed transaction processing system includes a programmable switch, a client node, and a plurality of service nodes, and the distributed transaction processing apparatus is included in a service node, and the apparatus includes:
the receiving module is configured to receive a fourth message sent by the client node, where the fourth message includes an identifier of a distributed transaction, identifiers of multiple transaction processing stages in the distributed transaction, an identifier of at least one service node participating in each transaction processing stage, and a message number threshold corresponding to each transaction processing stage, and the fourth message is further configured to indicate that a first transaction processing stage is started.
And the processing module is used for sequentially processing the current transaction processing stage according to the fourth message, wherein the current transaction processing stage is one of a plurality of sequentially processed transaction processing stages in the distributed transaction.
And the sending module is used for sending a first message to the programmable switch, wherein the first message comprises the identification of the distributed transaction, the message number threshold, the type information used for indicating that the processing result of the current transaction processing stage is success or failure, and the identification of the target node.
And when the current transaction processing stage is a non-last transaction processing stage and the type information in the first message indicates success, the identifier of the target node is the identifier of at least one service node participating in the next transaction processing stage.
The identification of the target node is the identification of the client node when the current transaction phase is the last transaction phase and the type information in the first message indicates success.
Optionally, the receiving module is further configured to:
and after the sending module sends the first message to the programmable switch, receiving a second message sent by the programmable switch, wherein the second message is used for indicating the next transaction processing stage.
And the processing module is also used for processing the next transaction processing stage.
Optionally, the fourth message is further used to indicate at least one service node that needs to execute the rollback transaction processing phase after the processing result of each transaction processing phase is a failure.
The identification of the target node is the identification of at least one serving node participating in the rollback transaction phase when the type information in the first message indicates a failure.
Optionally, the receiving module is further configured to:
and receiving a third message sent by the programmable switch, wherein the third message is used for indicating that the rollback transaction processing stage is performed.
And the processing module is also used for processing the rollback transaction processing phase.
In a seventh aspect, the present application provides a programmable switch-based distributed transaction processing apparatus, including: a memory and a processor;
the memory is used for storing program instructions;
the processor is configured to invoke program instructions in the memory to perform the programmable switch-based distributed transaction processing method according to the first aspect of the application.
In an eighth aspect, the present application provides a distributed transaction processing apparatus based on a programmable switch, including: a memory and a processor;
the memory is used for storing program instructions;
the processor is configured to invoke program instructions in the memory to perform a programmable switch-based distributed transaction processing method as described in the second aspect of the present application.
In a ninth aspect, the present application provides a programmable switch-based distributed transaction processing apparatus, comprising: a memory and a processor;
the memory is used for storing program instructions;
the processor is configured to invoke program instructions in the memory to perform a programmable switch-based distributed transaction processing method according to the third aspect of the present application.
In a tenth aspect, the present application provides a programmable switch-based distributed transaction processing system, comprising a programmable switch, a client node, and a plurality of service nodes.
Wherein the programmable switch is adapted to perform the method according to the first aspect of the application, the client node is adapted to perform the method according to the second aspect of the application, and the service node is adapted to perform the method according to the third aspect of the application.
Alternatively, there may be a plurality of programmable switches, the plurality of programmable switches forming a tree structure for performing the method according to the first aspect of the present application.
In an eleventh aspect, the present application provides a computer readable storage medium having computer program instructions stored therein, which when executed, implement the method according to the first aspect of the present application.
In a twelfth aspect, the present application provides a computer readable storage medium having computer program instructions stored therein, which when executed, implement the method according to the second aspect of the present application.
In a thirteenth aspect, the present application provides a computer readable storage medium having computer program instructions stored therein, which when executed, implement a method as described in the third aspect of the present application.
In a fourteenth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, performs the method as set forth in the first aspect of the present application.
In a fifteenth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, performs the method as set forth in the second aspect of the present application.
In a sixteenth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, performs the method according to the third aspect of the present application.
According to the distributed transaction processing method, device and system based on the programmable switch, the client node sends a fourth message to each service node, the service nodes sequentially process a current transaction processing stage according to the received fourth message, and the current transaction processing stage is one of a plurality of sequentially processed transaction processing stages in the distributed transaction; the method comprises the steps that a service node sends first messages to a programmable switch, the programmable switch receives the first messages sent by at least one service node, and if the number of the first messages aiming at a non-last transaction processing stage received by the programmable switch is equal to a message number threshold value and type information in each first message indicates success, the programmable switch sends second messages to at least one service node participating in the next transaction processing stage; if the number of the first messages received by the programmable switch and aiming at the last transaction processing stage is equal to the corresponding message number threshold value, and the type information in each first message indicates success, or if the programmable switch receives the type information in the first message of the current transaction processing stage and indicates failure, the programmable switch sends a distributed transaction processing result to the client node, and the client node receives the distributed transaction processing result. The method and the device can make full use of the storage capacity and the programmable capacity of the programmable switch and use the programmable switch for processing the distributed transactions, so that the performance of the distributed transaction processing can be greatly improved, the time delay of the distributed transaction processing can be shortened, the probability of conflict among transactions can be reduced, and the throughput of the whole system can be improved. In addition, because network interaction between the client and the server is reduced, the resource utilization rate of a Central Processing Unit (CPU) of the client is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a flowchart of a method for distributed transaction processing based on programmable switches according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a successful commit process for a single read-write distributed transaction according to an embodiment of the present application;
fig. 4 is a diagram illustrating a first message according to an embodiment of the present application;
fig. 5 is a flowchart of a method for programmable switch based distributed transaction processing according to another embodiment of the present application;
fig. 6 is a schematic diagram of a plurality of switch processing units of a programmable switch provided in an embodiment of the present application;
FIG. 7 is a schematic diagram of internal processing logic of a programmable switch provided in one embodiment of the present application;
FIG. 8 is a schematic diagram of a plurality of programmable switches participating in a transaction commit process in parallel according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a programmable switch-based distributed transaction processing apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a programmable switch-based distributed transaction processing apparatus according to another embodiment of the present application;
fig. 11 is a schematic structural diagram of a programmable switch-based distributed transaction processing apparatus according to another embodiment of the present application;
fig. 12 is a schematic structural diagram of a programmable switch-based distributed transaction processing apparatus according to another embodiment of the present application;
fig. 13 is a schematic structural diagram of a programmable switch-based distributed transaction processing apparatus according to another embodiment of the present application;
fig. 14 is a schematic structural diagram of a programmable switch-based distributed transaction processing apparatus according to another embodiment of the present application;
FIG. 15 is a schematic diagram of a programmable switch based distributed transaction processing system according to an embodiment of the present application;
fig. 16 is a schematic structural diagram of a programmable switch-based distributed transaction processing apparatus according to another embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
As the amount of data for various applications increases, the data must be partitioned into different service nodes, and transactions involving the participation of multiple service nodes are referred to as distributed transactions. Distributed transactions can ensure consistency of data among multiple service nodes. Currently, in the process of executing a distributed transaction, a plurality of service nodes participating in the transaction need to directly perform network interaction with a client node in a plurality of transaction processing phases to complete the process. In the network interaction of each transaction processing stage, the client node needs to initiate the network interaction of the next transaction processing stage according to the network interaction result of the current transaction processing stage. Each transaction phase is initiated and terminated by a client node, increasing the delay of distributed transactions, resulting in poor performance of distributed transactions.
A programmable Switch (programmable Switch) is a network Switch with programming capabilities. With the development of network hardware, programmable switches with programmable capabilities have been introduced. Compared to conventional switches, intelligent network hardware can not only speed up network protocol processing (e.g., load balancing, flow control), but can also provide the ability to support specific computations and limited memory storage capabilities. Control of the programmable switch can be accomplished through a data plane programming language (e.g., P4 language), processing of the network (modify, forward, drop, etc.) can be accomplished according to the programming logic, and new network protocols can be customized.
Therefore, the application provides a distributed transaction processing method, device and system based on a programmable switch, which completes the submission of the distributed transaction by initiating the submission of the distributed transaction by a client and performing network interaction in a plurality of transaction processing phases between the programmable switch and a plurality of service nodes participating in the transaction. The programmable switch is used for processing the distributed transaction, so that the performance of the distributed transaction can be greatly improved, the time delay of the distributed transaction is shortened, the probability of conflict among transactions is reduced, the throughput of the whole system is improved, and the expandability of the data center with multiple switches and multiple servers is further provided.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application, as shown in fig. 1, a client 110 initiates a distributed transaction commit, and after receiving a request for the distributed transaction commit initiated by the client 110, a plurality of service nodes 120 respectively perform network interactions with a programmable switch 130 in a plurality of corresponding transaction processing phases to complete the commit of the distributed transaction. The specific implementation process of the distributed transaction commit can be seen in the schemes of the following embodiments. It should be noted that the application scenarios of the aspects of the present application are not limited to those shown in fig. 1.
Fig. 2 is a flowchart of a distributed transaction processing method based on a programmable switch according to an embodiment of the present application, and as shown in fig. 2, the method of this embodiment includes:
s201, the client node sends a fourth message to each service node, and correspondingly, the service node receives the fourth message sent by the client node. The fourth message comprises an identifier of the distributed transaction, identifiers of a plurality of transaction processing stages processed in sequence in the distributed transaction, identifiers of at least one service node participating in each transaction processing stage, and a message number threshold corresponding to each transaction processing stage, and is further used for indicating the first transaction processing stage of the starting processing.
Optionally, the multiple transaction processing phases processed in sequence are a lock holding phase, a version check phase, and a data writing phase.
And S202, the service node sequentially processes the current transaction processing stage according to the fourth message, wherein the current transaction processing stage is one of a plurality of sequentially processed transaction processing stages in the distributed transaction.
S203, the service node sends a first message to the programmable switch, and correspondingly, the programmable switch receives the first message sent by at least one service node participating in the current transaction processing stage of the distributed transaction. The current transaction processing stage is one of a plurality of transaction processing stages processed in sequence in the distributed transaction, and the first message comprises the identification of the distributed transaction, a message number threshold, type information used for indicating that the processing result of the current transaction processing stage is successful or failed, and the identification of the target node.
And when the current transaction processing stage is a non-last transaction processing stage and the type information in the first message indicates success, the identifier of the target node is the identifier of at least one service node participating in the next transaction processing stage.
The identification of the target node is the identification of the client node when the current transaction phase is the last transaction phase and the type information in the first message indicates success.
In fig. 2, it is illustrated that the service node 1, the service node 2, and the service node 3 all participate in the current transaction processing phase, which is not limited in this embodiment.
And S204, if the programmable switch receives the number of the first messages aiming at the non-last transaction processing stage and is equal to the message number threshold, the type information in each first message indicates success, the identification of the target node in each first message is the identification of at least one service node participating in the next transaction processing stage, the programmable switch sends a second message to the at least one service node participating in the next transaction processing stage according to the identification of the at least one service node participating in the next transaction processing stage, and the second message is used for indicating the next transaction processing stage.
In fig. 2, it is shown that the service node 1, the service node 2, and the service node 3 all participate in the next transaction processing stage, which is not limited to this embodiment.
S205, if the number of the first messages received by the programmable switch and aiming at the last transaction processing stage is equal to the corresponding message number threshold value, and the type information in each first message indicates success, or if the programmable switch receives the type information in the first message of the current transaction processing stage and indicates failure, the programmable switch sends the distributed transaction processing result to the client node. Accordingly, the client node receives the distributed transaction processing result sent by the programmable switch after the last transaction processing phase is completed or when the type information in the first message of the current transaction processing phase indicates failure.
Optionally, if the current transaction processing stage is a last transaction processing stage of the multiple sequentially processed transaction processing stages, the identifier of the target node in the first message is an identifier of the client node. The programmable switch sends the distributed transaction result to the client node based on the identification of the client node included in the first message.
In this embodiment, fig. 3 is a schematic diagram of a successful commit process of a single read-write distributed transaction according to an embodiment of the present application. Taking a plurality of service nodes as service node 1, service node 2, and service node 3 as an example, and the transaction processing phase includes: the lock holding phase, the version check phase, and the data writing phase are taken as examples, and the scheme of this embodiment is illustrated with reference to fig. 3. As shown in fig. 3, a read-write distributed transaction is initiated by a client node, service nodes where the transaction read set is located are a service node 1 and a service node 3, and service nodes where the transaction write set is located are a service node 1 and a service node 2. Some service nodes process only one transaction phase, and some service nodes process multiple transaction phases, for example, corresponding to fig. 3, where the transaction phases processed by the service node 1 in sequence include: the lock holding phase, the version checking phase and the data writing phase, and the transaction processing phase sequentially processed by the service node 2 comprises: the lock holding phase and the data writing phase, and the transaction processing phase sequentially processed by the service node 3 includes: and a version checking stage. After the transaction completes the execution phase, a commit of the transaction is initiated by the client node. The client node sends a data message to each serving node, which data message may be referred to as the fourth message above. Specifically, the fourth message includes an identifier of the distributed transaction, such as transaction processing phases respectively processed by the above 3 service nodes in sequence, and a message number threshold corresponding to each transaction processing phase (lock holding phase is 2, version check phase is 2, and data writing phase is 2). The fourth message further includes transaction-specific read-write data, such as an address and data of a write data set, and read data is an address and version information of a read data set. The fourth message is also used to indicate the start of the first transaction phase. And after the service nodes (namely the service node 1 and the service node 2) where the write set is located receive the fourth message sent by the client node, starting to process the first transaction processing phase, namely entering a lock holding phase. The service nodes (i.e., service node 1 and service node 2) where the write set is located acquire the locks of all write sets, and send a coordination operation message that the locks are successfully held to the programmable switch, where the coordination operation message may refer to the first message described above.
Fig. 4 is a schematic diagram of a first message provided in an embodiment of the present application, where a specific message format of the first message is as shown in fig. 4, a header of a network Protocol (ethernet, EHT), a header of an Internet Protocol (IP) indicate headers of a general ethernet Protocol and an IP Protocol, a source port of a packet header of a User Datagram Protocol (UDP) network indicates an identifier of a network Protocol of a distributed transaction submission mechanism, a destination port of the packet header of the UDP network indicates a thread identifier corresponding to a service node (a thread corresponding to the service node participates in processing of the distributed transaction), a unique identifier (Identity, ID) of the distributed transaction is used to identify the transaction and process network disorder and packet loss, the type is type information indicating that a processing result in a current transaction processing stage is success or failure, the threshold is a message number threshold, and the threshold is equal to the number of service nodes participating in the current transaction processing stage, the participating node is the identifier of the target node. For example, corresponding to fig. 3, the type information of the first message that the lock holding phase succeeds is the lock holding phase, the threshold of the number of messages is 2, and the identifiers of the target nodes are the service node 1 and the service node 3 that participate in the next transaction processing phase.
The programmable switch receives first messages aiming at the lock holding stage, records the number of the received first messages, judges whether the number of the received first messages is equal to a message number threshold value or not, and judges whether the type information in each first message indicates success or not. In contrast to the prior art, the first message is processed by the programmable switch, rather than by the client node, i.e., the coordinated operations during the commit of the distributed transaction are offloaded to the programmable switch (e.g., the operations offload in fig. 3). After the programmable switch receives the last first message (i.e., the coordination operation message sent by the service node 2) that successfully holds the lock, at this time, the number of the first messages received by the programmable switch is equal to the message number threshold (i.e., 2), and the type information in each first message (i.e., the first messages sent by the service node 1 and the service node 2, respectively) indicates that the lock-holding phase is successful, the programmable switch broadcasts the last coordination operation message that successfully holds the lock to the service nodes (i.e., the service node 1 and the service node 3) where all read sets are located according to the identifier of the target node, where the coordination operation message may refer to the second message, and the second message is used to indicate that the next transaction processing phase is performed. After receiving the second message broadcast by the programmable switch, the service nodes (i.e., service node 1 and service node 3) in which the read set is located enter a version check phase, confirm that the data of the read set is not changed by other parallel transactions from the execution phase to the version check phase, and send a coordination operation message that the version check passes to the programmable switch, where the coordination operation message may refer to the first message. The type information of the first message corresponding to the successful version check stage is the successful version check stage, the threshold value of the number of the messages is 2, and the identification of the target node is the service node 1 and the service node 2 participating in the next transaction processing stage.
The programmable switch receives first messages aiming at the version checking stage, records the number of the received first messages, judges whether the number of the received first messages is equal to a message number threshold value or not, and judges whether the type information in each first message indicates success or not. After the programmable switch receives the first message (i.e., the coordination operation message sent by the service node 3) whose version check is successful, where the number of the first messages received by the programmable switch is equal to the message number threshold (i.e., 2), and the type information in each first message (i.e., the first messages sent by the service node 1 and the service node 3, respectively) indicates that the version check stage is successful, the programmable switch broadcasts the coordination operation message whose version check is successful at the last version check stage to the service nodes (i.e., the service node 1 and the service node 2) where all write sets are located according to the identifier of the target node, where the coordination operation message may refer to the second message, and the second message is used to indicate that the next transaction processing stage is performed. The service nodes (i.e. the service node 1 and the service node 2) where the write set is located enter a write data phase after receiving the second message broadcasted by the programmable switch, the service nodes (i.e. the service node 1 and the service node 2) where the write set is located first perform a lock release operation, then update the data of the transaction write set into a local storage, and finally send a coordination operation message that the write data succeeds to the programmable switch, where the coordination operation message may refer to the first message. The type information of the first message corresponding to the data writing phase is success of the data writing phase, the threshold value of the number of the messages is 2, and because the data writing phase is the last transaction processing phase, the identifier of the target node is the identifier of the client node.
The programmable switch receives first messages aiming at a data writing stage, records the number of the received first messages, judges whether the number of the received first messages is equal to a message number threshold value or not, and judges whether type information in each first message indicates success or not. After the programmable switch receives the first message (i.e., the coordination operation message sent by the service node 2) that the last write data succeeds, at this time, the number of the first messages received by the programmable switch is equal to the message number threshold (i.e., 2), and the type information in each first message (i.e., the first messages sent by the service node 1 and the service node 2, respectively) indicates that the write data phase succeeds, the programmable switch forwards the coordination operation message that the last write data in the write data phase succeeds to the client node according to the identifier of the client node, where the coordination operation message is the distributed transaction processing result. And after receiving the distributed transaction processing result, the client node marks that the distributed transaction is successfully submitted.
For the general read-write distributed transaction in fig. 3, compared with the prior art, the method of the present embodiment shortens the time of the commit process to two thirds, shortens the lock holding time to one half, shortens the time interval of reading the set version twice to three fourths, and eliminates the start and end of commit, and does not need the participation of the thread of the client node in the commit process of the distributed transaction, thereby reducing the CPU resource consumption of the thread of the client node.
On the basis of the above embodiment, if the programmable switch receives the type information in the first message in the lock holding phase or the version check phase, which indicates that the type information indicates a failure, and the identifier of the target node in the first message is the identifier of the client node, the programmable switch sends the distributed transaction processing result to the client node, and the result indicates that the distributed transaction is failed to commit. When the client node receives that the distributed transaction processing result is failure, corresponding processing is performed, for example: the commit of the distributed transaction is reinitiated.
Alternatively, the client node may comprise a plurality of threads, the plurality of threads may initiate the commit of a plurality of distributed transactions simultaneously, the plurality of service nodes participating in the commit of the distributed transactions may comprise a plurality of threads, the plurality of threads may process a plurality of distributed transactions in parallel, and the specific processing procedure of each service node participates in the above-described embodiment.
The distributed transaction processing method based on the programmable switch sends a fourth message to each service node through the client node, the service nodes process a current transaction processing stage in sequence according to the received fourth message, and the current transaction processing stage is one of a plurality of sequentially processed transaction processing stages in the distributed transaction; the method comprises the steps that a service node sends first messages to a programmable switch, the programmable switch receives the first messages sent by at least one service node, and if the number of the first messages aiming at a non-last transaction processing stage received by the programmable switch is equal to a message number threshold value and type information in each first message indicates success, the programmable switch sends second messages to at least one service node participating in the next transaction processing stage; if the number of the first messages received by the programmable switch and aiming at the last transaction processing stage is equal to the corresponding message number threshold value, and the type information in each first message indicates success, or if the programmable switch receives the type information in the first message of the current transaction processing stage and indicates failure, the programmable switch sends a distributed transaction processing result to the client node, and the client node receives the distributed transaction processing result. The method and the device can make full use of the storage capacity and the programmable capacity of the programmable switch and use the programmable switch for processing the distributed transactions, so that the performance of the distributed transaction processing can be greatly improved, the time delay of the distributed transaction processing can be shortened, the probability of conflict among transactions can be reduced, and the throughput of the whole system can be improved. In addition, the network interaction between the client and the server is reduced, so that the CPU resource utilization rate of the client is improved.
Based on the embodiment shown in fig. 2, in some embodiments, fig. 5 is a flowchart of a method for distributed transaction processing based on a programmable switch according to another embodiment of the present application, and as shown in fig. 5, the method of this embodiment includes:
s501, the client node sends a fourth message to each service node, and correspondingly, the service node receives the fourth message sent by the client node. The fourth message comprises an identifier of the distributed transaction, identifiers of a plurality of transaction processing stages processed in sequence in the distributed transaction, identifiers of at least one service node participating in each transaction processing stage, and a message number threshold corresponding to each transaction processing stage, and is further used for indicating the first transaction processing stage of the starting processing.
And S502, the service node sequentially processes the current transaction processing stage according to the fourth message, wherein the current transaction processing stage is one of a plurality of sequentially processed transaction processing stages in the distributed transaction.
S503, the service node sends the first message to the programmable switch, and accordingly, the programmable switch receives the first message sent by at least one service node participating in the current transaction processing stage of the distributed transaction. The current transaction processing stage is one of a plurality of transaction processing stages processed in sequence in the distributed transaction, and the first message comprises the identification of the distributed transaction, a message number threshold, type information used for indicating that the processing result of the current transaction processing stage is successful or failed, and the identification of the target node.
In this embodiment, for specific implementation processes of S501, S502, and S503, reference may be made to the relevant description of the embodiment shown in fig. 2, and details are not described here again.
S504, if the programmable switch receives the number of the first messages aiming at the non-last transaction processing stage and is equal to the message number threshold, the type information in each first message indicates success, the identification of the target node in each first message is the identification of at least one service node participating in the next transaction processing stage, the programmable switch sends a second message to the at least one service node participating in the next transaction processing stage according to the identification of the at least one service node participating in the next transaction processing stage, and correspondingly, the service node receives the second message sent by the programmable switch. The second message is used to indicate that the next transaction phase is to be performed. The service node processes the next transaction processing phase.
In this embodiment, based on the embodiment shown in fig. 2, since some service nodes may process only one transaction stage and some service nodes may process multiple transaction stages, the service node that needs to participate in the next transaction stage receives the second message sent by the programmable switch, and performs the processing of the next transaction stage according to the second message. For example: in fig. 3, the service node 3 only processes the transaction phase of version checking; after receiving the second message broadcast successfully by the programmable switch for the lock holding, the service node 1 enters the next transaction processing stage, i.e. the version check stage, and performs the processing of the version check stage, i.e. it is confirmed that the data of the read set is not changed by other parallel transactions from the execution stage to the version check stage.
S505, if the type information in the first message received by the programmable switch indicates a failure, and the identifier of the target node in the first message is an identifier of at least one service node participating in the rollback transaction processing stage, the programmable switch sends a third message to the at least one service node participating in the rollback transaction processing stage, and accordingly, the service node receives the third message sent by the programmable switch. The third message is used to indicate that a rollback transaction phase is to be performed.
Optionally, the fourth message is further used to indicate at least one service node that needs to execute the rollback transaction processing phase after the processing result of each transaction processing phase is a failure.
Optionally, when the type information in the first message indicates a failure, the identifier of the target node is an identifier of at least one serving node participating in the rollback transaction processing stage.
Optionally, when the type information in the first message indicates a failure, the programmable switch filters and discards other first messages received after the first message, so as to reduce network overhead.
In this embodiment, the fourth message includes an identifier of the distributed transaction, identifiers of a plurality of transaction processing stages processed in sequence in the distributed transaction, and an identifier of at least one service node participating in each transaction processing stage, so that, according to the fourth message, at least one service node that needs to execute a rollback transaction processing stage after a processing result of each transaction processing stage is a failure can be obtained. For example: in fig. 3, the fourth message includes service nodes where the distributed transaction write set is located, namely a service node 1 and a service node 2, and the service node where the write set is located needs to perform rollback transaction processing when the execution of the service node in the current transaction processing stage fails. If the type information in the first message received by the programmable switch in the lock holding phase or the version check phase indicates failure, and the identifiers of the target nodes are the service node 1 and the service node 2 participating in the rollback transaction processing phase, the programmable switch sends a third message to the service node 1 and the service node 2 participating in the rollback transaction processing phase. Accordingly, service node 1 and service node 2 receive the third message sent by the programmable switch, respectively. The third message is used to indicate that a rollback transaction phase is to be performed.
S506, the service node processes the rollback transaction processing phase.
In this embodiment, after receiving the third message sent by the programmable switch, the service node processes the rollback transaction processing stage. In fig. 5, it is shown that the service node 1, the service node 2, and the service node 3 all participate in the rollback transaction processing phase, but the embodiment is not limited thereto.
For example, referring to fig. 3, after receiving the third message sent by the programmable switch, the service node 1 and the service node 2 respectively execute a lock releasing operation, where the lock releasing operation is a rollback transaction processing stage.
And S507, if the number of the first messages received by the programmable switch and aiming at the last transaction processing stage is equal to the corresponding message number threshold value, and the type information in each first message indicates success, or if the programmable switch receives the type information in the first message of the current transaction processing stage and indicates failure, the programmable switch sends the distributed transaction processing result to the client node. Accordingly, the client node receives the distributed transaction processing result sent by the programmable switch after the last transaction processing phase is completed or when the type information in the first message of the current transaction processing phase indicates failure.
In this embodiment, the specific implementation process of S507 may refer to the related description of the embodiment shown in fig. 2, and is not described herein again.
Optionally, the programmable switch includes a plurality of switching processing units, and at least one of the plurality of switching processing units is respectively configured to receive a first message sent by at least one service node participating in the current transaction processing stage.
In this embodiment, the physical port of the programmable switch is statically divided into a plurality of different computing units, the computing units are switching processing units, and the plurality of computing units collectively complete processing of different transaction processing stages of distributed transactions across different physical port groups. Multiple computing units processing in parallel byThe programmable switch internal mechanism communication can avoid single-point bottleneck. Fig. 6 is a schematic diagram of a plurality of switch processing units of a programmable switch according to an embodiment of the present application. As shown in fig. 6, a plurality of physical ports are mapped to different switching processing units, which may also be referred to as computing units, and each computing unit is composed of an Ingress (Ingress) and an Egress (Egress). Network messages processed by Ingress can be forwarded to Egress of other computing units, thereby completing communication tasks of different physical ports. The network message completed by the Egress processing may be retransmitted to the Ingress, thereby completing the loop processing of the network packet. To slave computing unit 1 For example, a transaction initiated by a client node, a distributed transaction requires other computing units (e.g., a computing unit) N-1 Computing unit N ) The messages of the service node of each other computing unit can directly reach the computing unit 1 By the computing unit 1 The Egress receives a first message sent by at least one service node participating in the current transaction processing stage, and sends the first message to the computing unit through retransmission 1 Is located in the service node (computing unit) of the same computing unit 1 ) Receiving a first message sent by at least one service node participating in a current transaction processing stage and sending the first message to a computing unit 1 Ingress, calculation unit 1 Aggregate of Ingress from the compute unit 1 And a first message sent by the service node and from the computing unit 1 The first message retransmitted by the Egress is processed in the corresponding transaction processing stage, and the second message or the third message passes through the computing unit 1 The Ingress in (a) is forwarded to the Egress of the corresponding computing unit according to the identifier of the target node, and the specific processing mode is as shown in S504 or S505. By fully utilizing the processing capacity of a plurality of computing units, message transmission among different computing units is reduced by completing message aggregation operation in advance inside each computing unit.
The method and the device can make full use of the storage capacity and the programmable capacity of the programmable switch, and the programmable switch is used for processing the distributed transactions, and the plurality of switching processing units of the programmable switch process the distributed transactions in parallel, so that the performance of the distributed transaction processing can be greatly improved, the time delay of the distributed transaction processing can be shortened, the probability of conflict among the transactions can be reduced, and the throughput of the whole system can be improved. In the process of distributed transaction processing, the correctness and consistency of the distributed transaction processing are ensured by rolling back the transaction processing stage. In addition, the network interaction between the client and the server is reduced, so that the CPU resource utilization rate of the client is improved.
On the basis of the above embodiment, network messages of the commit process of different distributed transactions can be given different priorities, and processing can be scheduled according to the priorities in the programmable switch and the service node. The programmable switch sets different processing queues for different priorities, and preferentially processes the messages with high priority. And the service node processes the messages with high priority preferentially after sequencing the batch network requests simultaneously received according to the network priority. Specifically, distributed transactions initiated by different client nodes perform operations on the same data, and when the distributed transactions are submitted, by priority scheduling in the programmable switch and the service node, the critical path can be made as short as possible, the critical path includes, for example, a lock holding critical path, for a lock holding operation in a lock holding phase to a lock releasing operation in a rollback transaction processing phase or a data writing phase (e.g., a critical path from a lock holding operation in a lock holding phase to a lock releasing operation in a data writing phase of the service node 2 in fig. 3), the critical path further includes, for example, a data version valid critical path, for a version checking operation from read data in the execution process to a version checking phase in the distributed transaction submitting process (e.g., a critical path of the service node 3 in fig. 3), and therefore, a network request for ending the critical path has a higher priority, the order of network request priority is from high to low: the method comprises the steps of firstly, network requests for releasing locks, secondly, network requests for version checking, thirdly, network requests for reading data and fourthly, network requests for holding locks.
Based on the foregoing embodiments, fig. 7 is a schematic diagram of internal processing logic of a programmable switch according to an embodiment of the present application. As shown in fig. 7, the filtering message completes forwarding of other network requests for the programmable switch, so as to ensure that normal forwarding of other network requests in the network is not affected during the commit process of the distributed transaction. The packet loss processing is that the programmable switch firstly judges whether the state of the distributed transaction is legal or not through the ID of the network message (i.e. the first message), and is used for processing the conditions of network packet loss and network disorder, and the specific judgment logic is as follows: if the ID of the network message is different from the ID recorded in the programmable switch, the current network message is discarded. If the programmable switch judges whether the state of the current distributed transaction starts the transaction processing stage, if the current distributed transaction is in the transaction processing stage, network messages sent by other service nodes of the transaction are discarded, and repeated rollback is avoided; if the programmable switch meets the judgment condition for the next transaction processing stage in S204, the programmable switch enables the participating service node in the next stage to perform the processing of the next transaction processing stage in a broadcasting manner. And the priority scheduling is that the programmable switch completes the priority scheduling processing of the network message in the submission process of the distributed transaction through a priority queue in the programmable switch. Broadcast is a broadcast operation in the network and unicast is a unicast operation in the network. The forwarding table is used for completing the basic function of network forwarding of the programmable switch.
On the basis of the above embodiment, a tree structure can be constructed by selecting a part of the programmable switches from a plurality of programmable switches. The service nodes and the client nodes participating in the distributed transaction processing can perform network communication through the programmable switch with the tree structure, and each switch completes the related processing of the distributed transaction in parallel, so that the performance of the distributed transaction processing is improved. For example: fig. 8 is a schematic diagram of a plurality of programmable switches participating in a transaction commit process in parallel according to an embodiment of the present application. As shown in fig. 8, a group of programmable switches are selected from the programmable switches to form a tree structure, the tree structure can connect all service nodes and client nodes participating in the current distributed transaction processing, that is, the programmable switch tree completes the commit process of the current distributed transaction, and the programmable switch at the highest layer in the tree structure is used as the tree nodeA root node of the construct. Taking the data writing phase in the distributed transaction submitting process as an example, as shown in fig. 8, the service nodes where three write sets are located and the programmable switch S 1 Directly connected to a service node where a write set is located and to a programmable switch S 2 Directly connected, client node and programmable switch S 3 Directly connected, programmable switch S 1 、S 2 、S 3 And S 0 Are directly connected. S 0 、S 1 、S 2 、S 3 Collectively forming a set of programmable switch tree structures for completing commitment of distributed transactions, wherein S 0 Is the root node of the tree structure. And a programmable switch S 1 The three service nodes which are directly connected complete the data writing phase of the transaction and send the successful data writing information to the programmable exchanger S 1 Programmable switch S 1 Waiting for all three service nodes to send messages, and sending the last message of successful data writing to the programmable exchanger S 0 And so on, programmable switch S 2 Sending the message of the service node directly connected with the service node to S 0 . Programmable switch S 0 Wait for S 1 And S 2 When S is 0 Receive S 1 And S 2 The write data phase of the distributed transaction is successful, the programmable switch S 0 Passing the received message that the last write data phase is successful through S 3 To the client node.
Based on the above embodiments, the programmable switch may recycle limited storage resources to serve subsequent distributed transactions for different distributed transactions and different transaction processing phases of the same distributed transaction. Specifically, in the process of distributed transaction processing, the lock holding phase, the version check phase, the data writing phase, and the rollback transaction processing phase in which the commit fails are abstracted into the same operation, that is, the processing corresponding to S204 and S205, and the same state machine is repeatedly used for the same operation, so that the storage resources in the programmable switch are fully utilized. Different distributed transactions represent the storage space in the programmable switch through the low bit of the ID in the network message, and the storage space is repeatedly utilized by different distributed transactions, so that the condition that a plurality of distributed transactions share the same storage space at the same time is ensured, and the correctness is ensured.
Fig. 9 is a schematic structural diagram of a distributed transaction processing apparatus based on a programmable switch according to an embodiment of the present application, and as shown in fig. 9, the distributed transaction processing apparatus 900 based on a programmable switch according to this embodiment is applied to a distributed transaction processing system, where the distributed transaction processing system includes a programmable switch, a client node, and a plurality of service nodes, and the distributed transaction processing apparatus 900 based on a programmable switch is included in a programmable switch. The programmable switch-based distributed transaction processing apparatus 900 of the present embodiment includes: a receiving module 901 and a sending module 902.
A receiving module 901, configured to receive a first message sent by at least one service node of a distributed transaction participating in a current transaction processing stage, where the current transaction processing stage is one of multiple transaction processing stages processed in sequence in the distributed transaction, and the first message includes an identifier of the distributed transaction, a message number threshold, type information used for indicating that a processing result of the current transaction processing stage is successful or failed, and an identifier of a target node.
A sending module 902, configured to send, if the receiving module 901 receives that the number of first messages for a non-last transaction stage is equal to a message number threshold, and the type information in each first message indicates success, and an identifier of a target node in the first message is an identifier of at least one service node participating in a next transaction stage, a second message to the at least one service node participating in the next transaction stage according to the identifier of the at least one service node participating in the next transaction stage, where the second message is used to indicate that the next transaction stage is performed; and if the number of the first messages received by the receiving module 901 for the last transaction processing stage is equal to the corresponding message number threshold and the type information in each first message indicates success, or if the receiving module 901 receives the type information in the first message of the current transaction processing stage and indicates failure, sending a distributed transaction processing result to the client node.
Based on any of the above-described embodiments, if the current transaction processing stage is a last transaction processing stage of a plurality of sequentially processed transaction processing stages, the identifier of the target node in the first message is an identifier of the client node.
The sending module 902 is specifically configured to:
and sending the distributed transaction processing result to the client node according to the identification of the client node included in the first message.
On the basis of any of the above illustrated embodiments, the sending module 902 is further configured to:
if the type information in the first message received by the receiving module 901 indicates a failure and the identifier of the target node in the first message is an identifier of at least one service node participating in the rollback transaction processing stage, a third message is sent to the at least one service node participating in the rollback transaction processing stage, and the third message is used to indicate to perform the rollback transaction processing stage.
On the basis of any one of the above-mentioned embodiments, the plurality of transaction processing phases processed in sequence are a lock holding phase, a version checking phase and a data writing phase.
On the basis of any of the above-described embodiments, the programmable switch includes a plurality of switch processing units, and each switch processing unit includes a programmable switch-based distributed transaction processing apparatus.
The apparatus of this embodiment may be configured to implement the scheme of the programmable switch in any of the method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 10 is a schematic structural diagram of a distributed transaction processing apparatus based on a programmable switch according to another embodiment of the present application, and as shown in fig. 10, the distributed transaction processing apparatus 1000 based on a programmable switch according to this embodiment is applied to a distributed transaction processing system, where the distributed transaction processing system includes a programmable switch, a client node, and a plurality of service nodes, and the distributed transaction processing apparatus 1000 based on a programmable switch is included in the client node. The programmable switch-based distributed transaction processing apparatus 1000 of the present embodiment includes: a sending module 1001 and a receiving module 1002.
A sending module 1001, configured to send a fourth message to each service node, where the fourth message includes an identifier of a distributed transaction, identifiers of multiple transaction processing stages in the distributed transaction, and an identifier of at least one service node participating in each transaction processing stage, and the fourth message is further used to indicate a start of a first transaction processing stage.
A receiving module 1002, configured to receive a distributed transaction processing result sent by the programmable switch after the last transaction processing stage is completed or when the type information in the first message in the current transaction processing stage indicates a failure.
On the basis of any of the above-described embodiments, the fourth message is further used to indicate at least one service node that needs to perform a rollback transaction phase after the processing result of each transaction phase is a failure.
The apparatus of this embodiment may be configured to execute the scheme of the client node in any of the method embodiments, where the implementation principle and the technical effect are similar, and are not described herein again.
Fig. 11 is a schematic structural diagram of a distributed transaction apparatus based on a programmable switch according to another embodiment of the present application, and as shown in fig. 11, the distributed transaction apparatus 1100 based on a programmable switch according to this embodiment is applied to a distributed transaction system, where the distributed transaction system includes a programmable switch, a client node, and a plurality of service nodes, and the distributed transaction apparatus 1100 based on a programmable switch is included in the service nodes. The programmable switch-based distributed transaction apparatus 1100 of this embodiment includes: a receiving module 1101, a processing module 1102, and a sending module 1103.
A receiving module 1101, configured to receive a fourth message sent by a client node, where the fourth message includes an identifier of a distributed transaction, an identifier of multiple sequentially processed transaction processing phases in the distributed transaction, an identifier of at least one service node participating in each transaction processing phase, and a message number threshold corresponding to each transaction processing phase, and the fourth message is further used to indicate a first transaction processing phase of start processing.
The processing module 1102 is configured to sequentially process a current transaction processing stage according to the fourth message, where the current transaction processing stage is one of multiple sequentially processed transaction processing stages in the distributed transaction.
A sending module 1103, configured to send a first message to the programmable switch, where the first message includes an identifier of the distributed transaction, a threshold of the number of messages, type information used to indicate that a processing result in a current transaction processing stage is successful or failed, and an identifier of the target node.
And when the current transaction processing stage is a non-last transaction processing stage and the type information in the first message indicates success, the identifier of the target node is the identifier of at least one service node participating in the next transaction processing stage.
The identification of the target node is the identification of the client node when the current transaction phase is the last transaction phase and the type information in the first message indicates success.
On the basis of any of the above illustrated embodiments, the receiving module 1101 is further configured to:
after the sending module 1103 sends the first message to the programmable switch, a second message sent by the programmable switch is received, where the second message is used to instruct a next transaction processing stage to be performed.
The processing module 1102 is further configured to process a next transaction processing stage.
On the basis of any of the above-described embodiments, the fourth message is further used to indicate at least one service node that needs to perform a rollback transaction phase after the processing result of each transaction phase is a failure.
The identification of the target node is the identification of at least one serving node participating in the rollback transaction phase when the type information in the first message indicates a failure.
On the basis of any of the above illustrated embodiments, the receiving module 1101 is further configured to:
and receiving a third message sent by the programmable switch, wherein the third message is used for indicating that the rollback transaction processing stage is performed.
The processing module 1102 is further configured to process a rollback transaction processing phase.
The apparatus of this embodiment may be configured to execute the scheme of the service node in any of the method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 12 is a schematic structural diagram of a programmable switch-based distributed transaction processing apparatus according to another embodiment of the present application. As shown in fig. 12, the programmable switch-based distributed transaction apparatus 1200 of the present embodiment is applied to a distributed transaction processing system, the distributed transaction processing system includes a programmable switch, a client node, and a plurality of service nodes, and the programmable switch-based distributed transaction apparatus 1200 is included in the programmable switch. The programmable switch-based distributed transaction processing apparatus 1200 of the present embodiment includes: a memory 1201 and a processor 1202. The memory 1201 and the processor 1202 are connected by a bus.
The memory 1201 is used to store program instructions.
The processor 1202 is configured to invoke the execution of program instructions in memory:
receiving a first message sent by at least one service node of a distributed transaction participating in a current transaction processing stage, wherein the current transaction processing stage is one transaction processing stage of a plurality of transaction processing stages processed in sequence in the distributed transaction, and the first message comprises a distributed transaction identifier, a message number threshold, type information used for indicating that a processing result of the current transaction processing stage is successful or failed, and a target node identifier; if the processor 1202 receives that the number of the first messages aiming at the non-last transaction processing stage is equal to the message number threshold, and the type information in each first message indicates success, and the identifier of the target node in the first message is the identifier of at least one service node participating in the next transaction processing stage, sending a second message to the at least one service node participating in the next transaction processing stage according to the identifier of the at least one service node participating in the next transaction processing stage, wherein the second message is used for indicating the next transaction processing stage; and if the number of the first messages received by the processor 1202 for the last transaction processing stage is equal to the corresponding message number threshold and the type information in each first message indicates success, or if the processor 1202 receives the type information in the first message of the current transaction processing stage and indicates failure, sending a distributed transaction processing result to the client node.
Based on any of the above-described embodiments, if the current transaction processing stage is a last transaction processing stage of a plurality of sequentially processed transaction processing stages, the identifier of the target node in the first message is an identifier of the client node.
The processor 1202 is specifically configured to:
and sending the distributed transaction processing result to the client node according to the identification of the client node included in the first message.
On the basis of any of the illustrated embodiments described above, the processor 1202 is further configured to:
if the type information in the first message received by the processor 1202 indicates a failure and the identifier of the target node in the first message is the identifier of the at least one service node participating in the rollback transaction processing phase, a third message is sent to the at least one service node participating in the rollback transaction processing phase, and the third message is used for indicating to perform the rollback transaction processing phase.
On the basis of any one of the above-described embodiments, the multiple transaction processing phases processed in sequence are a lock holding phase, a version checking phase, and a data writing phase.
On the basis of any of the above-described embodiments, the programmable switch includes a plurality of switch processing units, and each switch processing unit includes a programmable switch-based distributed transaction processing apparatus.
The apparatus of this embodiment may be configured to implement the scheme of the programmable switch in any of the method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 13 is a schematic structural diagram of a programmable switch-based distributed transaction processing apparatus according to another embodiment of the present application. As shown in fig. 13, the programmable switch-based distributed transaction apparatus 1300 of the present embodiment is applied to a distributed transaction processing system, the distributed transaction processing system includes a programmable switch, a client node, and a plurality of service nodes, and the programmable switch-based distributed transaction apparatus 1300 is included in the client node. The programmable switch-based distributed transaction processing apparatus 1300 of the present embodiment includes: memory 1301 and processor 1302. The memory 1301 and the processor 1302 are connected by a bus.
The memory 1301 is used to store program instructions.
Processor 1302 is configured to invoke execution of program instructions in memory:
sending a fourth message to each service node, wherein the fourth message comprises an identifier of a distributed transaction, identifiers of a plurality of transaction processing stages processed in sequence in the distributed transaction and an identifier of at least one service node participating in each transaction processing stage, and the fourth message is also used for indicating the start of the first transaction processing stage; and receiving a distributed transaction processing result sent by the programmable switch after the processing of the last transaction processing stage is completed or when the type information in the first message of the current transaction processing stage indicates failure.
On the basis of any of the above-described embodiments, the fourth message is further used to indicate at least one service node that needs to perform a rollback transaction phase after the processing result of each transaction phase is a failure.
The apparatus of this embodiment may be configured to execute the scheme of the client node in any of the method embodiments, where the implementation principle and the technical effect are similar, and are not described herein again.
Fig. 14 is a schematic structural diagram of a programmable switch-based distributed transaction processing apparatus according to another embodiment of the present application. As shown in fig. 14, the programmable switch-based distributed transaction processing apparatus 1400 of the present embodiment is applied to a distributed transaction processing system, the distributed transaction processing system includes a programmable switch, a client node, and a plurality of service nodes, and the programmable switch-based distributed transaction processing apparatus 1400 is included in the service nodes. The programmable switch-based distributed transaction processing apparatus 1400 of the present embodiment includes: a memory 1401, and a processor 1402. The memory 1401 and the processor 1402 are connected by a bus.
The memory 1401 is used to store program instructions.
Processor 1402 is operable to invoke execution of program instructions in memory:
receiving a fourth message sent by the client node, wherein the fourth message comprises an identifier of a distributed transaction, identifiers of a plurality of transaction processing stages processed in sequence in the distributed transaction, an identifier of at least one service node participating in each transaction processing stage, and a message number threshold corresponding to each transaction processing stage, and is further used for indicating the start of the first transaction processing stage; processing the current transaction processing stage in sequence according to the fourth message, wherein the current transaction processing stage is one of a plurality of transaction processing stages processed in sequence in the distributed transaction; and sending a first message to the programmable switch, wherein the first message comprises the identification of the distributed transaction, a message number threshold, type information used for indicating that the processing result of the current transaction processing stage is success or failure, and the identification of the target node. When the current transaction processing stage is a non-last transaction processing stage and the type information in the first message indicates success, the identifier of the target node is an identifier of at least one service node participating in the next transaction processing stage. The identification of the target node is the identification of the client node when the current transaction phase is the last transaction phase and the type information in the first message indicates success.
On the basis of any of the illustrated embodiments described above, the processor 1402 is further configured to:
after the processor 1402 sends the first message to the programmable switch, a second message sent by the programmable switch is received, the second message indicating that a next transaction phase is to be performed.
The processor 1402 is also used to process the next transaction processing phase.
On the basis of any of the above-described embodiments, the fourth message is further used to indicate at least one service node that needs to perform a rollback transaction phase after the processing result of each transaction phase is a failure.
The identification of the target node is the identification of at least one serving node participating in the rollback transaction phase when the type information in the first message indicates a failure.
On the basis of any of the illustrated embodiments described above, the processor 1402 is further configured to:
and receiving a third message sent by the programmable switch, wherein the third message is used for indicating that the rollback transaction processing stage is performed.
Processor 1402 is also configured to process a rollback transaction processing phase.
The apparatus of this embodiment may be configured to execute the scheme of the service node in any of the method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 15 is a schematic diagram of a distributed transaction processing system based on a programmable switch according to an embodiment of the present application, and as shown in fig. 15, the distributed transaction processing system based on a programmable switch 1500 includes a programmable switch 1501, a client node 1502, and a plurality of service nodes 1503. The programmable switch 1501 may adopt the structure of the apparatus embodiment in fig. 9 or fig. 12, and accordingly, may execute the technical solution in the embodiment in fig. 2 or fig. 5, and its implementation principle and technical effect are similar, and are not described herein again. The client node 1502 may adopt the structure of the embodiment of the apparatus in fig. 10 or fig. 13, and accordingly, may execute the technical solution in the embodiment of fig. 2 or fig. 5, which implements similar principles and technical effects, and is not described herein again. The service node 1503 may adopt the structure of the embodiment of the apparatus in fig. 11 or fig. 14, and accordingly, may execute the technical solution in the embodiment of fig. 2 or fig. 5, which has similar implementation principle and technical effect, and is not described herein again.
It should be noted that one or more programmable switches in fig. 15 may be provided. If there are multiple programmable switches, the multiple programmable switches form a tree structure, and the schemes of the programmable switches in the above embodiments are completed together.
Fig. 16 is a schematic structural diagram of a programmable switch-based distributed transaction processing apparatus according to another embodiment of the present application. As shown in fig. 16, for example, programmable switch-based distributed transaction device 1600 can be provided as a server or computer. Referring to fig. 16, a programmable switch-based distributed transaction device 1600 includes a processing component 1601 that further includes one or more processors and memory resources, represented by memory 1602, for storing instructions, such as applications, that are executable by the processing component 1601. The application programs stored in memory 1602 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1601 is configured to execute instructions to perform aspects of a client node or a service node or a programmable switch in any of the method embodiments described above.
The programmable switch-based distributed transaction apparatus 1600 may also include a power component 1603 configured to perform power management of the programmable switch-based distributed transaction apparatus 1600, a wired or wireless network interface 1604 configured to connect the programmable switch-based distributed transaction apparatus 1600 to a network, and an input output (I/O) interface 1605. The programmable switch-based distributed transaction device 1600 may operate based on an operating system stored in memory 1602, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
The present application also provides a computer program product comprising a computer program which, when executed by a processor, implements aspects of the programmable switch-based distributed transaction processing method as described above.
The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the processor executes the computer-executable instructions, the solution of the distributed transaction processing method based on the programmable switch is implemented.
The computer-readable storage medium may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk. Readable storage media can be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary readable storage medium is coupled to the processor such the processor can read information from, and write information to, the readable storage medium. Of course, the readable storage medium may also be an integral part of the processor. The processor and the readable storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the readable storage medium may reside as discrete components in a programmable switch-based distributed transaction apparatus.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (18)

1. A distributed transaction processing method based on a programmable switch is applied to a distributed transaction processing system, the distributed transaction processing system comprises the programmable switch, a client node and a plurality of service nodes, and the method comprises the following steps:
the programmable switch receives a first message sent by at least one service node of a distributed transaction participating in a current transaction processing stage, wherein the current transaction processing stage is one transaction processing stage of a plurality of transaction processing stages processed in sequence in the distributed transaction, and the first message comprises an identifier of the distributed transaction, a message number threshold, type information for indicating that a processing result of the current transaction processing stage is successful or failed, and an identifier of a target node;
if the programmable switch receives that the number of the first messages aiming at the non-last transaction processing stage is equal to the message number threshold, and the type information in each first message indicates success, and the identification of the target node in each first message is the identification of at least one service node participating in the next transaction processing stage, the programmable switch sends a second message to the at least one service node participating in the next transaction processing stage according to the identification of the at least one service node participating in the next transaction processing stage, wherein the second message is used for indicating the next transaction processing stage;
and if the number of the first messages received by the programmable switch and aiming at the last transaction processing stage is equal to the corresponding message number threshold value and the type information in each first message indicates success, or if the programmable switch receives the type information in the first message of the current transaction processing stage and indicates failure, the programmable switch sends a distributed transaction processing result to the client node.
2. The method of claim 1, wherein the identifier of the target node in the first message is the identifier of the client node if the current transaction stage is a last transaction stage of a plurality of sequentially processed transaction stages;
the programmable switch sending a distributed transaction result to the client node, comprising:
and the programmable switch sends a distributed transaction processing result to the client node according to the identification of the client node included in the first message.
3. The method of claim 2, further comprising:
if the type information in the first message received by the programmable switch indicates failure, and the identifier of the target node in the first message is the identifier of at least one service node participating in the rollback transaction processing phase, the programmable switch sends a third message to the at least one service node participating in the rollback transaction processing phase, where the third message is used to indicate the rollback transaction processing phase.
4. The method of claim 1, wherein the plurality of sequentially processed transaction processing phases are a lock holding phase, a version check phase, and a write data phase.
5. The method according to any of claims 1-4, wherein the programmable switch comprises a plurality of switching processing units, and at least one of the plurality of switching processing units is configured to receive the first message sent by at least one service node participating in the current transaction processing stage.
6. A distributed transaction processing method based on a programmable switch is applied to a distributed transaction processing system, the distributed transaction processing system comprises the programmable switch, a client node and a plurality of service nodes, and the method comprises the following steps:
the client node sends a fourth message to each service node, the fourth message includes an identifier of a distributed transaction, identifiers of a plurality of transaction processing stages processed in sequence in the distributed transaction, an identifier of at least one service node participating in each transaction processing stage, and a message number threshold corresponding to each transaction processing stage, and the fourth message is further used for indicating that a first transaction processing stage of processing is started;
and the client node receives the distributed transaction processing result sent by the programmable switch after the last transaction processing stage is completed or when the type information in the first message of the current transaction processing stage indicates failure.
7. The method of claim 6, wherein the fourth message is further used to indicate at least one service node that needs to perform a rollback transaction phase after the processing result of each of the transaction phases is a failure.
8. A distributed transaction processing method based on a programmable switch is applied to a distributed transaction processing system, the distributed transaction processing system comprises the programmable switch, a client node and a plurality of service nodes, and the method comprises the following steps:
the service node receives a fourth message sent by the client node, where the fourth message includes an identifier of a distributed transaction, identifiers of multiple transaction processing stages processed in sequence in the distributed transaction, an identifier of at least one service node participating in each transaction processing stage, and a message number threshold corresponding to each transaction processing stage, and the fourth message is further used to indicate that a first transaction processing stage of processing is started;
the service node sequentially processes a current transaction processing stage according to a fourth message and sends a first message to the programmable switch, wherein the current transaction processing stage is one of a plurality of sequentially processed transaction processing stages in the distributed transaction, and the first message comprises an identifier of the distributed transaction, a message number threshold, type information for indicating that a processing result of the current transaction processing stage is successful or failed, and an identifier of a target node;
when the current transaction processing stage is a non-last transaction processing stage and the type information in the first message indicates success, the identifier of the target node is an identifier of at least one service node participating in a next transaction processing stage;
and when the current transaction processing stage is the last transaction processing stage and the type information in the first message indicates success, the identifier of the target node is the identifier of the client node.
9. The method of claim 8, wherein after sending the first message to the programmable switch, further comprising:
the service node receives a second message sent by the programmable switch, wherein the second message is used for indicating the next transaction processing stage;
the service node processes the next transaction processing phase.
10. The method of claim 8, further comprising:
the service node receives a third message sent by the programmable switch, wherein the third message is used for indicating a rollback transaction processing stage;
the service node processes the rollback transaction processing phase.
11. A programmable switch-based distributed transaction apparatus employing a distributed transaction system comprising a programmable switch, a client node, a plurality of service nodes, said distributed transaction apparatus being included in said programmable switch, said apparatus comprising:
a receiving module, configured to receive a first message sent by at least one service node of a distributed transaction, where the service node participates in a current transaction processing stage, the current transaction processing stage is one of multiple transaction processing stages processed in sequence in the distributed transaction, and the first message includes an identifier of the distributed transaction, a message number threshold, type information used for indicating that a processing result of the current transaction processing stage is successful or failed, and an identifier of a target node;
a sending module, configured to send a second message to at least one service node participating in a next transaction processing stage according to an identifier of the at least one service node participating in the next transaction processing stage if the receiving module receives that the number of the first messages for a non-last transaction processing stage is equal to the message number threshold, and the type information in each first message indicates success, and the identifier of the target node in the first message is an identifier of the at least one service node participating in the next transaction processing stage, where the second message is used to indicate to perform the next transaction processing stage; and if the number of the first messages received by the receiving module aiming at the last transaction processing stage is equal to the corresponding message number threshold value and the type information in each first message indicates success, or if the type information in the first messages received by the receiving module in the current transaction processing stage indicates failure, sending a distributed transaction processing result to the client node.
12. A distributed transaction processing apparatus based on a programmable switch, applied to a distributed transaction processing system, the distributed transaction processing system including a programmable switch, a client node, and a plurality of service nodes, the distributed transaction processing apparatus being included in the client node, the apparatus comprising:
a sending module, configured to send a fourth message to each service node, where the fourth message includes an identifier of a distributed transaction, identifiers of multiple transaction processing stages in the distributed transaction, and an identifier of at least one service node participating in each transaction processing stage, and the fourth message is further used to indicate a start of a first transaction processing stage;
a receiving module, configured to receive a distributed transaction processing result sent by the programmable switch after the last transaction processing stage is completed or when the type information in the first message in the current transaction processing stage indicates failure.
13. A distributed transaction processing apparatus based on a programmable switch, applied to a distributed transaction processing system, the distributed transaction processing system including a programmable switch, a client node, and a plurality of service nodes, the distributed transaction processing apparatus being included in the service nodes, the apparatus comprising:
a receiving module, configured to receive a fourth message sent by the client node, where the fourth message includes an identifier of a distributed transaction, identifiers of multiple transaction processing stages that are processed sequentially in the distributed transaction, an identifier of at least one service node that participates in each transaction processing stage, and a message number threshold corresponding to each transaction processing stage, and the fourth message is further used to indicate that a first transaction processing stage of processing is started;
the processing module is used for sequentially processing a current transaction processing stage according to a fourth message, wherein the current transaction processing stage is one of a plurality of sequentially processed transaction processing stages in the distributed transaction;
a sending module, configured to send a first message to the programmable switch, where the first message includes an identifier of the distributed transaction, a threshold of the number of messages, type information used to indicate that a processing result of the current transaction processing stage is successful or failed, and an identifier of a target node;
when the current transaction processing stage is a non-last transaction processing stage and the type information in the first message indicates success, the identifier of the target node is an identifier of at least one service node participating in a next transaction processing stage;
and when the current transaction processing stage is the last transaction processing stage and the type information in the first message indicates success, the identifier of the target node is the identifier of the client node.
14. A programmable switch-based distributed transaction processing apparatus, comprising: a memory and a processor;
the memory is to store program instructions;
the processor is configured to invoke program instructions in the memory to perform the method of any of claims 1-5 or the method of claim 6 or 7 or the method of any of claims 8-10.
15. A distributed transaction processing system based on programmable switch comprises a programmable switch, a client node, a plurality of service nodes;
wherein the programmable switch is configured to perform the method of any of claims 1-5, the client node is configured to perform the method of claim 6 or 7, and the plurality of service nodes are configured to perform the method of any of claims 8-10.
16. The system according to claim 15, wherein said programmable switch is a plurality of programmable switches, a plurality of said programmable switches forming a tree structure for performing the method according to any one of claims 1-5.
17. A computer-readable storage medium, characterized in that computer program instructions are stored therein, which computer program instructions, when executed, implement the method of any of claims 1-5 or the method of claim 6 or 7 or the method of any of claims 8-10.
18. A computer program product comprising a computer program, characterized in that the computer program realizes the method according to any of claims 1-5 or the method according to claim 6 or 7 or the method according to any of claims 8-10 when executed by a processor.
CN202110075634.3A 2021-01-20 2021-01-20 Distributed transaction processing method, device and system based on programmable switch Pending CN114860740A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110075634.3A CN114860740A (en) 2021-01-20 2021-01-20 Distributed transaction processing method, device and system based on programmable switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110075634.3A CN114860740A (en) 2021-01-20 2021-01-20 Distributed transaction processing method, device and system based on programmable switch

Publications (1)

Publication Number Publication Date
CN114860740A true CN114860740A (en) 2022-08-05

Family

ID=82623350

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110075634.3A Pending CN114860740A (en) 2021-01-20 2021-01-20 Distributed transaction processing method, device and system based on programmable switch

Country Status (1)

Country Link
CN (1) CN114860740A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115576969A (en) * 2022-12-07 2023-01-06 北京奥星贝斯科技有限公司 Method, device, medium and equipment for executing database tasks in parallel

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115576969A (en) * 2022-12-07 2023-01-06 北京奥星贝斯科技有限公司 Method, device, medium and equipment for executing database tasks in parallel
CN115576969B (en) * 2022-12-07 2023-03-10 北京奥星贝斯科技有限公司 Method, device, medium and equipment for executing database tasks in parallel

Similar Documents

Publication Publication Date Title
CN110691062B (en) Data writing method, device and equipment
AU2019201592B2 (en) Exactly-once transaction semantics for fault tolerant FPGA based transaction systems
CN109690510B (en) Multicast apparatus and method for distributing data to multiple receivers in high performance computing networks and cloud-based networks
US20140280398A1 (en) Distributed database management
US20190044875A1 (en) Communication of a large message using multiple network interface controllers
CN110708175B (en) Method for synchronizing messages in a distributed network
WO2018161881A1 (en) Structuralized data processing method, data storage medium, and computer apparatus
WO2017185615A1 (en) Method for determining service status of service processing device and scheduling device
US10212259B2 (en) Management of transmission control blocks (TCBs) supporting TCP connection requests in multiprocessing environments
CN111338806A (en) Service control method and device
CN110971702A (en) Service calling method and device, computer equipment and storage medium
CN114860740A (en) Distributed transaction processing method, device and system based on programmable switch
CN113157450B (en) Method and apparatus for executing blocks in a blockchain system
JP2014528611A (en) System and method for preventing single point bottlenecks in a transaction middleware machine environment
US20150127799A1 (en) Hierarchical distribution of control information in a massively scalable network server
CN112612855A (en) High-availability database log receiving queue, synchronization method and device
CN114301891B (en) Python-based Web service and Socket client interaction method and system
CN113268327A (en) Transaction request processing method and device and electronic equipment
CN116032498A (en) Memory area registration method, device and equipment
CN110912958A (en) HTTP connection processing method, device, equipment and medium
CN114866395A (en) Multi-component distributed consistency protocol cluster heartbeat communication method and device
US9509780B2 (en) Information processing system and control method of information processing system
US11263184B1 (en) Partition splitting in a distributed database
CN113641604A (en) Data transmission method and system
US20220327526A1 (en) Method for enabling efficient evaluation of transactions in a distributed ledger network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination