CN112507033B - Multi-master service cluster access method and device based on block chain and electronic equipment - Google Patents

Multi-master service cluster access method and device based on block chain and electronic equipment Download PDF

Info

Publication number
CN112507033B
CN112507033B CN202110169258.4A CN202110169258A CN112507033B CN 112507033 B CN112507033 B CN 112507033B CN 202110169258 A CN202110169258 A CN 202110169258A CN 112507033 B CN112507033 B CN 112507033B
Authority
CN
China
Prior art keywords
request
operation request
node
transaction
connection
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.)
Active
Application number
CN202110169258.4A
Other languages
Chinese (zh)
Other versions
CN112507033A (en
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.)
Beijing Holographic Zhixin Technology Co ltd
Original Assignee
Beijing Holographic Zhixin Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Holographic Zhixin Technology Co ltd filed Critical Beijing Holographic Zhixin Technology Co ltd
Priority to CN202110169258.4A priority Critical patent/CN112507033B/en
Publication of CN112507033A publication Critical patent/CN112507033A/en
Application granted granted Critical
Publication of CN112507033B publication Critical patent/CN112507033B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a block chain-based multi-master service cluster access method, a device and electronic equipment, based on multi-party consensus and strong consistency of a block chain without block rollback and with transaction only executed once at the same node, each service instance is linked up through a multi-active access service module (intelligent contract), and write operation is separated from other operations through a multi-active access agent module, and all write operations are triggered through the block chain and automatically synchronized and strongly consistent to completely avoid the problem of synchronous modification while connection/closing, transaction starting/ending and read operation are executed at high speed through network direct connection, thereby supporting the realization of ultra-large-scale multi-master cluster access. The method of the invention can be used for realizing the ultra-large scale multi-master database cluster and can also be used for the non-database ultra-large scale multi-master cluster.

Description

Multi-master service cluster access method and device based on block chain and electronic equipment
Technical Field
The invention relates to the field of super-large-scale multi-activity database clusters, in particular to the technical field of multi-activity multi-master super-large-scale database clusters for realizing application level synchronization based on block chains.
Background
The existing database cluster is divided into a master-slave (master-slave) mode or a multi-master (multi-master) mode. In the master-slave mode, a write is performed at the master server (master), and a read is performed at the master server or the slave server (slave). The slave server realizes the synchronization of the data of the master server by reading and synchronizing the log of the master server. In the multi-master mode, the database cluster avoids the problem of simultaneous modification (or synchronous modification solution) through mutual synchronization of logs of servers in the cluster and through mechanisms such as a synchronous lock.
The multi-master database cluster mechanism is deeply coupled with the implementation processes inside the respective databases of various manufacturers, has high complexity and high bandwidth requirements, so that small-scale clusters (typically two clusters) are usually deployed in a local area network or high-speed connection environment. In addition, the existing database multi-master scheme realizes multi-master on the 'data' level. When the database is down or recovered, the influence of the application level is difficult to know and correspond.
Platform environments in the digital era are becoming huge, and large-quantity multi-master database clusters across data centers are increasingly required to be deployed so as to meet the requirements of platforms on concurrent data access (reading, writing and transaction). How to realize ultra-large scale, cross-data center (even wide area) multi-master database clusters is a great challenge to database platforms in the digital era.
Disclosure of Invention
In order to solve at least one of the above technical problems, the present invention provides a block chain based multi-master service cluster access method, apparatus, electronic device and readable storage medium.
In a first aspect of the present invention, a block chain-based multi-master service cluster access method is provided, including:
a first node receives an operation request for a service instance;
when the first node confirms that the operation request is a write operation request, issuing the write operation request to a blockchain network;
when the block is generated or verified, the block chain network sequentially selects write operation requests from a write operation request sequence contained in the block, and calls a second node corresponding to the current write operation request to process the current write operation request in a service instance; the blockchain network is a non-rollback blockchain network and performs only one transaction at a single network node.
Specifically, invoking the second node to process the write operation request sequence at the service instance includes:
and calling a second node to process the write operation request sequence at the service instance according to a calling mechanism of the blockchain client to the intelligent contract.
Optionally, the method further comprises:
when the first node confirms that the operation request is a read operation request, forwarding the read operation request to the second node; wherein the second node processes the read operation request at the service instance.
Optionally, the method further comprises:
when the first node confirms that the operation request is a request for establishing connection or terminating connection, forwarding the request for establishing connection or terminating connection to the second node; wherein the second node processes the request to establish or terminate a connection at the service instance.
Optionally, the method further comprises:
when the first node confirms that the operation request is a request for establishing a transaction or terminating a transaction, forwarding the request for establishing the transaction or terminating the transaction to the second node; wherein the second node processes the request to establish a transaction or terminate a transaction at the service instance.
Optionally, the method further comprises:
and the first node receives a write operation result returned by the second node.
Optionally, the write operation request includes:
a connection identification that records network connections to the service instance.
In a second aspect of the present invention, there is provided a first node apparatus, including:
the request receiving module is used for receiving an operation request of the service instance;
the first request processing module is used for issuing the write operation request to the blockchain network when the operation request is confirmed to be the write operation request; when the block is generated or verified, the block chain network sequentially selects write operation requests from a write operation request sequence contained in the block, and calls a second node corresponding to the current write operation request to process the current write operation request in a service instance; the blockchain network is a non-rollback blockchain network and only executes one transaction at a single network node;
optionally, the apparatus further comprises:
the second request processing module is used for forwarding the read operation request to the second node when the operation request is confirmed to be the read operation request; wherein the second node processes the read operation request at the service instance.
Optionally, the second request processing module is further configured to forward the request for establishing a connection or terminating a connection to the second node when it is determined that the operation request is a request for establishing a connection or terminating a connection; wherein the second node processes the request to establish or terminate a connection at the service instance.
Optionally, the second request processing module is further configured to forward, when it is determined that the operation request is a request for establishing a transaction or terminating a transaction, the request for establishing a transaction or terminating a transaction to the second node; wherein the second node processes the request to establish a transaction or terminate a transaction at the service instance.
In a third aspect of the invention, there is provided an electronic device comprising a memory for storing computer instructions for execution by a processor to implement the method according to the first aspect of the invention.
In a fourth aspect of the invention, there is provided a readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the method of the first aspect of the invention.
In a fifth aspect of the present invention, a block chain based multi-master cluster access system is provided, which includes a client, a service instance, a first agent and a second agent;
the first agent end is used for receiving an operation request of the client end to the service instance; when the operation request is confirmed to be a write operation request, issuing the write operation request to a blockchain network; when the block is generated or verified, the block chain network sequentially selects write operation requests from a write operation request sequence contained in the block, and calls a second node corresponding to the current write operation request to process the current write operation request in a service instance; the blockchain network is a non-rollback blockchain network and performs only one transaction at a single network node.
Optionally, the first proxy is further configured to forward the read operation request to the second proxy when it is determined that the operation request is a read operation request, and the second proxy processes the read operation request at the service instance.
Optionally, the first proxy is further configured to forward the request for establishing a connection or terminating a connection to the second proxy when it is determined that the operation request is a request for establishing a connection or terminating a connection, and the second proxy processes the request for establishing a connection or terminating a connection at the service instance.
Optionally, the first proxy end is further configured to forward, when it is determined that the operation request is a request for establishing a transaction or terminating a transaction, the request for establishing a transaction or terminating a transaction to the second proxy end, and the second proxy end processes the request for establishing a transaction or terminating a transaction at the service instance.
Optionally, the first agent is further configured to receive a write operation result returned by the second agent.
Optionally, the write operation request includes a connection identifier, and the connection identifier records a network connection to the service instance.
Optionally, the first agent is located in the device where the client is located, and/or the second agent is located in the device where the service instance is located. In addition, the first agent side and the second agent side can be independent devices.
Based on the multi-party consensus and strong consistency of a block chain without block rollback and with transactions executed only once at the same node, the invention links each service instance through a multi-active access service module (intelligent contract), separates database writing operation from other database operations through a multi-active agent module, and triggers all database writing operations through the block chain and automatically synchronizes and strongly accords to completely avoid the problem of synchronous modification while realizing database connection/closing, transaction starting/ending and reading operation through network direct connection and high-speed execution, thereby supporting the realization of ultra-large-scale multi-active database clusters. The method of the invention can be used for realizing the ultra-large scale multi-master database cluster and can also be used for the non-database ultra-large scale multi-master cluster.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the invention and together with the description serve to explain the principles of the invention.
FIG. 1 illustrates the major functional blocks involved in typical database access prior to the present invention.
FIG. 2 illustrates the major functional modules involved in database cluster access of the present invention.
FIG. 3 illustrates the flow of database access of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are for purposes of illustration only and are not to be construed as limitations of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
In addition, the embodiments of the present invention and the features of the embodiments may be combined with each other without conflict. The following detailed description will be made in conjunction with embodiments with reference to the accompanying drawings.
The invention realizes the access to the ultra-large-scale multi-main cluster sensitive to the application layer, especially to the database cluster, based on the multi-party consensus and strong consistent serialization mechanism of the block chain.
The invention introduces a multi-active access agent module at an application program end and introduces a multi-active access service module at a database end, and the two modules are communicated simultaneously by two modes: 1) direct connection through a TCP/IP network (a multi-active access agent module is used as a TCP/IP client, and a multi-active access service module is used as a TCP/IP server); 2) connected through a blockchain network (a multi-active access agent module as a blockchain client and a multi-active access service module as a blockchain intelligent contract). The multi-active access agent module intercepts all database CRUD (creating, inquiring, modifying and deleting) operations of database connection/closing, transaction starting/ending, reading and writing and the like of an application program through a database driver, forwards the database connection/closing, the transaction starting/ending and the reading operation through a TCP/IP network direct connection channel, and forwards the writing operation to the multi-active access service module through a block chain network. The multi-active access service module establishes connection with a database through database driving, and completes the establishment/closing of database connection, transaction starting/ending, reading operation and writing operation triggered from the block chain, which are received from a TCP/IP direct connection channel, through the same connection (corresponding to the connection from an application program to the database driving).
All database operations supported by the database driver are completely supported, each application program can be adapted without recompiling, and only one node in the cluster needs to be appointed when database connection is established.
In the invention, each database instance is connected with the blockchain network through the multi-active access service module (intelligent contract) to form a super-large-scale multi-master database cluster, and the deployment position of the cluster member cluster is not limited (as long as the bandwidth requirements of the blockchain network and the database write operation are met). Because all write operations are triggered by the blockchain and executed by the multi-live access service (intelligent contract) of each member node of the cluster, all write operations of the application program to the database cluster are automatically serialized and strongly consistent when the blockchain generates the blocks and the synchronous blocks, so that the problem of synchronous modification is completely avoided.
Unlike the usual blockchain scenario, the various nodes of a blockchain-based database cluster trust each other. Therefore, the consensus mechanism can be very simple, and block rollback is not needed, for example, a simple consensus mechanism in which each block chain node (i.e., database cluster member) generates blocks in a determined order and each node is a substitute for the previous node is adopted.
Firstly, the problem is solved.
As shown in fig. 1, in a multi-live database cluster deployment prior to the present invention, an application (block 100.a or 100. B) typically establishes/terminates a connection, establishes/terminates transactions, and performs database read/write operations with one database instance (blocks 102.a and 102. B) in the database cluster through database driver modules (blocks 101.a and 101. B) provided by the database vendor. In the multi-master database cluster before the invention, the synchronization and conflict resolution of the write operation among database instances in the cluster are usually realized through a complex database internal protocol. Due to the complexity of cooperation among members, a multi-master database cluster usually has only a few members, and a large-scale cluster is difficult to form. Many real-world ultra-large data access scenarios are read-based but require write synchronization to avoid dirty data. Such a small-scale database cluster obviously does not meet the requirements.
And secondly, a multi-live architecture based on block chains.
The block chain automatically realizes multi-party consensus and strong consistency among multiple parties, each database instance is linked through an intelligent contract, and write operation can be automatically realized among all instances of the database cluster to realize write operation synchronization through the mode that the write operation is triggered through the block chain and executed through the intelligent contract. As shown in fig. 2, the present invention architecturally incorporates three modules, a multi-live access agent (blocks 202.a and 202. B), a multi-live access service (blocks 204.a and 204. B), and a blockchain network without rollback (block 205).
The multi-active access proxy module is a TCP/IP network service, which intercepts the database connection establishment/termination, transaction initiation/termination, data read/write operation, etc. performed by the application (blocks 200.a and 200. B) through the database driver (blocks 201.a and 201. B), and establishes two connection channels with the local (or nearby) multi-active access service module according to the connection configuration of the user. One channel is a TCP/IP network direct channel and the other is a channel via a blockchain network. And responding to the requirement of an application program driven by a database, the multi-active access agent module forwards database connection/closing, transaction starting/ending and reading operation through a TCP/IP network direct connection channel, and forwards writing operation (in a mode of sending blockchain transaction) to the multi-active access service module through the blockchain network.
The multi-active access service module is a network agent of database service, receives and responds to a request of the multi-active access agent module directly connected through a TCP/IP network, is a block chain intelligent contract, and receives and responds to a write operation request triggered by the multi-active access agent module through a block chain network in a block chain transaction mode during block generation and verification. When the multi-active access agent module establishes a network Connection with the multi-active access service module according to the requirement of the database driver module, the multi-active access service module establishes a network Connection with the database instance (blocks 203.a and 203. B), and generates a unique identifier, i.e., a Connection-ID (Connection-ID), to bind the network Connection between the multi-active access agent module and the multi-active access service, and the network Connection between the multi-active access service and the database instance. All the write operations passing through the block chain are accompanied by the connection ID, and the multi-active access service module uses the multi-active access service corresponding to the connection ID to interact with the network connection of the database instance and the database instance when the write operations are executed. In this way, all operations in one connection initiated by the application program through the database driver, whether through the direct network connection of the multi-live access proxy and the multi-live access service or through the block chain network, are connected with the database instance through the same multi-live access service, so as to ensure that the database read-write and the database transaction operation can be accurate and error-free.
All operations supported by the database instance can be completely supported. And the whole process is transparent to the application program and the database instance, and the application program can be adapted without recompilation (as long as the TCP/IP address and the port of the database service are configured to be the address and the port of the multi-active access agent).
And thirdly, the requirement of the bottom layer of the block chain.
Traditionally, blocks of the blockchain may be rolled back or voided because of invalidation or ledger, which is not suitable for the scenario of the present invention, because write operations cannot be rolled back once they are validated in the database (transaction commit). The blockchain forming the database cluster in the invention is the blockchain which does not roll back the blocks and only executes the transaction once at the same node, and the method can be realized by a simple consensus mechanism, for example, a simple consensus mechanism that each blockchain node (namely, database cluster member) generates blocks according to a determined sequence and each node is a substitute of the previous node is adopted.
And fourthly, database access flow.
As shown in fig. 3, a typical database access flow according to the present invention is as follows:
1) the application @ a (block 300) requests the database driver @ a (block 301) to establish a database connection;
2) the database driver @ a (block 301) creates a service connection to the multi-live access agent (block 302);
3) the multi-live access proxy establishes a network connection with the multi-live access service @ B (block 304);
4) the multi-live access service @ B (block 304) establishes a network connection with the database instance @ B (block 305);
5) the multi-live access service @ B generates and returns a connection ID to the multi-live access proxy;
6) the application @ a (block 300) requests the database driver @ a (block 301) to create a transaction;
7) the database driver @ a (block 301) requests the multi-live access agent (block 302) to create a transaction;
8) the multi-live access agent requests the multi-live access service @ B (block 304) to create a transaction;
9) the multi-live access service @ B (block 304) requests the database instance @ B (block 305) to create a transaction;
10) the application @ a (block 300) requests the database driver @ a (block 301) to perform a read operation;
11) the database driver @ a (block 301) requests the multi-live access agent (block 302) to perform a read operation;
12) the multi-live access agent requests the multi-live access service @ B (block 304) for a read operation;
13) the multi-live access service @ B (block 304) requests the database instance @ B (block 305) for a read operation; returning the result to the application @ A along the original path;
14) the application @ a (block 300) requests the database driver @ a (block 301) to perform a write operation;
15) the database driver @ a (block 301) requests the multi-live access agent (block 302) to perform a write operation;
16) the multi-live access agent sends a blockchain transaction (containing the write operation and the connection ID) to the blockchain network (block 303);
17) the block chain network calls a multi-active access service to execute write operation when the blocks are generated and verified;
18) the multi-live access service @ B (block 304) requests the database instance @ B (block 305) for a write operation; the return result directly returns to the multi-active access agent through a TCP/IP network direct connection channel, and then returns to the application @ A through the database drive @ A;
19) the application @ a (block 300) requests the database driver @ a (block 301) to end the transaction;
20) the database driver @ a (block 301) requests the multi-live access agent (block 302) to end the transaction;
21) the multi-live access agent requests the multi-live access service @ B (block 304) to end the transaction;
22) the multi-live access service @ B (block 304) requests the database instance @ B (block 305) to end the transaction;
23) the application @ a (block 300) requests the database driver @ a (block 301) to close the connection;
24) the database driver @ a (block 301) requests the multi-live access agent (block 302) to close the connection;
25) the multi-live access proxy requests the multi-live access service @ B (block 304) to close the connection;
26) the multi-live access service @ B (block 304) requests the database instance @ B (block 305) to close the connection;
the invention ensures direct connection and high efficiency of non-write operation, and realizes complete synchronization of data among nodes of a large-scale database cluster by multi-party consensus and strong consistency of a block chain based on non-block rollback and transaction execution at the same node only once, thereby really supporting realization of the large-scale multi-master database cluster.
It should be understood that the various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to perform the various methods of the present invention according to instructions in the program code stored in the memory.
By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer-readable media includes both computer storage media and communication media. Computer storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of computer readable media.
Those skilled in the art will appreciate that the modules or units or components of the apparatus in the examples invented herein may be arranged in an apparatus as described in this embodiment or alternatively may be located in one or more apparatuses different from the apparatus in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features of the invention in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so invented, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature of the invention in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention is to be considered as illustrative and not restrictive in character, with the scope of the invention being indicated by the appended claims.

Claims (17)

1.A block chain-based multi-master service cluster access method is characterized by comprising the following steps:
a first node receives an operation request for a service instance;
when the first node confirms that the operation request is a write operation request, issuing the write operation request to a blockchain network;
when the block is generated or verified, the block chain network sequentially selects write operation requests from a write operation request sequence contained in the block, and calls a second node corresponding to the current write operation request to process the current write operation request in a service instance; the blockchain network is a non-rollback blockchain network and only executes one transaction at a single network node;
when the first node confirms that the operation request is a read operation request, forwarding the read operation request to the second node; wherein the second node processes the read operation request at the service instance.
2. The method of claim 1, further comprising:
when the first node confirms that the operation request is a request for establishing connection or terminating connection, forwarding the request for establishing connection or terminating connection to the second node; wherein the second node processes the request to establish or terminate a connection at the service instance.
3. The method of claim 1, further comprising:
when the first node confirms that the operation request is a request for establishing a transaction or terminating a transaction, forwarding the request for establishing the transaction or terminating the transaction to the second node; wherein the second node processes the request to establish a transaction or terminate a transaction at the service instance.
4. The method of claim 1, further comprising:
and the first node receives a write operation result returned by the second node.
5. The method of claim 1, wherein the write operation request comprises:
a connection identification that records network connections to the service instance.
6. A first node apparatus, comprising:
the request receiving module is used for receiving an operation request of the service instance;
the first request processing module is used for issuing the write operation request to the blockchain network when the operation request is confirmed to be the write operation request; when the block is generated or verified, the block chain network sequentially selects write operation requests from a write operation request sequence contained in the block, and calls a second node corresponding to the current write operation request to process the current write operation request in a service instance; the blockchain network is a non-rollback blockchain network and only executes one transaction at a single network node;
the second request processing module is used for forwarding the read operation request to the second node when the operation request is confirmed to be the read operation request; wherein the second node processes the read operation request at the service instance.
7. The apparatus of claim 6, wherein the second request processing module is further configured to forward the request for establishing a connection or terminating a connection to the second node when the operation request is confirmed to be a request for establishing a connection or terminating a connection; wherein the second node processes the request to establish or terminate a connection at the service instance.
8. The apparatus of claim 6, wherein the second request processing module is further configured to forward the request to establish a transaction or terminate a transaction to the second node when the operation request is confirmed as a request to establish a transaction or terminate a transaction; wherein the second node processes the request to establish a transaction or terminate a transaction at the service instance.
9. The apparatus of claim 6, further comprising:
and the result receiving module is used for receiving the write operation result returned by the second node.
10. An electronic device comprising a memory and a processor, the memory for storing computer instructions, wherein the computer instructions are executable by the processor to implement the method of any one of claims 1-5.
11. A readable storage medium having stored thereon computer instructions, which when executed by a processor, implement the method of any one of claims 1-5.
12. A blockchain based multi-master cluster access system, comprising: client and service instance, characterized in that, still include: the system comprises a first agent end and a second agent end;
the first agent end is used for receiving an operation request of the client end to the service instance; when the operation request is confirmed to be a write operation request, issuing the write operation request to a blockchain network; when the block is generated or verified, the block chain network sequentially selects write operation requests from a write operation request sequence contained in the block, and calls a second node corresponding to the current write operation request to process the current write operation request in a service instance; the blockchain network is a non-rollback blockchain network and only executes one transaction at a single network node; and when the operation request is confirmed to be a read operation request, forwarding the read operation request to the second proxy, and processing the read operation request at the service instance by the second proxy.
13. The system of claim 12, wherein the first proxy is further configured to forward the request to establish the connection or terminate the connection to the second proxy when the operation request is confirmed to be a request to establish the connection or terminate the connection, and the second proxy processes the request to establish the connection or terminate the connection at the service instance.
14. The system of claim 12, wherein the first agent is further configured to forward the request to establish a transaction or terminate a transaction to the second agent when the operation request is confirmed as a request to establish a transaction or terminate a transaction, and the second agent processes the request to establish a transaction or terminate a transaction at the service instance.
15. The system of claim 12, wherein the first agent is further configured to: and receiving a write operation result returned by the second agent terminal.
16. The system of claim 12, wherein the write operation request comprises:
a connection identification that records network connections to the service instance.
17. The system of claim 12, wherein the first agent is located on a device where the client is located, and/or the second agent is located on a server device where the service instance is located.
CN202110169258.4A 2021-02-07 2021-02-07 Multi-master service cluster access method and device based on block chain and electronic equipment Active CN112507033B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110169258.4A CN112507033B (en) 2021-02-07 2021-02-07 Multi-master service cluster access method and device based on block chain and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110169258.4A CN112507033B (en) 2021-02-07 2021-02-07 Multi-master service cluster access method and device based on block chain and electronic equipment

Publications (2)

Publication Number Publication Date
CN112507033A CN112507033A (en) 2021-03-16
CN112507033B true CN112507033B (en) 2021-06-22

Family

ID=74953184

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110169258.4A Active CN112507033B (en) 2021-02-07 2021-02-07 Multi-master service cluster access method and device based on block chain and electronic equipment

Country Status (1)

Country Link
CN (1) CN112507033B (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106203178B (en) * 2016-08-26 2018-11-20 杨鹏 A kind of the write-in authority distributing method and system of block chain
US20180211043A1 (en) * 2017-01-24 2018-07-26 SparkCognition, Inc. Blockchain Based Security for End Points
CN108628942B (en) * 2018-03-27 2020-07-31 深圳市网心科技有限公司 Block chain node equipment and data reading and writing method of distributed database

Also Published As

Publication number Publication date
CN112507033A (en) 2021-03-16

Similar Documents

Publication Publication Date Title
CN110650189B (en) Relay-based block chain interaction system and method
KR101863398B1 (en) Method and system for synchronization mechanism on multi-server reservation system
US7668839B2 (en) Application management for utilizing a replication engine of a Web-AP server to execute SIP replication
EP3837604B1 (en) In situ triggered function as a service within a service mesh
US9721246B2 (en) Synchronization patterns for mobile applications
US20190287082A1 (en) Method for processing transactions using blockchain networks, and transaction management server using the same
CN107517227B (en) Session implementation method and device for distributed consistency system
WO2021169243A1 (en) Method, apparatus and system for processing distributed transaction
US10924587B1 (en) Live migration for highly available data stores
CN108710638A (en) A kind of Distributed concurrency control method and system based on mixing RDMA operation
CN110519127B (en) Network delay detection method, device and storage medium
CN111694873B (en) Virtual resource package processing method and device and database server
CN109104368B (en) Connection request method, device, server and computer readable storage medium
CN107612950A (en) A kind of method, apparatus, system, electronic equipment that service is provided
CN103731465A (en) Distributed system and transaction treatment method thereof
CN112995262B (en) Distributed transaction submission method, system and computing equipment
CN112507033B (en) Multi-master service cluster access method and device based on block chain and electronic equipment
US20090254716A1 (en) Coordinated remote and local machine configuration
US20150212850A1 (en) Using compensation transactions for multiple one-phase commit participants
US9721052B1 (en) Concurrent design process
CN115314375B (en) Blockchain network cross-domain networking method, equipment, storage medium and program product
CN115098528B (en) Service processing method, device, electronic equipment and computer readable storage medium
CN112395104B (en) Method and device for realizing distributed transaction context transfer in routing layer
Shoker et al. Towards byzantine resilient directories
CN110445848B (en) Method and apparatus for transaction processing

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
GR01 Patent grant
GR01 Patent grant