CN113010531B - Block chain BAAS system task scheduling framework based on directed acyclic graph - Google Patents

Block chain BAAS system task scheduling framework based on directed acyclic graph Download PDF

Info

Publication number
CN113010531B
CN113010531B CN202110162913.3A CN202110162913A CN113010531B CN 113010531 B CN113010531 B CN 113010531B CN 202110162913 A CN202110162913 A CN 202110162913A CN 113010531 B CN113010531 B CN 113010531B
Authority
CN
China
Prior art keywords
task
execution
module
executed
alarm
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
CN202110162913.3A
Other languages
Chinese (zh)
Other versions
CN113010531A (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.)
Sichuan Cooper Technology Group Co ltd
Original Assignee
Chengdu Cooper Innovation 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 Chengdu Cooper Innovation Technology Co ltd filed Critical Chengdu Cooper Innovation Technology Co ltd
Priority to CN202110162913.3A priority Critical patent/CN113010531B/en
Publication of CN113010531A publication Critical patent/CN113010531A/en
Application granted granted Critical
Publication of CN113010531B publication Critical patent/CN113010531B/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/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2336Pessimistic concurrency control approaches, e.g. locking or multiple versions without time stamps
    • G06F16/2343Locking methods, e.g. distributed locking or locking implementation details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • 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/242Query formulation
    • G06F16/2433Query languages
    • 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/2457Query processing with adaptation to user needs
    • G06F16/24578Query processing with adaptation to user needs using ranking
    • 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)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a block chain BAAS system task scheduling framework based on a directed acyclic graph, wherein a task creating module creates a task and puts the task into a task pool; the task triggering module searches for a task to be executed which meets a triggering strategy; the task execution module executes the task to be executed and checks the task execution result according to the execution queue; if the task is successfully executed, the task execution module evaluates the task arrangement of the task to be executed, and if the task arrangement needs to be executed, the information of the task arrangement is updated; if the task arrangement does not need to be executed, removing the task pool of the task to be executed; if the task execution fails, the alarm module checks whether an alarm strategy is met, and if the alarm strategy is met, the alarm module triggers an alarm; if the alarm strategy is not satisfied, the task execution module evaluates a failure processing strategy; the application solves the problem that the dispatching requirement on complex and unreliable tasks cannot be met in a BAAS system through the application of high availability, distributed, pluggable and directed acyclic graph technologies.

Description

Block chain BAAS system task scheduling framework based on directed acyclic graph
Technical Field
The application relates to the technical field of block chains, in particular to a block chain BAAS system task scheduling framework based on a directed acyclic graph.
Background
Blockchain as a Service, referred to as BAAS for short, is a block chain Service. The BAAS system packs the deployment, operation and maintenance, development flow and the like of the block chain into service and provides the service for users. A user uses the BAAS system, and various block chain services can be efficiently, flexibly and easily deployed and developed. The task scheduling framework is a software framework for task scheduling and management, and is used for being integrated with other software systems to manage the execution of tasks in the systems. In mathematics, particularly graph theory and computer science, a directed acyclic graph refers to a loop-free directed graph, which can be used for task orchestration of a task scheduling framework.
In the BAAS system, operations such as deployment, operation and maintenance, management and the like need to be performed on the blockchain system, and a large number of tasks need to be executed in the process. Due to the complexity of the blockchain system itself, task execution requires interaction with multiple systems, such as the operating system, the container framework, the blockchain system, and so forth. There is uncertainty in task execution due to the complex interactions involved across systems. Therefore, high requirements are required on the scheduling flexibility, failure processing mechanism, availability and the like of the task scheduling framework. In addition, the BAAS system has a relatively large amount of development related to task execution, and therefore, the ease of use of the scheduling framework is also very important.
At present, in a hot open source task scheduling framework, a distributed timing execution and failure processing mechanism of a task can be achieved, but a timing mechanism, a failure processing mechanism, an alarm mechanism and an arrangement reuse mechanism of a fine-grained management task cannot be achieved. In addition, the purpose of the open source task scheduling framework is to solve the general problem, and on the special problem of the BAAS system, a large amount of customized development is required, the development amount is large, and the large development amount brings the risk of system robustness.
Disclosure of Invention
Based on the technical problems, the application provides a block chain BAAS system task scheduling framework based on a directed acyclic graph, so as to solve the problem that the scheduling requirements for complex and unreliable tasks cannot be met in a BAAS system.
A block chain BAAS system task scheduling framework based on a directed acyclic graph comprises a task creating module, a task triggering module, a task executing module and an alarming module, wherein:
the task creating module is configured to create a task based on a block chain BASS system and place the task into a task pool;
the task triggering module is configured to check the task pool, find a task to be executed in the tasks, which meets a triggering strategy, and send the task to be executed to an execution queue of the task executing module;
the task execution module is configured to execute the task to be executed according to the execution queue, generate a task execution result, and check the task execution result;
if the task execution result is that the task is successfully executed, the task execution module is further configured to evaluate task arrangement of the task to be executed, and if the task arrangement needs to be executed, the task execution module updates information of the task arrangement based on a directed acyclic graph; if the task arrangement does not need to be executed, the task execution module removes the task pool from the task to be executed;
the alarm module is configured to check whether an alarm strategy is met or not if the task execution result is that the task execution fails, and trigger an alarm if the alarm strategy is met;
the task execution module is further configured to evaluate a failure processing strategy if the alarm strategy is not met or the alarm is triggered to end; if the evaluation result is the end, the task execution module removes the task pool of the task to be executed; and if the evaluation result is the task retry, the task execution module updates the task execution information.
Further, the task creation module is further configured to specify parameters of task execution when creating a task, the parameters including: triggering strategy, executing strategy, alarming strategy, failure processing strategy and task arrangement.
Furthermore, the task pool can be plugged and disconnected, and the task pool is stored by adopting a MySQL database.
Furthermore, the task trigger module can be plugged and disconnected, and the task trigger module realizes distributed scheduling by adopting a mode based on Redis lock and local scheduling.
Furthermore, the task execution module can be plugged and disconnected, and the task execution module adopts a built-in thread tool execution module in Java to realize a local queue.
Furthermore, the alarm module can be plugged and pulled, and the alarm module is connected to the nailing robot to give an alarm.
Further, if the task arrangement needs to be executed, the step of updating the task arrangement information by the task execution module based on the directed acyclic graph includes:
if the task to be executed has the task arrangement and the task arrangement is not finished, continuing to execute according to the execution relation in the task arrangement configuration;
a plurality of execution relations are established in the task arrangement configuration, and the execution relations form a directed acyclic graph;
and executing the task arrangement according to the task arrangement sequence of the execution relation in the directed acyclic graph, and updating the information of the task arrangement.
Further, the execution relationship is pre-configured when the task is created.
Further, the task arrangement corresponds to a plurality of task units, the task units are program codes for realizing the task arrangement, and the task units can be reused.
Further, the task execution module contains an execution policy configuration item, the execution policy configuration item includes parallel execution and distributed serial execution, and the execution policy configuration item is extensible.
According to the technical scheme, the block chain BAAS system task scheduling framework based on the directed acyclic graph comprises a task creating module, a task triggering module, a task executing module and an alarm module, wherein the task creating module creates tasks and puts the tasks into a task pool; the task triggering module checks the task pool, searches for a task to be executed which meets a triggering strategy, and sends the task to be executed to an execution queue of the task executing module; the task execution module executes the task to be executed according to the execution queue, generates a task execution result and checks the task execution result; if the task is successfully executed, the task execution module evaluates the task arrangement of the task to be executed, and if the task arrangement needs to be executed, the task execution module updates the information of the task arrangement based on the directed acyclic graph; if the task arrangement does not need to be executed, the task execution module removes the task pool from the task to be executed; if the task execution fails, the alarm module checks whether an alarm strategy is met, and if the alarm strategy is met, the alarm module triggers an alarm; if the alarm strategy is not satisfied or the alarm is triggered to be finished, the task execution module evaluates a failure processing strategy; if the evaluation result is end, the task execution module removes the task pool of the task to be executed; and if the evaluation result is that the task retries, the task execution module updates the task execution information. The application can realize high concurrency, high availability and high performance capability of the frame by matching different pluggable components, and solves the problem that the dispatching requirement on complex and unreliable tasks cannot be met in a BAAS system by applying high availability, distributed, pluggable and directed acyclic graph technologies.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a block-based chain of blocks BAAS system task scheduling framework architecture diagram based on directed acyclic graph disclosed in the present application;
FIG. 2 is an exemplary diagram of a directed acyclic graph as disclosed in an embodiment of the present application;
FIG. 3 is an exemplary diagram of another directed acyclic graph disclosed in embodiments of the present application;
fig. 4 is a schematic flowchart illustrating a process of implementing a pluggable function according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only a few embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
The task scheduling framework is a software framework for task scheduling and management, and is used for being integrated with other software systems to manage the execution of tasks in the systems. At present, in an open source task scheduling framework of an open source code, a distributed timing execution and failure processing mechanism of a task can be achieved, but a timing mechanism, a failure processing mechanism, an alarm mechanism and an arrangement reuse mechanism of a fine-grained management task cannot be achieved. In addition, the purpose of the open source task scheduling framework is to solve the general problem, and on the special problem of the BAAS system, a large amount of customized development is required, the development amount is large, and the large development amount brings the risk of system robustness. The invention aims to solve the problems and meets the scheduling requirements of the BAAS system on complex and unreliable tasks by the application of high availability, distributed, pluggable and directed acyclic graph technologies.
In the application, the task scheduling framework cannot operate independently and needs to be integrated with the BAAS system. The BAAS, namely Blockchain as a Service, is a block chain Service, and a user can deploy and develop various block chain services efficiently, flexibly and easily by using a BAAS system. It should be noted that the present application does not replace the existing open source task scheduling framework, but enhances their capabilities by organically combining them to meet the task scheduling requirements of a specific field.
Referring to fig. 1, fig. 1 is a schematic diagram of a block chain BAAS system task scheduling framework based on a directed acyclic graph disclosed in the present application, in a graph theory, if a directed graph cannot go from a certain vertex and go back to the certain vertex through a plurality of edges, the graph is a directed acyclic graph, as can be seen from fig. 1, a block chain BAAS system task scheduling framework based on a directed acyclic graph includes a task creating module, a task triggering module, a task executing module, and an alarm module, where:
and the task creating module is configured to create the tasks based on the block chain BASS system and place the tasks into the task pool. When creating a task, parameters for task execution need to be specified, including: trigger strategy, execution strategy, alarm strategy, failure processing strategy, arrangement and configuration, etc. The strategy can be expanded according to requirements, flexibility is achieved, the task scheduling framework can meet the requirements of the block chain BAAS system on complex task scheduling to a great extent through strategy configuration and expansion, and development difficulty is greatly reduced. The task pool provides persistent storage capacity of tasks, and the task pool can be plugged and unplugged, so-called pluggable performance, wherein literal understanding means that plugging and unplugging do not affect normal operation of the system, plugging and unplugging certain functions can be realized, and system operation is not affected, and the task pool can be interpreted as adding configuration to automatically operate on software, and automatically stops without configuration. For example, the task pool may be pluggable by using a MySQL database to perform persistent storage, and may also be implemented in other manners, which is not specifically limited in this application. The task scheduling framework with pluggable design enables the framework to have expandability and evolutionary capability, and the selection which best meets the current situation can be made according to requirements, technologies, cost, infrastructure and the like.
And the task triggering module is configured to check the task pool, find the tasks to be executed meeting the triggering strategy in the tasks, and send the tasks to be executed to the execution queue of the task execution module. The trigger strategy comprises immediate execution, time-designated execution, interval execution, cron expression execution and the like, and is extensible. The task triggering module provides the capability of selecting tasks from the task pool, takes the tasks meeting the triggering strategy in the task pool as the tasks to be executed, and sends the tasks to be executed to the execution queue of the task execution module. Meanwhile, the task trigger module can be plugged, for example, the task trigger module adopts a mode based on a Redis lock and local scheduling, and can be combined with an open-source distributed scheduling framework to realize distributed scheduling of tasks, wherein a Redis (Remote Dictionary Server), namely, a Remote Dictionary service, is an open-source log-type and Key-Value database which is written by using an ANSI C language, supports a network, can be based on a memory and can also be persisted, and provides APIs (application programming interfaces) of multiple languages.
And the task execution module is configured to execute the task to be executed according to the execution queue, generate a task execution result and check the task execution result. The task execution module comprises an execution strategy configuration item, namely the task execution module can configure the execution strategy, the execution strategy configuration item comprises parallel execution and distributed serial execution, and the execution strategy configuration item can be expanded. The execution queue provides queue service capability, and can use a memory queue or a distributed queue. Meanwhile, the task execution module may be plugged, for example, the task execution module implements the local queue by using a thread pool threadpool built in Java.
And the task execution module checks the task execution result, and if the task execution result is that the task is successfully executed, the task execution module evaluates the task arrangement of the task to be executed according to the execution parameters specified when the task is created, by combining with the graph 1. And if the task to be executed has the task arrangement and the task arrangement is not completed, continuing to execute the subsequent tasks according to the execution relation in the task arrangement. The execution relation is configured in advance when the task is created, the execution relation of a plurality of tasks is established in the task arrangement, the task arrangement corresponds to a directed acyclic graph, the task arrangement is executed according to the task arrangement sequence of the execution relation in the directed acyclic graph, and the information of the task arrangement is updated.
Referring to fig. 2, fig. 2 is an exemplary diagram of a directed acyclic graph disclosed in an embodiment of the present application, where if task orchestration needs to be performed, a task execution module updates task orchestration information based on the directed acyclic graph, and if task orchestration does not need to be performed, the task execution module removes a task pool for a task to be performed. In order to facilitate further understanding of the present application, taking the task arrangement that needs to be performed as an example, 7 tasks are illustrated in fig. 2, and in the blockchain BAAS system, each task may be regarded as a node, a plurality of execution relations are preset in the 7 tasks, and when the task arrangement is performed, the tasks are sequentially executed according to the task arrangement sequence in the execution relations, for example, taking fig. 2 as an example, the execution sequence is assumed to be sequentially executed from task 1 to task 7, and the specific execution steps are as follows:
step 1: based on the directed acyclic graph shown in fig. 2, the task execution modules execute the tasks in sequence according to the task arrangement order in the execution relation, and the task arrangement order in fig. 2 is that the direction of the front view 2 is executed from left to right in the direction indicated by the arrow, that is, the direction from task 1 to task 7. And scheduling and executing the tasks from the task 1, and triggering the concurrent execution of the tasks 2, 3 and 4 from the edge of the task 1 after the task 1 is successfully executed. In the directed acyclic graph, an edge associated with a node has a part of an outgoing edge and an incoming edge, in fig. 2, the outgoing edge of task 1 connects tasks 2, 3 and 4, it can be seen that the outgoing edge of task 1 is an edge in the direction of an arrow on the right side of the node of task 1 in the front view 2, and accordingly, the incoming edge can be understood as an edge in the direction of an arrow on the left side of a certain node in the front view 2.
Step 2: after the tasks 2 and 3 are successfully executed, the mark of the task 5 is updated, and the number of entries of the task 5 is reduced by 1. The degree of entries is an initial value calculated according to task arrangement configuration when a task is created, and is updated according to the execution process of the task, the degree of entries of the task 5 is the number of edges, for example, taking a front view 2 as an example, the number of edges of the left side of a node where the current task 5 is located is two, that is, the number of edges of a direction pointing to the task 5 is 2, the degree of entries of the task 5 is initially 2, and after the tasks 2 and 3 are executed, the degree of entries are updated to 0, and the condition for executing the degree of entries of the task 5 is met, then the task 5 is triggered to execute.
And 3, step 3: and after the task 4 is successfully executed, the execution condition of the number of entries of the task 6 is met, and the task 6 is triggered to be executed.
And 4, step 4: after the tasks 5 and 6 are successfully executed, the marks of the task 7 are respectively updated until the in-degree number execution condition of the task 7 is met, the task 7 is triggered to be executed, and after the task 7 is executed, the task arrangement based on the directed acyclic graph shown in fig. 2 is executed.
The above is an example of a step of performing task arrangement according to a task arrangement sequence of an execution relation in a directed acyclic graph, where a task execution module updates information of task arrangement according to an execution progress in a task arrangement process, for example, updates the degree according to the task execution progress, and with reference to fig. 1, after the task execution module updates the task arrangement information based on the directed acyclic graph, the task execution module updates information of a next task arrangement according to actual requirements, and after the current task arrangement execution is completed, a task trigger module may continue to check a task pool to find a task to be executed that meets a trigger policy, as shown by an arrow in fig. 1.
And the alarm module is configured to check whether an alarm strategy is met or not if the task execution result is that the task execution fails. The warning module is used for providing warning notice, and the warning module is pluggable, if the warning module can be used for warning notice through the access nailing robot so as to realize that the warning module is pluggable, other forms can be provided, and the application is not particularly limited. If the alarm strategy is met through the inspection of the alarm module, the alarm module triggers the alarm, and the specific condition meeting the alarm strategy can be preset according to the actual condition.
The task execution module is further configured, in conjunction with fig. 1, to evaluate a failure handling policy if the alarm policy is not satisfied or the alarm is triggered to end by the alarm module, where the failure handling policy may include: fixed interval retry, dynamic interval retry, end, i.e., failure handling policy may include both an end and retry state. When the evaluation result is the end, the task execution module removes the task pool of the task to be executed; when the evaluation result is that the task retries, the task execution module updates the task execution information, where the updated task execution information may include the number of task executions, next trigger time, and the like, and if the current task is scheduled and executed, the task trigger module may continue to check the task pool to find the task to be executed that meets the trigger policy, and as shown by an arrow in the figure in conjunction with fig. 1, the example steps in the figure are executed again according to the actual situation.
In order to facilitate further understanding of the present application, the implementation principle of the present application is further described, where the task scheduling framework in the present application cannot operate independently, and needs to be integrated with the blockchain BAAS system, and the blockchain BAAS system integrates the task scheduling framework by adding a MAVEN dependency, and then configures the framework. The Maven is a tool specially used for constructing and managing related Java items, and the advantages of using the Maven to manage the items are mainly two points, one is that all Java items managed by the Maven have the same item structure, and the other is that a jar package is convenient to maintain in a unified mode.
With reference to fig. 4 in conjunction with the above description, fig. 4 is a schematic flowchart illustrating a process of implementing a pluggable function disclosed in this embodiment of the present application. The method comprises the following steps of configuring a block chain BAAS system task scheduling framework based on the directed acyclic graph: the task pool adopts a MySQL database for persistent storage, so that the task pool can be plugged and unplugged; the task trigger module realizes distributed scheduling by adopting a mode based on Redis lock and local scheduling, and realizes that the task trigger module can be plugged; the task execution module adopts a built-in thread queue execution or of Java to realize a local queue, so that the task execution module can be plugged; the alarm module is connected to the nailing robot to give an alarm, so that the alarm module can be plugged and unplugged. The task pool, the task trigger module, the task execution module and the alarm module are not limited to the above form, and other forms are available, and the specific implementation manner is not specifically limited in the present application.
After the task scheduling framework is configured, the task scheduling framework completes initialization at the starting stage of the BAAS system, and then task scheduling service can be provided for the block-chaining BAAS system. Referring to fig. 3, fig. 3 is an exemplary diagram of another directed acyclic graph disclosed in the embodiment of the present application, for example, a blockchain BAAS system needs to create a blockchain of a certain type, and the specific steps of creating are sequentially: the method comprises the steps of starting a chain node in parallel, creating a chain channel, adding an organization to the channel, and registering chain monitoring, wherein before a specific task is executed, a block chain BAAS system needs to realize service codes of the steps in advance and register the service codes as the task. When the action of creating the blockchain is executed, the blockchain BAAS system invokes a task scheduling frame to perform configuration and creation of tasks, including configuring task arrangement information of the tasks, assuming that the chain nodes started in parallel in this embodiment include a chain node 1 and a chain node 2, the corresponding directed acyclic graph is the directed acyclic graph shown in fig. 3, and the task scheduling frame automatically executes scheduling of the tasks according to the configured task information, that is, executes specific tasks in task arrangement according to the execution relationship shown in fig. 3.
In the application, the task arrangement based on the directed acyclic graph can flexibly arrange tasks and can enable the task units to be reusable, wherein the task units refer to program codes for realizing the task arrangement, the task arrangement corresponds to a plurality of task units, and the task unit reusability refers to the fact that the realization codes of the tasks can be configured into the plurality of task arrangements. For example, task T is used for sending short messages, the existing A, B two services correspond to X, Y two task arrangements, because the services are different, X, Y two task arrangements are also different, but both services need to send short messages, and then both task arrangements include task T, that is, task T can be arranged in both task arrangements. For a block chain BAAS system with a large number of tasks, the reusability of the task units can greatly increase the code reusability, reduce the code amount and increase the robustness of the system.
According to the technical scheme, the block chain BAAS system task scheduling framework based on the directed acyclic graph comprises a task creating module, a task triggering module, a task executing module and an alarm module, wherein the task creating module creates tasks and puts the tasks into a task pool; the task triggering module checks the task pool, searches for a task to be executed which meets a triggering strategy, and sends the task to be executed to an execution queue of the task executing module; the task execution module executes the task to be executed according to the execution queue, generates a task execution result and checks the task execution result; if the task is successfully executed, the task execution module evaluates the task arrangement of the task to be executed, and if the task arrangement needs to be executed, the task execution module updates the information of the task arrangement based on the directed acyclic graph; if the task arrangement does not need to be executed, the task execution module removes the task pool of the tasks to be executed; if the task execution fails, the alarm module checks whether an alarm strategy is met, and if the alarm strategy is met, the alarm module triggers an alarm; if the alarm strategy is not satisfied or the alarm is triggered to be finished, the task execution module evaluates a failure processing strategy; if the evaluation result is end, the task execution module removes the task pool of the task to be executed; and if the evaluation result is the task retry, the task execution module updates the task execution information. The application can realize high concurrency, high availability and high performance capability of the frame by matching different pluggable components, and solves the problem that the dispatching requirement on complex and unreliable tasks cannot be met in a BAAS system by applying high availability, distributed, pluggable and directed acyclic graph technologies.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.

Claims (9)

1. A block chain BAAS system task scheduling framework based on a directed acyclic graph is characterized by comprising a task creating module, a task triggering module, a task executing module and an alarming module, wherein:
the task creating module is configured to create a task based on a block chain BASS system and place the task into a task pool; the task pool can be plugged and unplugged;
the task triggering module is configured to check the task pool, find a task to be executed in the tasks, which meets a triggering strategy, and send the task to be executed to an execution queue of the task executing module; the task trigger module can be plugged and unplugged;
the task execution module is configured to execute the task to be executed according to the execution queue, generate a task execution result, and check the task execution result; the task execution module can be plugged and unplugged;
if the task execution result is that the task is successfully executed, the task execution module is further configured to evaluate task arrangement of the task to be executed, and if the task arrangement exists in the task to be executed and the task arrangement is not completed, the task is continuously executed according to an execution relation in the task arrangement configuration; a plurality of execution relations are established in the task arrangement configuration, and the execution relations form a directed acyclic graph; executing the task arrangement according to the task arrangement sequence of the execution relation in the directed acyclic graph, and updating the information of the task arrangement; if the task arrangement does not need to be executed, the task execution module removes the task pool from the task to be executed;
the alarm module is configured to check whether an alarm strategy is met or not if the task execution result is that the task execution fails, and trigger an alarm if the alarm strategy is met; the alarm module can be plugged;
the task execution module is further configured to evaluate a failure processing strategy if the alarm strategy is not satisfied or the alarm is triggered to end; if the evaluation result is the end, the task execution module removes the task pool from the task to be executed; and if the evaluation result is the task retry, the task execution module updates the task execution information.
2. The system task scheduling framework of blockchain BAAS based on directed acyclic graph of claim 1, wherein the task creation module is further configured to specify parameters for task execution when creating a task, the parameters comprising: triggering strategy, executing strategy, alarming strategy, failure processing strategy and task arrangement.
3. The blockchain BAAS system task scheduling framework based on directed acyclic graph of claim 1, wherein the task pool is stored using MySQL database.
4. The blockchain BAAS system task scheduling framework based on directed acyclic graph of claim 1, wherein the task triggering module implements distributed scheduling in a manner based on Redis lock and local scheduling.
5. The blockchain BAAS system task scheduling framework based on directed acyclic graph of claim 1, wherein the task execution module implements the local queue using Java built-in threadpoolsexcecutor.
6. The blockchain BAAS system task scheduling framework based on directed acyclic graph of claim 1, wherein the alarm module is connected to a nailing robot for alarm notification.
7. The blockchain BAAS system task scheduling framework based on directed acyclic graph of claim 1, wherein the execution relation is pre-configured at the time of task creation.
8. The blockchain BAAS system task scheduling framework based on directed acyclic graph of claim 1, wherein the task orchestration corresponds to a plurality of task units, the task units are program codes for implementing task orchestration, and the task units are reusable.
9. The system task scheduling framework of a blockchain BAAS based on a directed acyclic graph of claim 1, wherein the task execution module includes an execution policy configuration item, the execution policy configuration item includes parallel execution and distributed serial execution, and the execution policy configuration item is expandable.
CN202110162913.3A 2021-02-05 2021-02-05 Block chain BAAS system task scheduling framework based on directed acyclic graph Active CN113010531B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110162913.3A CN113010531B (en) 2021-02-05 2021-02-05 Block chain BAAS system task scheduling framework based on directed acyclic graph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110162913.3A CN113010531B (en) 2021-02-05 2021-02-05 Block chain BAAS system task scheduling framework based on directed acyclic graph

Publications (2)

Publication Number Publication Date
CN113010531A CN113010531A (en) 2021-06-22
CN113010531B true CN113010531B (en) 2022-11-01

Family

ID=76383887

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110162913.3A Active CN113010531B (en) 2021-02-05 2021-02-05 Block chain BAAS system task scheduling framework based on directed acyclic graph

Country Status (1)

Country Link
CN (1) CN113010531B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115809133A (en) * 2022-12-13 2023-03-17 北京领雁科技股份有限公司 Distributed scheduling system, method, electronic device, and computer-readable medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104965754A (en) * 2015-03-31 2015-10-07 腾讯科技(深圳)有限公司 Task scheduling method and task scheduling apparatus
CN106293971A (en) * 2016-08-15 2017-01-04 张家林 A kind of method and apparatus of distributed task dispatching
CN108196912A (en) * 2018-01-03 2018-06-22 新疆熙菱信息技术股份有限公司 One kind is based on hot-plug component formula data integrating method
CN109375996A (en) * 2018-09-27 2019-02-22 安徽省鼎众金融信息咨询服务有限公司 A kind of support dependence managerial role scheduling system
CN109614164A (en) * 2018-11-29 2019-04-12 深圳前海微众银行股份有限公司 Realize plug-in unit configurable method, apparatus, equipment and readable storage medium storing program for executing
CN110879701A (en) * 2019-11-06 2020-03-13 深圳市网心科技有限公司 Workflow visualization configuration method, server, system and medium
CN111176802A (en) * 2019-07-26 2020-05-19 腾讯科技(深圳)有限公司 Task processing method and device, electronic equipment and storage medium
CN111913793A (en) * 2020-07-31 2020-11-10 同盾控股有限公司 Distributed task scheduling method, device, node equipment and system
CN112214289A (en) * 2019-07-11 2021-01-12 腾讯科技(深圳)有限公司 Task scheduling method and device, server and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0302926D0 (en) * 2003-02-08 2003-03-12 Grex Games Ltd System architecture and engine for massively multi-user operation
CN110120979B (en) * 2019-05-20 2023-03-10 华为云计算技术有限公司 Scheduling method, device and related equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104965754A (en) * 2015-03-31 2015-10-07 腾讯科技(深圳)有限公司 Task scheduling method and task scheduling apparatus
CN106293971A (en) * 2016-08-15 2017-01-04 张家林 A kind of method and apparatus of distributed task dispatching
CN108196912A (en) * 2018-01-03 2018-06-22 新疆熙菱信息技术股份有限公司 One kind is based on hot-plug component formula data integrating method
CN109375996A (en) * 2018-09-27 2019-02-22 安徽省鼎众金融信息咨询服务有限公司 A kind of support dependence managerial role scheduling system
CN109614164A (en) * 2018-11-29 2019-04-12 深圳前海微众银行股份有限公司 Realize plug-in unit configurable method, apparatus, equipment and readable storage medium storing program for executing
CN112214289A (en) * 2019-07-11 2021-01-12 腾讯科技(深圳)有限公司 Task scheduling method and device, server and storage medium
CN111176802A (en) * 2019-07-26 2020-05-19 腾讯科技(深圳)有限公司 Task processing method and device, electronic equipment and storage medium
CN110879701A (en) * 2019-11-06 2020-03-13 深圳市网心科技有限公司 Workflow visualization configuration method, server, system and medium
CN111913793A (en) * 2020-07-31 2020-11-10 同盾控股有限公司 Distributed task scheduling method, device, node equipment and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种基于YARN的高优先级作业调度实现方案;詹文涛 等;《软件》;20160315;第37卷(第03期);84-88 *
区块链***中的分布式数据管理技术——挑战与展望;于戈 等;《计算机学报》;20191029;第44卷(第01期);28-54 *

Also Published As

Publication number Publication date
CN113010531A (en) 2021-06-22

Similar Documents

Publication Publication Date Title
US7779298B2 (en) Distributed job manager recovery
US7707451B2 (en) Methods and devices for recovering from initialization failures
CN101960425B (en) Virtual machine and programming language for event processing
US8738968B2 (en) Configuration based service availability analysis of AMF managed systems
US20080059610A1 (en) Dynamically configuring, allocating and deploying computing systems
US6226694B1 (en) Achieving consistency and synchronization among multiple data stores that cooperate within a single system in the absence of transaction monitoring
CN107832230B (en) Test method, equipment and system based on data tuning
US20060259594A1 (en) Progressive deployment and maintenance of applications on a set of peer nodes
CN111447079B (en) High-availability extension system and method based on SCA framework
CN111679888A (en) Deployment method and device of agent container
Stoicescu et al. Architecting resilient computing systems: A component-based approach for adaptive fault tolerance
CN112631795A (en) Method, device, equipment and storage medium for automatically synchronizing service application information
CN113010531B (en) Block chain BAAS system task scheduling framework based on directed acyclic graph
CN113448686A (en) Resource deployment method and device, electronic equipment and storage medium
Ketfi et al. Automatic adaptation of component-based software
JP2008269277A (en) Distributed editing system of shared data, distributed editing method and program
JP3712984B2 (en) Work progress control device and method, work progress control program, and recording medium recording the program
CN111147541A (en) Node processing method, device and equipment based on parameter server and storage medium
CN109032674B (en) Multi-process management method, system and network equipment
Sadou et al. A unified approach for software architecture evolution at different abstraction levels
Ozeer et al. Verification of a Failure Management Protocol for Stateful IoT Applications
CN114416276A (en) Scheduling method and device of equipment management service, electronic equipment and storage medium
CN110837394B (en) High-availability configuration version warehouse configuration method, terminal and readable medium
CN114115821A (en) Application development method and platform, application deployment method and node, system and equipment
Gama et al. Resilience in dynamic component-based applications

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
CB02 Change of applicant information

Address after: Floor 1, No.81 Xinle Road, high tech Zone, Chengdu, Sichuan 610041

Applicant after: Chengdu Cooper Innovation Technology Co.,Ltd.

Address before: Floor 1, No.81 Xinle Road, high tech Zone, Chengdu, Sichuan 610041

Applicant before: Chengdu Cooper blockchain Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20230912

Address after: No. 1, Jinyun East Third Lane, High tech Zone, Chengdu, Sichuan, 610096

Patentee after: Sichuan Cooper Technology Group Co.,Ltd.

Address before: Floor 1, No.81 Xinle Road, high tech Zone, Chengdu, Sichuan 610041

Patentee before: Chengdu Cooper Innovation Technology Co.,Ltd.

TR01 Transfer of patent right