CN113806035A - Distributed scheduling method and service server - Google Patents

Distributed scheduling method and service server Download PDF

Info

Publication number
CN113806035A
CN113806035A CN202110256988.8A CN202110256988A CN113806035A CN 113806035 A CN113806035 A CN 113806035A CN 202110256988 A CN202110256988 A CN 202110256988A CN 113806035 A CN113806035 A CN 113806035A
Authority
CN
China
Prior art keywords
server
construction
scheduling
task
servers
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110256988.8A
Other languages
Chinese (zh)
Inventor
周智
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding 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 Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202110256988.8A priority Critical patent/CN113806035A/en
Publication of CN113806035A publication Critical patent/CN113806035A/en
Pending legal-status Critical Current

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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system

Abstract

The application provides a distributed scheduling method and a service server, wherein the method comprises the following steps: acquiring a task request, wherein the task request has a task attribute; sending a construction request to a scheduling server according to the task request, wherein the construction request has a task attribute, and the scheduling server selects a target construction server from a plurality of construction servers according to the task attribute and a health state mapping table; and receiving the address of the target construction server fed back by the scheduling server, and calling the target construction server to execute the task corresponding to the task request according to the address, so that scheduling can be performed according to the health state of the construction server, the scheduling efficiency is improved, and the task execution efficiency is improved.

Description

Distributed scheduling method and service server
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a distributed scheduling method and a service server.
Background
At present, with the development of mobile internet, a large-scale internet company can maintain different APPs (including Android and IOS platforms) by dozens of teams at the same time, and in order to reduce cost and improve efficiency, improve the efficiency of development and testing, and quickly complete continuous delivery tasks, a set of high-performance construction service platform is needed.
In the related technology, a Jenkins continuous integration tool is adopted in a construction service platform, a Master server is responsible for scheduling tasks and sending requests through a Master Slave mechanism provided by the tool, and a plurality of Slave servers can execute construction tasks concurrently.
According to the service platform, the Master server fixes the scheduling strategies of the plurality of Slave servers, the scheduling strategies are difficult to dynamically adjust according to the health states of the plurality of Slave servers, the scheduling efficiency is poor, and the task execution efficiency is poor.
Disclosure of Invention
The present application is directed to solving, at least to some extent, one of the technical problems in the related art.
The application provides a distributed scheduling method and a service server, so that scheduling is performed according to the health state of a constructed server, and therefore scheduling efficiency and task execution efficiency are improved.
An embodiment of a first aspect of the present application provides a distributed scheduling method, including:
acquiring a task request, wherein the task request has a task attribute;
sending a construction request to a scheduling server according to the task request, wherein the construction request has the task attribute, and the scheduling server selects a target construction server from a plurality of construction servers according to the task attribute and a health state mapping table;
and receiving the address of the target construction server fed back by the scheduling server, and calling the target construction server to execute the task corresponding to the task request according to the address.
In the technical scheme, the scheduling server can select the target construction server according to the health state of the construction server, so that the scheduling efficiency is improved; the service server can schedule the target construction server to execute the task, so that the task execution efficiency is improved.
In the technical scheme, the health state mapping table is set, so that the scheduling server can know the health state of each construction server, and when a certain construction server is disconnected or fails, the health state information of the construction server in the health state mapping table is deleted; if a certain construction server is reconnected or a certain construction server is newly added, the health state information of the construction server can be added in the health state mapping table, so that the pluggable of each construction server is realized, the capacity can be automatically reduced and expanded, and no influence is caused on other construction servers.
Optionally, the method further includes: if the address of the target construction server fed back by the scheduling server is not received, the target construction server is determined according to the construction server configuration file, so that the business server cannot receive the address of the target construction server fed back by the scheduling server under the condition that the scheduling server is down or the scheduling strategy is wrong, and the business server can select the target construction server by polling the addresses of the plurality of construction servers, so that disaster tolerance and automatic degradation of the scheduling service can be realized without influencing the execution of tasks.
Optionally, when the scheduling policy is a source code compiling and scheduling policy or a source code dependency analysis scheduling policy, the corresponding number of tasks is preferentially selected to not reach the corresponding maximum value, and the first construction server with the downloaded codes is used as the target construction server, so as to avoid re-downloading of the codes, reduce time occupied by re-downloading of the codes, further improve scheduling efficiency, reduce task execution time, and further improve task execution efficiency.
Optionally, when the scheduling policy is a source code compiling scheduling policy or a source code dependency analysis scheduling policy, and when there is no corresponding task quantity that does not reach the corresponding maximum value and there is a first build server of downloaded codes, the second server that has a predicted build time that is less than a preset time threshold value and does not have the corresponding maximum value and the downloaded codes is preferentially selected as the target build server, so that the predicted build time can be reduced as much as possible, that is, the task execution time is reduced, and the task execution efficiency is further improved.
An embodiment of a second aspect of the present application provides a service server, including: the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring task requests, and the task requests have task attributes;
a sending module, configured to send a construction request to a scheduling server according to the task request, where the construction request includes the task attribute, and the scheduling server selects a target construction server from among multiple construction servers according to the task attribute and a health status mapping table;
and the processing module is used for receiving the address of the target construction server fed back by the scheduling server and calling the target construction server to execute the task corresponding to the task request according to the address.
The service server of the embodiment of the application acquires the task request, wherein the task request has task attributes; sending a construction request to a scheduling server according to the task request, wherein the construction request has a task attribute, and the scheduling server selects a target construction server from a plurality of construction servers according to the task attribute and a health state mapping table; and receiving the address of the target construction server fed back by the scheduling server, and calling the target construction server to execute the task corresponding to the task request according to the address, so that scheduling can be performed according to the health state of the construction server, the scheduling efficiency is improved, and the task execution efficiency is improved.
An embodiment of a third aspect of the present application provides a service platform, including:
the system comprises a business server, a scheduling server and a plurality of construction servers, wherein the scheduling server is respectively connected with the business server and the construction servers;
the service server is configured to execute the distributed scheduling method according to the embodiment of the first aspect.
An embodiment of a fourth aspect of the present application provides a computer device, including: the present invention relates to a distributed scheduling method, and more particularly, to a distributed scheduling method, and a computer program stored in a memory and executable on a processor.
An embodiment of a fifth aspect of the present application provides a computer program product, which when executed by an instruction processor in the computer program product, performs the distributed scheduling method provided in the embodiment of the first aspect of the present application, or performs the distributed scheduling method as provided in the embodiment of the second aspect of the present application.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a schematic diagram of an architecture for building a service platform;
fig. 2 is a schematic flowchart of a distributed scheduling method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a distributed scheduling method according to a second embodiment of the present application;
fig. 4 is a schematic structural diagram of a service server provided in the third embodiment of the present application;
fig. 5 is a schematic structural diagram of a dispatch server according to a fourth embodiment of the present application;
FIG. 6 illustrates a block diagram of an exemplary computer device suitable for use to implement embodiments of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
In a traditional construction service platform, a Jenkins continuous integration tool is adopted, a Master Server provided by the tool is responsible for scheduling tasks and sending requests, a plurality of Slave servers can execute construction tasks concurrently, but the Master server is fixed to scheduling strategies of the Slave servers, the scheduling strategies are difficult to dynamically adjust according to states of the Slave servers, scheduling efficiency is poor, and task execution efficiency is poor.
Therefore, the distributed scheduling method is provided mainly for the technical problems of poor scheduling efficiency and poor task execution efficiency in the prior art.
According to the distributed scheduling method, the task requests are obtained, wherein the task requests have task attributes; sending a construction request to a scheduling server according to the task request, wherein the construction request has a task attribute, and the scheduling server selects a target construction server from a plurality of construction servers according to the task attribute and a health state mapping table; and receiving the address of the target construction server fed back by the scheduling server, and calling the target construction server to execute the task corresponding to the task request according to the address, so that scheduling can be performed according to the health state of the construction server, the scheduling efficiency is improved, and the task execution efficiency is improved.
In the embodiment of the present application, constructing a service platform includes: the system comprises a business Server (WebServer), a scheduling Server (Distributed Server) and a plurality of building servers (built Server), wherein the scheduling Server is respectively connected with the business Server and the building servers. The service server is used for acquiring a task request of a front-end user, sending a construction request to the scheduling server according to the task request so as to acquire an address of the target construction server, and calling the target construction server to execute a task corresponding to the task request according to the address. Fig. 1 is a schematic diagram of an architecture for constructing a service platform.
The scheduling server maintains a health Map (health Map) and is used for scheduling a target construction server for a specific construction request in combination with the health Map and managing the construction server in combination with the health Map. The construction server maintains a memory queue, the memory queue comprises the executing tasks, and the construction server executes each task in the memory queue according to the sequence of the tasks in the memory queue.
In the embodiment of the present application, the dispatch server refers to a server deployed with a dispatch service. A build server refers to a server deployed with a build service. The same server can be deployed with a construction service, and the same server can be deployed with the construction service and the scheduling service at the same time. Therefore, the scheduling server and the building server mentioned in the present application may be the same server or different servers, and are determined according to the deployment location of the service, but the correspondence between the service and the server is determined.
The distributed scheduling method and the service server according to the embodiment of the present application are described below with reference to the drawings.
Fig. 2 is a flowchart illustrating a distributed scheduling method according to an embodiment of the present application.
The embodiment of the present application is exemplified by configuring the distributed scheduling method in a service server, and the service server may be applied to any computer device, so that the computer device may execute a distributed scheduling function.
As shown in fig. 2, the distributed scheduling method may include the steps of:
step 201, a task request is obtained, wherein the task request has a task attribute.
In the embodiment of the application, the service server receives the task request of the front-end user through the front end. Wherein the front end is provided with an interface for a front end user to create a task request. Wherein the task attribute comprises at least one of the following parameters: the software to be constructed belongs to the platform type, the service scene and the construction task identifier.
The platform type is, for example, an IOS platform or an Android platform. The service scenario may be, for example, creating APP (clone), creating APP version (BRANCH), constructing APP (build), analyzing dependence of APP source code (anayz), packaging channel package for Android platform (CHANNELS), and the like.
Step 202, sending a construction request to a scheduling server according to the task request, wherein the construction request has a task attribute, and the scheduling server selects a target construction server from a plurality of construction servers according to the task attribute and the health status mapping table.
In the embodiment of the application, the service server maintains a message queue for storing the task requests waiting for the absence of the idle construction server, and once the idle construction server exists, the service server initiates the construction requests with the task attributes in the task requests to the scheduling server again. Therefore, in the embodiment of the application, the triggering condition that the service server sends the construction request to the scheduling server according to the task request is that an idle construction server exists and the message queue is empty; if the message queue is not empty, the earliest task request is taken out from the message queue, a construction request is sent according to the task attribute in the task request, and the task request which is just received is cached in the message queue.
In the embodiment of the present application, the health status mapping table includes a plurality of health status indicators of a plurality of construction servers. The health status indexes include, for example, a disk remaining space, a CPU remaining space, a memory queue size, a number of maximum parallel execution tasks of the build service deployed on the build server, and the like.
In the embodiment of the present application, the health status mapping table may be obtained, for example, in such a manner that the scheduling server receives health status feedback messages sent by a plurality of construction servers, where the health status feedback messages include health status information of corresponding construction servers; and the scheduling server maintains the health state mapping table according to the health state information of the plurality of construction servers. The construction server also stores at least one of the following data in the memory queue: the method comprises the following steps that the total capacity (total) of a disk, the residual space of the disk, the total core number of a CPU, the residual space of the CPU, the total size of a memory, the residual space of the memory, the size of a memory queue, the number of maximum parallel execution tasks of a construction service deployed on a construction server and the like, and the construction server can obtain health state information from the memory queue and provide the health state information to a scheduling server so as to maintain a health state mapping table. The method for providing the health state information to the scheduling server by the construction server may be, for example, regularly pushing the health state information to the scheduling server through WebSocket.
It should be noted that, in the present application, a health state mapping table is set on a scheduling server, so that the scheduling server can know the health state of each construction server, and when a certain construction server is disconnected or fails, the health state information of the construction server in the health state mapping table is deleted; if a certain construction server is reconnected or a certain construction server is newly added, the health state information of the construction server can be added in the health state mapping table, so that the pluggable of each construction server is realized, the capacity can be automatically reduced and expanded, and no influence is caused on other construction servers.
In this embodiment of the present application, the scheduling server may select a target build server from among the plurality of build servers by: acquiring a service scene in task attributes; acquiring a scheduling strategy corresponding to a service scene; and selecting a target construction server from the plurality of construction servers according to the scheduling policy according to the health state mapping table.
The service scenario may be, for example, creating APP (clone), creating APP version (BRANCH), constructing APP (build), analyzing dependence of APP source code (anal), packaging channel package for Android platform (CHANNELS), and the like. Creating a scheduling strategy corresponding to the APP as a source code cloning scheduling strategy; creating a scheduling strategy corresponding to the APP version to create a branch scheduling strategy; constructing a scheduling strategy corresponding to the APP as a source code compiling scheduling strategy; analyzing a scheduling strategy corresponding to the dependence of the APP source code into a source code dependence analysis scheduling strategy; and aiming at the scheduling strategy corresponding to the Android platform packaging channel package, the scheduling strategy is a multi-channel package scheduling strategy.
In the embodiment of the application, (1) in the source code cloning scheduling strategy and the creation branch scheduling strategy, the health state indexes are disk health state indexes, CPU health state indexes and memory health state indexes according to the descending order of priority. (2) In the source code compiling and scheduling strategy and the source code dependence analyzing and scheduling strategy, the health state indexes are sorted in descending order according to priority, the number of tasks in a memory queue of a construction server does not reach the maximum value of the queue, downloaded codes exist in the construction server, the estimated construction time of the construction server is smaller than a preset time threshold, the disk health state indexes, the CPU health state indexes and the memory health state indexes. (3) In the multi-channel packet scheduling strategy, the health status indexes are CPU health status indexes and memory health status indexes in the descending order of priority.
When the scheduling strategy is a source code clone scheduling strategy, a branch scheduling strategy or a multi-channel packet scheduling strategy, the scheduling server selects a target construction server in such a way that the construction server with the maximum corresponding health state index is obtained from a plurality of construction servers as the target construction server according to the sequence corresponding to the scheduling strategy; and if the construction server with the maximum corresponding health state index is not obtained, randomly selecting one construction server from the plurality of construction servers as a target construction server.
In the embodiment of the application, when the scheduling policy is a source code clone scheduling policy, a created branch scheduling policy or a multi-channel packet scheduling policy, the construction server with the largest corresponding health state index is preferentially selected as the target server, so that the resource for executing the task can be increased, the task execution time can be reduced, and the task execution efficiency can be further improved.
When the scheduling policy is a source code compiling scheduling policy or a source code dependency analysis scheduling policy, the scheduling server selects the target construction server in such a way that the corresponding number of tasks does not reach the corresponding maximum value and the first construction server with downloaded codes is obtained from a plurality of construction servers, and the first construction server is used as the target construction server; if the first construction server is not obtained, obtaining a plurality of second construction servers, wherein the corresponding task number does not reach the corresponding maximum value, the downloaded codes do not exist, and the expected construction time is smaller than the preset time threshold value, from the plurality of construction servers; acquiring a construction server with the maximum corresponding health state index from the plurality of second construction servers as a target construction server according to the disk health state index, the CPU health state index and the memory health state index in the sequence corresponding to the scheduling strategy; and if the construction server with the maximum corresponding health state index is not obtained, randomly selecting one construction server from the plurality of construction servers as a target construction server.
In the embodiment of the application, when the scheduling policy is a source code compiling scheduling policy or a source code dependency analysis scheduling policy, the corresponding number of tasks is preferentially selected to be less than the corresponding maximum value, and the first construction server with the downloaded codes is used as the target construction server, so that the code is prevented from being downloaded again, the time occupied by the code to be downloaded again is shortened, the scheduling efficiency is further improved, the task execution time is reduced, and the task execution efficiency is further improved.
In the embodiment of the application, when the corresponding task quantity does not reach the corresponding maximum value and the first building server of the downloaded codes does not exist, the second server of which the corresponding task quantity does not reach the corresponding maximum value and the downloaded codes do not exist and the expected building time is smaller than the preset time threshold value is preferentially selected as the target building server, so that the expected building time can be reduced as much as possible, namely the task execution time is reduced, and the task execution efficiency is further improved.
And step 203, receiving the address of the target construction server fed back by the scheduling server, and calling the target construction server to execute the task corresponding to the task request according to the address.
In this embodiment of the present application, the process of the service server executing step 203 may be, for example, acquiring task parameters from a database according to a task request; and sending the task parameters to a target construction server, and executing the task parameters through the target construction server.
In the embodiment of the application, the service server may specifically call an address of the target construction server through a remote Procedure call (rpc) (remote Procedure call) to send the task parameter to the target construction server, so that the target construction server executes the task according to the task parameter. It should be noted that each build server maintains a memory queue, and the build server can add the executed task to the memory queue.
In the embodiment of the application, the service server and the scheduling server are isolated from the function of the construction server, namely the service server is used for sending the construction request to obtain the target construction server and further calling the target construction server to execute the task; the scheduling server is used for selecting a target construction server according to the construction request; the build server is used to perform tasks. The 3 servers have single functions, and function intersection does not exist among the servers, so that when one server is expanded or updated, other servers are not affected, low-coupling high-cohesion among the servers is realized, and the scheduling efficiency and the task execution efficiency are further improved.
In this embodiment of the application, after step 203, the service server may further perform the following steps: receiving task state information fed back by a plurality of construction servers; and updating the task state in the database according to the task state information so as to ensure the accuracy of the task state in the database.
In addition, it should be noted that, if the service server does not receive the address of the target construction server fed back by the scheduling server, the target construction server is determined according to the construction server configuration file. The method for determining the target construction server by the service server according to the construction server configuration file may be, for example, polling addresses of a plurality of construction servers, and selecting an available construction server from the plurality of construction servers as the target construction server.
In the embodiment of the application, under the condition that the scheduling server is down or the scheduling strategy is wrong, the service server cannot receive the address of the target construction server fed back by the scheduling server, and at the moment, the service server can select the target construction server by polling the addresses of the plurality of construction servers, so that disaster tolerance and automatic degradation of the scheduling service can be realized without influencing the execution of tasks.
According to the distributed scheduling method, the task requests are obtained, wherein the task requests have task attributes; sending a construction request to a scheduling server according to the task request, wherein the construction request has a task attribute, and the scheduling server selects a target construction server from a plurality of construction servers according to the task attribute and a health state mapping table; and receiving the address of the target construction server fed back by the scheduling server, and calling the target construction server to execute the task request according to the address, so that scheduling can be performed according to the health state of the construction server, thereby improving scheduling efficiency and task execution efficiency.
Fig. 3 is a flowchart illustrating a distributed scheduling method according to a second embodiment of the present application.
The embodiment of the present application is described by way of example that the distributed scheduling method is configured in a scheduling server, and the scheduling server may be applied to any computer device, so that the computer device may perform a distributed scheduling function.
As shown in fig. 3, the distributed scheduling method may include the steps of:
step 301, receiving a construction request of a service server, wherein the construction request has a task attribute.
In the embodiment of the application, the construction request of the service server is a construction request which is sent to the scheduling server according to the task attribute in the task request after the service server obtains the task request of the front-end user.
Step 302, selecting a target build server from the plurality of build servers according to the task attributes and the health state mapping table.
In the embodiment of the present application, the health status mapping table includes a plurality of health status indicators of a plurality of construction servers. The health status indexes include, for example, a disk remaining space, a CPU remaining space, a memory queue size, a number of maximum parallel execution tasks of the build service deployed on the build server, and the like.
In the embodiment of the present application, the health status mapping table may be obtained, for example, in such a manner that the scheduling server receives health status feedback messages sent by a plurality of construction servers, where the health status feedback messages include health status information of corresponding construction servers; and the scheduling server maintains the health state mapping table according to the health state information of the plurality of construction servers. The method for providing the health state information to the scheduling server by the construction server may be, for example, regularly pushing the health state information to the scheduling server through WebSocket.
It should be noted that, in the present application, a health state mapping table is set on a scheduling server, so that the scheduling server can know the health state of each construction server, and when a certain construction server is disconnected or fails, the health state information of the construction server in the health state mapping table is deleted; if a certain construction server is reconnected or a certain construction server is newly added, the health state information of the construction server can be added in the health state mapping table, so that the pluggable of each construction server is realized, the capacity can be automatically reduced and expanded, and no influence is caused on other construction servers.
In this embodiment of the present application, the scheduling server may select a target build server from among the plurality of build servers by: acquiring a service scene in task attributes; acquiring a scheduling strategy corresponding to a service scene; and selecting a target construction server from the plurality of construction servers according to the scheduling policy according to the health state mapping table.
The service scenario may be, for example, creating APP (clone), creating APP version (BRANCH), constructing APP (build), analyzing dependence of APP source code (anal), packaging channel package for Android platform (CHANNELS), and the like. Creating a scheduling strategy corresponding to the APP as a source code cloning scheduling strategy; creating a scheduling strategy corresponding to the APP version to create a branch scheduling strategy; constructing a scheduling strategy corresponding to the APP as a source code compiling scheduling strategy; analyzing a scheduling strategy corresponding to the dependence of the APP source code into a source code dependence analysis scheduling strategy; and aiming at the scheduling strategy corresponding to the Android platform packaging channel package, the scheduling strategy is a multi-channel package scheduling strategy.
In the embodiment of the application, (1) in the source code cloning scheduling strategy and the creation branch scheduling strategy, the health state indexes are disk health state indexes, CPU health state indexes and memory health state indexes according to the descending order of priority. (2) In the source code compiling and scheduling strategy and the source code dependence analyzing and scheduling strategy, the health state indexes are sorted in descending order according to priority, the number of tasks in a memory queue of a construction server does not reach the maximum value of the queue, downloaded codes exist in the construction server, the estimated construction time of the construction server is smaller than a preset time threshold, the disk health state indexes, the CPU health state indexes and the memory health state indexes. (3) In the multi-channel packet scheduling strategy, the health status indexes are CPU health status indexes and memory health status indexes in the descending order of priority.
In the embodiment of the application, when the scheduling policy is a source code clone scheduling policy, a branch scheduling policy or a multi-channel packet scheduling policy, the scheduling server selects a target construction server in such a way that the construction server with the maximum corresponding health state index is obtained from a plurality of construction servers as the target construction server according to the sequence corresponding to the scheduling policy; and if the construction server with the maximum corresponding health state index is not obtained, randomly selecting one construction server from the plurality of construction servers as a target construction server.
Specifically, taking the scheduling policy as a source code cloning scheduling policy as an example, (1) the scheduling server may first obtain a corresponding construction server with the largest disk health status index from among the plurality of construction servers, that is, the construction server with the largest disk remaining space, and if the construction server is obtained, take the construction server as a target construction server; (2) if the disk health status indexes of all the construction servers are consistent, acquiring a construction server with the maximum corresponding CPU health status index from the plurality of construction servers, namely acquiring the construction server with the maximum CPU residual space, and if the construction server is acquired, taking the construction server as a target construction server; (3) if the CPU health status indexes of all the construction servers are consistent, acquiring a construction server with the maximum corresponding memory health status index from the plurality of construction servers, namely acquiring the construction server with the maximum memory remaining space, and if the construction server is acquired, taking the construction server as a target construction server; (4) and if the memory health state indexes of all the construction servers are consistent, randomly selecting the construction server from the plurality of construction servers as a target construction server.
In the embodiment of the application, when the scheduling policy is a source code clone scheduling policy, a created branch scheduling policy or a multi-channel packet scheduling policy, the construction server with the largest corresponding health state index is preferentially selected as the target server, so that the resource for executing the task can be increased, the task execution time can be reduced, and the task execution efficiency can be further improved.
In the embodiment of the application, when the scheduling policy is a source code compiling scheduling policy or a source code dependency analysis scheduling policy, the scheduling server selects the target construction server in such a way that a first construction server which has a downloaded code and acquires the corresponding number of tasks from a plurality of construction servers does not reach the corresponding maximum value is used as the target construction server; if the first construction server is not obtained, obtaining a plurality of second construction servers, wherein the corresponding task number does not reach the corresponding maximum value, the downloaded codes do not exist, and the expected construction time is smaller than the preset time threshold value, from the plurality of construction servers; acquiring a construction server with the maximum corresponding health state index from the plurality of second construction servers as a target construction server according to the disk health state index, the CPU health state index and the memory health state index in the sequence corresponding to the scheduling strategy; and if the construction server with the maximum corresponding health state index is not obtained, randomly selecting one construction server from the plurality of construction servers as a target construction server. The maximum value is the maximum task number of the memory queue corresponding to the building server.
Specifically, taking the scheduling policy as an example of compiling the scheduling policy for the source code, (1) the scheduling server may first obtain, from among the plurality of construction servers, a construction server for which the corresponding task number does not reach the corresponding maximum value, and if not, does not receive the construction request; (2) if the downloaded code is acquired, acquiring a first construction server with the downloaded code from the construction servers of which the corresponding task quantity does not reach the corresponding maximum value, and if the downloaded code is acquired, taking the first construction server as a target construction server; (3) if not, acquiring a second construction server of which the estimated construction time is less than a preset time threshold from the construction servers of which the corresponding task quantity does not reach the corresponding maximum value; if the number of the second construction servers is single, taking the single construction server as a target construction server; (4) if the number of the second construction servers is multiple, acquiring a construction server with the largest corresponding disk health state index from the multiple second construction servers, namely acquiring the construction server with the largest disk remaining space, and if the number of the second construction servers is multiple, taking the construction server as a target construction server; (5) if the disk health status indexes of all the construction servers are consistent, acquiring a construction server with the maximum corresponding CPU health status index from the plurality of construction servers, namely acquiring the construction server with the maximum CPU residual space, and if the construction server is acquired, taking the construction server as a target construction server; (6) if the CPU health status indexes of all the construction servers are consistent, acquiring a construction server with the maximum corresponding memory health status index from the plurality of construction servers, namely acquiring the construction server with the maximum memory remaining space, and if the construction server is acquired, taking the construction server as a target construction server; (7) and if the memory health state indexes of all the construction servers are consistent, randomly selecting the construction server from the plurality of construction servers as a target construction server.
In the embodiment of the application, when the scheduling policy is a source code compiling scheduling policy or a source code dependency analysis scheduling policy, the corresponding number of tasks is preferentially selected to be less than the corresponding maximum value, and the first construction server with the downloaded codes is used as the target construction server, so that the code is prevented from being downloaded again, the time occupied by the code to be downloaded again is shortened, the scheduling efficiency is further improved, the task execution time is reduced, and the task execution efficiency is further improved.
And step 303, feeding back the address of the target construction server to the service server, so that the service server calls the target construction server to execute the task corresponding to the task attribute according to the address.
In the embodiment of the application, after the scheduling server feeds back the address of the target construction server to the service server, the service server can obtain task parameters from the database according to the task request corresponding to the task attribute; and sending the task parameters to a target construction server, and executing the task parameters through the target construction server. The service server can update the task state in the database according to the task state information fed back by the plurality of construction servers, so that the accuracy of the task state in the database is ensured.
In addition, it should be noted that, if the service server does not receive the address of the target construction server fed back by the scheduling server, the target construction server is determined according to the construction server configuration file. The method for determining the target construction server by the service server according to the construction server configuration file may be, for example, polling addresses of a plurality of construction servers, and selecting an available construction server from the plurality of construction servers as the target construction server.
The distributed scheduling method of the embodiment of the application receives a construction request of a service server, wherein the construction request has a task attribute; selecting a target construction server from a plurality of construction servers according to the task attribute and the health state mapping table; and feeding back the address of the target construction server to the service server so that the service server calls the target construction server to execute the task request corresponding to the task attribute according to the address, and scheduling can be performed according to the health state of the construction server, so that the scheduling efficiency is improved, and the task execution efficiency is improved.
Fig. 4 is a schematic structural diagram of a service server provided in the third embodiment of the present application.
As shown in fig. 4, the service server 400 may include: an acquisition module 410, a sending module 420 and a processing module 430.
The acquiring module 410 is configured to acquire a task request, where the task request has a task attribute;
a sending module 420, configured to send a build request to a scheduling server according to the task request, where the build request includes the task attribute, and the scheduling server selects a target build server from a plurality of build servers according to the task attribute and a health status mapping table;
and the processing module 430 is configured to receive the address of the target construction server fed back by the scheduling server, and call the target construction server to execute the task corresponding to the task request according to the address.
Further, in a possible implementation manner of the embodiment of the present application, the processing module 430 is further configured to determine the target build server according to a build server configuration file when the address of the target build server fed back by the scheduling server is not received.
Further, in a possible implementation manner of the embodiment of the present application, the processing module 430 is specifically configured to poll addresses of the multiple build servers, and select an available build server from the multiple build servers as the target build server.
Further, in a possible implementation manner of the embodiment of the present application, the processing module 430 is specifically configured to obtain task parameters from a database according to the task request; and sending the task parameters to the target construction server, and executing the task parameters through the target construction server.
Further, in a possible implementation manner of the embodiment of the present application, the health state mapping table is obtained in a manner that the scheduling server receives health state feedback messages sent by the plurality of construction servers, where the health state feedback messages include health state information of corresponding construction servers; and the scheduling server maintains the health state mapping table according to the health state information of the plurality of construction servers.
Further, in a possible implementation manner of the embodiment of the present application, the processing module 430 is further configured to receive task state information fed back by the multiple construction servers; and updating the task state in the database according to the task state information.
Further, in a possible implementation manner of the embodiment of the present application, the scheduling server selects a target build server from among the plurality of build servers by: acquiring a service scene in the task attribute; acquiring a scheduling strategy corresponding to the service scene; and selecting a target construction server from the plurality of construction servers according to the scheduling strategy according to the health state mapping table.
Further, in a possible implementation manner of the embodiment of the present application, the health status mapping table includes a plurality of health status indicators, and the target construction server is selected in a manner that priorities of the plurality of health status indicators are determined according to the scheduling policy; and selecting a target construction server from the plurality of candidate construction servers according to the priorities of the plurality of health state indexes and the plurality of health state indexes.
Further, in a possible implementation manner of the embodiment of the present application, the scheduling policy includes at least one of the following policies: a source code cloning scheduling strategy, a branch scheduling strategy, a source code compiling scheduling strategy, a source code dependence analysis scheduling strategy and a multi-channel packet scheduling strategy are established;
in the source code cloning scheduling strategy and the created branch scheduling strategy, the health state indexes are a disk health state index, a CPU health state index and a memory health state index in the descending order of priority;
in the source code compiling and scheduling strategy and the source code dependence analyzing and scheduling strategy, the health state indexes are sorted in descending order according to priority, the number of tasks in a memory queue of the construction server does not reach the maximum value of the queue, the construction server has downloaded codes, the estimated construction time of the construction server is less than a preset time threshold, the disk health state indexes, the CPU health state indexes and the memory health state indexes;
in the multi-channel packet scheduling strategy, the health status indexes are CPU health status indexes and memory health status indexes in the descending order of priority.
Further, in a possible implementation manner of the embodiment of the present application, when the scheduling policy is a source code cloning scheduling policy, a creation branch scheduling policy, or a multi-channel packet scheduling policy, a target construction server is selected in such a manner that a construction server with a maximum corresponding health status index is obtained from among the plurality of construction servers as the target construction server according to a sequence corresponding to the scheduling policy; and if the construction server with the maximum corresponding health state index is not obtained, randomly selecting one construction server from the plurality of construction servers as the target construction server.
Further, in a possible implementation manner of the embodiment of the present application, when the scheduling policy is a source code compiling scheduling policy or a source code dependency analysis scheduling policy, the target construction server is selected in a manner that a first construction server that acquires, from the plurality of construction servers, that the number of corresponding tasks does not reach a corresponding maximum value and has downloaded codes exists is used as the target construction server;
if the first construction server is not obtained, obtaining a plurality of second construction servers, wherein the corresponding task quantity does not reach the corresponding maximum value, downloaded codes do not exist, and the expected construction time is smaller than the preset time threshold value, from the plurality of construction servers;
acquiring a construction server with the maximum corresponding health state index from the plurality of second construction servers as the target construction server according to the disk health state index, the CPU health state index and the memory health state index in the sequence corresponding to the scheduling strategy;
and if the construction server with the maximum corresponding health state index is not obtained, randomly selecting one construction server from the plurality of construction servers as the target construction server.
The service server of the embodiment of the application acquires the task request, wherein the task request has task attributes; sending a construction request to a scheduling server according to the task request, wherein the construction request has a task attribute, and the scheduling server selects a target construction server from a plurality of construction servers according to the task attribute and a health state mapping table; and receiving the address of the target construction server fed back by the scheduling server, and calling the target construction server to execute the task request according to the address, so that scheduling can be performed according to the health state of the construction server, thereby improving scheduling efficiency and task execution efficiency.
Fig. 5 is a schematic structural diagram of a dispatch server according to a fourth embodiment of the present application.
As shown in fig. 5, the scheduling server 500 may include: a receiving module 510, a selecting module 520, and a feedback module 530.
The receiving module 510 is configured to receive a construction request of a service server, where the construction request has a task attribute;
a selecting module 520, configured to select a target build server from the multiple build servers according to the task attribute and the health status mapping table;
a feedback module 530, configured to feed back the address of the target construction server to the service server, so that the service server calls the target construction server to execute the task corresponding to the task attribute according to the address.
Further, in a possible implementation manner of the embodiment of the present application, the scheduling server further includes: a processing module; the receiving module 510 is further configured to receive health state feedback messages sent by the multiple construction servers, where the health state feedback messages include health state information of corresponding construction servers; and the processing module is used for maintaining the health state mapping table according to the health state information of the plurality of construction servers.
Further, in a possible implementation manner of the embodiment of the present application, the processing module is specifically configured to obtain a service scenario in the task attribute; acquiring a scheduling strategy corresponding to the service scene; and selecting the target construction server from the plurality of construction servers according to the scheduling policy according to the health state mapping table.
Further, in a possible implementation manner of the embodiment of the present application, the health status mapping table includes a plurality of health status indicators, where the selecting module 520 is specifically configured to determine priorities of the plurality of health status indicators according to the scheduling policy; and selecting the target construction server from the plurality of construction servers according to the plurality of health status indexes and the corresponding priorities.
Further, in a possible implementation manner of the embodiment of the present application, the scheduling policy includes at least one of the following policies: a source code cloning scheduling strategy, a branch scheduling strategy, a source code compiling scheduling strategy, a source code dependence analysis scheduling strategy and a multi-channel packet scheduling strategy are established;
in the source code cloning scheduling strategy and the created branch scheduling strategy, the health state indexes are a disk health state index, a CPU health state index and a memory health state index in the descending order of priority;
in the source code compiling and scheduling strategy and the source code dependence analyzing and scheduling strategy, the plurality of health state indexes are sorted in descending order according to priority, the number of tasks in a memory queue of the construction server does not reach the maximum value of the queue, the construction server has downloaded codes, the estimated construction time of the construction server is less than a preset time threshold, the disk health state indexes, the CPU health state indexes and the memory health state indexes;
in the multi-channel packet scheduling strategy, the health status indexes are CPU health status indexes and memory health status indexes in the descending order of priority.
Further, in a possible implementation manner of the embodiment of the present application, when the scheduling policy is a source code cloning scheduling policy, a creation branch scheduling policy, or a multi-channel packet scheduling policy, the selecting module 520 is specifically configured to obtain, according to a sequence corresponding to the scheduling policy, a construction server with a maximum corresponding health status index from among the plurality of construction servers, and use the construction server as a target construction server; and if the construction server with the maximum corresponding health state index is not obtained, randomly selecting one construction server from the plurality of construction servers as a target construction server.
Further, in a possible implementation manner of the embodiment of the present application, when the scheduling policy is a source code compiling scheduling policy or a source code dependency analysis scheduling policy, the selecting module 520 is specifically configured to obtain, from among the multiple construction servers, a first construction server that has a downloaded code and whose corresponding number of tasks does not reach a corresponding maximum value, and use the first construction server as the target construction server; if the first construction server is not obtained, obtaining a plurality of second construction servers, wherein the corresponding task number does not reach the corresponding maximum value, the downloaded codes do not exist, and the expected construction time is smaller than the preset time threshold value, from the plurality of construction servers; acquiring a construction server with the maximum corresponding health state index from the plurality of second construction servers as a target construction server according to the disk health state index, the CPU health state index and the memory health state index in the sequence corresponding to the scheduling strategy; and if the construction server with the maximum corresponding health state index is not obtained, randomly selecting one construction server from the plurality of construction servers as a target construction server.
The scheduling server receives a construction request of a service server, wherein the construction request has a task attribute; selecting a target construction server from a plurality of construction servers according to the task attribute and the health state mapping table; and feeding back the address of the target construction server to the service server so that the service server calls the target construction server to execute the task request corresponding to the task attribute according to the address, and scheduling can be performed according to the health state of the construction server, so that the scheduling efficiency is improved, and the task execution efficiency is improved.
In order to implement the foregoing embodiment, the present application further provides a service platform, including: the system comprises a business server, a scheduling server and a plurality of construction servers, wherein the scheduling server is respectively connected with the business server and the construction servers; the service server is configured to execute the distributed scheduling method in the embodiment shown in fig. 2.
In order to implement the foregoing embodiments, the present application also provides a computer device, including: the distributed scheduling method includes a memory, a processor and a computer program stored in the memory and running on the processor, and when the processor executes the program, the distributed scheduling method is realized as proposed in the foregoing embodiments of the present application.
In order to implement the foregoing embodiments, the present application also provides a computer program product, which when executed by an instruction processor in the computer program product, performs the distributed scheduling method as set forth in the foregoing embodiments of the present application.
FIG. 6 illustrates a block diagram of an exemplary computer device suitable for use to implement embodiments of the present application. The computer device 12 shown in fig. 6 is only an example and should not bring any limitation to the function and scope of use of the embodiments of the present application.
As shown in FIG. 6, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. These architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus, to name a few.
Computer device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 28 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 30 and/or cache Memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, and commonly referred to as a "hard drive"). Although not shown in FIG. 6, a disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk Read Only Memory (CD-ROM), a Digital versatile disk Read Only Memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the application.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally perform the functions and/or methodologies of the embodiments described herein.
Computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with computer device 12, and/or with any devices (e.g., network card, modem, etc.) that enable computer device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Moreover, computer device 12 may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public Network such as the Internet) via Network adapter 20. As shown, network adapter 20 communicates with the other modules of computer device 12 via bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing, for example, implementing the methods mentioned in the foregoing embodiments, by executing programs stored in the system memory 28.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (16)

1. A distributed scheduling method, comprising:
acquiring a task request, wherein the task request has a task attribute;
sending a construction request to a scheduling server according to the task request, wherein the construction request has the task attribute, and the scheduling server selects a target construction server from a plurality of construction servers according to the task attribute and a health state mapping table;
and receiving the address of the target construction server fed back by the scheduling server, and calling the target construction server to execute the task corresponding to the task request according to the address.
2. The distributed scheduling method of claim 1, further comprising:
and if the address of the target construction server fed back by the dispatching server is not received, determining the target construction server according to a construction server configuration file.
3. The distributed scheduling method of claim 2 wherein the build server profile includes addresses of a plurality of build servers, the determining the target build server from the build server profile comprising:
polling the addresses of the plurality of build servers, selecting an available build server from among the plurality of build servers as the target build server.
4. The distributed scheduling method according to claim 1, wherein the invoking the target build server according to the address to execute the task corresponding to the task request includes:
acquiring task parameters from a database according to the task request;
and sending the task parameters to the target construction server, and executing the task parameters through the target construction server.
5. The distributed scheduling method of claim 1 wherein the health map is obtained by,
the scheduling server receives health state feedback messages sent by the plurality of construction servers, wherein the health state feedback messages comprise health state information of the corresponding construction servers;
and the scheduling server maintains the health state mapping table according to the health state information of the plurality of construction servers.
6. The distributed scheduling method of claim 1, further comprising:
receiving task state information fed back by the plurality of construction servers;
and updating the task state in the database according to the task state information.
7. The distributed scheduling method of claim 1 wherein the scheduling server selects a target build server from among the plurality of build servers by:
acquiring a service scene in the task attribute;
acquiring a scheduling strategy corresponding to the service scene;
and selecting a target construction server from the plurality of construction servers according to the scheduling strategy according to the health state mapping table.
8. The distributed scheduling method of claim 7 wherein the health map table comprises a plurality of health indicators, and wherein said selecting a target build server from among the plurality of build servers according to the scheduling policy based on the health map table comprises:
determining priorities of the plurality of health status indicators according to the scheduling policy;
selecting a target build server from among the plurality of candidate build servers according to the priorities of the plurality of health status indicators and the plurality of health status indicators.
9. The distributed scheduling method of claim 8 wherein the scheduling policy comprises at least one of the following policies: a source code cloning scheduling strategy, a branch scheduling strategy, a source code compiling scheduling strategy, a source code dependence analysis scheduling strategy and a multi-channel packet scheduling strategy are established;
in the source code cloning scheduling strategy and the created branch scheduling strategy, the health state indexes are a disk health state index, a CPU health state index and a memory health state index in the descending order of priority;
in the source code compiling and scheduling strategy and the source code dependence analyzing and scheduling strategy, the health state indexes are sorted in descending order according to priority, the number of tasks in a memory queue of the construction server does not reach the maximum value of the queue, the construction server has downloaded codes, the estimated construction time of the construction server is less than a preset time threshold, the disk health state indexes, the CPU health state indexes and the memory health state indexes;
in the multi-channel packet scheduling strategy, the health status indexes are CPU health status indexes and memory health status indexes in the descending order of priority.
10. The distributed scheduling method of claim 9, wherein when the scheduling policy is a source clone scheduling policy, a create branch scheduling policy, or a multi-channel packet scheduling policy, the selecting the target build server from among the plurality of build servers according to the plurality of health status indicators and corresponding priorities comprises:
according to the sequence corresponding to the scheduling strategy, acquiring a construction server with the maximum corresponding health state index from the plurality of construction servers as the target construction server;
and if the construction server with the maximum corresponding health state index is not obtained, randomly selecting one construction server from the plurality of construction servers as the target construction server.
11. The distributed scheduling method of claim 9 wherein, when the scheduling policy is a source code compilation scheduling policy or a source code dependent analysis scheduling policy, the selecting the target build server from among the plurality of build servers according to the plurality of health status indicators and corresponding priorities comprises:
acquiring a first construction server which has a downloaded code and has a corresponding task number which does not reach a corresponding maximum value from the plurality of construction servers, and taking the first construction server as the target construction server;
if the first construction server is not obtained, obtaining a plurality of second construction servers, wherein the corresponding task quantity does not reach the corresponding maximum value, downloaded codes do not exist, and the expected construction time is smaller than the preset time threshold value, from the plurality of construction servers;
acquiring a construction server with the maximum corresponding health state index from the plurality of second construction servers as the target construction server according to the disk health state index, the CPU health state index and the memory health state index in the sequence corresponding to the scheduling strategy;
and if the construction server with the maximum corresponding health state index is not obtained, randomly selecting one construction server from the plurality of construction servers as the target construction server.
12. The distributed scheduling method of any of claims 7-11 wherein the traffic scenario is at least one of the following scenarios: creating an APP, creating an APP version, constructing the APP, analyzing dependence of an APP source code, and packaging a channel package aiming at an Android platform.
13. A traffic server, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring task requests, and the task requests have task attributes;
a sending module, configured to send a construction request to a scheduling server according to the task request, where the construction request includes the task attribute, and the scheduling server selects a target construction server from among multiple construction servers according to the task attribute and a health status mapping table;
and the processing module is used for receiving the address of the target construction server fed back by the scheduling server and calling the target construction server to execute the task corresponding to the task request according to the address.
14. A build service platform, comprising:
the system comprises a business server, a scheduling server and a plurality of construction servers, wherein the scheduling server is respectively connected with the business server and the construction servers;
the traffic server for performing the distributed scheduling method of any of claims 1-12.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-12.
16. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-12.
CN202110256988.8A 2021-03-09 2021-03-09 Distributed scheduling method and service server Pending CN113806035A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110256988.8A CN113806035A (en) 2021-03-09 2021-03-09 Distributed scheduling method and service server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110256988.8A CN113806035A (en) 2021-03-09 2021-03-09 Distributed scheduling method and service server

Publications (1)

Publication Number Publication Date
CN113806035A true CN113806035A (en) 2021-12-17

Family

ID=78892898

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110256988.8A Pending CN113806035A (en) 2021-03-09 2021-03-09 Distributed scheduling method and service server

Country Status (1)

Country Link
CN (1) CN113806035A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117724725A (en) * 2024-02-05 2024-03-19 英诺达(成都)电子科技有限公司 Continuously integrated automatic scheduling method, device, system and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744726A (en) * 2014-01-02 2014-04-23 西北工业大学 Two-stage scheduling method of real-time extension of Windows system
US20150089042A1 (en) * 2013-09-20 2015-03-26 Microsoft Corporation Dynamic discovery of applications, external dependencies, and relationships
US20160321104A1 (en) * 2014-04-03 2016-11-03 Tencent Technology (Shenzhen) Company Limited Method and apparatus for scheduling concurrent task
CN109766189A (en) * 2019-01-15 2019-05-17 北京地平线机器人技术研发有限公司 Colony dispatching method and apparatus
CN110032576A (en) * 2019-03-12 2019-07-19 平安科技(深圳)有限公司 A kind of method for processing business and device
CN110888722A (en) * 2019-11-15 2020-03-17 北京奇艺世纪科技有限公司 Task processing method and device, electronic equipment and computer readable storage medium
CN111274006A (en) * 2019-12-17 2020-06-12 武汉空心科技有限公司 Work platform task allocation method based on predefined scheduling strategy

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150089042A1 (en) * 2013-09-20 2015-03-26 Microsoft Corporation Dynamic discovery of applications, external dependencies, and relationships
CN103744726A (en) * 2014-01-02 2014-04-23 西北工业大学 Two-stage scheduling method of real-time extension of Windows system
US20160321104A1 (en) * 2014-04-03 2016-11-03 Tencent Technology (Shenzhen) Company Limited Method and apparatus for scheduling concurrent task
CN109766189A (en) * 2019-01-15 2019-05-17 北京地平线机器人技术研发有限公司 Colony dispatching method and apparatus
CN110032576A (en) * 2019-03-12 2019-07-19 平安科技(深圳)有限公司 A kind of method for processing business and device
CN110888722A (en) * 2019-11-15 2020-03-17 北京奇艺世纪科技有限公司 Task processing method and device, electronic equipment and computer readable storage medium
CN111274006A (en) * 2019-12-17 2020-06-12 武汉空心科技有限公司 Work platform task allocation method based on predefined scheduling strategy

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117724725A (en) * 2024-02-05 2024-03-19 英诺达(成都)电子科技有限公司 Continuously integrated automatic scheduling method, device, system and storage medium

Similar Documents

Publication Publication Date Title
US7316017B1 (en) System and method for allocatiing communications to processors and rescheduling processes in a multiprocessor system
CN108717379B (en) Electronic device, distributed task scheduling method and storage medium
US20090165003A1 (en) System and method for allocating communications to processors and rescheduling processes in a multiprocessor system
CN107807815B (en) Method and device for processing tasks in distributed mode
CN109152061B (en) Channel allocation method, device, server and storage medium
CN110310139B (en) Data delivery method and data delivery engine device
CN106897299B (en) Database access method and device
CN113064619A (en) Firmware upgrading method, device, system, equipment and storage medium
CN113448594A (en) Service processing method and device, computer equipment and storage medium
CN112579515B (en) Thread message processing method and related product
CN110888658B (en) Method and device for dynamically changing function modules in application program and storage medium
CN116339934A (en) Task execution method, device, electronic equipment and medium
CN113806035A (en) Distributed scheduling method and service server
CN107045452B (en) Virtual machine scheduling method and device
CN111506388B (en) Container performance detection method, container management platform and computer storage medium
CN111625344B (en) Resource scheduling system, method and device in application system
CN114610446B (en) Method, device and system for automatically injecting probe
CN111177160A (en) Service updating method, device, server and medium
CN116166421A (en) Resource scheduling method and equipment for distributed training task
CN111126604B (en) Model training method, device, server and storage medium
US8374593B2 (en) Method of providing mobile application
CN114726657A (en) Method and device for interrupt management and data receiving and sending management and intelligent network card
CN111405015B (en) Data processing method, device, equipment and storage medium
CN115221041A (en) Multi-device testing method and device, electronic device and storage medium
CN114490000A (en) Task processing method, device, equipment and storage medium

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