A scheduling system, a scheduling method and an electronic device for configuring events
By using a multi-level concurrent control architecture with event dispatchers, object handlers, and subsystem operators, the problem of low efficiency in global serial processing of server configuration tasks is solved, and concurrent execution of configuration events is achieved, thereby improving the efficiency of server system configuration changes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-03-27
AI Technical Summary
In existing technologies, the global serial processing of server configuration tasks leads to inefficiency, fails to fully utilize hardware resources, and limits the system's scalability.
A multi-level concurrency control architecture is adopted, including an event dispatcher, an object processor, and a subsystem operator. The event dispatcher performs concurrent scheduling based on the concurrency threshold and event type mutual exclusion information, allocates configuration objects to the object processor, and the object processor and subsystem operator call the process to achieve concurrent execution of configuration events.
Without increasing the complexity of configuration tasks, concurrent processing of configuration events was achieved, improving the efficiency of server system configuration changes and overcoming the obstacle of global serial execution.
Smart Images

Figure CN121433849B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of server, and in particular to a scheduling system and method for configuration events and electronic equipment. BACKGROUND
[0002] In the field of servers, with the performance improvement of various hardware resources, the server architecture is also changing towards parallelization, multi-threading, and asynchronous cooperation. For example, one of the optimization goals of storage servers is to provide high-concurrency read-write capabilities to users. However, at the management level of the server system, a centralized and unified management approach is usually adopted, and all configuration tasks for the server are globally serialized. This approach has the advantage of not having to consider the concurrency timing of configuration tasks and only relying on the current state to organize processing logic. However, this also leads to low management capabilities of the system, which cannot take full advantage of hardware resources and limits the expansion capabilities of the system.
[0003] How to improve the processing efficiency of configuration tasks for servers is a technical problem that needs to be solved by those skilled in the art. SUMMARY
[0004] The present application provides a scheduling system and method for configuration events and electronic equipment to at least solve the problem of low efficiency caused by global serialization of server configuration tasks in related technologies.
[0005] The present application provides a scheduling system for configuration events, comprising:
[0006] An event dispatcher is configured to perform concurrent scheduling on input configuration events according to a first concurrency threshold and event type concurrency exclusion information, and to assign the configuration events to an object processor corresponding to a configuration object of the configuration events when it is determined that the configuration events are to be executed.
[0007] The object processor is configured to perform concurrent scheduling on the configuration events input to the object processor according to a second concurrency threshold and concurrent scheduling decision parameters corresponding to the object processor, and to execute the configuration events according to a corresponding subsystem operator based on a flow call of the configuration events when it is determined that the configuration events are to be executed.
[0008] The subsystem operator is configured to perform concurrent scheduling on the configuration events input to the subsystem operator according to a third concurrency threshold.
[0009] The present application also provides a scheduling method for configuration events, which can be applied to any of the above scheduling systems for configuration events, comprising:
[0010] According to the first concurrent quantity threshold and the event type concurrent mutual exclusion information, the input configuration event is concurrently scheduled, and when it is determined to execute the configuration event, the configuration event is assigned to the object processor corresponding to the configuration object of the configuration event;
[0011] According to the second concurrent quantity threshold, the configuration event input into the object processor is concurrently scheduled by using the concurrent scheduling decision parameter corresponding to the object processor, and when it is determined to execute the configuration event, the corresponding subsystem operator is executed according to the flow calling of the configuration event.
[0012] The configuration event input into the subsystem operator is concurrently scheduled according to the third concurrent quantity threshold.
[0013] The application further provides an electronic device, comprising a memory for storing a computer program and a processor for executing the computer program to realize the steps of the scheduling method of any one of the configuration events.
[0014] According to the application, a multi-level concurrent control architecture is provided for a configuration task, comprising an event dispatcher, an object processor and a subsystem operator. The event dispatcher concurrently schedules the input configuration event according to the first concurrent quantity threshold and the event type concurrent mutual exclusion information, and assigns the configuration object corresponding to the configuration event to the object processor. The object processor schedules the flow of the configuration event, concurrently schedules according to the second concurrent quantity threshold and the concurrent scheduling decision parameter corresponding to the object processor, and calls the subsystem operator to execute the flow of the configuration event. The subsystem operator concurrently schedules according to the third concurrent quantity threshold when executing the operation of the configuration event. Through the control architecture, the coordination of the event dispatcher and the object processor can reduce the complexity of the subsystem, and the subsystem does not need to monitor and coordinate the state by itself. Concurrent scheduling is realized at each level, and unrelated configuration events can be processed concurrently without introducing additional complexity to the configuration task, thereby breaking through the obstacle that the configuration task of the same system can only be executed globally and serially in the related art, and greatly improving the efficiency of server system configuration change. BRIEF DESCRIPTION OF DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the application, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.
[0016] Figure 1 The architecture diagram of a configuration event scheduling system provided by the embodiments of the application;
[0017] Figure 2 A flowchart illustrating a scheduling method for configuration events provided in an embodiment of the present invention;
[0018] Figure 3 This is a schematic diagram illustrating the execution sequence of a subsystem operator provided in an embodiment of the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.
[0020] It should be noted that, in the description of this invention, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., used in this invention are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0021] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0022] To facilitate understanding, the scheduling system for configuration events provided in the embodiments of the present invention will be described first.
[0023] Figure 1 This is an architecture diagram of a scheduling system for configuration events provided in an embodiment of the present invention.
[0024] like Figure 1 As shown, the configuration event scheduling system provided in this embodiment of the invention may include: an event dispatcher, configured to concurrently schedule input configuration events according to a first concurrency threshold and event type concurrency mutual exclusion information, and when determining to execute a configuration event, allocate the configuration event to the object processor corresponding to the configuration object of the configuration event; an object processor, configured to concurrently schedule the configuration events input to the object processor according to a second concurrency threshold and using the concurrency scheduling decision parameters corresponding to the object processor, and when determining to execute a configuration event, call the corresponding subsystem operator to execute the configuration event according to the flow of the configuration event; and a subsystem operator, configured to concurrently schedule the configuration events input to the subsystem operator according to a third concurrency threshold.
[0025] The embodiment of the present application provides a software architecture of an event-driven scheduling system, in which a configuration event is a common entrance for triggering a configuration class action of a configuration object.
[0026] In the embodiment of the present application, the type of the configuration object can be a software unit or a hardware device. For example, for a storage system, the configuration object can be a chassis, a disk, a virtual volume, a file system, a host, etc. The configuration class action can be divided into adding, deleting, changing and querying.
[0027] In order to efficiently manage these configuration objects, the embodiment of the present application provides a three-level event concurrent control system of "global event control-object flow control-subsystem controller notification" to maximize the concurrent processing capacity of irrelevant configuration events and avoid logical conflicts of related configuration events.
[0028] As shown in FIG. 1, a scheduling service client (Client) is used to receive a configuration task, which can be generated by a natural person user or a monitoring program inside or outside the system. Figure 1
[0029] In the scheduling system of the configuration event, a service interface layer is used to parse the request of the configuration task and generate a configuration event.
[0030] An event dispatcher is responsible for the persistence, monitoring, queuing and dispatching of the configuration event.
[0031] The configuration event is coordinated by an object processor in a flow library to execute cross-subsystem events.
[0032] In the flow library, the object processor is a software unit used to process a specific configuration event flow, which can be in the form of a process, a thread, a microservice, a function, etc. In the embodiment of the present application, the configuration events are grouped according to the type of the configuration object, and different flows in the configuration events of the same configuration object can share the same object processor. An object processor responsible for a virtual volume can be used to manage multiple flows such as adding, deleting, changing and querying the virtual volume.
[0033] A subsystem operator is responsible for the specific execution of the configuration event and the specific configuration operation on the configuration object. In the embodiment of the present application, a subsystem refers to a device (such as a server or a server cluster) divided into multiple subsystems according to the software and hardware architecture of the device, for example, a disk subsystem, a host subsystem, a virtual volume subsystem, a storage pool subsystem, etc. The subsystem operator refers to a hardware processor or a software processor with execution capability in the subsystem.
[0034] Figure 1 The arrows in FIG. 1 show the flow of the configuration task entering the scheduling system of the configuration event. Among them, S101-S105 are the submission flow of the configuration event.
[0035] S101: The scheduling service client sends a configuration task to the service interface layer in response to a request to configure the task.
[0036] S102: The event engine generates a configuration event according to the configuration task and assigns an event serial number to the configuration event. The assignment can be a unique serial number in the scheduling system in a monotonically increasing manner.
[0037] S103: The event engine persists the information of the generated configuration event to a database, for example, to a cluster database if the configuration event is applied to a server cluster.
[0038] S104: After the persistence is completed, the event engine returns information to the scheduling service client, including the event serial number. At this point, the configuration event submission is completed.
[0039] S201-S214 are the configuration event distribution and execution process.
[0040] S201: The event monitor detects the submission of a new configuration event, for example, by monitoring the database to detect the persisted configuration event.
[0041] S202: The event monitor adds the new configuration event to the first event queue.
[0042] S203: The configuration events in the first event queue are dequeued to the event dispatcher in order.
[0043] S204: The event dispatcher matches the corresponding object processor according to the event type and assigns the configuration event to the object processor.
[0044] S205-S214 are the execution process of the object processor to coordinate the configuration event, which decides to serially or in parallel send the event to the subsystem operator interested in the configuration event.
[0045] S205-S206: The object processor calls the thread pool resource to execute the configuration event, such as the disk operator, pool operator, and volume operator.
[0046] S207: The disk operator is called to execute the operation in the flow of the configuration event.
[0047] S208: The disk operator executes the operation based on the internal event processor and returns the operation result.
[0048] S209: The pool operator is called to execute the operation in the flow of the configuration event.
[0049] S210: The pool operator executes the operation based on the internal event processor and returns the operation result.
[0050] S211: invoke the volume operator to perform the operation in the flow of the configuration event.
[0051] S212: the volume operator performs the operation based on the internal event handler, and returns the operation result.
[0052] In the three-level event concurrent control system provided in the embodiment of the present application, concurrent control is implemented in the event dispatcher, object handler and subsystem operator respectively.
[0053] For distinction, in the embodiment of the present application, the maximum concurrency number based on which the event dispatcher is based on is defined as the first concurrency threshold, which can represent the maximum concurrency number of the entire scheduling system. The maximum concurrency number based on which the object handler is based on is defined as the second concurrency threshold. The maximum concurrency number based on which the subsystem operator is based on is defined as the third concurrency threshold. The first concurrency threshold, the second concurrency threshold and the third concurrency threshold can be fixedly set at system initialization, or can be adjusted according to the change of the work load of the device.
[0054] In the embodiment of the present application, the queue in the event dispatcher is defined as the first event queue, and the enqueue and dequeue logic of the first event queue is controlled by the event dispatcher. The queue in the object handler is defined as the second event queue, and the enqueue and dequeue logic of the second event queue is controlled by the event dispatcher. The queue in the subsystem operator is defined as the third event queue, and the enqueue and dequeue logic of the third event queue is controlled by the subsystem operator.
[0055] In the embodiment of the present application, the configuration event being executed in the entire scheduling system is defined as the first configuration event, and the executed configuration event is defined as the second configuration event. The configuration event being executed in the object handler is defined as the third configuration event, and the configuration event being executed in the subsystem operator is defined as the fourth configuration event. That is to say, the first configuration event, the third configuration event and the fourth configuration event can be the same configuration event, which only represents the different execution states of the configuration event.
[0056] In the scheduling system of the configuration event provided in the embodiment of the present application, the first-level concurrent control is in the event dispatcher, which is used to coordinate the concurrent behavior among the configuration events of different types of configuration objects. In the embodiment of the present application, the event type concurrent mutual exclusion information is established according to the dependency relationship among the configuration objects. That is to say, the coordination principle in the event dispatcher can be that the configuration events of the configuration objects having the dependency relationship should have the concurrent mutual exclusion relationship (i.e. cannot be concurrently executed).
[0057] Three tables can be maintained in the event dispatcher: an event-object processor mapping table, used to determine the corresponding object processor according to the configuration event, which can be uniquely determined at system initialization and not changed at runtime, or updated by the operation and maintenance personnel; an in-process event table, in which the configuration event is recorded when it starts to execute and deleted when it ends to execute; and an event concurrency mutual exclusion table, used to record the concurrency mutual exclusion information of event types, i.e., the mutual exclusion relationship of different types of configuration events, which can be uniquely determined at system initialization and not changed at runtime, or updated by the operation and maintenance personnel.
[0058] In the embodiment of the application, the event dispatcher performs concurrent scheduling on the input configuration event according to the first concurrency quantity threshold and the event type concurrency mutual exclusion information, and when it is determined to execute the configuration event, the configuration event is allocated to the object processor corresponding to the configuration object of the configuration event, which can include: the event dispatcher determines a first configuration event being executed in the scheduling system; the event dispatcher determines the mutual exclusion of the configuration event and the first configuration event according to the event type of the configuration event, the event type of the first configuration event and the event type concurrency mutual exclusion information when the number of the first configuration event does not reach the first concurrency quantity threshold; the event dispatcher lists the configuration event in the first event queue to place the configuration event in a waiting state when there is a first configuration event mutually exclusive with the configuration event; and the event dispatcher allocates the configuration event to the corresponding object processor when there is no first configuration event mutually exclusive with the configuration event.
[0059] For the configuration event before entering the event dispatcher, the configuration event can be added to the external event queue in the order of the generation time of the configuration event. In the embodiment of the application, different types of configuration events can also be divided into priorities, and the configuration event with a high priority is processed first. In the embodiment of the application, the external event queue can be multiple, corresponding to different priorities, and the configuration events with the same priority are entered into the same external event queue in the order of time. The event dispatcher can be in the order from high to low priority, such as the priority of the first external event queue is higher than that of the second external event queue, and when there is a configuration event in the first external priority queue, the event dispatcher only schedules the configuration event in the first external event queue, and when there is no configuration event in the first external event queue, the event dispatcher schedules the configuration event in the second external event queue.
[0060] In the embodiment of the present application, the concurrent scheduling of the input configuration event is performed according to the first concurrent quantity threshold and the event type concurrent exclusion information, and when it is determined to execute the configuration event, the configuration event is assigned to the object processor corresponding to the configuration object of the configuration event, including: determining a first configuration event being executed in the scheduling system; in the case where the number of the first configuration events does not reach the first concurrent quantity threshold, determining the mutual exclusion of the configuration event and the first configuration event according to the event type of the configuration event, the event type of the first configuration event and the event type concurrent exclusion information; in the case where there is a first configuration event mutually exclusive with the configuration event, listing the configuration event in the first event queue to place the configuration event in a waiting state; in the case where there is no first configuration event mutually exclusive with the configuration event, assigning the configuration event to the corresponding object processor.
[0061] In the embodiment of the present application, the determination of the first configuration event being executed in the scheduling system can include: querying a first event table for recording the ongoing events of the scheduling system to obtain the information of the first configuration event; and the scheduling method of the configuration event further includes: in the case where there is no first configuration event mutually exclusive with the configuration event, writing the information of the configuration event into the first event table.
[0062] The first event table is an ongoing event table.
[0063] The event dispatcher can also be used to delete the information of the configuration event in the first event table after the process of the configuration event is executed.
[0064] The event dispatcher can also be used to set the configuration service of the scheduling system to a blocked state in the case where the number of the first configuration events reaches the first concurrent quantity threshold; check the number of the first configuration events in the case where there is a second configuration event executed in the scheduling system; and in the case where the number of the first configuration events is the first concurrent quantity threshold minus 1, release the blocked state.
[0065] After the blocked state is released, the event dispatcher can also be used to take out the configuration event in the first event queue and assign it to the corresponding object processor in the case where the first event queue is not empty and there is no configuration event in the first event queue mutually exclusive with the first configuration event; and in the case where the first event queue is empty or the first event queue is not empty but there is a first configuration event mutually exclusive with the tail configuration event of the first event queue, check the external event queue to receive a new configuration event.
[0066] Then, when the scheduling system is started, the event dispatcher can start an event listening and dispatching loop, including: (1) continuously listening to whether there is a new configuration event in the external event queue.
[0067] (2) Check the running event table and the event concurrent exclusion table. If there is a running event that is mutually exclusive with the new event, take out the event and put it at the end of the internal waiting queue. If not, go to the next step.
[0068] (3) Check if there is a configuration event in the first event queue that is mutually exclusive with the new configuration event. If so, put the new configuration event at the end of the first event queue.
[0069] (4) If no mutually exclusive event is found in the above two steps, record the information of the configuration event in the running event table, find the corresponding object processor from the event-object processor mapping table, and start execution.
[0070] When a configuration event is executed, the event dispatcher performs the following process: (1) delete the information of the configuration event from the running event table.
[0071] (2) Check if the maximum number of concurrent events has been reached. If so, release the blocking of the configuration service.
[0072] (3) First check the first event queue. If the queue is not empty and the tail event no longer has a running mutually exclusive event, record the event in the running event table and start the execution of the corresponding process.
[0073] (4) If the first event queue is empty or the tail event has a running mutually exclusive event, check if there is an event in the external event queue, and decide to put the event in the first event queue or start the execution of the corresponding object processor according to the mutual exclusion.
[0074] In the configuration event scheduling system provided in the embodiment of the present application, the second level design is inside the object process processor, which can be used to control the concurrent behavior between different types of configuration events of the same configuration object, and the concurrent behavior of the same configuration event between different subsystems. The add, delete, modify, and query events of the same configuration object are coordinated by a common object processor.
[0075] In the embodiment of the present application, the object processor determines, according to the second concurrency quantity threshold, the mutual exclusion condition between the configuration event input into the object processor and the third configuration event being executed by the object processor, using the concurrency scheduling decision parameter corresponding to the object processor, and when it is determined to execute the configuration event, the corresponding subsystem operator is called to execute the configuration event according to the flow of the configuration event, which can include: the object processor determines that the third configuration event is being executed by the object processor; the object processor determines, when the number of the third configuration event does not reach the second concurrency quantity threshold, the mutual exclusion condition between the configuration event input into the object processor and the third configuration event, using the concurrency scheduling decision parameter corresponding to the object processor; the object processor puts the configuration event in a waiting state when there is a third configuration event that is mutually exclusive with the configuration event; and the object processor calls the subsystem operator corresponding to the configuration event to execute the configuration event when there is no third configuration event that is mutually exclusive with the configuration event.
[0076] The object processor can also be used to list the configuration event in the second event queue of the object processor when the configuration event is assigned to the object processor, so as to use the object processor to make the de-queue judgment and concurrency scheduling on the configuration event in the second event queue.
[0077] In some optional embodiments of the embodiment of the present application, the de-queue judgment and concurrency scheduling of the object processor on the configuration event in the second event queue can include: the object processor checks whether the configuration event at the tail of the second event queue meets the de-queue condition, and if not, moves the configuration event at the tail of the second event queue to the head of the second event queue; and if so, performs concurrency scheduling according to the order of the second event queue. That is, by first checking the mutual exclusion state between the configuration event at the tail of the second event queue and the configuration event being executed, the new configuration event entering the object processor can be quickly responded, and the throughput of the scheduling system can be improved.
[0078] In other optional embodiments of the embodiment of the present application, the de-queue judgment and concurrency scheduling of the object processor on the configuration event in the second event queue can also include: the object processor checks whether the configuration event at the head of the second event queue meets the de-queue condition, and if not, moves the configuration event at the tail of the second event queue to the tail of the second event queue; and if so, performs concurrency scheduling on the configuration event at the head of the second event queue. That is, the configuration event at the head of the second event queue that does not meet the de-queue condition can also be moved to the tail, so as to avoid mutual exclusion events from blocking the execution of other configuration events in the second event queue.
[0079] In the embodiment of the present application, the concurrency scheduling decision parameter includes: there is a mutual exclusion relationship between different types of configuration events of the same configuration object.
[0080] In the embodiment of the present application, the concurrent scheduling decision parameter can further comprise: calling different subsystem operators in mutual exclusion when the different subsystem operators exist a dependent relationship in performing the configuration event.
[0081] The specific structure of the object processor can comprise: a second event queue for receiving the configuration event issued by the event dispatcher; a second concurrent quantity threshold for controlling the maximum concurrent quantity of the object processor in performing the configuration event; a concurrent scheduling decision parameter for performing the out-queue judgment on the configuration event in the second event queue, which can be in the form of a decision function; and a concurrent condition record for recording the concurrent condition of the object processor, which can be in the form of a state setting function.
[0082] The object processor can also start an execution cycle when the scheduling system starts, and the main logic of the execution cycle can comprise: (1) listening to whether there is a new configuration event in the second event queue.
[0083] (2) If there is a new configuration event, then: (a) checking whether the maximum concurrent quantity (the second concurrent quantity threshold) is reached, and if yes, setting the object processor to a blocked state, otherwise, going to the next step.
[0084] (b) checking whether the configuration event at the tail of the second event queue meets the out-queue requirement, and if not, adding it back to the head, and going to (2)(a); if yes, going to the next step.
[0085] (c) recording the concurrent condition, and updating the newly started configuration event to the concurrent condition record.
[0086] (d) starting the execution of the configuration event.
[0087] (e) canceling the concurrent condition record, and deleting the concurrent record of the executed configuration event after the execution is completed.
[0088] In the scheduling system of the configuration event provided in the embodiment of the present application, the third level design is in the subsystem operator, and can be used for adjusting the concurrent degree in the subsystem and managing the public data structure of the configuration object managed by the subsystem.
[0089] In the embodiment of the present application, the subsystem operator performs the concurrent scheduling on the configuration event input into the subsystem operator according to the third concurrent quantity threshold, which can comprise: the subsystem operator determines a fourth configuration event being executed by the subsystem operator; the subsystem operator puts the configuration event in a waiting state when the number of the fourth configuration event reaches the third concurrent quantity threshold; and the subsystem operator executes the configuration operation of the configuration event when the number of the fourth configuration event does not reach the third concurrent quantity threshold.
[0090] Further, the subsystem operator can also be configured to place the common data structure corresponding to the configuration event into a protection state in a case that the subsystem operator concurrently executes multiple configuration events based on the subsystem operator; the common data structure corresponds to at least two configuration events concurrently executed by the subsystem operator.
[0091] In the embodiment, the placing of the common data structure corresponding to the configuration event into the protection state can be that, in the execution process of the configuration event, the common data structure is protected by a mutex.
[0092] The subsystem operator can further include a third event queue configured to receive the configuration event issued by the object processor; a third concurrent quantity threshold configured to control the maximum number of concurrent configuration events executed by the subsystem operator; and a mutex.
[0093] The subsystem operator can also start an execution cycle when the scheduling system starts, and the main logic of the execution cycle is to perform concurrent execution of the configuration event related operation within the allowed range of the third concurrent quantity threshold, and the common data structure is protected by the mutex in the execution process.
[0094] The scheduling system for configuration events provided by the embodiment of the present application provides a multi-level concurrent control architecture for configuration tasks, including an event dispatcher, an object processor and a subsystem operator, the event dispatcher performs concurrent scheduling on the input configuration event according to the first concurrent quantity threshold and the event type concurrent mutex information, and allocates the object processor corresponding to the configuration object of the configuration event; the object processor schedules the flow of the configuration event, performs concurrent scheduling according to the second concurrent quantity threshold and the concurrent scheduling decision parameter corresponding to the object processor, and calls the subsystem operator to execute the flow of the configuration event; the subsystem operator performs concurrent scheduling according to the third concurrent quantity threshold when executing the operation of the configuration event. Through the control architecture, the coordination of the event dispatcher and the object processor can reduce the complexity of the subsystem, the subsystem does not need to monitor and coordinate the state by itself, concurrent scheduling is realized at each level, unrelated configuration events can be processed concurrently as much as possible without introducing additional complexity to the configuration task, thereby breaking through the obstacle that the configuration tasks of the same system can only be executed globally and in series in the related art, and greatly improving the efficiency of server system configuration changes.
[0095] The embodiment of the present application provides a scheduling method for configuration events, and the method is described in detail below in combination with the execution flow of the scheduling method for configuration events.
[0096] Figure 2 The embodiment of the present application provides a scheduling method for configuration events, and the method is described in detail below in combination with the execution flow of the scheduling method for configuration events.
[0097] The scheduling method for configuration events provided in the embodiment of the present application is executed based on the scheduling system for configuration events provided in the above embodiment, and can be any implementation of the scheduling system for configuration events provided in the above embodiment.
[0098] As shown in Figure 2 The scheduling method for configuration events provided in the embodiment of the present application can include: S401: performing concurrent scheduling on the input configuration event according to the first concurrent quantity threshold and the event type concurrent mutual exclusion information, and assigning the configuration event to the object processor corresponding to the configuration object of the configuration event when it is determined to execute the configuration event.
[0099] S402: performing concurrent scheduling on the configuration event input to the object processor according to the second concurrent quantity threshold and the concurrent scheduling decision parameter corresponding to the object processor, and executing the configuration event according to the flow call of the corresponding subsystem operator when it is determined to execute the configuration event.
[0100] S403: performing concurrent scheduling on the configuration event input to the subsystem operator according to the third concurrent quantity threshold.
[0101] The three steps of the scheduling method for configuration events provided in the embodiment of the present application can be executed based on the event dispatcher, the object processor and the subsystem operator respectively, and the definition and implementation manner thereof are referred to the above embodiment.
[0102] In the embodiment of the present application, the event type concurrent mutual exclusion information represents the mutual exclusion information between different event types, which can be established according to the dependency relationship between configuration objects, that is, there is a mutual exclusion relationship between the configuration events corresponding to the configuration objects that exist in the configuration dependency.
[0103] In the embodiment of the present application, in S401, the input configuration event is concurrently scheduled according to the first concurrent quantity threshold and the event type concurrent mutual exclusion information, and the configuration event is assigned to the object processor corresponding to the configuration object of the configuration event when it is determined to execute the configuration event, which can include: determining the first configuration event being executed in the scheduling system; in the case that the number of the first configuration events does not reach the first concurrent quantity threshold, determining the mutual exclusion situation of the configuration event and the first configuration event according to the event type of the configuration event, the event type of the first configuration event and the event type concurrent mutual exclusion information; in the case that there is a first configuration event mutually exclusive with the configuration event, listing the configuration event in the first event queue to place the configuration event in a waiting state; in the case that there is no first configuration event mutually exclusive with the configuration event, assigning the configuration event to the corresponding object processor.
[0104] The determining the first configuration event being executed in the scheduling system can include: querying a first event table for recording ongoing events of the scheduling system to obtain information of the first configuration event. The scheduling method of the configuration event provided by the embodiment of the present application can further include: in the absence of the first configuration event that is mutually exclusive with the configuration event, writing the information of the configuration event into the first event table.
[0105] The scheduling method of the configuration event provided by the embodiment of the present application can further include: after the flow of the configuration event is executed, deleting the information of the configuration event in the first event table.
[0106] The scheduling method of the configuration event provided by the embodiment of the present application can further include: in the case that the number of the first configuration events reaches a first concurrent quantity threshold, setting the configuration service of the scheduling system to a blocked state; in the case that the scheduling system has a second configuration event that is executed, checking the number of the first configuration events; in the case that the number of the first configuration events is the first concurrent quantity threshold minus 1, releasing the blocked state.
[0107] The scheduling method of the configuration event provided by the embodiment of the present application can further include: after the blocked state is released, in the case that the first event queue is not empty and there is no configuration event in the first event queue that is mutually exclusive with the first configuration event, taking out the configuration event in the first event queue and assigning it to the corresponding object processor.
[0108] The scheduling method of the configuration event provided by the embodiment of the present application can further include: in the case that the first event queue is empty or the first event queue is not empty but there is a first configuration event that is mutually exclusive with the tail configuration event of the first event queue, checking an external event queue to receive a new configuration event.
[0109] In the embodiment of the present application, the concurrent scheduling of the configuration event input into the object processor according to the second concurrent quantity threshold and the concurrent scheduling decision parameter corresponding to the object processor in S402, and the execution of the configuration event according to the flow of the configuration event and the corresponding subsystem operator when it is determined to execute the configuration event, can include: determining a third configuration event being executed based on the object processor; in the case that the number of the third configuration events does not reach the second concurrent quantity threshold, determining the mutual exclusivity of the configuration event and the third configuration event by using the concurrent scheduling decision parameter corresponding to the object processor; in the case that there is a third configuration event that is mutually exclusive with the configuration event, placing the configuration event in a waiting state; in the case that there is no third configuration event that is mutually exclusive with the configuration event, calling the subsystem operator corresponding to the configuration event to execute the configuration event.
[0110] The scheduling method of the configuration event provided in the embodiment of the present application can further include: when the configuration event is assigned to the object processor, the configuration event is listed in a second event queue of the object processor, so that the configuration event in the second event queue is judged and concurrently scheduled by the object processor.
[0111] In the embodiment of the present application, the concurrent scheduling decision parameter can include: there is a mutual exclusion relationship between different types of configuration events of the same configuration object.
[0112] In the embodiment of the present application, the concurrent scheduling decision parameter can further include: when there is a dependency relationship between operations of different subsystem operators to execute the configuration event, a mutual exclusion relationship between the different subsystem operators is called.
[0113] In the embodiment of the present application, the concurrent scheduling of the configuration event of the input subsystem operator according to the third concurrent quantity threshold in S403 can include: determining a fourth configuration event based on the subsystem operator being executed; in the case that the number of the fourth configuration event reaches the third concurrent quantity threshold, the configuration event is placed in a waiting state; in the case that the number of the fourth configuration event does not reach the third concurrent quantity threshold, the configuration operation of the configuration event is executed.
[0114] The scheduling method of the configuration event provided in the embodiment of the present application can further include: in the case that the subsystem operator concurrently executes a plurality of configuration events, a public data structure corresponding to the configuration event is placed in a protection state; the public data structure corresponds to at least two configuration events concurrently executed by the subsystem operator.
[0115] In the embodiment of the present application, the public data structure corresponding to the configuration event is placed in the protection state, which can include: in the execution process of the configuration event, the public data structure is protected by a mutex.
[0116] The scheduling method of configuration events provided by the embodiment of the application provides a multi-level concurrent control architecture for configuration tasks, including an event dispatcher, an object processor and a subsystem operator, the event dispatcher performs concurrent scheduling on the input configuration events according to a first concurrent quantity threshold and event type concurrent mutual exclusion information, and allocates the object processor corresponding to the configuration object of the configuration event; the object processor schedules the flow of the configuration event, performs concurrent scheduling according to a second concurrent quantity threshold and the concurrent scheduling decision parameter corresponding to the object processor, and calls the subsystem operator to execute the flow of the configuration event; the subsystem operator performs concurrent scheduling according to a third concurrent quantity threshold when performing the operation of the configuration event. Through the control architecture, the complexity of the subsystem can be reduced through the coordination of the event dispatcher and the object processor, the subsystem does not need to monitor and coordinate the state by itself, concurrent scheduling is realized at each level, unrelated configuration events can be processed concurrently as much as possible without introducing additional complexity to the configuration task, thereby breaking through the obstacle that the configuration tasks of the same system can only be executed globally and serially in the related art, and the efficiency of server system configuration change is greatly improved.
[0117] The practical application scenarios of the scheduling system and the scheduling method of configuration events provided by the embodiment of the application are exemplarily described below.
[0118] Taking application to a distributed storage system as an example, the application scenario of the first-level concurrent control is as follows:
[0119] The host and the virtual volume system are independent of each other, and in order to enable a specific host to use a specific storage volume, a mapping relationship needs to be established between the two. The event of creating the mapping relationship between the host and the virtual volume cannot be executed concurrently with the event of deleting the host and the event of deleting the virtual volume. Assuming that the two can be executed concurrently, the following scenarios are considered: event 1: the mapping between host 1 and virtual volume 1 is being established; event 2: host 1 is being deleted; event 3: virtual volume 1 is being deleted.
[0120] Supposing that the above three configuration events are executed concurrently, event 1 is executed on the premise that host 1 and virtual volume 1 exist, and before event 1 is executed, events 2 and 3 are both executed. After event 1 is executed, the execution result of event 1 will be difficult to define clearly. Therefore, the host-virtual volume mapping creation event and the host deletion event, and the host-virtual volume mapping creation event and the virtual volume deletion event can be selected as mutually exclusive events.
[0121] One application scenario of the second-level concurrent control can be that the adding, deleting, modifying and querying logics of the same virtual volume should not be concurrent because of the dependency relationship therebetween. The queuing inspection criterion can be configured in the flow processor of the virtual volume based on the identification (ID) of the virtual volume. When the configuration modification event of the virtual volume 1 is being performed, it is recorded that the virtual volume 1 has an ongoing modification event. At this time, if the query event of the virtual volume 1 is issued, the query event should be waited.
[0122] Figure 3 An execution sequence diagram of a sub-system operator provided by the embodiment of the application is shown.
[0123] Another application scenario of the second-level concurrent control can be that when a physical node leaves the storage cluster, multiple sub-systems need to process the offline event of the node. The processing of the event by these sub-systems is dependent on each other (for example, the virtual volume subsystem depends on the storage pool subsystem, and the storage pool subsystem depends on the disk subsystem), can be executed concurrently (for example, the host subsystem), is on the critical path of storage read-write (IO) service, and is not on the critical path of storage read-write (IO) service (for example, the chassis subsystem, the configuration backup subsystem and the like). In order to ensure that the task on the critical path of IO service is completed as soon as possible to restore the service, the organization mode shown in FIG. 8 can be selected. In the organization mode, the execution sequences of the sub-systems are organized in the left-to-right and top-to-bottom concurrent manner. Figure 3 Figure 3
[0124] The application scenario of the third-level concurrent control is that when multiple virtual volumes are created or deleted in batches, the total number of virtual volumes of the system can be changed by multiple configuration events at the same time. At this time, the modification of the state quantity of the total number of virtual volumes is protected by the mutual exclusion lock, and the configuration events are prevented from changing the total number of virtual volumes of the system until the configuration events are executed and then the total number of virtual volumes is modified.
[0125] Through the description of the above implementation manner, those skilled in the art can clearly understand that the method according to the above embodiment can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better implementation manner.
[0126] The embodiment of the application further provides an electronic device, including a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in the scheduling method embodiment of any one of the configuration events.
[0127] The embodiment of the application further provides a non-volatile storage medium, which stores a computer program, wherein the computer program is configured to execute the steps in the scheduling method embodiment of any one of the configuration events when running.
[0128] In one example embodiment, the non-volatile storage medium described above can include, but is not limited to, a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.
[0129] Embodiments of the present application also provide a computer program product comprising a computer program which, when executed by a processor, implements the steps of any of the scheduling method embodiments of configuration events.
[0130] Embodiments of the present application also provide another computer program product comprising a non-volatile storage medium storing a computer program which, when executed by a processor, implements the steps of any of the scheduling method embodiments of configuration events.
[0131] The skilled person can further realize that the units and algorithm steps of the examples described in connection with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in general terms in the above description. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0132] The above provides a detailed description of the scheduling system, scheduling method and electronic device of configuration events. The principles and implementation modes of the present application are described by applying specific examples. The above description of the examples is only applicable to help understand the method of the present application and its core idea. It should be noted that for those skilled in the art, without departing from the principles of the present application, the present application can be improved and modified in several ways. These improvements and modifications also fall within the scope of the present application.
Claims
1. A scheduling system for configuring events, characterized by The application comprises: An event dispatcher is configured to perform concurrent scheduling on an input configuration event according to a first concurrent quantity threshold and event type concurrent mutual exclusion information, and assign the configuration event to an object processor corresponding to a configuration object of the configuration event when it is determined that the configuration event is to be executed. The object processor is configured to perform concurrent scheduling on the configuration event input to the object processor according to a second concurrent quantity threshold and a concurrent scheduling decision parameter corresponding to the object processor, and execute the configuration event according to a corresponding subsystem operator according to a flow call of the configuration event when it is determined that the configuration event is to be executed. The subsystem operator is configured to perform concurrent scheduling on the configuration event input to the subsystem operator according to a third concurrent quantity threshold. The concurrent scheduling decision parameter comprises: when there is a mutual exclusion relationship between different types of configuration events of the same configuration object, and there is a dependent relationship between operations of different subsystem operators executing the configuration event, different subsystem operators are called to have a mutual exclusion relationship.
2. The scheduling system of configuring events according to claim 1, characterized in that, The event dispatcher performs concurrent scheduling on an input configuration event according to a first concurrent quantity threshold and event type concurrent mutual exclusion information, and assigns the configuration event to an object processor corresponding to a configuration object of the configuration event when it is determined that the configuration event is to be executed, comprising: The event dispatcher determines a first configuration event being executed in a scheduling system. The event dispatcher determines mutual exclusion of the configuration event and the first configuration event according to an event type of the configuration event, an event type of the first configuration event, and the event type concurrent mutual exclusion information when a quantity of the first configuration event does not reach the first concurrent quantity threshold. The event dispatcher lists the configuration event in a first event queue to place the configuration event in a waiting state when there is the first configuration event mutually exclusive with the configuration event. The event dispatcher assigns the configuration event to the corresponding object processor when there is no first configuration event mutually exclusive with the configuration event.
3. The scheduling system of claim 1, wherein, The object processor performs concurrent scheduling on the configuration event input to the object processor according to a second concurrent quantity threshold and a concurrent scheduling decision parameter corresponding to the object processor, and executes the configuration event according to a corresponding subsystem operator according to a flow call of the configuration event when it is determined that the configuration event is to be executed, comprising: The object processor determines a third configuration event being executed based on the object processor. The object processor determines mutual exclusion of the configuration event input to the object processor and the third configuration event using the concurrent scheduling decision parameter corresponding to the object processor when a quantity of the third configuration event does not reach the second concurrent quantity threshold. The object processor places the configuration event in a waiting state when there is the third configuration event mutually exclusive with the configuration event. The object processor invokes the subsystem operator corresponding to the configuration event to execute the configuration event in the absence of the third configuration event that is mutually exclusive with the configuration event.
4. The scheduling system of claim 1, wherein, The subsystem operator concurrently schedules the configuration events inputted into the subsystem operator according to a third concurrency quantity threshold, comprising: The subsystem operator determines a fourth configuration event that the subsystem operator is executing; The subsystem operator puts the configuration event in a waiting state in the case that the quantity of the fourth configuration events reaches the third concurrency quantity threshold; The subsystem operator executes the configuration operation of the configuration event in the case that the quantity of the fourth configuration events does not reach the third concurrency quantity threshold.
5. A method of scheduling configuration events, characterized by, The scheduling system of the configuration event of any one of claims 1 to 4, comprising: concurrently scheduling the inputted configuration event according to a first concurrency quantity threshold and event type concurrent mutual exclusion information, and assigning the configuration event to an object processor corresponding to a configuration object of the configuration event when determining to execute the configuration event; concurrently scheduling the configuration event inputted into the object processor according to a second concurrency quantity threshold and a concurrent scheduling decision parameter corresponding to the object processor, and executing the configuration event according to a corresponding subsystem operator according to a flow of the configuration event when determining to execute the configuration event; concurrently scheduling the configuration event inputted into the subsystem operator according to a third concurrency quantity threshold.
6. The scheduling method of claim 5, wherein, concurrently scheduling the inputted configuration event according to a first concurrency quantity threshold and event type concurrent mutual exclusion information, and assigning the configuration event to an object processor corresponding to a configuration object of the configuration event when determining to execute the configuration event, comprising: determining a first configuration event that is being executed in the scheduling system; determining mutual exclusion of the configuration event and the first configuration event according to an event type of the configuration event, an event type of the first configuration event, and the event type concurrent mutual exclusion information in the case that the quantity of the first configuration events does not reach the first concurrency quantity threshold; listing the configuration event in a first event queue to put the configuration event in a waiting state in the case that the first configuration event that is mutually exclusive with the configuration event exists; assigning the configuration event to the corresponding object processor in the case that the first configuration event that is mutually exclusive with the configuration event does not exist.
7. The method of claim 6, wherein, determining a first configuration event that is being executed in the scheduling system, comprising: querying a first event table for recording ongoing events of the scheduling system to obtain information of the first configuration event; The scheduling method of the configuration event further comprises: writing the information of the configuration event into the first event table in the case that the first configuration event that is mutually exclusive with the configuration event does not exist.
8. The method of claim 7, wherein, Further comprising: deleting the information of the configuration event in the first event table after the flow of the configuration event is executed.
9. The method of claim 6, wherein, Further comprising: in a case where the number of the first configuration events reaches the first concurrent number threshold, setting a configuration service of the scheduling system to a blocked state; in a case where a second configuration event of the scheduling system is executed, checking the number of the first configuration events; in a case where the number of the first configuration events is the first concurrent number threshold minus 1, releasing the blocked state.
10. The method of claim 9, wherein, after releasing the blocked state, further comprising: in a case where the first event queue is not empty and there is no configuration event in the first event queue that is mutually exclusive with the first configuration event, taking out the configuration event in the first event queue and assigning it to the corresponding object processor.
11. The method of claim 9, wherein, further comprising: in a case where the first event queue is empty or the first event queue is not empty but there is the first configuration event that is mutually exclusive with the tail configuration event of the first event queue, checking an external event queue to receive a new configuration event.
12. The method of claim 5, wherein, the event type concurrent mutual exclusion information is established according to the dependency relationship between the configuration objects.
13. The method of claim 5, wherein, according to a second concurrent number threshold, the configuration event input into the object processor is concurrently scheduled by using the concurrent scheduling decision parameter corresponding to the object processor, and when it is determined to execute the configuration event, the corresponding subsystem operator is called to execute the configuration event according to the flow of the configuration event, comprising: determining a third configuration event that is being executed based on the object processor; in a case where the number of the third configuration events does not reach the second concurrent number threshold, determining the mutual exclusion of the configuration event and the third configuration event by using the concurrent scheduling decision parameter corresponding to the object processor; in a case where there is the third configuration event that is mutually exclusive with the configuration event, placing the configuration event in a waiting state; in a case where there is no third configuration event that is mutually exclusive with the configuration event, calling the subsystem operator corresponding to the configuration event to execute the configuration event.
14. The method of claim 13, wherein, further comprising: when the configuration event is assigned to the object processor, the configuration event is listed in a second event queue of the object processor, so as to use the object processor to make a de-queue judgment and concurrent scheduling on the configuration event in the second event queue.
15. The method of claim 5, wherein, according to a third concurrent number threshold, the configuration event input into the subsystem operator is concurrently scheduled, comprising: determining a fourth configuration event that is being executed based on the subsystem operator; in a case where the number of the fourth configuration events reaches the third concurrent number threshold, placing the configuration event in a waiting state; in a case where the number of the fourth configuration events does not reach the third concurrent number threshold, executing the configuration operation of the configuration event.
16. The method of claim 15, wherein, further comprising: in a case where the subsystem operator concurrently executes a plurality of configuration events, placing a common data structure corresponding to the configuration event in a protection state; the common data structure corresponds to at least two configuration events that are concurrently executed by the subsystem operator.
17. The method of claim 16, wherein, placing the common data structure corresponding to the configuration event in the protection state, comprising: During execution of the configuration event, the common data structure is protected by a mutex.
18. An electronic device, comprising: Comprising: a memory for storing a computer program; a processor for implementing the steps of the scheduling method of the configuration event according to any one of claims 5 to 17 when executing the computer program.
Citation Information
Patent Citations
Event scheduling method and system based on coroutine
CN116089041A
Event processing method and device based on staged event-driven architecture, equipment and medium
CN119376881A