CN102681881B - Across machine dispatching method and system thereof - Google Patents
Across machine dispatching method and system thereof Download PDFInfo
- Publication number
- CN102681881B CN102681881B CN201110053551.0A CN201110053551A CN102681881B CN 102681881 B CN102681881 B CN 102681881B CN 201110053551 A CN201110053551 A CN 201110053551A CN 102681881 B CN102681881 B CN 102681881B
- Authority
- CN
- China
- Prior art keywords
- slave node
- node
- slave
- predefined
- call request
- 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
Links
Landscapes
- Computer And Data Communications (AREA)
- Hardware Redundancy (AREA)
Abstract
本发明提供一种跨机调度系统,其特征在于,包括主机节点和从机节点,其中,主机节点被配置成根据从机节点信息、预定义流程控制信息和从机节点状态向从机节点发送调用请求;从机节点被配置成执行调用请求并且将调用结果返回主机节点。
The present invention provides a cross-machine scheduling system, which is characterized in that it includes a master node and a slave node, wherein the master node is configured to send to the slave node according to the slave node information, predefined process control information and slave node status Call request; the slave node is configured to execute the call request and return the call result to the master node.
Description
技术领域 technical field
本发明涉及计算机系统的程序执行,尤其涉及跨机调度方法及其系统。The invention relates to program execution of a computer system, in particular to a cross-machine scheduling method and system thereof.
背景技术 Background technique
UNIX是一个多用户、多任务的操作系统,在同一时间内,可以有多个进程同时被执行。进程是系统程序或应用程序在内存中的一次运行,是操作系统当前运行的执行程序。进程和程序并不一一对应,一个程序可以作为多个进程执行。在UNIX系统中,进程调度是通过系统调用来实现的。操作系统的进程调度,主要是实现按照优先级对每个进程进行分时间片的调度,以便对资源(主要是CPU)进行共享。进程的流程调度是指多个进程按照预定义流程被执行。UNIX is a multi-user, multi-tasking operating system. At the same time, multiple processes can be executed at the same time. A process is an execution of a system program or application program in memory, and is an execution program currently running by the operating system. There is no one-to-one correspondence between processes and programs, and one program can be executed as multiple processes. In UNIX systems, process scheduling is implemented through system calls. The process scheduling of the operating system is mainly to realize the scheduling of each process in time slices according to the priority, so as to share resources (mainly CPU). The flow scheduling of a process means that multiple processes are executed according to a predefined flow.
UNIX操作系统未直接提供对进程按照预定义流程进行调用的控制功能。在操作系统下直接实现预定义流程调度的方式,一般是编写命令脚本(shell),但这种命令脚本的方式存在如下缺点:由于命令脚本是针对进程的流程调度编写的,每个shell对应一种调度流程,因此一旦流程改变,则需要修改调用脚本。而且,对于具有一定逻辑关系的执行步骤,步骤之间的这种逻辑关系无法控制。The UNIX operating system does not directly provide a control function for calling a process according to a predefined flow. The way to directly realize the predefined process scheduling under the operating system is generally to write command scripts (shells), but this command script method has the following disadvantages: since the command scripts are written for process process scheduling, each shell corresponds to a A scheduling process, so once the process changes, the calling script needs to be modified. Moreover, for execution steps with a certain logical relationship, this logical relationship between the steps cannot be controlled.
申请号为200610028504.X的专利申请公开了一种应用进程的流程调度方法,其解决了Unix(Linux)环境下采用命令脚本方式实现的流程调度方法单一、无法按照预定义流程满足多种应用进程调度的问题。这种方法设置流程调度服务程序,包括:读取预定义服务进程配置信息;创建输出消息队列及与所述服务进程配置信息对应的输入消息队列;逐条读取单步预定义流程控制信息,执行调用请求时写入对应服务的输入消息队列,执行调用返回时读取输出消息队列。The patent application with the application number 200610028504.X discloses a process scheduling method for application processes, which solves the problem that the single process scheduling method implemented by using command scripts in the Unix (Linux) environment cannot satisfy various application processes according to the predefined process Scheduling issues. This method sets up the process scheduling service program, including: reading predefined service process configuration information; creating an output message queue and an input message queue corresponding to the service process configuration information; reading single-step predefined process control information one by one, and executing Write the input message queue of the corresponding service when calling the request, and read the output message queue when the call returns.
然而,随着计算机系统运算的网络化和异构化部署的特征越来越明显,上述方法或者面向OLTP的中间件系统难以适应复杂的分布式应用。例如,在多机部署的情况下调度方式更加复杂。有些应用程序与机器无关;有些应用对所在主机和位置敏感,要求在所有可访问的机器上强制执行或需要在指定机器运行。进一步,批处理系统要求高性能,即全程尽可能充分地利用硬件资源直至所有流程任务结束,而且计算量大,流程运行时间长,需要较强的高可用性,甚至要具备一定的容灾功能,在进程失效甚至部分物理机器失效时尽量不影响流程的执行。However, as the characteristics of networked and heterogeneous deployment of computer system operations become more and more obvious, the above methods or OLTP-oriented middleware systems are difficult to adapt to complex distributed applications. For example, the scheduling method is more complicated in the case of multi-machine deployment. Some applications are machine-independent; some applications are host- and location-sensitive and require mandatory execution on all accessible machines or need to run on specified machines. Furthermore, the batch processing system requires high performance, that is, the full use of hardware resources throughout the process until the end of all process tasks, and a large amount of calculation, long process running time, strong high availability, and even a certain disaster recovery function. When a process fails or even some physical machines fail, try not to affect the execution of the process.
为达到上述目的,需要一种适用于Unix/Linux类系统的面向批处理应用的跨机调度系统。In order to achieve the above purpose, a batch application-oriented cross-machine scheduling system suitable for Unix/Linux systems is needed.
发明内容 Contents of the invention
本发明的一个或多个目标通过以下技术方案来实现,One or more objectives of the present invention are achieved through the following technical solutions,
一种跨机调度方法,其特征在于,包括以下步骤:A method for cross-machine scheduling, characterized in that it comprises the following steps:
(a)在主机节点处接收预定义流程执行请求,(a) receiving a predefined process execution request at the host node,
(b)在主机节点处读取预定义流程配置信息,(b) Read predefined process configuration information at the host node,
(c)在主机节点处读取从机节点信息,并且装载从机节点列表,(c) read the slave node information at the master node, and load the slave node list,
(d)在主机节点处读取预定义流程控制信息,并且根据预定义流程控制信息向从机节点发送调用请求,(d) Read the predefined flow control information at the master node, and send a call request to the slave node according to the predefined flow control information,
(e)在从机节点处执行调用请求,(e) Execute the call request at the slave node,
(f)在从机节点处将调用结果返回主机节点。(f) return the calling result at the slave node to the master node.
优选地,从机节点信息包括关于从机节点的处理能力的信息,预定义流程控制信息包括预定义流程的调用方式。Preferably, the slave node information includes information about the processing capability of the slave node, and the predefined flow control information includes a calling method of the predefined flow.
优选地,在向从机节点发送调用请求之前,进一步包括查询操作,其中,该查询操作包括:由主机节点向从机节点发送查询参数的步骤,以及,由从机节点向主机节点返回从机节点状态的步骤。Preferably, before sending the invocation request to the slave node, a query operation is further included, wherein the query operation includes: a step of sending query parameters from the master node to the slave node, and returning the slave node to the master node by the slave node Steps for node status.
优选地,当预定义流程控制信息指示预定义流程的调用方式为单机同步调用时,查询从机节点列表中的第一从机节点,以及,当第一从机节点有空闲进程时,向第一从机节点发送调用请求,当第一从机节点没有空闲进程时,流程失败。Preferably, when the predefined flow control information indicates that the calling method of the predefined flow is single-machine synchronous calling, query the first slave node in the slave node list, and, when the first slave node has an idle process, send the A slave node sends a call request, and when the first slave node has no idle process, the process fails.
优选地,当预定义流程控制信息指示预定义流程的调用方式为多机同步调用时,查询从机节点列表中的第一从机节点,以及,当第一从机节点有空闲进程时,向第一从机节点发送调用请求,当第一从机节点没有空闲进程时,查询从机节点列表中的第二从机节点,当第二从机节点有空闲进程时,向第二从机节点发送调用请求。Preferably, when the predefined process control information indicates that the calling method of the predefined process is multi-machine synchronous calling, query the first slave node in the slave node list, and, when the first slave node has an idle process, send The first slave node sends a call request. When the first slave node has no idle process, query the second slave node in the slave node list. When the second slave node has an idle process, send the call request to the second slave node. Send a call request.
优选地,当预定义流程控制信息指示预定义流程的调用方式为多机强制同步调用时,查询从机节点列表中的指定的从机节点,当指定的从机节点都具有空闲进程时,向指定的从机节点发送调用请求,否则,流程失败。调用成功后,在指定的从机节点处将调用结果同步返回主机节点。Preferably, when the predefined process control information indicates that the calling method of the predefined process is a multi-machine forced synchronous call, query the specified slave node in the list of slave nodes, and when the specified slave nodes all have idle processes, send The specified slave node sends the call request, otherwise, the process fails. After the call is successful, the call result is synchronously returned to the master node at the specified slave node.
优选地,当预定义流程控制信息指示预定义流程的调用方式为单机异步调用时,查询从机节点列表中的第一从机节点,根据第一从机节点的空闲进程数量发送调用请求。调用成功后,在第一从机节点处将调用结果异步返回主机节点。Preferably, when the predefined process control information indicates that the calling method of the predefined process is single machine asynchronous calling, query the first slave node in the slave node list, and send the call request according to the number of idle processes of the first slave node. After the call is successful, the call result is asynchronously returned to the master node at the first slave node.
优选地,在主机节点收到来自第一从机节点的一个调用结果后就向第一从机节点发送一个新的调用请求。Preferably, after the master node receives a call result from the first slave node, it sends a new call request to the first slave node.
优选地,当预定义流程控制信息指示预定义流程的调用方式为多机异步调用时,查询从机节点列表中的指定的从机节点,根据指定的从机节点的空闲进程数量发送调用请求。调用成功后,在指定的从机节点处将调用结果异步返回主机节点。Preferably, when the predefined flow control information indicates that the calling method of the predefined flow is multi-machine asynchronous calling, query the specified slave node in the slave node list, and send the call request according to the number of idle processes of the specified slave node. After the call is successful, the call result is asynchronously returned to the master node at the specified slave node.
优选地,在主机节点收到来自指定的从机节点的调用结果后就向该指定的从机节点发送新的调用请求。Preferably, the master node sends a new call request to the designated slave node after receiving the call result from the designated slave node.
一种跨机调度系统,其特征在于,包括主机节点和从机节点,其中,主机节点被配置成根据从机节点信息、预定义流程控制信息和从机节点状态向从机节点发送调用请求;从机节点被配置成执行调用请求并且将调用结果返回主机节点。A cross-machine scheduling system, characterized in that it includes a master node and a slave node, wherein the master node is configured to send a call request to the slave node according to slave node information, predefined flow control information and slave node status; The slave node is configured to execute the call request and return the call result to the master node.
优选地,从机节点中还存储各自的从机节点信息,所述各自的从机节点信息与主机节点中存储的从机节点信息一致。Preferably, the respective slave node information is also stored in the slave node, and the respective slave node information is consistent with the slave node information stored in the master node.
优选地,主机节点通过向从机节点发起查询连接会话获取从机节点状态,其中,通过该查询连接会话直接向从机节点发送调用请求。Preferably, the master node acquires the state of the slave node by initiating a query connection session to the slave node, wherein the call request is directly sent to the slave node through the query connection session.
优选地,主机节点和一个或多个从机节点共同部署在同一物理机器上。Preferably, the master node and one or more slave nodes are co-deployed on the same physical machine.
本发明通过在分布在网络上的计算机中设置主从结构的逻辑服务器,配合消息队列机制,实现了分布式环境下多个进程按照预定义流程进行跨机部署,跨主机调度,支持同步调用(禁止多机/允许多机/强制多机)、异步调用(禁止多机/允许多机),从而满足多种调用流程。在多个进程的调度中,本发明还采用了消息队列控制机制,对于具有逻辑关系的执行步骤,可以通过单进程/多进程、同步/异步的组合调用方式实现步骤之间的逻辑控制。In the present invention, by setting up a master-slave logical server in computers distributed on the network and coordinating with the message queue mechanism, multiple processes in a distributed environment are deployed across computers according to a predefined process, scheduled across hosts, and support synchronous calls ( Prohibit multi-machine/allow multi-machine/force multi-machine), asynchronous call (prohibit multi-machine/allow multi-machine), so as to meet various calling processes. In the scheduling of multiple processes, the present invention also adopts a message queue control mechanism, and for execution steps with logical relationships, the logical control between steps can be realized through combined calls of single process/multiple processes and synchronous/asynchronous.
本发明中,主机节点在调度时可以实时获取进程信息,尽可能最大化资源利用率。当进程或从机节点失效时,可以通过简单修改配置文件实现从机节点的转移或启用。通过主机的调度职能和从机的管理职能之间分开,使得系统组件之间的耦合度较低,进程调度的位置对从机节点透明,可随意指定,大大增加了系统的灵活性。In the present invention, the host node can obtain process information in real time during scheduling, so as to maximize resource utilization as much as possible. When a process or a slave node fails, the transfer or activation of the slave node can be realized by simply modifying the configuration file. By separating the scheduling function of the master from the management function of the slave, the coupling degree between the system components is low, and the location of the process scheduling is transparent to the slave node, which can be freely specified, which greatly increases the flexibility of the system.
附图说明 Description of drawings
在参照附图阅读了本发明的具体实施方式以后,本领域技术人员将会更清楚地了解本发明的各个方面。本领域技术人员应当理解的是,这些附图仅仅用于配合具体实施方式说明本发明的技术方案,而并非意在对本发明的保护范围构成限制。其中,Those skilled in the art will understand various aspects of the present invention more clearly after reading the detailed description of the present invention with reference to the accompanying drawings. It should be understood by those skilled in the art that these drawings are only used to describe the technical solution of the present invention in conjunction with the specific implementation, and are not intended to limit the protection scope of the present invention. in,
图1是根据本发明实施例的跨机调度系统的示意图。Fig. 1 is a schematic diagram of a cross-machine scheduling system according to an embodiment of the present invention.
图2是根据本发明实施例的跨机调度方法的流程图。Fig. 2 is a flowchart of a cross-machine scheduling method according to an embodiment of the present invention.
具体实施方式 Detailed ways
为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明作进一步详细的说明。In order to make the above objects, features and advantages of the present invention more comprehensible, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
图1是根据本发明实施例的跨机调度系统的示意图。如图所示,实现流程调度服务的逻辑模块分2级逻辑部署。第一级为主机节点(第一逻辑服务器),作为流程调度的执行者;第二级为从机节点(第二逻辑服务器),用于对各应用程序的进程进行管理,以及分配来自主机节点的调用请求。主机节点和从机节点可以作为逻辑服务模块被部署在不同的物理机器上,主机节点也可以和一个或多个从机节点共同被部署在一台物理机器上。主机节点和从机节点可以通过socket通信,主机节点也可以通过socket向外部系统提供预定义流程执行服务。Fig. 1 is a schematic diagram of a cross-machine scheduling system according to an embodiment of the present invention. As shown in the figure, the logical modules that implement the process scheduling service are logically deployed in two levels. The first level is the master node (the first logical server), as the executor of process scheduling; the second level is the slave node (the second logical server), which is used to manage the process of each application program and distribute call request. The master node and the slave node can be deployed on different physical machines as logical service modules, and the master node can also be deployed together with one or more slave nodes on one physical machine. The master node and the slave node can communicate through the socket, and the master node can also provide predefined process execution services to the external system through the socket.
图1中还用虚线框示出了预定义流程配置信息、从机节点信息和预定义流程控制信息。其中,预定义流程配置信息指示执行预定义流程所需要的资源配置,例如,要执行的应用程序名称或者特定的指令序列名称,以及这些应用程序或者特定的指令序列的进程的配置。从机节点信息包括关于从机节点的处理能力的信息。这里,处理能力的信息可以指示相应的从机节点能够适于执行哪些应用程序或者特定的指令序列,以及从机节点的最大配置进程数量。可以理解的是,上述处理能力的信息还可以包括相应从机节点的资源配置,例如CPU资源、内存资源等。另外,从机节点信息还可以包括关于各种应用程序或者特定的指令序列可以由哪些从机节点执行的信息,例如,可以将应用程序或者特定的指令序列与相应的从机节点的标识符关联。预定义流程控制信息由一个或多个有序的流程控制命令组成,其可以包括预定义流程的调用方式、调用参数、应用程序标识或者特定的指令序列标识。这里,预定义流程的调用方式可以包括单机同步调用、多机同步调用、多机强制同步调用、单机异步调用和多机异步调用。这里,同步调用是指同一时间只能发起一次调用,待该调用返回后,才能进行下一次调用;异步调用是指发出一次调用后,不等待返回即可再次发出调用,即相当于同一时间可以发出多个调用。下文将详细描述这些调用方式的实现。主机节点中的预定义流程配置信息、从机节点信息和预定义流程控制信息可以被预先设置好并存储在一个或多个配置文件中。Fig. 1 also shows predefined process configuration information, slave node information and predefined process control information with a dotted line box. Wherein, the predefined process configuration information indicates the resource configuration required to execute the predefined process, for example, the name of the application program or the name of the specific instruction sequence to be executed, and the configuration of the processes of the application program or the specific instruction sequence. The slave node information includes information on the processing capabilities of the slave nodes. Here, the processing capability information may indicate which application programs or specific instruction sequences the corresponding slave node is suitable for executing, as well as the maximum number of configured processes of the slave node. It can be understood that the above processing capability information may also include resource configurations of corresponding slave nodes, such as CPU resources, memory resources, and the like. In addition, the slave node information may also include information about which slave nodes can execute various application programs or specific instruction sequences, for example, the application programs or specific instruction sequences may be associated with the corresponding slave node identifiers . The predefined process control information consists of one or more ordered process control commands, which may include the calling method of the predefined process, calling parameters, application program identifier or specific instruction sequence identifier. Here, the calling methods of the predefined process may include single-machine synchronous calling, multi-machine synchronous calling, multi-machine forced synchronous calling, single-machine asynchronous calling and multi-machine asynchronous calling. Here, a synchronous call means that only one call can be made at the same time, and the next call can only be made after the call returns; an asynchronous call means that after a call is made, the call can be made again without waiting for the return, which is equivalent to the same time. Make multiple calls. The implementation of these calling methods will be described in detail below. The predefined flow configuration information in the master node, the slave node information and the predefined flow control information can be preset and stored in one or more configuration files.
在本发明的一个实施例中,还可以在各个从机节点存储各自的从机节点信息,通过互联网或者局域网同步从机节点信息的存储文件使得所述各自的从机节点信息与主机节点中存储的各个从机的节点信息一致。这样,通过使得主机节点与相应的从机节点保持相同的从机节点信息,系统全局可以共用一致的配置信息。当某一从机节点失效时,可以通过变更从机节点信息方便地实现节点的转移。In one embodiment of the present invention, it is also possible to store respective slave node information at each slave node, and to synchronize the storage files of the slave node information through the Internet or a local area network so that the respective slave node information is stored in the master node. The node information of each slave machine is consistent. In this way, by making the master node and the corresponding slave node maintain the same slave node information, the system can share consistent configuration information globally. When a slave node fails, the transfer of the node can be easily realized by changing the information of the slave node.
图2是根据本发明实施例的跨机调度方法的流程图。如图所示,在步骤201中,在主机节点处接收预定义流程执行请求。在步骤202中,在主机节点处读取预定义流程配置信息以获取关于待执行的预定义流程的需求。在步骤203中,在主机节点处读取从机节点信息,分析从机节点的处理能力,并且将相关的从机节点装载至从机节点列表。在步骤204中,在主机节点处读取预定义流程控制信息,每执行一个流程控制命令,根据该流程控制命令的信息向从机节点发送调用请求。此时,在步骤208中,在从机节点处执行调用请求,并且步骤209中返回调用结果。主机节点在步骤210中接收调用返回,由此完成一个流程控制命令的调用。此后,主机节点根据流程控制命令的序列进行下一个流程控制命令的调用。这里,为完成上述步骤,作为示例,可以在主机节点设置控制模块、返回队列、协同模块。其中,控制模块可以作为流程调度的执行模块;返回队列用于存放调用请求的完成消息,控制模块从返回队列读取该完成消息(进程调用返回)来获得应用程序的完成情况;协同模块用于从各从机节点接收进程调用返回并放入返回队列。作为示例,可以在从机节点设置管理模块、协同模块、一个或多个输入队列和一个输出队列。其中,管理模块使用保存并管理各队列和进程的状态;协同模块用于将各进程的返回消息从输出队列传递给主机节点。多个输入队列可以各自分别是不同应用程序的进程队列,也可以为某一应用程序配置多个输入队列用于进程的并发处理,提高单步处理性能。Fig. 2 is a flowchart of a cross-machine scheduling method according to an embodiment of the present invention. As shown in the figure, in step 201, a predefined process execution request is received at a host node. In step 202, the configuration information of the predefined process is read at the host node to obtain requirements about the predefined process to be executed. In step 203, the information of the slave nodes is read at the master node, the processing capability of the slave nodes is analyzed, and the relevant slave nodes are loaded into the slave node list. In step 204, the predefined process control information is read at the master node, and each time a process control command is executed, a call request is sent to the slave node according to the information of the process control command. At this time, in step 208, the call request is executed at the slave node, and the call result is returned in step 209. The host node receives the call return in step 210, thereby completing the call of a flow control command. Thereafter, the host node invokes the next flow control command according to the flow control command sequence. Here, in order to complete the above steps, as an example, a control module, a return queue, and a coordination module may be set on the host node. Among them, the control module can be used as the execution module of process scheduling; the return queue is used to store the completion message of the call request, and the control module reads the completion message (process call return) from the return queue to obtain the completion status of the application program; the coordination module is used for Receive the process call return from each slave node and put it into the return queue. As an example, a management module, a cooperative module, one or more input queues and one output queue can be set on the slave node. Among them, the management module is used to save and manage the state of each queue and process; the coordination module is used to transfer the return message of each process from the output queue to the host node. Multiple input queues can be process queues of different applications, or multiple input queues can be configured for an application for concurrent processing of processes to improve single-step processing performance.
如图2所示,在向从机节点发送调用请求之前,还可以包括查询从机节点状态的步骤205和返回从机节点状态的步骤206。其中,由主机节点向从机节点发送查询参数,从机节点根据查询参数向主机节点返回从机节点状态。这里,查询参数可以是应用程序名称或者特定的指令序列等能够指示从机应当完成的任务的标识符。从机节点状态可以是被查询的从机节点的对应于查询参数的空闲进程的数量等反映进程状态的信息,从机节点状态还可以是反映从机节点处的当前资源使用状态的任何信息。As shown in FIG. 2 , before sending the calling request to the slave node, a step 205 of querying the state of the slave node and a step 206 of returning the state of the slave node may also be included. Wherein, the master node sends query parameters to the slave nodes, and the slave nodes return the status of the slave nodes to the master node according to the query parameters. Here, the query parameter may be an identifier such as an application program name or a specific instruction sequence that can indicate a task that the slave should complete. The status of the slave node may be information reflecting the status of the process, such as the number of idle processes of the queried slave node corresponding to the query parameters, or any information reflecting the current resource usage status of the slave node.
如前所述,预定义流程控制信息包括预定义流程的调用方式。当预定义流程控制信息指示预定义流程的调用方式为单机同步调用时,查询从机节点列表中的一个从机节点,当该从机节点有空闲进程时,向该从机节点发送调用请求,否则,流程失败。As mentioned above, the predefined process control information includes the calling method of the predefined process. When the predefined process control information indicates that the calling method of the predefined process is a single-machine synchronous call, query a slave node in the slave node list, and when the slave node has an idle process, send a call request to the slave node, Otherwise, the process fails.
当预定义流程控制信息指示预定义流程的调用方式为多机同步调用时,查询从机节点列表中的一个从机节点,当该从机节点有空闲进程时,向该从机节点发送调用请求;当该从机节点没有空闲进程时,查询从机节点列表中的另一从机节点,直到查询至首个拥有空闲进程的节点进行调用。如果从机节点列表中的所有从机节点都没有空闲进程,则流程失败。When the predefined process control information indicates that the calling method of the predefined process is multi-machine synchronous calling, query a slave node in the slave node list, and send a call request to the slave node when the slave node has an idle process ; When the slave node has no idle process, query another slave node in the slave node list until the first node with an idle process is found to call. If none of the slave nodes in the slave node list have idle processes, the process fails.
当预定义流程控制信息指示预定义流程的调用方式为多机强制同步调用时,查询从机节点列表中的指定的从机节点,当指定的从机节点都具有空闲进程时,向指定的从机节点发送调用请求,否则,流程失败。调用成功后,在指定的从机节点处将调用结果同步返回主机节点。主机节点待所有从机节点调用结束后统一接收返回。When the predefined process control information indicates that the calling method of the predefined process is multi-machine forced synchronous call, query the specified slave node in the slave node list, and when the specified slave nodes have idle processes, send the specified slave node The machine node sends the call request, otherwise, the process fails. After the call is successful, the call result is synchronously returned to the master node at the specified slave node. The host node will receive and return after all the slave node calls are completed.
当预定义流程控制信息指示预定义流程的调用方式为单机异步调用时,查询从机节点列表中的一个从机节点,根据该从机节点的空闲进程数量发送调用请求。调用成功后,在该从机节点处将调用结果异步返回主机节点。这里,主机节点每收到一个调用返回就向发送返回的节点发送新的调用请求。When the predefined process control information indicates that the calling method of the predefined process is single-machine asynchronous calling, query a slave node in the slave node list, and send a call request according to the number of idle processes of the slave node. After the call is successful, the call result is asynchronously returned to the master node at the slave node. Here, every time the host node receives a call return, it sends a new call request to the node that sent the return.
当预定义流程控制信息指示预定义流程的调用方式为多机异步调用时,查询从机节点列表中的指定的从机节点,根据指定的从机节点的空闲进程数量发送调用请求。调用成功后,在指定的从机节点处将调用结果异步返回主机节点。这里,主机节点每收到来自指定的从机节点的调用返回就向发送返回的节点发送新的调用请求。When the predefined flow control information indicates that the calling method of the predefined flow is multi-machine asynchronous calling, query the specified slave node in the list of slave nodes, and send a call request according to the number of idle processes of the specified slave node. After the call is successful, the call result is asynchronously returned to the master node at the specified slave node. Here, every time the master node receives a call return from a specified slave node, it sends a new call request to the node that sent the return.
此外,主机节点可以在查询操作的连接会话中向从机节点发送调用请求,这样可以进一步保证从机节点状态信息的准确。In addition, the master node can send a call request to the slave node in the connection session of the query operation, which can further ensure the accuracy of the status information of the slave node.
本领域普通技术人员可以理解上述实施例中的全部或部分步骤可以通过程序来指令相关的硬件完成,该程序可以存储于计算机可读存储介质中,存储介质可以包括ROM、RAM、磁盘或光盘等。本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若对本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型。Those of ordinary skill in the art can understand that all or part of the steps in the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can include ROM, RAM, magnetic disk or optical disk, etc. . Those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and equivalent technologies, the present invention also intends to include these modifications and variations.
上文中,参照附图描述了本发明的具体实施方式。但是,本领域中的普通技术人员能够理解,在不偏离本发明的精神和范围的情况下,还可以对本发明的具体实施方式作各种变更和替换。这些变更和替换都落在本发明权利要求书所限定的范围内。Hereinbefore, specific embodiments of the present invention have been described with reference to the accompanying drawings. However, those skilled in the art can understand that without departing from the spirit and scope of the present invention, various changes and substitutions can be made to the specific embodiments of the present invention. These changes and substitutions all fall within the scope defined by the claims of the present invention.
Claims (16)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201110053551.0A CN102681881B (en) | 2011-03-07 | 2011-03-07 | Across machine dispatching method and system thereof |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201110053551.0A CN102681881B (en) | 2011-03-07 | 2011-03-07 | Across machine dispatching method and system thereof |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN102681881A CN102681881A (en) | 2012-09-19 |
| CN102681881B true CN102681881B (en) | 2015-09-16 |
Family
ID=46813852
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201110053551.0A Active CN102681881B (en) | 2011-03-07 | 2011-03-07 | Across machine dispatching method and system thereof |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN102681881B (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103347053A (en) * | 2013-06-19 | 2013-10-09 | 成都市欧冠信息技术有限责任公司 | Remote coprocessing procedure call method based on pipeline technology |
| CN104407923A (en) * | 2014-10-31 | 2015-03-11 | 百度在线网络技术(北京)有限公司 | Cluster task balancing method and device based on single node triggering |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1750486A (en) * | 2005-08-16 | 2006-03-22 | 西安电子科技大学 | Network Measurement Architecture and Its Implementation |
| CN101727389A (en) * | 2009-11-23 | 2010-06-09 | 中兴通讯股份有限公司 | Automatic test system and method of distributed integrated service |
| CN101751288A (en) * | 2008-12-12 | 2010-06-23 | 中国移动通信集团山东有限公司 | Method, device and system applying process scheduler |
-
2011
- 2011-03-07 CN CN201110053551.0A patent/CN102681881B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1750486A (en) * | 2005-08-16 | 2006-03-22 | 西安电子科技大学 | Network Measurement Architecture and Its Implementation |
| CN101751288A (en) * | 2008-12-12 | 2010-06-23 | 中国移动通信集团山东有限公司 | Method, device and system applying process scheduler |
| CN101727389A (en) * | 2009-11-23 | 2010-06-09 | 中兴通讯股份有限公司 | Automatic test system and method of distributed integrated service |
Also Published As
| Publication number | Publication date |
|---|---|
| CN102681881A (en) | 2012-09-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11886929B2 (en) | Deploying cloud-native services across control planes | |
| CN108804238B (en) | Soft bus communication method based on remote procedure call | |
| CN111641515A (en) | VNF life cycle management method and device | |
| WO2017152633A1 (en) | Port binding implementation method and device | |
| CN111897633A (en) | Task processing method and device | |
| CN108064377B (en) | Management method and device for multi-system shared memory | |
| WO2018032770A1 (en) | Application component deployment method and deployment node | |
| WO2021103646A1 (en) | Pod deployment method and device | |
| US12299487B2 (en) | Data processing method and computer device | |
| CN114816709A (en) | Task scheduling method, device, server and readable storage medium | |
| CN114615308A (en) | RPC-based asynchronous multithreading concurrent network communication method and device | |
| CN111966462A (en) | Hybrid cloud management system | |
| CN102681881B (en) | Across machine dispatching method and system thereof | |
| CN105100180A (en) | Cluster node dynamic loading method, device and system | |
| CN113326098B (en) | Cloud management platform supporting KVM virtualization and container virtualization | |
| CN115617459A (en) | A method, device and equipment for resource scheduling | |
| WO2025051231A1 (en) | Medical robot image algorithm deployment method and apparatus, medical robot image algorithm scheduling method and apparatus, and system | |
| CN116069388A (en) | A task processing method and electronic device | |
| CN112015515B (en) | Instantiation method and device of virtual network function | |
| CN109032674B (en) | Multi-process management method, system and network equipment | |
| CN110782040A (en) | Method, device, equipment and medium for training tasks of pitorch | |
| CN117648165A (en) | Application cold start task management method, device and system | |
| WO2023185300A1 (en) | Container storage management method and apparatus | |
| CN115543383A (en) | Operator-based distributed storage upgrading method | |
| CN111526168B (en) | Scheduling management method and device for network function virtualization NFV architecture |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant |