CN110532074B - Task scheduling method and system for multi-tenant mode SaaS service cluster environment - Google Patents

Task scheduling method and system for multi-tenant mode SaaS service cluster environment Download PDF

Info

Publication number
CN110532074B
CN110532074B CN201910730794.XA CN201910730794A CN110532074B CN 110532074 B CN110532074 B CN 110532074B CN 201910730794 A CN201910730794 A CN 201910730794A CN 110532074 B CN110532074 B CN 110532074B
Authority
CN
China
Prior art keywords
tenant
data source
task
cluster environment
task scheduling
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
CN201910730794.XA
Other languages
Chinese (zh)
Other versions
CN110532074A (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.)
Beiming Yunzhi Wuhan Network Software Co ltd
Original Assignee
Beiming Yunzhi Wuhan Network Software 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 Beiming Yunzhi Wuhan Network Software Co ltd filed Critical Beiming Yunzhi Wuhan Network Software Co ltd
Priority to CN201910730794.XA priority Critical patent/CN110532074B/en
Publication of CN110532074A publication Critical patent/CN110532074A/en
Application granted granted Critical
Publication of CN110532074B publication Critical patent/CN110532074B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a task scheduling method and a task scheduling system for a multi-tenant mode SaaS service cluster environment, belongs to the technical field of SaaS service, and solves the problem that task scheduling in the prior art cannot meet high concurrency and extensible requirements under the multi-tenant mode SaaS service cluster environment. A task scheduling method of a multi-tenant mode SaaS service cluster environment comprises the following steps: the tasks in the used application examples are all concentrated in a task database; acquiring a tenant ID to complete the encapsulation of the dynamic task information; acquiring a tenant ID, acquiring an application instance from an application instance cluster list, calling a static task creation API by taking the tenant ID as an entry parameter, and packaging the static task by the API; clock synchronization of cluster node task scheduling is carried out through the database, and scheduling execution of tasks is carried out by using the Quartz component under the multi-tenant cluster environment. The method and the device realize high-concurrency and extensible task scheduling in a multi-tenant mode SaaS service cluster environment, and improve the efficiency of task scheduling and task processing.

Description

Task scheduling method and system for multi-tenant mode SaaS service cluster environment
Technical Field
The invention relates to the technical field of SaaS (software as a service), in particular to a task scheduling method and system for a multi-tenant mode SaaS cluster environment.
Background
In a large platform system, task scheduling is a fundamental requirement, tasks which need to be executed repeatedly and regularly or take a long time are often stripped to be processed independently, and along with the increase of the scale and complexity of the tasks, a task scheduling service framework needs to have reliability and flexibility, can manage and monitor the execution state of the tasks, and provides a stable and reliable scheduling mode for scheduling the tasks so as to ensure the correct execution of the tasks. The types of the tasks include a static task and a dynamic task, wherein the static task refers to some periodic tasks of the platform, is a part of a platform architecture, is irrelevant to user services, is relevant to specific function implementation, and simultaneously relates to user data, such as a task of aggregating multi-type data displayed by a node list. The dynamic tasks refer to regular tasks related to user services, such as service flows initiated at fixed time, planning tasks and the like, which are dynamically created in the using process of a user.
When the system needs to meet the cluster environment and the multi-tenant environment, task scheduling of the single architecture is far from meeting the requirements of high concurrency and expandability; for a cluster environment, the scheduling of static tasks and dynamic tasks must consider the situation of multi-application instance deployment; in a cluster environment where multiple application instances are deployed, if each application instance is separately scheduled by a timing task, a situation of task repeated scheduling occurs, which causes task scheduling confusion, and therefore, a scheduling manner of a dynamic task in a cluster mode must be considered.
Disclosure of Invention
The invention aims to overcome at least one technical defect and provides a task scheduling method and system for a multi-tenant mode SaaS service cluster environment.
On one hand, the invention provides a task scheduling method of a multi-tenant mode SaaS service cluster environment, which comprises the following steps:
deploying a plurality of application instances in a multi-tenant mode SaaS service cluster environment, deploying independent Quartz in each application instance, and concentrating tasks in the application instances into a task database;
acquiring a tenant ID according to a mapping relation between a task and a tenant to complete the encapsulation of dynamic task information; acquiring a tenant ID according to a mapping relation between a task and a tenant, acquiring an application instance from an application instance cluster list, calling a static task creation API by taking the tenant ID as an entry parameter, and packaging the static task by the API;
clock synchronization of cluster node task scheduling is carried out through the database, and scheduling execution of tasks is carried out by using the Quartz component under the multi-tenant cluster environment.
Further, the task scheduling method for the multi-tenant mode SaaS service cluster environment further includes tenant data source management, which specifically includes: the tenant data sources are physically or logically isolated such that each tenant has an independent data source.
Further, the task scheduling method of the multi-tenant mode SaaS service cluster environment further includes acquiring a tenant ID corresponding to a tenant to which the user belongs according to a user request, requesting a data source according to the tenant ID, thereby creating a data source connection, mapping to a corresponding tenant data source according to the tenant ID and a data source type, and changing the corresponding tenant data source.
Further, changing the corresponding tenant data source specifically includes creating a data source object, adding the data source object to a data source object list to implement opening of the tenant data source, or deleting the data source object of the tenant from the data source object list, then creating a new data source object, and adding the new data source object to the data source list to implement modification of the tenant data source, or deleting the data source object of the tenant from the data source object list to implement deletion of the tenant data source.
On the other hand, the invention also provides a task scheduling system of the multi-tenant mode SaaS service cluster environment, which comprises an application instance deployment module, a task encapsulation module and a task scheduling execution module;
the application instance deployment module is used for deploying a plurality of application instances in a multi-tenant mode SaaS service cluster environment, deploying independent Quartz in each application instance, and centralizing tasks in the used application instances in a task database;
the task encapsulation module is used for acquiring the tenant ID according to the mapping relation between the task and the tenant so as to complete encapsulation of the dynamic task information; the system is also used for acquiring a tenant ID according to the mapping relation between the task and the tenant, acquiring an application instance from the application instance cluster list, calling a static task creation API by taking the tenant ID as an entry parameter, and encapsulating the static task by the API;
and the task scheduling and executing module is used for carrying out clock synchronization of cluster node task scheduling through the database and carrying out scheduling and execution of tasks by using the Quartz component in a multi-tenant cluster environment.
Further, the task scheduling system of the multi-tenant mode SaaS service cluster environment further includes a tenant data source management module, which is used for performing physical isolation or logical isolation on tenant data sources, so that each tenant has an independent data source.
Further, the task scheduling system of the multi-tenant mode SaaS service cluster environment further includes a tenant data source changing module, configured to obtain a tenant ID corresponding to a tenant to which the user belongs according to a user request, request a data source according to the tenant ID, thereby creating a data source connection, map to a corresponding tenant data source according to the tenant ID and a data source type, and change the corresponding tenant data source.
Further, the tenant data source changing module changes the corresponding tenant data source, and specifically includes:
the tenant data source changing module creates a data source object, adds the data source object into the data source object list to realize the opening of the tenant data source, or deletes the data source object of the tenant from the data source object list, then creates a new data source object, and adds the new data source object into the data source list to realize the modification of the tenant data source, or deletes the data source object of the tenant from the data source object list to realize the deletion of the tenant data source.
Compared with the prior art, the invention has the beneficial effects that: the method comprises the steps that under the multi-tenant mode SaaS service cluster environment, tasks in used application examples are all concentrated in a task database, and dynamic task information is packaged; calling a static task creation API by taking the tenant ID as an entry parameter, and packaging the static task by the API; clock synchronization of cluster node task scheduling is carried out through the database, and scheduling execution of tasks is carried out by using the Quartz component in a multi-tenant cluster environment, so that high-concurrency and extensible task scheduling is realized in a multi-tenant mode SaaS service cluster environment, and the task scheduling and task processing efficiency is improved.
Drawings
Fig. 1 is a schematic flowchart of a task scheduling method for a SaaS service cluster environment in a multi-tenant mode according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating the creation and encapsulation of static tasks according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a task scheduling architecture of a multi-tenant cluster environment according to an embodiment of the present invention;
FIG. 4 is a block diagram of a data dynamic routing component module according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of application cluster data source change according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Example 1
The embodiment of the invention provides a task scheduling method for a multi-tenant mode SaaS service cluster environment, which has a flow diagram as shown in FIG. 1 and comprises the following steps:
deploying a plurality of application instances in a multi-tenant mode SaaS service cluster environment, deploying independent Quartz in each application instance, and concentrating tasks in the application instances into a task database;
acquiring a tenant ID according to a mapping relation between a task and a tenant to complete the encapsulation of dynamic task information; acquiring a tenant ID according to a mapping relation between a task and a tenant, acquiring an application instance from an application instance cluster list, calling a static task creation API by taking the tenant ID as an entry parameter, and packaging the static task by the API;
clock synchronization of cluster node task scheduling is carried out through the database, and scheduling execution of tasks is carried out by using the Quartz component under the multi-tenant cluster environment.
It should be noted that, in a multi-tenant SaaS cluster environment, static tasks and dynamic tasks must be encapsulated in an undifferentiated format before being submitted and executed, and then are collectively submitted to a scheduling execution module for scheduling execution, and a relationship between the tasks and tenants must be clarified during execution, so that each task must include tenant ID information, and specifically, information for encapsulating specific work tasks using a JobDetail data type is implemented, and a JobDetail object mainly includes information such as "tenant ID", "task grouping", "task execution parameters", and "task scheduling policy".
With spring integrating Quartz, example code is as follows:
Figure BDA0002160495080000041
for the persistence of the Quartz cluster, corresponding database scripts need to be selected under a Quartz package in docs/dbTables, and a corresponding database table is created, and in the specific implementation, mysql is used to select table _ mysql _ Innodb.sql, the data source is deployed independently, and the tenant management database can be considered to be placed on a database service, and example codes are as follows:
Figure BDA0002160495080000051
Figure BDA0002160495080000061
Figure BDA0002160495080000071
Figure BDA0002160495080000081
Figure BDA0002160495080000091
quartz configuration, example code is as follows:
#Configure Main Scheduler Properties
org.Quartz.scheduler.instanceName=ClusteredScheduler
org.Quartz.scheduler.instanceId=AUTO
#Configure ThreadPool
org.Quartz.threadPool.class=org.Quartz.simpl.SimpleThreadPool
org.Quartz.threadPool.threadCount=25
org.Quartz.threadPool.threadPriority=5
#Configure JobStore
org.Quartz.jobStore.misfireThreshold=60000
org.Quartz.jobStore.class=org.Quartz.impl.jdbcjobstore.JobStoreTX
org.Quartz.jobStore.driverDelegateClass=org.Quartz.impl.jdbcjobstore.StdJDBCDelegat e
org.Quartz.jobStore.useProperties=false
org.Quartz.jobStore.dataSource=myDS
org.Quartz.jobStore.tablePrefix=QRTZ_
org.Quartz.jobStore.isClustered=true
org.Quartz.jobStore.clusterCheckinInterval=20000;
quartz is configured integrally with Spring, and the code is exemplified as follows:
Figure BDA0002160495080000101
Figure BDA0002160495080000111
the customJobFactory is to solve the problem that Spring Quartz Job cannot rely on injection; example codes are as follows:
Figure BDA0002160495080000112
task scheduling, example code is as follows:
Figure BDA0002160495080000113
Figure BDA0002160495080000121
Figure BDA0002160495080000131
task information encapsulation is performed by using JobDetail, and information or parameters related to the task are stored in a JobDataMap, and example codes are as follows:
JobDetail job=newJob(EntityListCombineJob.class)
.withIdentity("myJob","group1")
usangjobdata ("tenteid", "xxxxxx")// tenant ID
Usangjobdata ("type", "2100")// type parameter
.build();
The tenant tasks can be distinguished by grouping, with the tenant ID as the grouping name of Job and Trigger, and example codes are as follows:
Figure BDA0002160495080000132
Figure BDA0002160495080000141
the dynamic task is generated by the user in the configuration of the related function interface, the task generated by the user through the configuration of the function interface comprises related task parameter information, and the 'tenant ID' of the task can be easily obtained through the mapping relation between the user and the tenant, so that the task information is packaged.
The static task is a task which is executed by the system regularly, such as regular statistics, backup and the like of data, and the task is not initiated by a user and belongs to a system task of each tenant, so that the task can be mapped to the 'tenant ID' when the tenant is opened, and the encapsulation and submission of the static task are completed. The creation of static tasks encapsulates the schematic, shown in FIG. 2.
Xml creates a static task, example code as follows:
Figure BDA0002160495080000142
in a multi-tenant environment, when a tenant is opened and enabled, a static task is created, when the tenant is opened, a tenant management function module acquires any (random) application instance from a current survival list of an application instance cluster list, calls a static task creation API, an entry parameter is tenant ID, the API packages the task and submits the task to a task scheduling execution module, if the creation process fails, the next application instance is acquired from the list, the application instance is called again, the remaining survival instances are called in sequence until the creation is successful, if all instances are called and the calling fails, the tenant is marked with a static task creation failure state, and then the creation can be manually initiated.
And creating and adding a dynamic timing task, and calling the ScheduleAnagerBean by the service module to create and add.
Example code for dynamic data loading, as follows:
Figure BDA0002160495080000151
Figure BDA0002160495080000161
Figure BDA0002160495080000171
the method uses a Quartz component to execute the scheduling of tasks in a multi-tenant cluster environment, the Quartz is another open source project of an OpenSymphony open source organization in the field of Job scheduling, the Quartz can be combined with J2EE and J2SE application programs or used independently, and the Quartz can be used for creating simple programs or complex programs for running ten, hundreds or even tens of thousands of Jobs. The design uses a cluster working mode of the Quartz component, and supports the scheduling execution of any multi-tenant task through self-developed tenant data routing. A schematic diagram of a task scheduling architecture of a multi-tenant cluster environment is shown in fig. 3.
When different physical or virtual machines are used in the application instance cluster environment, it is necessary to determine that all machines are synchronized to the clock, ensuring that all machines are TIME consistent, Quartz clusters are currently synchronized by the database for cluster node task scheduling, when a Scheduler instance executes a check-in routine, it checks to see if other Scheduler instances have not checked in when they reach their expected TIME, this is through the database schedule _ STATE table and looks for the value of the Scheduler record in the LAST _ CHEDK _ TIME column, if a node is run on a machine that is not synchronized by a different clock, an unexpected result is obtained because the node uses a timestamp to inform other instances of the node's LAST check-in TIME, if a node's clock is set to a future TIME, the running Scheduler may no longer be aware that the node has been down, and if a node's clock is set to a past TIME, perhaps another node would think that it has been down and try to re-run through its Job, it is necessary to ensure that the machine's clocks are synchronized.
Preferably, the task scheduling method for the SaaS service cluster environment in the multi-tenant mode further includes tenant data source management, which specifically includes: the tenant data sources are physically or logically isolated such that each tenant has an independent data source.
It should be noted that, in the SaaS service cluster environment in the multi-tenant mode, tenant data are isolated from each other, each tenant needs to have its own independent data source, and a physical isolation or logical isolation manner may be adopted according to different types of data sources.
The supported data source types comprise a Redis data source, a Mysql data source, an InfluxDB data source and a Kapacitor component data source; the Redis data source is used as a high-speed buffer area of front-end service data to avoid that a service request is directly punctured to a database persistent layer, and the configuration of the Redis data source comprises a service IP, a service port and a password; the Mysql data source provides data persistence service; the data source configuration comprises a service IP, a service port, dbname, a user and password; the InfluxDB provides persistent storage of time sequence data such as performance indexes and the like; the data source configuration comprises a service IP, a service port, dbname, a user and password; the Kapacitor component data source provides data calculation engine service; the data source configuration comprises a service IP and a service port.
Preferably, the task scheduling method for the multi-tenant mode SaaS service cluster environment further includes acquiring a tenant ID corresponding to a tenant to which the user belongs according to a user request, requesting a data source according to the tenant ID, thereby creating a data source connection, mapping to a corresponding tenant data source according to the tenant ID and a data source type, and changing the corresponding tenant data source.
The way of configuring multiple data sources by using the Spring configuration file requires reconfiguring the data sources and restarting all cluster instances when newly building a tenant, which causes service interruption in a production environment and increases the maintenance cost of a platform.
A schematic architecture diagram of a data dynamic routing component module, as shown in fig. 4, wherein a dashed box is a data source routing module, and mainly includes a "data source initialization", "data source change API", "tenant data source table", and a "data source routing log" functional component, where the "data source initialization" component is responsible for creating a connection of data sources, maintaining a certain available number of connection pools, and ensuring availability of data source connection; the data source change API mainly provides functional APIs for adding, modifying, deleting and the like of the data source; the 'tenant data source table' is a Hash mapping table of data sources of all tenants, and can be mapped to the data sources quickly according to tenant IDs and data source types; the "data source route log" complexly records the operation of all data sources and the log record of the data source routes.
Preferably, the task scheduling method for the SaaS service cluster environment in the multi-tenant mode further includes tenant data source change, specifically including creating a data source object, adding the data source object to a data source object list to enable a tenant data source, or deleting a data source object of a tenant from the data source object list, then creating a new data source object, and adding the new data source object to the data source list to modify the tenant data source, or deleting the data source object of the tenant from the data source object list to delete the tenant data source.
The creation of the data source is triggered by the opening of the tenants, and the opening of each tenant requires the creation of a corresponding data source; when the tenant is out of service for a period of time and meets the data source deletion strategy, the data source can be deleted; when the tenant is out of service for a period of time and meets the data source deletion strategy, the data source can be deleted; an architectural diagram of application cluster data source change is shown in fig. 5.
When the multi-tenant cluster is started, the loading strategy of the data source is as follows:
when the application example cluster is started, each application example calls a tenant management module API to acquire data source information of all current tenants. If the API call fails, the application instance retries to acquire the data at certain intervals, and outputs relevant retry information at the console; if the failure continues, the application instance will not start until the data source information is successfully obtained. When a tenant is added or deleted or data source information is modified, the tenant management module calls APIs of all the live application instances to notify the tenant change information to all the application instances, and the application instances regenerate data source objects according to the change conditions;
when an API call of an application instance fails, a retry strategy is started, the API call is retried at certain intervals (configurable) within a certain time (configurable), and if the API call finally fails, the application instance is deleted from a survival instance list. When the tenant is stopped, the login sessions of all users of the tenant are firstly deleted, which can lead the business requests of all the logged-in users of the current tenant to be redirected to a system login page, and then the API of all the application instances is called to delete the data sources corresponding to the tenant.
Example 2
The embodiment of the invention provides a task scheduling system of a multi-tenant mode SaaS service cluster environment, which comprises an application instance deployment module, a task encapsulation module and a task scheduling execution module;
the application instance deployment module is used for deploying a plurality of application instances in a multi-tenant mode SaaS service cluster environment, deploying independent Quartz in each application instance, and centralizing tasks in the used application instances in a task database;
the task encapsulation module is used for acquiring the tenant ID according to the mapping relation between the task and the tenant so as to complete encapsulation of the dynamic task information; the system is also used for acquiring a tenant ID according to the mapping relation between the task and the tenant, acquiring an application instance from the application instance cluster list, calling a static task creation API by taking the tenant ID as an entry parameter, and encapsulating the static task by the API;
and the task scheduling and executing module is used for carrying out clock synchronization of cluster node task scheduling through the database and carrying out scheduling and execution of tasks by using the Quartz component in a multi-tenant cluster environment.
Preferably, the task scheduling system of the multi-tenant mode SaaS service cluster environment further includes a tenant data source management module, which is used for performing physical isolation or logical isolation on tenant data sources, so that each tenant has an independent data source.
Preferably, the task scheduling system of the multi-tenant mode SaaS service cluster environment further includes a tenant data source changing module, configured to obtain a tenant ID corresponding to a tenant to which the user belongs according to a user request, request a data source according to the tenant ID, thereby creating a data source connection, map to a corresponding tenant data source according to the tenant ID and a data source type, and change the corresponding tenant data source.
Preferably, the tenant data source changing module changes the corresponding tenant data source, and specifically includes:
the tenant data source changing module creates a data source object, adds the data source object into the data source object list to realize the opening of the tenant data source, or deletes the data source object of the tenant from the data source object list, then creates a new data source object, and adds the new data source object into the data source list to realize the modification of the tenant data source, or deletes the data source object of the tenant from the data source object list to realize the deletion of the tenant data source.
In the invention, the static task implementation mode uses Spring to integrate the task scheduling of Quartz, the scheduling of the timing task is realized by a scheduler annotation mode, the dynamic task scheduling is realized by using self-defined task scheduling management based on Quartz, Quartz is an open source job scheduling framework completely written by Java, a simple and powerful mechanism is provided for job scheduling in Java application programs, the Quartz can be combined with J2EE and J2SE application programs and can be used independently, a program developer is allowed to schedule jobs according to the time interval, the many-to-many relation between jobs and triggers is realized, and a plurality of jobs can be associated with different triggers.
The invention provides a task scheduling method and a task scheduling system for a multi-tenant mode SaaS service cluster environment, which are characterized in that tasks in application examples are all concentrated in a task database under the multi-tenant mode SaaS service cluster environment, and dynamic task information is encapsulated; calling a static task creation API by taking the tenant ID as an entry parameter, and packaging the static task by the API; clock synchronization of cluster node task scheduling is carried out through a database, and scheduling execution of tasks is carried out by using a Quartz component in a multi-tenant cluster environment, so that high-concurrency and extensible task scheduling is realized in a multi-tenant mode SaaS service cluster environment, and the task scheduling and task processing efficiency is improved; and the purpose of reasonably distributing application resources is achieved, and the waste of resources is avoided.
The above-described embodiments of the present invention should not be construed as limiting the scope of the present invention. Any other corresponding changes and modifications made according to the technical idea of the present invention should be included in the protection scope of the claims of the present invention.

Claims (8)

1. A task scheduling method of a multi-tenant mode SaaS service cluster environment is characterized by comprising the following steps:
deploying a plurality of application instances in a multi-tenant mode SaaS service cluster environment, deploying independent Quartz in each application instance, and concentrating tasks in the application instances into a task database;
acquiring a tenant ID according to a mapping relation between a task and a tenant to complete the encapsulation of dynamic task information; acquiring a tenant ID according to a mapping relation between a task and a tenant, acquiring an application instance from an application instance cluster list, calling a static task creation API by taking the tenant ID as an entry parameter, and packaging the static task by the API;
clock synchronization of cluster node task scheduling is carried out through the database, and scheduling execution of tasks is carried out by using the Quartz component under the multi-tenant cluster environment.
2. The method for task scheduling in a multi-tenant mode SaaS service cluster environment according to claim 1, further comprising tenant data source management, specifically comprising: the tenant data sources are physically or logically isolated such that each tenant has an independent data source.
3. The method for task scheduling in a multi-tenant mode SaaS service cluster environment according to claim 2, further comprising obtaining a tenant ID corresponding to a tenant to which the user belongs according to a user request, requesting a data source according to the tenant ID to create a data source connection, mapping to a corresponding tenant data source according to the tenant ID and a data source type, and changing the corresponding tenant data source.
4. The method for task scheduling in a multi-tenant mode SaaS service cluster environment according to claim 3, wherein the changing of the corresponding tenant data source specifically includes creating a data source object, adding the data source object to a data source object list to enable a tenant data source, or deleting a data source object of a tenant from the data source object list, then creating a new data source object, and adding the new data source object to the data source list to modify the tenant data source, or deleting a data source object of the tenant from the data source object list to delete the tenant data source.
5. A task scheduling system of a multi-tenant mode SaaS service cluster environment is characterized by comprising an application instance deployment module, a task encapsulation module and a task scheduling execution module;
the application instance deployment module is used for deploying a plurality of application instances in a multi-tenant mode SaaS service cluster environment, deploying independent Quartz in each application instance, and centralizing tasks in the used application instances in a task database;
the task encapsulation module is used for acquiring the tenant ID according to the mapping relation between the task and the tenant so as to complete encapsulation of the dynamic task information; the system is also used for acquiring a tenant ID according to the mapping relation between the task and the tenant, acquiring an application instance from the application instance cluster list, calling a static task creation API by taking the tenant ID as an entry parameter, and encapsulating the static task by the API;
and the task scheduling and executing module is used for carrying out clock synchronization of cluster node task scheduling through the database and carrying out scheduling and execution of tasks by using the Quartz component in a multi-tenant cluster environment.
6. The task scheduling system of a multi-tenant mode SaaS service cluster environment according to claim 5, further comprising a tenant data source management module, configured to perform physical isolation or logical isolation on tenant data sources, so that each tenant has an independent data source.
7. The task scheduling system of a multi-tenant mode SaaS service cluster environment according to claim 6, further comprising a tenant data source changing module, configured to obtain a tenant ID corresponding to a tenant to which the user belongs according to a user request, request a data source according to the tenant ID, thereby creating a data source connection, map to a corresponding tenant data source according to the tenant ID and a data source type, and change the corresponding tenant data source.
8. The task scheduling system of a multi-tenant mode SaaS service cluster environment according to claim 7, wherein the tenant data source changing module changes the corresponding tenant data source, specifically comprising:
the tenant data source changing module is used for creating a data source object, adding the data source object into the data source object list to realize the opening of the tenant data source, or deleting the data source object of the tenant from the data source object list, then creating a new data source object, and adding the new data source object into the data source list to realize the modification of the tenant data source, or deleting the data source object of the tenant from the data source object list to realize the deletion of the tenant data source.
CN201910730794.XA 2019-08-08 2019-08-08 Task scheduling method and system for multi-tenant mode SaaS service cluster environment Active CN110532074B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910730794.XA CN110532074B (en) 2019-08-08 2019-08-08 Task scheduling method and system for multi-tenant mode SaaS service cluster environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910730794.XA CN110532074B (en) 2019-08-08 2019-08-08 Task scheduling method and system for multi-tenant mode SaaS service cluster environment

Publications (2)

Publication Number Publication Date
CN110532074A CN110532074A (en) 2019-12-03
CN110532074B true CN110532074B (en) 2021-11-23

Family

ID=68662137

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910730794.XA Active CN110532074B (en) 2019-08-08 2019-08-08 Task scheduling method and system for multi-tenant mode SaaS service cluster environment

Country Status (1)

Country Link
CN (1) CN110532074B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111343258A (en) * 2020-02-17 2020-06-26 中国建设银行股份有限公司 Peer node management method, device, storage medium and electronic equipment
CN113965582B (en) * 2020-07-20 2024-04-09 中移(苏州)软件技术有限公司 Mode conversion method and system, and storage medium
CN111988173B (en) * 2020-08-19 2023-09-12 北京安瑞志远科技有限公司 Tenant management platform and tenant management method based on multi-layer father-son structure tenant
CN112114873B (en) * 2020-08-19 2023-03-21 成都安易迅科技有限公司 Task processing method and device and computer equipment
CN112100262A (en) * 2020-09-16 2020-12-18 南京智数云信息科技有限公司 Method and system for quickly building and dynamically expanding multi-tenant software as a service (SaaS) platform
CN112637232B (en) * 2020-12-29 2022-09-27 国云科技股份有限公司 Cloud platform resource isolation framework implementation method and device supporting multiple strategies
CN112769947A (en) * 2021-01-20 2021-05-07 浪潮云信息技术股份公司 Method for managing micro-service engine instances based on tenant-side container cluster
CN114693283B (en) * 2022-06-01 2022-09-27 四川高灯企服科技有限公司 Cross-system business process approval processing method and device and computer equipment
CN116743876B (en) * 2023-08-14 2023-12-08 云筑信息科技(成都)有限公司 Method for realizing multi-tenant scheduling based on xxl-job

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106503163A (en) * 2016-10-31 2017-03-15 用友网络科技股份有限公司 Based on the global configuration multi-tenant dynamic data origin system that SaaS is applied
CN107113302A (en) * 2014-12-19 2017-08-29 微软技术许可有限责任公司 Security and licensing architecture in multi-tenant computing system
CN109803018A (en) * 2019-01-24 2019-05-24 云南电网有限责任公司信息中心 A kind of DCOS cloud management platform combined based on Mesos and YARN

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150067698A1 (en) * 2013-08-28 2015-03-05 Connectloud, Inc. Method and apparatus for persistent orchestrated task management
US10469401B2 (en) * 2014-09-25 2019-11-05 Oracle International Corporation System and method for supporting lifecycle plugins in a multitenant application server environment
US10228916B2 (en) * 2016-06-23 2019-03-12 International Business Machines Corporation Predictive optimization of next task through asset reuse

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107113302A (en) * 2014-12-19 2017-08-29 微软技术许可有限责任公司 Security and licensing architecture in multi-tenant computing system
CN106503163A (en) * 2016-10-31 2017-03-15 用友网络科技股份有限公司 Based on the global configuration multi-tenant dynamic data origin system that SaaS is applied
CN109803018A (en) * 2019-01-24 2019-05-24 云南电网有限责任公司信息中心 A kind of DCOS cloud management platform combined based on Mesos and YARN

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Pluggable SaaS Integration: Quality Characteristics for Cloud Based Application Services;Fabian Aulkemeier.et.al.;《2015 International Conference on Enterprise Systems (ES)》;20151015;全文 *
物联网服务中间件:挑战与研究进展;陈海明等;《计算机学报》;20170831;第40卷(第08期);全文 *

Also Published As

Publication number Publication date
CN110532074A (en) 2019-12-03

Similar Documents

Publication Publication Date Title
CN110532074B (en) Task scheduling method and system for multi-tenant mode SaaS service cluster environment
US10621005B2 (en) Systems and methods for providing zero down time and scalability in orchestration cloud services
US11226847B2 (en) Implementing an application manifest in a node-specific manner using an intent-based orchestrator
US11593149B2 (en) Unified resource management for containers and virtual machines
US10776147B2 (en) Orchestration engine for migrating application data and application services using migration steps in migration component
WO2019223173A1 (en) High-frequency task scheduling method and system, and computer device and storage medium
KR101970839B1 (en) Replaying jobs at a secondary location of a service
AU2007289177B2 (en) Dynamically configuring, allocating and deploying computing systems
US20170270151A1 (en) Dynamic code loading
US11385993B2 (en) Dynamic integration of command line utilities
WO2012163245A1 (en) Transaction-based service control system and control method therefor
US20120246651A1 (en) System and method for supporting batch job management in a distributed transaction system
CN105700939A (en) Method and system for multi-thread synchronization in distributed system
WO2011137672A1 (en) Method and device for task execution based on database
WO2012113336A1 (en) System for managing resources in virtualized environment and implementation method therefor
CN110971700B (en) Method and device for realizing distributed lock
CN111930487A (en) Job flow scheduling method and device, electronic equipment and storage medium
WO2009089746A1 (en) Method, device and system for realizing task in cluster environment
CN114756357B (en) Non-blocking distributed planned task scheduling method based on JVM (Java virtual machine)
US20210182412A1 (en) System and method for managing data object creation
US10534640B2 (en) System and method for providing a native job control language execution engine in a rehosting platform
WO2020124459A1 (en) Method employing hybrid-cloud computing platform to provide serverless function as a service
US11681722B2 (en) System and method for configurable and automated data extraction, formatting and distribution
Wu et al. Heron Basics
GB2542585A (en) Task scheduler and task scheduling process

Legal Events

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