Aspects of the present invention generally relates to agent scheduling. Specifically, an embodiment of the present invention provides a solution for managing and/or scheduling agents interacting with one or a plurality of databases.
In the world of information technology it is often required that tasks be performed on a periodic basis. In a database realm, agents are often used to perform these tasks. An agent is a program snippet employing a number of functions and/or procedures that is used to perform a specific task on a database. When an agent is needed to perform a task periodically, it is often preferable that the agent be scheduled to run automatically.
The inventors have noticed several shortcomings in the current way in which agents are normally scheduled. Currently, if a developer desires an agent to run at a particular time, the necessary parameters must be included within the code of the agent, itself. To this extent, changing scheduling of an agent requires recoding the agent. Agent schedulers for use with agents in certain database applications have a drawback of not being able to run simultaneously. Furthermore, there is no way to associate an agent with another agent such that the agent runs after the other agent has completed. Still further, if the database upon which the agent is to run is non-functioning there is no way to facilitate running of the agent and/or to notify a user that the agent has not run.
In general, aspects of the present invention provide a solution for managing database agents. Specifically, an embodiment of the present invention produces a predetermined number of replica databases for running the agents. Agent scheduling documents are produced and parsed to determine on which database the agent should be run and on which database the agent should run if the first choice of databases is not functioning. The agent scheduling documents also specify whether running of a specific agent has certain prerequisites, such as a time constraint and/or whether its running is dependent upon successful completion of another agent.
A first aspect of the present invention provides a system for managing database agents, comprising: a database replicator for producing a number of replica databases based on an original database; an agent scheduling document that includes: an identifier for an agent to be scheduled; a primary database upon which the agent is to be run, the primary database being at least one of the original database or one of the replica databases; and a prerequisite that must be satisfied before the agent is run; and a scheduling server, including a parser for parsing the agent scheduling document, the parser, for the agent scheduling document: determining, based on the prerequisite, whether the agent specified by the identifier is ready to be run, and: in case that a determination is made that the agent is ready to be run, forwarding the agent for running on the primary database.
A second aspect of the present invention provides a method for providing for management of database agents, comprising: producing a number of replica databases based on an original database; providing an agent scheduling document that includes: an identifier for an agent to be scheduled; a primary database upon which the agent is to be run, the primary database being at least one of the original database or one of the replica databases; and a prerequisite that must be satisfied before the agent is run; parsing an agent scheduling document via a scheduling server, by, for the agent scheduling document determining, based on the prerequisite, whether the agent specified by the identifier is ready to be run, and: in case that a determination is made that the agent is ready to be run, forwarding the agent for running on the primary database.
A third aspect of the present invention provides a program product stored on a computer readable for providing for maintaining database agents, comprising: program code for producing a predetermined number of replica databases based on an original database; program code for providing an agent scheduling document that includes: an identifier for an agent to be scheduled; a primary database upon which the agent is to be run, the primary database being at least one of the original database or one of the replica databases; and a prerequisite that must be satisfied before the agent is run; program code for parsing an agent scheduling documents in a scheduling server, by, for the agent scheduling document, determining, based on the prerequisite, whether the agent specified by the identifier is ready to be run, and: in case that a determination is made that the agent is ready to be run, program code for forwarding the agent for running on the primary database.
A fourth aspect of the present invention provides a method for deploying an application for managing database agents, comprising: providing a computer infrastructure being operable to: produce a predetermined number of replica databases based on an original database; provide an agent scheduling document that includes: an identifier for an agent to be scheduled; a primary database upon which the agent is to be run, the primary database being at least one of the original database or one of the replica databases; and a prerequisite that must be satisfied before the agent is run; provide a scheduling server to parse a plurality of agent scheduling documents, by, for every agent scheduling document determining, based on the prerequisite, whether the agent specified by the identifier is ready to be run, and: in case that a determination is made that the agent is ready to be run, forward the agent for running on the primary database.
A fifth aspect of the present invention provides computer software embodied in a propagated signal for scheduling of database agents, the computer software comprising instructions for causing a computer system to perform the following: produce a number of replica databases based on an original database; provide an agent scheduling document that includes: an identifier for an agent to be scheduled; a primary database upon which the agent is to be run, the primary database being at least one of the original database or one of the replica databases; and a prerequisite that must be satisfied before the agent is run; parse an agent scheduling document via a scheduling server, by, for the agent scheduling document determining, based on the prerequisite, whether the agent specified by the identifier is ready to be run, and: in case that a determination is made that the agent is ready to be run, forward the agent for running on the primary database.
A sixth aspect of the present invention provides a method for scheduling of database agents, the method comprising managing a computer infrastructure that performs the process described herein; and receiving payment based on the managing.
These and other features of this invention will be more readily understood from the following detailed description of the various aspects of the invention taken in conjunction with the accompanying drawings that depict various embodiments of the invention, in which:
It is noted that the drawings of the invention are not to scale. The drawings are intended to depict only typical aspects of the invention, and therefore should not be considered as limiting the scope of the invention. In the drawings, like numbering represents like elements between the drawings.
As indicated above, aspects of the present invention provide a solution for managing database agents. Specifically, an embodiment of the present invention produces a predetermined number of replica databases for running the agents. Agent scheduling documents are produced and parsed to determine on which database the agent should be run and on which database the agent should run if the first choice of databases is not functioning. The agent scheduling documents also specify whether running of a specific agent has certain prerequisites, such as a time constraint and/or whether its running is dependent upon successful completion of another agent.
Referring now to
As depicted, system 10 includes a computer system 14 deployed within a computer infrastructure 12. This is intended to demonstrate, among other things, that embodiments of the present invention could be implemented within a network environment (e.g., the Internet, a wide area network (WAN), a local area network (LAN), a virtual private network (VPN), etc.), or on a stand-alone computer system. In the case of the former, communication throughout the network can occur via any combination of various types of communications links. For example, the communication links can comprise addressable connections that may utilize any combination of wired and/or wireless transmission methods. Where communications occur via the Internet, connectivity could be provided by a conventional TCP/IP sockets-based protocol, and an Internet service provider could be used to establish connectivity to the Internet. Still yet, computer infrastructure 12 is intended to demonstrate that some or all of the components of system 10 could be deployed, managed, serviced, etc. by a service provider who offers to manage database agents.
As shown, computer system 14 includes a processing unit 20, a memory 22, a bus 24, and input/output (I/O) interfaces 26. Further, computer system 14 is shown in communication with external I/O devices/resources 28 and storage system 30. In general, processing unit 20 executes computer program code, such as an agent scheduling system 40, which is stored in memory 22 and/or storage system 30. While executing computer program code, processing unit 20 can read and/or write data to/from memory 22, storage system 30, and/or I/O interfaces 26. Bus 24 provides a communication link between each of the components in computer system 14. External devices 28 can comprise any devices (e.g., keyboard, pointing device, display, etc.) that enable a user to interact with computer system 14 and/or any devices (e.g., network card, modem, etc.) that enable computer system 14 to communicate with one or more other computing devices.
Computer infrastructure 12 is only illustrative of various types of computer infrastructures for implementing the invention. For example, in one embodiment, computer infrastructure 12 comprises two or more computing devices (e.g., a server cluster) that communicate over a network to perform a process described herein. Moreover, computer system 14 is only representative of various possible computer systems that can include numerous combinations of hardware and/or software. To this extent, in other embodiments, computer system 14 can comprise any specific purpose computing article of manufacture comprising hardware and/or computer program code for performing specific functions, any computing article of manufacture that comprises a combination of specific purpose and general purpose hardware/software, or the like. In each case, the program code and hardware can be created using standard programming and engineering techniques, respectively. Moreover, processing unit 20 may comprise a single processing unit, or be distributed across one or more processing units in one or more locations, e.g., on a client and server. Similarly, memory 22 and/or storage system 30 can comprise any combination of various types of data storage and/or transmission media that reside at one or more physical locations. Further, I/O interfaces 26 can comprise any system for exchanging information with one or more external devices 28. Still further, it is understood that one or more additional components (e.g., system software, math co-processing unit, etc.) not shown in
Storage system 30 can be any type of system (e.g., a database) capable of providing storage for information under the present invention. For example, storage system 30 may be used to an original and/or replica database (not shown), agents 118, schedule database documents 130, agent scheduling documents 150, etc. To this extent, storage system 30 could include one or more storage devices, such as a magnetic disk drive or an optical disk drive. In another embodiment, storage system 30 includes data distributed across, for example, a local area network (LAN), wide area network (WAN) or a storage area network (SAN) (not shown). Although not shown, additional components, such as cache memory, communication systems, system software, etc., may be incorporated into computer system 14.
Shown in memory 22 of computer system 14 is an agent scheduling system 40, which is a software program that provides the functions of the present invention. Agent scheduling system 40 manages/schedules database agents 118. To this extent, agent scheduling system 40 includes a database replicator 42, an agent scheduling document creator 44, an agent scheduling document parser 46 and a notification component 48.
Referring now to
Agent scheduling document creator 44 allows schedule database documents 130 and agent scheduling documents 150 to be created by, for example, user 16, which control scheduling of agents 118. Schedule database documents 130 contain a set of documents that point to a list of agents that need to be run, e.g., agent scheduling documents 150. Each agent scheduling document 150 contains instructions regarding the scheduling and/or execution of a particular agent or agents 118. To this extent, agent scheduling documents 150 may be used to control every agent 118 in the system from a central location.
Schedule database document 130 also contains a secondary schedule database 136, which performs the functions of primary schedule database in the case that primary schedule database 134 is not functioning properly. In schedule database document 130, secondary schedule database 136 is replica EMM 210. Schedule database document 130 may also have a primary notify 138 and secondary notify 139 for contact information for providing notification in response to certain events, for example, successful completion, unsuccessful completion, failing to run at a scheduled time, etc.
Agent 118 is also shown as having a secondary database 156 upon which the agent is to be run in the case that the primary database 154 is non-operational. Agent scheduling document 150 may have a single secondary database 156, as shown herein, or, in the alternative, may have a plurality of secondary databases 156 that are tested in sequence for operability. In any case, every one of the at least one secondary database 156 is different from both primary database 154 and every other secondary database 156. As with primary database 154, each secondary database 156 may be a different one the original database 110 or one of the replica databases 210, so long as it is different from the primary database 154 and every other secondary database 156. In this example, secondary database 156 for agent 118 is shown as being replica database 210.
In addition, agent scheduling document 150 may also contain a scheduling period 158. Scheduling period 158 may occupy a single field in agent scheduling document 150 or, in the alternative, may comprise multiple fields. Scheduling period 158 may indicate a particular date, day of the week, month of the year, multiple of the foregoing, time period, etc. In the example of
Further, agent scheduling document 150 may include information that indicate its past, current and future run status. Last run info 164 can indicate the beginning time, completion time, run time, status, etc. of the last run. This information may be used in conjunction with, e.g., scheduling period 158 and run after time 160 to calculate next run 168, which may be used by a processor database 120, 121, 220, 221 to determine whether the agent 118 specified by agent identifier 152 should be run. In addition, a status 166 could be included in agent schedule document 150, which indicates the current status of the agent 118.
Returning now to
To this extent, each of processor databases 120, 121, 220, 221, uses its processor agent 140 to parse its copy of schedule database documents 130. Upon encountering a schedule database document 130 that points to a particular primary schedule database 134 (
Upon retrieval of agent schedule documents 150, agent scheduling document parser 46 of agent scheduling system 40 has processor database 120, 121, 220, 221 parse each agent schedule document 150 in turn until there are no agent schedule documents 150 to be parsed. Upon finding an agent schedule document 150 having an indication that the particular processor database 120, 121, 220, 221 doing the processing is designated to process the particular agent schedule document 150, processor database makes a determination whether the prerequisite conditions contained in agent schedule document 150 (e.g., time 160, pre-requisite agent 162, etc.) have been satisfied. If the prerequisite conditions have been satisfied, the processor database 120, 121, 220, 221 instructs whichever EMM 110, 120 is the primary database 154 (
If, in process 202, the determination is made that primary database 74 is not functioning, in process 203, a determination is made whether secondary database 76 is functioning. If not, notification component 48 sends a notification of a schedule database server error for secondary database 76 in process 204 and processing ends. If secondary database 76 is functioning, notification component 48 sends a notification of a schedule database server error for primary database 74 in process 205. Then process flows to process 206 as before.
In the case that the primary database is not functioning, a determination is made in process 404 whether the backup database is functioning. If not, notification component 48 sends a notification of primary and backup agent database error in process 405. If the backup agent database is functioning, notification component 48 sends a notification of a primary agent database error in process 406 and process goes to process 407.
While shown and described herein as a method and system for scheduling database agents, it is understood that the invention further provides various alternative embodiments. For example, in one embodiment, the invention provides a computer-readable/useable medium that includes computer program code to enable a computer infrastructure to manage database agents. To this extent, the computer-readable/useable medium includes program code that implements an embodiment of the process described herein. It is understood that the terms computer-readable medium or computer useable medium comprises one or more of any type of physical embodiment of the program code. In particular, the computer-readable/useable medium can comprise program code embodied on one or more portable storage articles of manufacture (e.g., a compact disc, a magnetic disk, a tape, etc.), on one or more data storage portions of a computing device, such as memory 22 (
In another embodiment, the invention provides a method that performs the process described herein on a subscription, advertising, and/or fee basis. That is, a service provider, such as a Solution Integrator, could offer a service that manages database agents. In this case, the service provider can create, maintain, support, etc., a computer infrastructure, such as computer infrastructure 12 (
In still another embodiment, the invention provides a computer-implemented method for managing database agents. In this case, a computer infrastructure, such as computer infrastructure 12 (
As used herein, it is understood that the terms “program code” and “computer program code” are synonymous and mean any expression, in any language, code or notation, of a set of instructions intended to cause a computing device having an information processing capability to perform a particular function either directly or after either or both of the following: (a) conversion to another language, code or notation; and/or (b) reproduction in a different material form. To this extent, program code can be embodied as one or more of: an application/software program, component software/a library of functions, an operating system, a basic I/O system/driver for a particular computing and/or I/O device, and the like.
The foregoing description of various aspects of the invention has been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed, and obviously, many modifications and variations are possible. Such modifications and variations that may be apparent to a person skilled in the art are intended to be included within the scope of the invention as defined by the accompanying claims.