The present invention generally relates to data processing. The invention relates more specifically to a mechanism that determines the order of execution among a plurality of code modules.
Computer networks have become ubiquitous in the home, office, and industrial environment. As computer networks have grown ever complex, automated mechanisms for organizing and managing the networks have emerged. These mechanisms are generally implemented in the form of one or more computer programs, and are generically known as network management systems or applications.
FIG. 1 is a simplified diagram of a network 100 that is managed by a network management station 10. The network 100 comprises one or more network devices 102, such as switches, routers, bridges, gateways, and other devices. Each network device 102 is coupled to another network device 102, or to one or more end stations 120. Each end station 120 is a terminal node of the network 100 at which some type of work is carried out. For example, an end station 120 is a workstation, a printer, a server, or similar device.
Each network device 102 executes a network-oriented operating system 110. An example of a network-oriented operating system is the Internetworking Operating System (IOS) commercially available from Cisco Systems, Inc. Each network device 102 also executes one or more applications 112 under control of the operating system 110. The operating system 110 supervises operation of the applications 112 and communicates over network connections 104 using an agree-upon network communication protocol, such as Simple Network Management Protocol (SNMP).
Each device 102 stores information about its current configuration, and other information, in a Management Information Base (MIB) 114. Information in the MIB 114 is organized in one or more MIB variables. The network management station 10 can send xe2x80x9cfetchxe2x80x9d and xe2x80x9csetxe2x80x9d commands to the device 102 in order to retrieve or set values of MIB variables. Examples of MIB variables include sysObjectID and sysDescr.
Preferably the network management station 10 is a general-purpose computer system of the type shown and described further herein in connection with FIG. 10. The network management station 10 executes one or more software components that carry out the functions shown in block diagram form in FIG. 1. For example, the network management station 10 executes a basic input/output system (BIOS) 20 that controls and governs interaction of upper logical layers of the software components with hardware of the network management station. An example of a suitable BIOS is the Phoenix ROM BIOS. The network management station 10 also executes an operating system 30 that supervises and controls operation of upper-level application programs. An example of a suitable operating system is the Microsoft Windows NT(copyright) operating system. The network management station 10 may also execute other operating systems that may not require a BIOS 20, such as UNIX-type operating systems, microkernel-based operating systems, etc.
The network management station 10 executes an asynchronous network interface (ANI) 50 under control of the operating system 30. The ANI 50 provides an interface to the network 100 and communicates with the network using SNMP or another agreed-upon protocol. The ANI 50 provides numerous low-level services and functions for use by higher-level applications.
The network management station 10 executes a network management system 40 that interacts with a database 60 containing information about the managed network 100. The network management system 40 is an example of a network management application. Using a network management application, a manager can monitor and control network components. For example, a network management application enables a manager to interrogate devices such as host computers, routers, switches, and bridges to determine their status, and to obtain statistics about the networks to which they attach. The network management application also enables a manager to control such devices by changing routes and configuring network interfaces. Examples network management applications are Cisco Works, CiscoWorks for Switched Internetworks (CWSI), and Cisco View, each of which is commercially available from Cisco Systems, Inc.
The ANI 50 and network management system 40 need not execute or reside on the same physical computer. They may execute on different machines.
A requirement of many network management applications is the ability to rapidly adapt to new kinds of network devices, such as switches, routers, and other hardware and software. Often, it is necessary to support a new kind of device that is introduced into the network, released or shipped by the device vendor other than when the network management application is updated, released or shipped. Thus, it is necessary to support new devices and new services when the network management application is installed in the field or running in a managed network.
Accordingly, the network management application must accept new requirements in the field. In particular, the execution environment of the network management application must be able to accommodate new processes and services to be executed. Existing processes must be adapted to new devices.
In past approaches, there has been no simple way to integrate a new process, service, or software component and its execution into the existing network management application. Generally, in past approaches, the existing network management application must be patched or updated.
Based on the foregoing, there is a clear need in this field for a network management system that can accept field updates of new executable processes or services.
There is also a need for such a system that can integrate the new executable processes or services into the existing execution flow of the network management system.
In particular, there is a need for a system that can determine, at execution time, the order of execution of a plurality of modules that represent a process or service to be executed with respect to one or more network devices.
There is also a need for such a system that can resolve the run-time execution order of a plurality of executable components based upon interdependencies of the executable components.
There is also a need for such a system that can resolve the run-time execution order of executable components based upon requirements such as time of execution, type of function to be executed, and resources that are required to be available before a particular component can execute.
The foregoing needs, and other needs and objects that will become apparent in the following description, are fulfilled in the present invention, which comprises, in one aspect, a method of dynamically determining an execution order of a plurality of executable components, the method comprising the steps of associating, with a first component of the plurality of executable components, one or more preconditions to execution of the first component; storing a partial order of execution of the plurality of executable components based on the pre-conditions; and generating a final order of execution of the plurality of executable components based on the partial order.
One aspect of this feature is that the step of associating further comprises the steps of associating a time base with the first executable component. According to another feature, the step of associating further comprises the steps of associating a precondition value that represents a category of service to be executed before the first executable component is executed. In another feature, the step of associating a precondition value further comprises the steps of associating a time of execution and a category with the first executable component.
According to another feature, the step of associating a precondition value further comprises the steps of associating, with a first service module function of an asynchronous network interface in a network management system, an execution time, a name of a second service module function, and a type of the second service module function. In another feature, the step of associating a precondition value further comprises the steps of associating a time of execution value indicating that the first executable component is to be executed during device discovery processing.
Another feature is that the step of associating a precondition value further comprises the steps of associating a time of execution value indicating that the first executable component is to be executed at a fixed pre-determined time. Still another feature is that the step of associating a precondition value further comprises the steps of associating a time of execution value indicating that the first executable component is to be executed upon request by an external process.
In another feature, the step of storing further comprises the steps of storing a directed acyclic graph in a memory, in which the directed acyclic graph comprises a plurality of nodes, each node comprising information representing one of the preconditions. Still another feature is that the step of generating a final order of execution further comprises the steps of conducting a breadth-first traversal to each of the plurality of nodes of the directed acyclic graph, and building the final order of execution based on an order in which the nodes are traversed.
Yet another feature is that each node is associated with a level of the graph, and further comprising the steps of deleting one of the nodes when such node is encountered at more than one level of the graph. Still another feature is that one of the pre-conditions is a unit value that represents a data set that is required to be available before the first executable component is executed.