CN115098114A - Block chain-based distributed application deployment method and device - Google Patents

Block chain-based distributed application deployment method and device Download PDF

Info

Publication number
CN115098114A
CN115098114A CN202210668623.0A CN202210668623A CN115098114A CN 115098114 A CN115098114 A CN 115098114A CN 202210668623 A CN202210668623 A CN 202210668623A CN 115098114 A CN115098114 A CN 115098114A
Authority
CN
China
Prior art keywords
computing node
application
target application
information
node
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
CN202210668623.0A
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.)
Ant Blockchain Technology Shanghai Co Ltd
Original Assignee
Ant Blockchain Technology Shanghai 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 Ant Blockchain Technology Shanghai Co Ltd filed Critical Ant Blockchain Technology Shanghai Co Ltd
Priority to CN202210668623.0A priority Critical patent/CN115098114A/en
Publication of CN115098114A publication Critical patent/CN115098114A/en
Priority to PCT/CN2022/135258 priority patent/WO2023240933A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the specification provides a distributed application deployment method and device based on a block chain. The method comprises the following steps: the method comprises the steps that a first computing node obtains first application information of a target application from a block chain, the first application information comprises connection information of a second computing node, and the first application information is uploaded to the block chain through the second computing node; the first computing node judges whether the target application needs to be deployed or not based on the first application information; and if the target application needs to be deployed, the first computing node acquires the first installation package of the target application from the second computing node according to the connection information of the second computing node, and deploys the target application. Therefore, the first computing node can automatically and dynamically deploy the target application after the second computing node releases the target application, and the deployment efficiency, safety and stability of the target application are improved.

Description

Block chain-based distributed application deployment method and device
Technical Field
The embodiment of the specification belongs to the technical field of block chains, and particularly relates to a distributed application deployment method and device based on a block chain.
Background
The Blockchain (Blockchain) is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. In the block chain system, data blocks are combined into a chain data structure in a sequential connection mode according to a time sequence, and data cannot be tampered and forged cannot be guaranteed in a cryptographic mode. Because the block chain has the characteristics of decentralization, information non-tampering, autonomy and the like, the block chain is also paid more and more attention and applied by people. The block chain can be generally divided into three categories, namely a public chain (public block), a private chain (private block) and a federation chain (consortium block), according to different application scenarios and user requirements.
Disclosure of Invention
Embodiments of the present specification aim to provide a method and an apparatus for deploying distributed applications based on a blockchain, a computer-readable storage medium, and a computing device, which improve deployment efficiency of distributed applications.
To achieve the above object, a first aspect of the present specification provides a block chain-based distributed application deployment method, which is executed by a first computing node, and includes: acquiring first application information of a target application from a block chain, wherein the first application information comprises connection information of a second computing node, and the first application information is uploaded to the block chain through the second computing node; judging whether the target application needs to be deployed or not based on the first application information; if the target application needs to be deployed, a first installation package of the target application is obtained from the second computing node according to the connection information, and the target application is deployed based on the first installation package.
A second aspect of the present specification provides a blockchain-based distributed application deployment method, performed by a second computing node, comprising: acquiring a publishing request aiming at a target application, wherein the publishing request comprises first application information and a first installation package of the target application, and the first application information comprises connection information of the second computing node; uploading the first application information to a block chain through a second block chain node in the block chain, and storing the first installation package, wherein the second block chain node is a node in the block chain, which is in butt joint with the second computing node.
A second aspect of the present specification provides a method for block chain based distributed application deployment, the method performed by a first block link point, comprising: receiving a first transaction for calling an intelligent contract, wherein the first transaction is sent to a block chain by a second computing node connected with a second block chain link point, the first transaction comprises first application information of a target application, the first application information comprises connection information of the second computing node, and a first installation package of the target application is stored in the second computing node; storing the first application information into a contract state of the smart contract in accordance with the first transaction; receiving a second transaction for invoking the smart contract from the first computing node, the second transaction for querying the application information; and sending the first application information in the contract state to the first computing node according to the second transaction so that the first computing node acquires a first installation package of the target application from the second computing node according to the connection information.
A fourth aspect of the present specification provides a distributed application deployment apparatus based on a blockchain, deployed at a first computing node, the apparatus including: the acquisition module is configured to acquire first application information of a target application from a blockchain, wherein the first application information comprises a node identifier of a second computing node, and the first application information is uploaded to the blockchain through the second computing node; the judging module is configured to judge whether the target application needs to be deployed or not based on the first application information; the obtaining module is further configured to obtain a first installation package of the target application from the second computing node when the determining module determines that the target application needs to be deployed; and the processing module is configured to deploy the target application based on the first installation package when the obtaining module obtains the first installation package.
A fifth aspect of the present specification provides a blockchain-based distributed application deployment apparatus, deployed at a second computing node, the apparatus comprising: the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is configured to acquire a publishing request aiming at a target application, and the publishing request comprises first application information and a first installation package of the target application; a processing module configured to upload the first application information to a blockchain through a second blockchain node in the blockchain, and store the first installation package, wherein the second blockchain node is a node in the blockchain that is docked with the second computing node.
A sixth aspect of the present specification provides a block chain-based distributed application deployment apparatus, deployed at a first block chain node, including: the acquisition module is configured to receive a first transaction for calling an intelligent contract, the first transaction is sent to a block chain by a second computing node connected with a second block chain link point, the first transaction comprises first application information of a target application, the first application information comprises connection information of the second computing node, and a first installation package of the target application is stored in the second computing node; a processing module configured to store the first application information into a contract state of the smart contract in accordance with the first transaction; the obtaining module is further configured to receive a second transaction for invoking the intelligent contract from the first computing node, wherein the second transaction is used for inquiring the application information; the processing module is further configured to send the first application information in the contract state to the first computing node according to the second transaction so that the first computing node obtains a first installation package of the target application from the second computing node according to the connection information.
A seventh aspect of the present specification provides a computer-readable storage medium having a computer program stored thereon, which, when executed on a computing device, causes the computing device to perform the method of the first, second or third aspect.
An eighth aspect of the present specification provides a computing device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the method of the first, second or third aspect when executing the computer program.
By the method and the device provided in one or more embodiments of the present specification, the first computing node may obtain application information of a released target application from a blockchain, and may communicate with the second computing node storing the first installation package of the target application through the application information to obtain the first installation package and deploy the target application, so that dynamic deployment of the target application is automatically performed, and deployment efficiency, security, and stability of the target application are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments described in the present disclosure, and it is obvious for a person skilled in the art to obtain other drawings based on these drawings without any creative effort.
FIG. 1 is a system architecture diagram of a blockchain system in one embodiment of the present disclosure;
fig. 2 is a flowchart illustrating a distributed application deployment method based on a blockchain in an embodiment of the present specification;
FIG. 3 is a schematic diagram illustrating a step in which a first compute node obtains a first installation package from a second compute node in one embodiment of the present description;
fig. 4 is a schematic structural diagram of a distributed application deployment apparatus based on a blockchain provided in an embodiment of the present specification;
fig. 5 is a schematic structural diagram of another distributed application deployment apparatus based on a blockchain provided in an embodiment of the present specification;
fig. 6 is a schematic structural diagram of another block chain-based distributed application deployment apparatus provided in an embodiment of this specification.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step should fall within the scope of protection of the present specification.
Generally, when a DAPP (distributed application) is deployed in some specific scenarios (such as anti-fraud scenarios, etc.), since developers of the DAPP often belong to different organizations/companies, and the DAPP is often deployed in an intranet environment of each organization/company, the developers cannot access the organizations/companies needing to deploy the DAPP in an extranet environment. Therefore, when a developer deploys a DAPP, the developer is often required to manually deploy to the site of each organization/company, and the number of deployments is: n M P O; n is the number of distributed application developers, M is the number of DAPPs developed by each developer, P is the number of nodes that need to be deployed, and O is the number of DAPP version iterations. The scale of the deployment of the developer is exponentially increased along with the increase of nodes required to be deployed and/or the increase of the DAPP, and the deployment efficiency and the deployment speed can also become great barriers for limiting the development of the service.
In addition, since the developer cannot evaluate the environment diversity of the edge computing server (hereinafter referred to as "computing node") that needs to deploy the DAPP, the developer is prone to incompatibility problems when deploying the DAPP. For the basic capability (mysql, redis, etc.) that the DAPP depends on, when the DAPP is deployed in different computing nodes, the developer does not know the relevant configuration of the different computing nodes, and the information needs to be manually created in the field after the developer goes to the field. But manual creation can introduce security issues (root accounts may be used, etc.).
In addition, since the DAPP is deployed from manual to field, when resources allocated by an application are started, the resources are different from person to person, and when the application is deployed, resources of used computing nodes are different from one another, which may eventually cause unreasonable and uncontrollable allocation of resources, and both the number of DAPPs that can be deployed on the computing nodes and the deployment quality cannot be guaranteed. Meanwhile, when manual deployment is performed, DAPP deployment isolation is also uncontrollable. Because standardized intervention cannot be performed on manual deployment, when the application is started, the application may be directly started, and an isolation manner of a sandbox cannot be performed for each application, so that when one application has a performance problem, the whole computing node may be crashed.
In view of the foregoing problems, embodiments of the present disclosure provide a method and an apparatus for deploying distributed applications based on a block chain, where after a developer issues a target application through a computing node used by the developer, a node in the block chain that is in butt joint with the computing node may upload relevant information of the target application to the block chain, and a computing node that is in butt joint with another node in the block chain may obtain relevant information of the target application from the block chain. When other computing nodes can deploy the target application, the other computing nodes can automatically acquire the installation package of the target application from the computing node which issues the target application, and automatically complete application deployment. Therefore, automatic deployment of the target application is realized, and the deployment efficiency, safety and stability are improved.
Fig. 1 is a schematic diagram of a block chain system provided in an embodiment of the present disclosure. As shown in fig. 1, the block chain includes, for example, 6 nodes from node 1 to node 6. Each node may be any computing, processing capable device, server, or cluster of devices, etc. The lines between the nodes schematically represent P2P (Peer-to-Peer) connections.
The nodes may have a full ledger stored on them, i.e. the status of all blocks and all accounts. Wherein each node in the blockchain can generate the same state in the blockchain by performing the same transaction, and each node in the blockchain can store the same state database. It is to be understood that the blockchain shown in fig. 1 may be, but is not limited to being, a federation chain. In addition, although fig. 1 shows that the blockchain includes 6 nodes, the embodiments of the present specification are not limited thereto, and may include other numbers of nodes. Specifically, the nodes included in the block chain may satisfy the Byzantine Fault Tolerance (BFT) requirement. The byzantine fault tolerance requirement can be understood as that byzantine nodes can exist in a block chain, and the block chain does not show the byzantine behavior to the outside. Generally, some Byzantine Fault-tolerant algorithms require the number of nodes to be greater than (3f +1), where f is the number of Byzantine nodes, such as the practical Byzantine Fault-tolerant algorithm pbft (practical Byzantine Fault tolerance).
A transaction in the blockchain domain may refer to a task unit that is executed in the blockchain and recorded in the blockchain. The transaction typically includes a send field (Prom), a receive field (To), and a Data field (Data). Where the transaction is a transfer transaction, the From field indicates the address of the account From which the transaction was initiated (i.e., From which a transfer task To another account was initiated), the To field indicates the address of the account From which the transaction was received (i.e., From which a transfer was received), and the Data field includes the transfer amount. In the case of a transaction calling an intelligent contract in a blockchain, a From field represents an account address for initiating the transaction, a To field represents an account address of the contract called by the transaction, and a Data field includes Data such as a function name in the calling contract and incoming parameters To the function, so as To obtain the code of the function From the blockchain and execute the code of the function when the transaction is executed.
The block chain may provide the functionality of an intelligent contract. An intelligent contract on a blockchain is a contract that can be executed on a blockchain system triggered by a transaction. An intelligent contract may be defined in the form of code. The intelligent contract is called in the alliance chain, and a transaction pointing to the intelligent contract address is initiated, so that each node in the alliance chain network runs the intelligent contract code in a distributed mode. It should be noted that, in addition to the creation of the smart contracts by the users, the smart contracts may also be set by the system in the creation block. This type of contract is generally referred to as a startup contract. In general, the data structure, parameters, attributes and methods of some blockchains may be set in the startup contract. Further, an account with system administrator privileges may create a contract at the system level, or modify a contract at the system level (simply referred to as a system contract). Wherein the system contract is usable to add data structures for different services in a blockchain.
In the scenario of contract deployment, for example, Bob sends a transaction containing information to create an intelligent contract (i.e., a deployment contract) into the blockchain as shown in fig. 1, the data field of the transaction includes the code (e.g., bytecode or machine code) of the contract to be created, and the to field of the transaction is null to indicate that the transaction is for contract deployment. After the agreement is achieved among the nodes through a consensus mechanism, a contract address '0 x6f8ae93 …' of the contract is determined, each node adds a contract account corresponding to the contract address of the intelligent contract in a state database, allocates a state storage corresponding to the contract account, and stores a contract code in the state storage of the contract, so that the contract creation is successful.
In the scenario of invoking a contract, for example, Bob sends a transaction for invoking a smart contract into the blockchain as shown in fig. 1, where the from field of the transaction is the address of the account of the transaction initiator (i.e., Bob), and "0 x6f8ae93 …" in the to field represents the address of the invoked smart contract, and the data field of the transaction includes the method and parameters for invoking the smart contract. After the transaction is identified in the blockchain, each node in the blockchain may execute the transaction, respectively, to execute the contract, respectively, and update the status database based on the execution of the contract.
In addition, after the intelligent contract is deployed on the block chain, a corresponding contract account is generated. This contract account will typically have states that are defined by state variables in the intelligent contract and that generate new values when the intelligent contract is created, executed. Wherein the contract account may be used to store intelligent contract-related state. Once an event triggers a term in the intelligent contract (execution condition is met), the code may be automatically executed. In a block chain, the relevant state of a contract is stored in a storage tree (storage tree), and the hash value of the root node of the storage tree is stored in the storage _ root, so that all the states of the contract are locked under the contract account through the hash. The storage tree is also an MPT tree structure that stores a key-value mapping of state addresses to state values. The address of a state is stored from the root node to the leaf node of the memory tree, and a value of a state is stored in one leaf node.
With continued reference to fig. 1, different nodes in the blockchain shown in fig. 1 may be responsible for interfacing with different computing nodes 10. Each computing node 10 may be, but is not limited to, configured to perform computing processing and the like on data and transmit the processed results and the like to nodes in a blockchain interfaced therewith. Each node in the block chain can achieve consensus on data acquired by the computing node to which the node is connected through a consensus mechanism with other nodes in the block chain. The different computing nodes may establish a communication connection through, but not limited to, a block chain high speed communication Network (BTN) or the like.
In this embodiment, each computing node 10 needs to deploy an industry application middleware. Wherein, the developer can log in to the DAPP issuing website through the industry application middleware on the computing node and issue the DAPP. The user can log in to the DAPP subscription website through the industry application middleware on the computing node and subscribe the DAPP.
Illustratively, when publishing a DAPP, a developer may upload application information related to the DAPP into a blockchain through a computing node deployed with industry middleware and store an installation package of the DAPP on the computing node. The application information of the DAPP may exemplarily include one or more of the following: the node identifier of the computing node deployed with the industry application middleware, the network identifier of the computing node in the network, the description information of the DAPP, the data structure of the service data which is associated with the DAPP and needs to be uplinked, or a strategy for circulating the data associated with the DAPP in the network, and the like.
When subscribing the DAPP, a user can acquire application information of the DAPP which can be subscribed by a computing node from a block chain through the computing node which is deployed with the industry middleware; and communicating with a computing node publishing the DAPP which can be subscribed through the computing node which is deployed with the industry middleware to acquire the installation package of the DAPP which can be subscribed. The computing node deployed with the industry middleware used by the user may then deploy the DAPP based on its acquired installation package of the DAPP. After the computing node deployment is complete, the user can use the DAPP.
Therefore, by utilizing the characteristics of the point-to-point transmission network of the block chain, after the developer publishes/updates the DAPP, the computing node used by the developer can automatically complete distribution, and the computing node used by the user can automatically acquire the installation package of the DAPP which can be subscribed by the computing node and complete the deployment of the DAPP, so that the developer does not need to manually deploy and distribute the DAPP to each node, the problem of resource distribution of distributed application in multiple nodes, multiple applications and multiple developers in the distributed application is solved, and the deployment efficiency, safety and stability of the DAPP are improved.
The embodiments provided in the present specification are described in detail below with reference to specific examples.
Fig. 2 is a flowchart illustrating a block chain-based distributed application deployment method provided in an embodiment of the present specification. In fig. 2, a first industry application middleware is deployed in a first compute node, a second industry application middleware is deployed in a second compute node, a first blockchain node that interfaces with the first compute node in a blockchain, and a second blockchain node that interfaces with the second compute node. Wherein the first computing node may be a node used by a user of the DAPP and the second computing node may be a node used by a developer of the DAPP. As shown in fig. 2, the method may include the steps of:
in S201, the second computing node obtains a publishing request for the target application, where the publishing request includes the first application information and the first installation package of the target application.
In this embodiment, a developer may log in to a website for publishing the target application through the second industry application middleware deployed in the second computing node, and submit a publishing request of the target application, so that the second computing node may obtain the publishing request of the target application. Illustratively, the issue request may include: first application information and a first installation package of the target application. Wherein the first application information may include one or more of: the connection information of the second computing node, the description information of the target application, the data structure of the service data associated with the target application and needing uplink, or a policy for circulating data associated with the target application in the network, and the like. For example, the connection information of the second computing node may include: a node identification of the second computing node, a network identification of the second computing node in the network, and the like.
Illustratively, the description information of the target application may include: a subscription type of the target application. Wherein, the subscription type may include: a forced subscription, a limited subscription, or an open subscription. When the subscription type is a mandatory subscription, the subscription scope may be a specific object or objects, and only the specific object may subscribe to the application at this time; when the subscription type is limited subscription, the subscription scope may be a specific one or more types of objects, and only the specific type of objects may subscribe to the application; when the subscription type is an open subscription, the subscription scope may be all objects, and all the objects may subscribe to the application at this time. By way of example, a subscription scope may be understood as authorization information that a target application authorizes a computing node. For example, when a first computing node is included within the scope of the subscription, it is indicated that the target application is authorized for the first computing node, i.e., the first computing node may subscribe to the target application.
At S202, the second compute node uploads the first application information to the blockchain via the second blockchain link, and stores the first installation package.
In this embodiment, the second industry application middleware may send, to the second block node through the second computing node, a transaction for invoking the smart contract, where the data field in the transaction may include the first application information. After the second block link point acquires the transaction sent by the second computing node, the second block link point can be identified with other nodes in the block chain for the transaction. After the node in the block chain agrees with the transaction, each node in the block chain can respectively execute the transaction, so as to respectively execute the intelligent contract, and update the state database based on the execution of the intelligent contract, so that the state database corresponding to each node in the block chain can have the first application information, and at this time, the first application information is stored in the contract state of the intelligent contract. The second compute node thereby uploads the first application information into the blockchain through the second blockchain link.
In addition, after acquiring the first installation package, the second computing node may store the first installation package locally.
At S203, the first computing node acquires first application information from the blockchain.
In this embodiment, after the first application information is uploaded to the blockchain, the first computing node may obtain the first application information from the blockchain.
As a possible implementation manner, the first computing node may send, by using the first business application middleware thereon, a query transaction for invoking the intelligent contract to the first block link node in a polling manner, where the query transaction includes a node identifier of the first computing node. The query transaction may be used to screen out applications authorized for the first computing node from the contract state of the smart contract. For example, when the target application is an authorized application for the first computing node, the query transaction may be understood as querying the first application information of the target application. After the first block link point obtains the query transaction sent by the first computing node, the query transaction can be executed, so that the target application authorized for the first computing node is screened out from the contract state of the intelligent contract on the first computing node based on the node identification of the first computing node in the query transaction, namely the target application which can be subscribed by the first computing node is screened out. For example, when an object that can subscribe to an application in the application information of each application in the contract state includes a first computing node, a target application may be screened from each application based on a node identifier of the first computing node, and first application information of the target application is acquired. The first block link point may then return the first application information to the first compute node. In this way, the first computing node acquires the first application information.
At S204, the first computing node determines whether it needs to deploy the target application based on the first application information.
In this embodiment, after the first computing node obtains the first application information, the first application middleware deployed on the first computing node may determine whether the target application needs to be deployed according to a subscription type in the first application information. When the subscription type is a forced subscription, the first industrial application middleware can determine that the target application needs to be deployed on the first computing node, and at the moment, the first computing node immediately deploys the target application. When the subscription type is limited subscription or open subscription, the first industry application middleware can inquire whether the user deploys the target application through the first computing node, and after the user issues a deployment instruction, the first computing node needs to deploy the target application. For example, the first business application middleware may control to display query information on a user UI displayed by the first computing node, the query information being used to query a user whether to deploy the target application.
At S205, if the target application needs to be deployed on the first computing node, the first computing node obtains the first installation package of the target application from the second computing node according to the connection information of the second computing node included in the first application information.
In this embodiment, the first computing node may obtain, from the first application information, connection information of the second computing node, such as a node identifier of the second computing node and a network identifier of the second computing node in a network. Then, the first computing node may communicate with the second computing node through the BTN based on the connection information of the second computing node to obtain the installation package of the target application. For example, as shown in fig. 3, in S301, the first computing node may send an application obtaining request to the second computing node, where the application obtaining request may include an application identifier of the target application. In S402, the second computing node may filter out the installation package of the target application from the installation packages of the applications stored therein based on the application identifier of the target application, and send the installation package to the first computing node.
In S206, the first compute node deploys the target application based on the first installation package.
In this embodiment, after the first computing node obtains the first installation package of the target application, the first computing node performs dynamic configuration and dynamic deployment on the target application based on the first installation package to complete deployment of the target application, so that a user can use the target application on the first computing node.
When the first computing node is dynamically configured, an account and a password of a database (such as mysql) for storing local data of the target application and an account and a password of a storage system (such as Redis) for storing cache data of the target application can be generated for the target application based on the software environment of the first computing node. In addition, when the first computing node performs dynamic configuration, it may also configure a start command, such as: configuring the resource occupation of starting, a CPU, a memory, a starting port, a sub configuration file to be loaded, a JVM command and the like.
When the first computing node is dynamically deployed, a mirror image can be constructed by using docker or k8s (kubernets) and the like to isolate the target application, so that the target application and other applications are not influenced by each other, and the stability of the first computing node is guaranteed. After the mirror image construction is completed, the first computing node can start the mirror image and load the installation package of the target application to complete the installation. At this point, after the target application is released through the second computing node, the target application is automatically deployed on the first computing node.
In some embodiments, the blockchain shown in fig. 2 may represent any one blockchain node in the blockchain.
It is to be understood that, although two compute nodes are shown in fig. 2, embodiments of the present description are not limited thereto and may include other numbers of compute nodes.
Based on the same concept as the foregoing method embodiment, the embodiment of the present specification further provides a block chain-based distributed application deployment apparatus.
Fig. 4 is a schematic structural diagram of a block chain-based distributed application deployment apparatus provided in an embodiment of this specification. Wherein the apparatus may be deployed at a first computing node. As shown in fig. 4, the apparatus 400 includes: an acquisition module 410, a determination module 420, and a processing module 430. The obtaining module 410 is configured to obtain first application information of the target application from the blockchain, where the first application information includes connection information of the second computing node, and the first application information is uploaded to the blockchain through the second computing node. The determination module 420 is configured to determine whether the target application needs to be deployed based on the first application information. The obtaining module 410 is further configured to obtain the first installation package of the target application from the second computing node according to the connection information of the second computing node when the determining module 420 determines that the target application needs to be deployed. The processing module 430 is configured to deploy the target application based on the first installation package when the obtaining module 410 obtains the first installation package.
In one possible implementation, the first application information is stored in a contract state of the intelligent contract, the first application information further including authorization information that the target application authorizes the first computing node. The obtaining module 410 is specifically configured to: sending a query transaction for calling an intelligent contract to a first block link node in a block chain, wherein the query transaction is used for screening the application authorized for a first computing node from the contract state of the intelligent contract, and the first block chain node is a node in the block chain, which is butted with the first computing node; and acquiring first application information returned by the link point of the first block.
In one possible implementation, the first application information further includes one or more of: a data structure of service data associated with the target application and requiring uplink, or a policy for data associated with the target application to flow in the network.
In one possible implementation, the first application information further includes a subscription type of the target application.
The subscription type includes a forced subscription, a limited subscription, or an open subscription. The determining module 420 is specifically configured to: and judging whether the target application needs to be deployed or not based on the subscription type.
In one possible implementation, the processing module 430 is specifically configured to: an account and password that generate a database for storing local data of the target application deploy the target application based on the account and password.
Fig. 5 is a schematic structural diagram of another block chain-based distributed application deployment apparatus provided in an embodiment of this specification. Wherein the apparatus may be deployed at a second computing node. As shown in fig. 5, the apparatus 500 includes: an acquisition module 510 and a processing module 520. The obtaining module 510 is configured to obtain a publishing request for the target application, where the publishing request includes first application information and a first installation package of the target application, and the first application information includes connection information of the second computing node. The processing module 520 is configured to upload the first application information to the blockchain through a second blockchain node in the blockchain, wherein the second blockchain node is a node in the blockchain that is docked with a second computing node, and to store the first installation package.
Fig. 6 is a schematic structural diagram of another block chain-based distributed application deployment apparatus provided in an embodiment of this specification. Wherein the apparatus may be deployed at a first blockchain node. As shown in fig. 6, the apparatus 600 includes: an acquisition module 610 and a processing module 620. The obtaining module 610 is configured to receive a first transaction for invoking an intelligent contract, where the first transaction is sent to a block chain by a second computing node connected to a link point of a second block chain, the first transaction includes first application information of a target application, the first application information includes connection information of the second computing node, and a first installation package of the target application is stored in the second computing node. The processing module 620 is configured to store the first application information into a contract state of the smart contract in accordance with the first transaction. Additionally, the obtaining module 610 is further configured to receive a second transaction from the first computing node for invoking the smart contract, the second transaction for querying the application information. The processing module 620 is further configured to send the first application information in the contract state to the first computing node according to the second transaction to cause the first computing node to obtain the first installation package of the target application from the second computing node according to the connection information.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement of the process flow cannot be realized with hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one kind, but many kinds, such as abel (advanced Expression Language), ahdl (alternate Hardware Description Language), traffic, CUPL (com universal Programming Language), HDCal, jhddl (Java Hardware Description Language), Lava, Lola, HDL, PALASM, and VHDL (runtime Hardware Description Language), which are currently used in most popular applications. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be conceived to be a software module or a structure within a hardware component for performing the method.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a server system. Of course, this application does not exclude that as future computer technology develops, the computer implementing the functionality of the above embodiments may be, for example, a personal computer, a laptop computer, a vehicle-mounted human interaction device, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
Although one or more embodiments of the present description provide method operational steps as described in the embodiments or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive approaches. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an actual apparatus or end product executes, it may execute sequentially or in parallel (e.g., parallel processors or multi-threaded environments, or even distributed data processing environments) according to the method shown in the embodiment or the figures. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the presence of additional identical or equivalent elements in a process, method, article, or apparatus that comprises the recited elements is not excluded. For example, if the terms first, second, etc. are used, they are used to denote names, but not to denote any particular order.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. It is to be understood that, when one or more of the present descriptions are implemented, the functions of the respective modules may be implemented in one or more of software and/or hardware, or a module implementing the same function may be implemented by a combination of a plurality of sub-modules or sub-units, or the like. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical functional division, and in actual implementation, there may be other divisions, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape storage, graphene storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
One skilled in the art will recognize that one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
One or more embodiments of the present description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment. In the description of the specification, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the specification. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
The above description is only one example of one or more embodiments of the present disclosure, and is not intended to limit the one or more embodiments of the present disclosure. Various modifications and alterations to one or more embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement made within the spirit and principle of the present specification shall be included in the scope of the claims.

Claims (12)

1. A blockchain-based distributed application deployment method, performed by a first computing node, comprising:
acquiring first application information of a target application from a block chain, wherein the first application information comprises connection information of a second computing node, and the first application information is uploaded to the block chain through the second computing node;
judging whether the target application needs to be deployed or not based on the first application information;
if the target application needs to be deployed, acquiring a first installation package of the target application from the second computing node according to the connection information, and deploying the target application based on the first installation package.
2. The method of claim 1, wherein the first application information is stored in a contract state of a smart contract, the first application information further comprising authorization information that the target application authorizes the first computing node, the obtaining first application information for a target application from a blockchain comprising:
sending a query transaction for invoking an intelligent contract to a first block link node in the block chain, the query transaction for screening applications authorized for the first computing node from a contract state of the intelligent contract, the first block chain node being a node in the block chain that interfaces with the first computing node;
and acquiring the first application information returned by the first block link point.
3. The method of claim 1 or 2, wherein the first application information further comprises: a data structure of service data associated with the target application and needing uplink, and/or a policy of data circulation in the network associated with the target application.
4. The method of claim 1 or 2, wherein the first application information further comprises: the determining whether the target application needs to be deployed based on the first application information includes: and judging whether the target application needs to be deployed or not based on the subscription type.
5. The method of claim 1 or 2, wherein the deploying the target application based on the first installation package comprises:
generating an account and a password of a database for storing local data of the target application, and deploying the target application based on the account and the password.
6. A blockchain-based distributed application deployment method, performed by a second computing node, comprising:
acquiring a publishing request aiming at a target application, wherein the publishing request comprises first application information and a first installation package of the target application, and the first application information comprises connection information of the second computing node;
uploading the first application information to a block chain through a second block chain node in the block chain, and storing the first installation package, wherein the second block chain node is a node in the block chain, which is in butt joint with the second computing node.
7. A method for block chain based distributed application deployment, the method performed by a first block link point, comprising:
receiving a first transaction for calling an intelligent contract, wherein the first transaction is sent to a block chain by a second computing node connected with a second block chain link point, the first transaction comprises first application information of a target application, the first application information comprises connection information of the second computing node, and a first installation package of the target application is stored in the second computing node;
storing the first application information into a contract state of the smart contract in accordance with the first transaction;
receiving a second transaction for invoking the smart contract from the first computing node, the second transaction for querying the application information;
and sending the first application information in the contract state to the first computing node according to the second transaction so that the first computing node acquires a first installation package of the target application from the second computing node according to the connection information.
8. A blockchain-based distributed application deployment apparatus deployed at a first computing node, the apparatus comprising:
the acquisition module is configured to acquire first application information of a target application from a blockchain, wherein the first application information comprises connection information of a second computing node, and the first application information is uploaded to the blockchain through the second computing node;
the judging module is configured to judge whether the target application needs to be deployed or not based on the first application information;
the obtaining module is further configured to obtain a first installation package of the target application from the second computing node according to the connection information when the judging module judges that the target application needs to be deployed;
the processing module is configured to deploy the target application based on the first installation package when the obtaining module obtains the first installation package.
9. A blockchain-based distributed application deployment apparatus deployed at a second computing node, the apparatus comprising:
an obtaining module, configured to obtain a publishing request for a target application, where the publishing request includes first application information and a first installation package of the target application, and the first application information includes connection information of the second computing node;
a processing module configured to upload the first application information to a blockchain through a second blockchain node in the blockchain, and store the first installation package, wherein the second blockchain node is a node in the blockchain that is docked with the second computing node.
10. A distributed application deployment device based on a blockchain is deployed at a first blockchain node, and comprises:
the acquisition module is configured to receive a first transaction for calling an intelligent contract, the first transaction is sent to a block chain by a second computing node connected with a second block chain link point, the first transaction comprises first application information of a target application, the first application information comprises connection information of the second computing node, and a first installation package of the target application is stored in the second computing node;
a processing module configured to store the first application information into a contract state of the smart contract in accordance with the first transaction;
the obtaining module is further configured to receive a second transaction for invoking the smart contract from the first computing node, wherein the second transaction is used for inquiring application information;
the processing module is further configured to send the first application information in the contract state to the first computing node according to the second transaction to cause the first computing node to obtain a first installation package of the target application from the second computing node according to the connection information.
11. A computer-readable storage medium having stored thereon a computer program which, when executed in a computing device, performs the method of any of claims 1 to 5, or performs the method of claim 6, or performs the method of claim 7.
12. A computing device comprising a memory having stored therein a computer program that, when executed by the processor, implements the method of any of claims 1 to 5, or performs the method of claim 6, or performs the method of claim 7.
CN202210668623.0A 2022-06-14 2022-06-14 Block chain-based distributed application deployment method and device Pending CN115098114A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210668623.0A CN115098114A (en) 2022-06-14 2022-06-14 Block chain-based distributed application deployment method and device
PCT/CN2022/135258 WO2023240933A1 (en) 2022-06-14 2022-11-30 Distributed application deployment method and apparatus based on blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210668623.0A CN115098114A (en) 2022-06-14 2022-06-14 Block chain-based distributed application deployment method and device

Publications (1)

Publication Number Publication Date
CN115098114A true CN115098114A (en) 2022-09-23

Family

ID=83290219

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210668623.0A Pending CN115098114A (en) 2022-06-14 2022-06-14 Block chain-based distributed application deployment method and device

Country Status (2)

Country Link
CN (1) CN115098114A (en)
WO (1) WO2023240933A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023240933A1 (en) * 2022-06-14 2023-12-21 蚂蚁区块链科技(上海)有限公司 Distributed application deployment method and apparatus based on blockchain

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107077557B (en) * 2016-12-29 2020-07-31 深圳前海达闼云端智能科技有限公司 Method and device for releasing and verifying software application program
CN108984784B (en) * 2018-07-26 2020-04-14 百度在线网络技术(北京)有限公司 Application implementation method, device, equipment and storage medium based on block chain network
CN111984271B (en) * 2020-08-27 2023-11-03 京东科技信息技术有限公司 Block chain application program processing method and device and block chain application system
CN115098114A (en) * 2022-06-14 2022-09-23 蚂蚁区块链科技(上海)有限公司 Block chain-based distributed application deployment method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023240933A1 (en) * 2022-06-14 2023-12-21 蚂蚁区块链科技(上海)有限公司 Distributed application deployment method and apparatus based on blockchain

Also Published As

Publication number Publication date
WO2023240933A1 (en) 2023-12-21

Similar Documents

Publication Publication Date Title
US9507748B2 (en) Platform runtime abstraction
US8990835B2 (en) Data distribution system based on the exchange of asynchronous messages
CN114529417A (en) Method for executing transaction, block chain, main node and slave node
CN114706690B (en) Method and system for sharing GPU (graphics processing Unit) by Kubernetes container
CN115098114A (en) Block chain-based distributed application deployment method and device
CN114675935A (en) Method and system for deploying chain code in alliance chain
CN116933886B (en) Quantum computing execution method, quantum computing execution system, electronic equipment and storage medium
CN111198677A (en) Equipment object generation method, device and equipment
WO2024001032A1 (en) Method for executing transaction in blockchain system, and blockchain system and nodes
CN114785800B (en) Cross-link communication method, device, storage medium and computing equipment
CN116032756A (en) Method for updating configuration information of application program based on block chain and block chain link point
CN114661421A (en) Method and system for deploying chain code in alliance chain
CN114782016A (en) Creditor data processing method and device based on intelligent contract and block chain system
CN114710350A (en) Allocation method and device for callable resources
CN113867776A (en) Method and device for publishing middle station application, electronic equipment and storage medium
CN115529352A (en) Routing processing method and device for computing service
CN112748981B (en) Processing method and device for software mirror image of virtual network function
CN115576709A (en) Communication processing method and device based on block chain
US20210373991A1 (en) Automated alert augmentation for deployments of software-defined storage
CN115664704A (en) Authority management method and device based on block chain and node in block chain system
CN115731040A (en) Block chain-based collection management method, block chain node and system
CN115880071A (en) Method for processing digital resources and nodes of block chain
CN114780973A (en) Method and device for managing accounts in block chain system
CN115760123A (en) Data processing method based on block chain and block chain link point
CN116226277A (en) NFT resource transfer method and block chain link point

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