SYSTEM AND CONTROL PROCEDURES

The method ensures accurate task execution in blue-green deployment systems by using environment-specific execution control modules with unique identifiers to manage tasks in shared databases, preventing cross-environment mismanagement and enhancing system reliability.

DE102016008158B4Active Publication Date: 2025-07-24CANON KK
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
DE102016008158
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Priority Date
2015-07-13
Filing Date
2016-07-04
Publication Date
2025-07-24
Estimated Expiration
2036-07-04

AI Technical Summary

Technical Problem

In systems utilizing blue-green deployment, schedulers operating in one environment may inadvertently manage tasks intended for another environment, leading to incorrect task execution due to shared database usage without considering environment switching.

Method used

Implement a method where execution control modules in each environment manage tasks stored in a shared database by ensuring each module performs execution control specific to its environment, using unique identifiers and mode switching to prevent cross-environment task mismanagement.

Benefits of technology

Ensures accurate task execution by maintaining environment-specific control, preventing tasks from being executed in the wrong environment, thus enhancing system reliability and stability during environment switches.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

A system (100) capable of establishing a plurality of execution environments (103, 107) in which a task corresponding to task information managed by a database (111) is executed, the system comprising: a plurality of execution control devices (106, 110) for respectively operating in the plurality of execution environments, wherein the plurality of execution environments include a production environment that releases a service to a client (101) outside the system, and a preliminary environment that does not release the service to the client outside the system, the plurality of execution control devices include a first execution control device (106) operating in the production environment and a second execution control device (110) operating in the preliminary environment, wherein an operating mode of an execution control device among the plurality of execution control devices is a first mode if this execution control device operates in the production environment, and is a second mode different from the first mode if this execution control device operates in the preliminary environment, wherein a respective one of the first execution control means and the second execution control means controls execution of a task (S603) if the task corresponds to task information managed in the database which satisfies a first condition and which is associated with identification information of this execution control means, wherein the first execution control device for which the first mode is set is further configured to control (S605:YES, S606) execution of a task corresponding to task information managed by the database that satisfies a second condition (S606) different from the first condition and that is not related to identification information of the first or second execution control device; wherein the task information managed by the database includes schedule information from which a time at which execution of the task corresponding to the task information is scheduled can be obtained; wherein the first condition is met if, according to the schedule information, the execution of the task corresponding to the task information is scheduled for the current time and date or before, and wherein the second condition is satisfied if, according to the schedule information, the execution of the task corresponding to the task information is scheduled for the current time and date or within a predetermined time period therebefore.
Need to check novelty before this filing date? Find Prior Art

Description

BACKGROUND OF THE INVENTIONField of the invention

[0001] The present invention relates to a method for controlling execution of a task when multiple modules such as schedulers are present. Description of the state of the art

[0002] In conventional computer data processing, a method is known in which a module such as a scheduler manages a plurality of tasks corresponding to a respective data processing to control a processing order using a queue (e.g., Japanese Patent Application JP 2009-176146). Here, a "task" is a processing unit managed by a queue, also referred to as a "job." There is also a system in which task execution control modules such as multiple schedulers register tasks in a common queue to process the tasks sequentially.

[0003] Furthermore, in recent years, a system called "cloud computing" has been deployed, which provides applications and services through a method using virtualization technology, on a network such as the Internet. In the system described above, a method called blue-green deployment is provided as a method for updating a version with an upgrade without stopping the applications and services.

[0004] In blue-green deployment, two execution environments, called a blue environment and a green environment, are deployed, and systems are set up by running applications and services in the respective environments. When using the above method to upgrade the version, the upgraded applications and services run in the green environment.

[0005] A system deployed in the blue environment is exposed to the Internet at a given time, and a request from outside the system is passed to the system deployed in the blue environment for processing via a router or a domain name system (DNS). In the blue-green deployment, a processing / execution environment of the request is switched by changing a router setting and passing the request from outside the system to a system deployed in the green environment, thus realizing a version update (version upgrade) of the system. Furthermore, the systems deployed in each environment are configured to share a database to allow a user to use a processing result or data collected up to that point even after the version update (version upgrade).

[0006] Assume that the schedulers described above operate to implement data processing involving multiple tasks in the systems configured in the blue environment and the green environment by using a database shared by these environments. This manages a task that defines processing corresponding to a request from outside the system, as well as a task that defines processing that must be executed regularly.

[0007] US 2011 / 0 022 812 A1 relates to a system for establishing a so-called cloud bridge between virtual storage resources. US 2010 / 0 251 248 A1 relates to a job processing system with a schedule server that extracts a respective task from a parameterized job and requests an associated execution server to execute the task. WO 2014 / 171 130 A1 relates to a system in which multiple software components with dependencies are deployed on multiple processing devices.US 2013 / 0 066 951 A1 relates to a communication method for managing data transfer through a communication network, US 2014 / 0 259 014 A1 relates to a control method for resource management processing with respect to a virtual server, US 2011 / 0 131 448 A1 relates to a method for performing a workflow on a plurality of task servers, US 2007 / 0 038 766 A1 relates to a method for controlling the availability of information with respect to devices depending on a timing, and US 2015 / 0 067 097 A1 relates to the management of data distribution on network client computers.US 2009 / 0 089 785 A1 relates to a method for job scheduling in application servers, US 2009 / 0 320 026 A1 relates to a method for executing a program in multiple execution environments, and US 2013 / 0 332 930 A1 relates to a flow service server group that manages a job consisting of multiple tasks. DISCLOSURE OF THE INVENTION

[0008] However, the scheduler operating in the blue environment system may, for example, attempt to manage a task using the database shared with the green environment without considering switching the processing environment. In such a case, the problem arises that the scheduler operating in the green environment system takes a task that was originally intended to be handled by the scheduler operating in the blue environment system and executes that task in the green environment system.

[0009] Accordingly, in accordance with one aspect of the present invention, a method is provided to ensure that, when multiple execution control modules operate in multiple environments, an execution control module for executing a respective task performs execution control of tasks managed by a database shared therewith.

[0010] According to another aspect of the present invention, there is provided a system as defined in claim 1 and a control method as defined in claim 9. The remaining claims relate to further developments.

[0011] Further features of the present invention will become clear from the following description of embodiments with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS Fig.1 is a block diagram illustrating a configuration example of an entire system according to the present invention. Fig. 2 is a block diagram illustrating an example of a hardware configuration of an information processing apparatus. Fig. Figure 3 is a block diagram illustrating an internal configuration of each environment in more detail. Fig. Figure 4 is a block diagram illustrating an example configuration of a virtual machine. Fig. Figures 5A to 5D are diagrams illustrating examples of task information content. Fig. 6A and Fig. 6B are flowcharts illustrating processing concerning task execution control executed by a scheduler. Fig. 7 is a flowchart illustrating task execution processing. Fig.8 is a flowchart illustrating environment switching processing executed by a switching control unit. Fig. 9A and Fig. 9B are flowcharts illustrating processing for determining an operation mode of a scheduler. Fig. 10 is a flowchart illustrating registration processing of task information performed by a scheduler. DESCRIPTION OF THE EMBODIMENT

[0012] An embodiment embodying the present invention will be described below with reference to the accompanying drawings. Fig. 1 is a block diagram illustrating a configuration example of an entire system according to the present invention.

[0013] A client 101 is a terminal through which a user uses a service provided by a production environment (blue environment 103) of the system. Client 101 accesses a system 100 to submit a request using a web browser. In addition to client 101, there may be multiple clients outside of system 100 that use the service provided by system 100. In such a case, these clients each submit requests to system 100.

[0014] A router 102 receives a request regarding the system 100 from the client 101 and forwards the request to the appropriate execution environment. Since two execution environments are operating in the system 100, with the blue environment 103 being released as a production environment, at this time the router 102 forwards a request from the client 101 to the blue environment 103. Here, the execution environment, such as the blue environment 103, that releases the service to the client 101 outside the system 100 is called a "production environment." On the other hand, a green environment 107 that does not release the service to the client 101 outside the system 100 is called a "test environment" or "preliminary environment." Although the green environment 107 does not release the service to the client 101 outside the system 100, its internal configurations are usually operational, so a system administrator can use the system by accessing it.Furthermore, the green environment 107 can be deployed multiple times. Furthermore, each of the environments, such as the blue environment 103 and the green environment 107, contains a unique environment identifier as attribute information. The configuration, such as a scheduler included in each of the environments, can refer to the environment identifier.

[0015] The blue environment 103 is configured with a web server 104, an application server 105, and a scheduler 106. Multiple web servers 104 and application servers 105 can be configured, and these servers 104 and 105 are implemented with virtual machines running on one or more server computers.

[0016] The web server 104 receives a request from the client 101, calls the application server 105 as required, and returns a processing result of the request to the client 101. The application server 105 receives a request from the web server 104 or the scheduler 106, executes processing according to the request, and returns a processing result to a call source. Furthermore, the application server 105 handles data within a database 111 as required before or after receiving the request.

[0017] The scheduler 106 receives task information as a request from the web server 104 or the application server 105 via a predetermined web application programming interface (API) and stores the task information in the database 111. In the database 111, the task information is managed by a task information table. The scheduler 106 regularly refers to the task information table and executes a task corresponding to the task information according to scheduling information of the managed task information. For example, the scheduler 106 executes a task by calling a function of the application server 105.

[0018] The database 111 can be accessed by applications, services, or schedulers within the systems in both the blue environment 103 and the green environment 107.

[0019] Essentially, the green environment 107 has a configuration similar to the blue environment 103. However, a version of the application or service running in the green environment 107 (e.g., a program running on a web server 108 or an application server 109) is different. A scheduler 110 with a function similar to that of scheduler 106 runs in the green environment 107.

[0020] A switching control unit 112 executes environment switching processing to switch a processing environment of the request from the client 101 from the blue environment 103 to the green environment 107. This environment switching processing is executed according to an instruction input by the administrator of the system 100, or is automatically executed according to a preset schedule. Furthermore, to test an operation, each component included in the green environment 107 is operated concurrently with components in the blue environment 103 for a predetermined period of time. During the operation test, the scheduler 110 performs internal task execution control, and a request manually input by the administrator is executed by the web server 108 or the application server 109. When the operation test is sufficiently completed, the switching control unit 112 executes environment switching processing at a timing described above.

[0021] Fig. 2 is a block diagram illustrating a hardware configuration of an information processing apparatus including a server computer in which a virtual machine operates. Fig.2, the information processing device includes a central processing unit (CPU) 501, a random access memory (RAM) 502, a read-only memory (ROM) 503, and an external storage device 507. The CPU 501 executes software stored in the ROM 502 or the external storage device 507, or software downloaded from a network, and comprehensively controls devices connected to a system bus 509. The RAM 502 functions as the main memory or work area of the CPU 501. The external storage device 507 is configured with a hard disk (HD) or a solid state drive (SSD). The external storage device 507 stores various applications, database data, and user files, such as a boot program, an operating system, an authentication server, and an authentication client. Furthermore, a keyboard control (KBDC, engl.A keyboard controller (VC) 504 in the information processing device transmits information received from a keyboard or pointing device to the CPU 501. A video controller (VC) 505 performs display control of a display device configured with a liquid crystal display (LCD). A disk controller (DC) 506 controls access to the external storage device 507. The information processing device is connected to the network via a network adapter (NIC) 420. A virtual software called a hypervisor emulates a virtual machine (VM) described below with reference to FIG. Fig. 4 described virtual machine (VM).

[0022] Fig. 3 is a block diagram showing internal configurations of the Fig. 1 described blue environment 103 and green environment 107 are illustrated in more detail. In Fig.3 The same web applications run on web servers 301, 302, and 303, and the same applications run on application servers 304 and 305.

[0023] A load balancer (LB) 306 performs load balancing by assigning requests from client 101 to web servers 301 to 303. Furthermore, an LB 307 performs load balancing by assigning requests from web servers 301 to 303 and scheduler 106 to one of application servers 304 and 305. Web servers 301 to 303, application servers 304 and 305, and the schedulers are implemented as virtual machines.

[0024] The planner in Fig. 3 corresponds to either the planner 106 or the planner 110. Furthermore, the web server 104 in Fig. 1 corresponds to the LB 306 and the web servers 301, 302 and 303, whereas the application server 105 corresponds to the LB 307 and the application servers 304 and 305.

[0025] Fig.Figure 4 is a block diagram illustrating configurations of virtual machines and virtual servers providing a control unit (controller). Fig. 4, a control unit 406 comprehensively controls virtual servers 401 to 405. These virtual servers 401 to 405 and the control unit 406 are mutually connected via a network. Fig. Figure 4 illustrates an internal structure of virtual server 401. This structure is common to all virtual servers 401 to 405.

[0026] A plurality of virtual machines 408, 409, and 410 operate within the virtual server 401. The virtual machine 408, 409, or 410 emulates a host computer, and an operating system 412 and an application 411 running on the operating system 412 operate therein. A virtual NIC 413 emulates a communication controller and performs data transmission / reception with other virtual NICs connected to the network via a virtual switch 407 and the NIC 420. The virtual switch 407 is software that emulates a switching node and controls communication between the virtual NICs within the virtual machines 408 to 410 and the NIC 420 within the virtual server 401. Software that implements the virtual machines 408 to 410 in the virtual server 401 is called a "hypervisor."The control unit 406 manages the settings of the virtual machines 408 to 410 and the virtual switch 407 within the virtual server 401. For example, the control unit 406 increases or decreases the number of web servers or application servers according to load. Furthermore, the control unit 406 monitors the application 411 running in the virtual machine 408 and stops the virtual machine 408 if any error is detected in the application 411. < Description of task information according to the present invention >

[0027] The scheduler 106 stores task information in the database 111 and controls execution of a task according to the task information.

[0028] The web server 104 and the application server 105 can instruct the scheduler 106 to register or modify the task via the web API.

[0029] Table 1 illustrates the contents (a format) of the task information stored and managed in the database 111. Table: Content of task information Column name Description Planner ID A string that uniquely identifies a planner. Task name A string that uniquely identifies a task and is specified when the task is registered. Planned execution date / time Next execution date / time of a task. Repeat setting Recurrence setting stored in JSON format when a task is a recurring task. Task type Task type (message queue or web API call) detail Task detail stored in JSON format.

[0030] "Scheduler Identifier (ID)" is identification information (character string) that uniquely identifies an instance of each scheduler, which is generated from a universally unique identifier (UUID) when each of the schedulers is activated. Instances of different schedulers have different scheduler IDs. For example, scheduler 106 sets its own scheduler ID when task information is added or changed.

[0031] “Task Name” is a character string specified by a task information registration source that uniquely identifies the task information stored in the database 111.

[0032] "Scheduled execution date / time" is scheduling information for when a task is to be executed according to the task information. The scheduled execution date / time is specified by "year / month / day / time." If the task information specifies a recurring task, the "Scheduled execution date / time" is calculated from a recurrence setting described below at the time the task is registered or executed. If the task is not a recurring task, the "Scheduled execution date / time" is specified by a registration source of the task information.

[0033] A "Recurrence Setting" is a recurrence setting for repeatedly executing a task. The recurrence setting is expressed in JavaScript Object Notation (JSON) format and specified by a registration source of task information. The "Recurrence Setting" item can be used to specify an end date / time, which indicates the end point of the recurrence period. If the "Recurrence Setting" is not specified, the task will only be executed once according to the schedule specified in the "Scheduled Execution Date / Time."

[0034] Fig.Figure 5A is a diagram illustrating an example of a "repeat setting" illustrated in Table 1. In the setting, a task is executed during a period from February 4, 2015, to February 3, 2020 (Tokyo time) every year from Monday to Friday at 00:15, 00:45, 12:15, and 12:45 (Tokyo time) in March, June, September, and December.

[0035] Fig.5B is a diagram illustrating another example of a "recurrence setting" illustrated in Table 1. In this setting, a task is called every 3 minutes starting from February 4, 2015, at 8:12 a.m. (Tokyo time). If the above-described recurrence setting is specified in the task information, the scheduler 106 calculates the scheduled execution date / time that is the current time or later than and closest to the current time, and sets the calculated date / time as the "scheduled execution date / time" of the task, for example, if the task information contains the Fig. 10 and described below is to be registered in the database 111.

[0036] "Task type" is an execution method of the task. For example, the scheduler 106 (110) provides the following two execution methods for the task. 1. Message queue (MQ): Instructing the application server 105 (109) receiving a message from a message queue to perform the task by transmitting the message corresponding to the task to the message queue. 2. Web API call (Hypertext Transfer Protocol (HTTP): Instructing the application server 105 (109) to perform the task by calling a web API provided by the application server 105 (109).

[0037] "Detail" is a setting detail expressed in JSON format that is used when the scheduler 106 (110) instructs the application server 105 (109) to execute the task. The scheduler 106 (110) instructs the application server 105 (109) to execute the task by using "task type" and "detail".

[0038] Fig.Figure 5C is a diagram illustrating an example of “Detail” in Table 1 when the task type is Message Queue.

[0039] In Fig. 5C, a message "159d2778-6adc-42af-b493-675b282a7e95" is to be transferred to a message queue named "aggregate." For example, the application server 105 (109) performs processing to periodically retrieve a message from the message queue "aggregate," aggregate information related to the user with an ID described in the message, i.e., "159d2778-6adc-42af-b493-675b282a7e95," and store a result of the aggregate in the database 111.

[0040] Fig. Figure 5D is a diagram illustrating an example of Detail when the task type is Web API call.

[0041] "Target" specifies a name used when obtaining an address of a Web API call target (i.e., a scheme, host, or port) from the Blue environment 103 or the Green environment 107. Because the address of the application server 105 (109) varies in the environment 103 (107), the scheduler 106 (110) obtains the address of the application server 105 (109) from the environment 103 (107).

[0042] "Path" indicates a path for a Uniform Resource Locator (URL) of the Web API call. For example, if an address that can be obtained by specifying "Destination" from the environment 103 (107) is "http: / / 192.168.11.30:8080," a URL for calling the above Web API is "http: / / 192.168.11.30:8080 / send." In the above example, data "jp" is transmitted in plain text via a POST method to this URL. For example, the application server 105 (109) receiving the above request performs processing such as transmitting an email in a transmission queue to a client whose region is "jp."

[0043] Processing of task execution control executed by the scheduler 106 or 110 will be described with reference to Fig. 6A and Fig. 6B.

[0044] Fig.6A is a flowchart illustrating a call processing of a task activation processing executed by the scheduler 106 (110). Through this processing, the task activation processing is regularly called and executed. Furthermore, in this processing, the scheduler 106 (110) performs execution control by obtaining task information that satisfies each of the conditions from the database 111.

[0045] In step S601, the scheduler 106 (110) determines whether a predetermined period of time (e.g., one minute) has elapsed. If a predetermined period of time has elapsed (YES in step S601), processing proceeds to step S602. In step S602, the scheduler 106 (110) calls task activation processing.

[0046] Fig.6B is a flowchart illustrating the task activation processing executed by scheduler 106 (110). As described above, task execution processing is invoked in step S602.

[0047] First, in step S603, the scheduler 106 (110) obtains the task information for which its own scheduler ID is set from the task information table stored in the database 111. Then, the scheduler 106 (110) identifies, as the first condition, among the task information, the task information in which schedule information (year / month / day / time) before or at the current date / time is specified in the "Scheduled Execution Date / Time" item, and acquires this task information from the database 111. Multiple pieces of task information can be acquired from the task information table.

[0048] In step S604, the scheduler 106 (110) executes execution processing of a task corresponding to the task information acquired in step S603. If multiple task information is acquired, execution processing is executed with respect to each of the tasks. Details of the task execution processing will be described in detail below with reference to Fig. 7 described.

[0049] In step S605, the scheduler 106 (110) checks its current mode. An operation mode of the scheduler 106 (110) takes a value representing either a "main" or a "sub" mode. An operation mode of the scheduler 106 (110) in a production environment takes a value representing the "main" mode. An operation mode of the scheduler 106 (110) in a preliminary environment takes a value representing the "sub" mode. In step S605, if the current operation mode is not the "main" mode (NO in step S605), the processing is terminated, and if the current operation mode is the "main" mode (YES in step S605), the processing proceeds to step S606.

[0050] In step S606, the scheduler 106 (110) identifies, as a second condition, the task information in which schedule information is specified in the "Scheduled Execution Date / Time" before or at a date / time that is a predetermined time (e.g., 3 minutes) earlier than the current date / time, and acquires this task information from the database 111. In step S607, the scheduler 106 (110) executes execution processing of a task corresponding to the task information acquired in step S606. Then, the processing is terminated.

[0051] In addition, optionally, if the above predetermined time period in step S601 is X minutes, whereas the predetermined time period in step S606 is Y minutes, values for "X" and "Y" may be specified to satisfy the following relationship. The maximum time period expected to be necessary to complete the task activation processing ( Fig.6B) by executing the call processing ( Fig. 6A) is α. Y>(2×X)+α

[0052] For example, if the blue environment 103 is the production environment, the scheduler 106 executes the processing in step S606. At this time, in a period between the current date / time and the date / time earlier than the current date / time by the predetermined time (Y minutes), the scheduler 110 operating in the sub-mode is ensured to execute the processing in steps S603 and S604 according to the comparison expression described above.

[0053] Accordingly, the task information acquired in step S606 is the task information in which "Scheduler ID" is set to identification information different from all the scheduler IDs of the schedulers 106 and 110. Furthermore, the scheduler 106 will not accidentally acquire the task information to be processed by the scheduler 110.

[0054] The task information acquired in the above situation is the task information registered in the database 111 under an environment used in the past (not illustrated) that is different from the blue environment 103 or the green environment 107 illustrated in Fig.1. If the environment is repeatedly switched by a method such as the blue-green provisioning used in the present invention, task information registered by a non-working scheduler in the environment used in the past may remain in the database 111 without being processed. In the present embodiment, the system 100 is also intended to perform processing on such task information, so that, instead of the non-working scheduler, the scheduler 106 in the current production environment performs execution control of the task corresponding to such task information.

[0055] Fig. Fig. 7 is a flowchart showing details of the processing performed by the scheduler 106 (110) in steps S604 and S607 in Fig. 6 performed task execution processing.

[0056] In step S702, the scheduler 106 (110) determines a task type of the task information. If the task type is "Message Queue (MQ)" (YES in step S702), processing proceeds to step S703. In step S703, the scheduler 106 (110) registers a message in a message queue according to the content specified in the "Detail" item of the task information. On the other hand, if the task type is "Web API Call (HTTP)" (NO in step S702), processing proceeds to step S704. In step S704, the scheduler 106 (110) generates a data packet containing a specified method and a main message according to the content specified in the "Detail" item of the task information and transmits the data packet to the specified URL. Through the processing in steps S703 or S704, the task is executed by the application server 105 (109).

[0057] In step S705, the scheduler 106 (110) determines whether the repetition setting is specified in the "Repetition Setting" item of the task information. If the repetition setting is not specified (NO in step S705), processing proceeds to step S706. If the repetition setting is specified (YES in step S705), processing proceeds to step S707.

[0058] In step S706, the scheduler 106 (110) cancels the task information stored as the processing target in the database 111 and terminates the processing. Here, the scheduler 106 (110) can cancel the task information, for example, by deleting the task information from the database 111 or by setting schedule information that is assumed to be non-executable, such as "YEAR 9999," in the "Scheduled Execution Date / Time" item of the task information. With this processing, the canceled task information is not acquired in the above-described processing in steps S603 and S606.

[0059] In step S707, the scheduler 106 (110) calculates a next execution time (year / month / day / time) from the content specified in the "repetition setting" item of the task information. Next, in step S708, if the end date / time is specified in the "repetition setting" item of the task information, the scheduler 106 or 110 compares the next execution time calculated in step S707 with the end date / time. As a result of the comparison in step S708, if the next execution time is on or after the end date / time (YES in step S708), processing proceeds to step S706. If the next execution time is before the end date / time (NO in step S708), processing proceeds to step S709. In addition, if the end date / time therefor is not set, the processing in step S708 is skipped, so that the processing proceeds to step S709.

[0060] In step S709, the scheduler 106 or 110 uses its own scheduler ID and the next execution time calculated in step S707 to update the information specified in “Scheduler ID” and “Scheduled Execution Date / Time” of the processing target task information stored in the database 111.

[0061] Table 2 is a specific example of the task information table stored and managed in database 111. The content managed by the task information table may contain different information than the content included in this example. Task information table Planner ID Task name Planned execution date / time Repeat setting Task type detail 550e8400 Send email 2015 / 5 / 12 12:23:41 [--] mq [--] 550e8400 charge1 2015 / 5 / 12 13:05:21 [--] http [--] 8761d91a accumulate 2015 / 5 / 12 12:20:46 [--] mq [--] 8761d91a Send email 2015 / 5 / 12 12:23:16 [--] mq [--] 550e8400 clean up 2015 / 5 / 12 12:25:28 [--] http [--] 619c82b9 check 2015 / 5 / 12 12:22:40 zero http [--]

[0062] In the above task information table, task information related to instances of at least three different schedulers (scheduler IDs are "550e8400," "8761d91a," and "619c82b9") is registered. Furthermore, the "recurrence setting" is not specified for the task information with the task name "check."

[0063] For example, it is assumed that the planner 106 of the blue environment 103 Fig. 6B every minute at second 00, whereas the scheduler 110 of the green environment 107 calls the Fig.6B is called every minute at second 30. Furthermore, the scheduler IDs of schedulers 106 and 110 are "550e8400" and "619c82b9," respectively. On the other hand, a scheduler ID "8761d91a" represents the identification information of a scheduler in an old environment that is neither the blue environment 103 nor the green environment 107. It is assumed that this scheduler is not operating at this time.

[0064] This explicitly describes task execution control, which is executed according to the task information contained in the above task information table.

[0065] When the current time has reached 12:23:30 on May 12, 2015, the scheduler 110 acquires in step S603 from Fig.6B task information with task name, and executes a task corresponding to this task information in step S604. Because the operating mode of the scheduler 110 is the "sub" mode, the scheduler 110 terminates the Fig. 6B. The task information with the task name “check” is transferred to the Fig. 7 deleted.

[0066] Next, when the current time has reached 12:24:00, the scheduler 106 acquires in step S603 from Fig. 6B task information with the task name "Send Email", and executes a task corresponding to this task information in step S604. If the scheduler 106 executes a task corresponding to the task information with the task name "Send Email", in step S709 Fig. 7 then only the item “Planned execution date / time” is updated with regard to the corresponding task information in the task information table above.

[0067] Subsequently, in step S606, the scheduler 106 continues to perform acquisition processing of task information because its operation mode is the "main" mode. Here, task information with the task name "accumulate" is acquired, in which the date / time before or on May 12, 2015, 12:21:00 (i.e., 3 minutes before the current time) is set for "Scheduled Execution Date / Time". In step S607, the scheduler 106 executes a task corresponding to the acquired task information with the task name "accumulate" that is associated with the scheduler ID "8761d91a". When the scheduler 106 executes the task corresponding to the task information with the task name "accumulate", in step S709 Fig. 7 "Scheduled Execution Date / Time" and "Scheduler ID" are updated with the corresponding task information contained in the above task information table. Specifically, the "Scheduler ID" item is updated with the identification information "550e8400" indicating the scheduler 106.

[0068] By updating the information specified in “Scheduler ID”, the scheduler 106 can execute the task corresponding to the task information with the task name “accumulate” at a timing of step S604 next time and thereafter.

[0069] Fig. 8 is a flowchart illustrating environment switching processing executed by the switching control unit 112. This describes in detail processing for switching a production environment from the blue environment 103 to the green environment 107. This processing is started according to an instruction input by the administrator of the system 100 or a schedule set in advance.

[0070] In step S801, the switching control unit 112 stops the scheduler 106 within the blue environment 103 serving as the production environment. The scheduler 106 releases the service to the client 101 outside the system 100. In particular, the scheduler 106 (110) of the environment 103 (107) provides a web API for stopping processing, so that the switching control unit 112 calls the web API of the scheduler 106. After the processing for stopping the scheduler 106 is executed, all processing in Fig. 6A and Fig. 6B stopped, which are executed regularly.

[0071] In step S802, the switching control unit 112 changes a setting of the router 102 to switch the production environment to the green environment 107. In step S803, the switching control unit 112 changes the operation mode of the scheduler 110 in the green environment 107 to "Main." Specifically, the scheduler 106 (110) of the environment 103 (107) provides a web API for changing the operation mode, so the switching control unit 112 calls the web API of the scheduler 110 to change the operation mode.

[0072] Processing for determining the operation mode of the scheduler 106 (110) will be described with reference to Fig. 9A and Fig. 9B.

[0073] Fig. Fig. 9A is a flowchart illustrating a setting processing of the operation mode of the scheduler 106 (110). This processing is executed in the processing in step S803 of Fig. 8 is called and executed. The environment, such as the blue environment 103 or the green environment 107, has an environment identifier that uniquely identifies the environment 103 (107), and a program operating in the environment 103 (107) can obtain the environment identifier.

[0074] In step S901, the scheduler 106 or 110 changes its own operation mode to a specified mode. Next, in step S902, the scheduler 106 or 110 determines whether the operation mode after making a change is the "main" mode. If the operation mode is the "main" mode (YES in step S902), processing proceeds to step S903. If the operation mode is not the "main" mode (NO in step S902), processing ends.

[0075] In step S903, the scheduler 106 or 110 acquires the environment identifier indicating its own operating environment, writes the acquired environment identifier to the database 111, and ends the processing. Through the processing in step S903, the environment identifier of the current production environment is managed in the database 111.

[0076] Fig. 9B is a flowchart illustrating operation mode setting processing executed by the scheduler 106 (110). This processing is executed when the scheduler 106 (110) is activated.

[0077] In step S905, the scheduler 106 or 110 obtains the environment identifier from the database 111. This is a value written to the database 111 in step S903 by the scheduler whose operating mode is the "main" mode.

[0078] In step S906, the scheduler 106 or 110 compares the environment identifier of its own operating environment with the environment identifier obtained in step S905. As a result of the comparison, if the environment identifiers match (YES in step S906), processing proceeds to step S907. If the environment identifiers do not match (NO in step S906), processing proceeds to step S908.

[0079] In step S907, the scheduler 106 or 110 sets its own operation mode to "Main." On the other hand, in step S908, the scheduler 106 or 110 sets its own operation mode to "Sub."

[0080] According to this processing, for example, if the scheduler 106 operating in the "main" operation mode is stopped and reactivated for some reason, the operation mode of the reactivated scheduler 106 is set to the "main" mode. Furthermore, in the system 100 according to the present invention, which provides web applications and services in a virtual environment, an operation status of the application in each virtual machine is monitored. If a problem in the operation of the application is found through the monitoring processing, the virtual machine in which this application is running is terminated, and the application is redeployed by re-creating a virtual machine containing the application. At this time, the scheduler ID for identifying the scheduler 106 is different from the scheduler ID before reactivation.

[0081] Fig.10 is a flowchart illustrating a flow of processing for registering a task in the database 111 by the scheduler 106 or 110.

[0082] In step S1001, the scheduler 106 or 110 receives a request to register task information and extracts the task information as the registration target from the request. The request is received via the Web API. The content of the task information to be extracted includes information about items such as "task name" for uniquely identifying a task, "scheduled execution date / time," "recurrence setting," "task type," and "details." Here, if the task is not a recurring task, there is no information about the "recurrence setting" item. Furthermore, if the task is a recurring task, there is no information about the "scheduled execution date / time."

[0083] In step S1002, the scheduler 106 or 110 checks whether the task information with the information specified by the "Task Name" item of the task information extracted in step S1001 has already been registered and exists in the database 111. After checking, if the task information has not yet been registered in the database 111 (NO in step S1002), processing proceeds to step S1003. If the task information has already been registered in the database 111 (YES in step S1002), processing ends without registering the task information.

[0084] In step S1003, the scheduler 106 or 110 determines whether the repetition setting is specified in the "Repetition Setting" item of the task information extracted in step S1001. If the task is a repetitive task for which repetition is set (YES in step S1003), processing proceeds to step S1004. If repetition is not set for the task (NO in step S1003), processing proceeds to step S1005.

[0085] In step S1004, the scheduler 106 or 110 calculates the next execution time (year / month / day / time) from the content specified in the "Recurrence Setting" item of the task information extracted in step S1001. Subsequently, the scheduler 106 or 110 sets the schedule information indicating the next execution time obtained from the above calculation to the "Scheduled Execution Date / Time" item of the task information.

[0086] In step S1005, the scheduler 106 or 110 sets the identification information for identifying itself for the "Scheduler ID" item, stores the task information in the database 111, and ends the processing. The task information stored in the database 111 is managed by the task information table described above.

[0087] The present invention also includes a device, a system or a method realized by suitably combining the embodiments described above. Other embodiments

[0088] Embodiment(s) of the present invention may also be implemented by a computer of a system or apparatus that retrieves and executes computer-executable instructions (e.g., one or more programs) recorded on a storage medium (which may also be more fully referred to as a 'non-transitory computer-readable storage medium') to perform the functions of one or more of the embodiment(s) described above, and / or that includes one or more circuit(s) (e.g.,an application-specific integrated circuit (ASIC)) for performing the functions of one or more of the embodiments described above, as well as by a method performed by the computer of the system or device by, for example, reading and executing the computer-executable instructions from the storage medium to perform the functions of one or more of the embodiments described above, and / or controlling the one or more circuits to perform the functions of one or more of the embodiments described above. The computer may comprise one or more processors (e.g., a central processing unit (CPU), a microprocessor unit (MPU)), and may include a network of separate computers or separate computer processors to read and execute the computer-executable instructions. The computer-executable instructions may be provided to the computer, for example,provided by a network or storage medium. The storage medium may include one or more hard disks, random access memory (RAM), read-only memory (ROM), distributed computing system memory, optical media (such as compact disc(s) (CD), digital versatile disc(s) (DVD), or Blu-ray Disc(s)™ (BD)), flash storage device(s), and / or memory card(s), or the like.

[0089] Although the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed embodiments. The scope of the following claims should be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.

Claims

[1] A system (100) capable of establishing a plurality of execution environments (103, 107) in which a task corresponding to task information managed by a database (111) is executed, the system comprising: a plurality of execution control devices (106, 110) for respectively operating in the plurality of execution environments, wherein the plurality of execution environments include a production environment that releases a service to a client (101) outside the system, and a preliminary environment that does not release the service to the client outside the system, the plurality of execution control devices include a first execution control device (106) operating in the production environment and a second execution control device (110) operating in the preliminary environment, wherein an operating mode of an execution control device among the plurality of execution control devices is a first mode if this execution control device operates in the production environment, and is a second mode different from the first mode if this execution control device operates in the preliminary environment, wherein a respective one of the first execution control means and the second execution control means controls execution of a task (S603) if the task corresponds to task information managed in the database which satisfies a first condition and which is associated with identification information of this execution control means, wherein the first execution control device for which the first mode is set is further configured to control (S605:YES, S606) execution of a task corresponding to task information managed by the database that satisfies a second condition (S606) different from the first condition and that is not related to identification information of the first or second execution control device; wherein the task information managed by the database includes schedule information from which a time at which execution of the task corresponding to the task information is scheduled can be obtained; wherein the first condition is met if, according to the schedule information, the execution of the task corresponding to the task information is scheduled for the current time and date or before, and wherein the second condition is satisfied if, according to the schedule information, the execution of the task corresponding to the task information is scheduled for the current time and date or within a predetermined time period therebefore. [2] The system according to claim 1, wherein the first execution control means for which the first mode is set stores an environment identifier indicating its own operation execution environment in the database (S903). [3] System according to claim 2, wherein, if an execution control device is activated in an execution environment specified by the environment identifier stored in the database (S906:YES), the first mode is set as the operation mode for the activated execution control device (S907), and wherein, if an execution control device is activated in an execution environment different from the execution environment indicated by the environment identifier stored in the database (S906:NO), the second mode is set as the operation mode for the activated execution control device (S908). [4] The system according to claim 1, wherein, if a request for registering the task information is received, the execution control means registers the identification information of each execution control means in the database in association with the task information (S709, S1005). [5] The system according to claim 4, wherein, if (S1003:YES) repetition is set for the task information included in the request, the execution control means respectively operating in a plurality of the execution environments register the task information in the database after setting (S1004) a next execution timing of a task corresponding to the task information. [6] The system according to claim 1, wherein, if switching processing of an execution environment in which an operation mode of the execution control means for which the second mode is set is changed to the first mode is performed, execution control of the task performed by the execution control means for which the first mode has been set before the switching processing is stopped (S801). [7] The system according to any one of claims 1 to 6, wherein, when the execution control means for which the first mode is set acquires the task information satisfying the second condition from the database and controls execution of a task corresponding to the acquired task information (S606), the execution control means for which the first mode is set registers the task information in association with its own identification information in the database (S607, S709). [8] System according to claim 1, where the task information contains information indicating a task type, and wherein a task corresponding to the task information is executed by an execution method according to the information. [9] A control method of a system (100) capable of establishing a plurality of execution environments (103, 107) in which a task is executed that corresponds to task information managed by a database (111), wherein the plurality of execution environments include a production environment that releases a service to a client (101) outside the system, and a preliminary environment that does not release the service to the client outside the system, a plurality of execution control devices of the system include a first execution control device (106) operating in the production environment and a second execution control device (110) operating in the preliminary environment, and an operating mode of an execution control device among the plurality of execution control devices is a first mode if this execution control device operates in the production environment, and is a second mode different from the first mode if this execution control device operates in the preliminary environment, the tax procedure includes: Controlling (S603), by a respective one of the first execution control means and the second execution control means, an execution of a task if the task corresponds to task information managed in the database which satisfies a first condition and which is associated with identification information of this execution control means, Controlling (S605:YES, S606), by the first execution control means for which the first mode is set, an execution of a task corresponding to task information managed in the database, which satisfies a second condition (S606) different from the first condition, and which is not related to identification information of the first or second execution control means; wherein the task information managed by the database includes schedule information from which a time at which execution of the task corresponding to the task information is scheduled can be obtained; wherein the first condition is met if, according to the schedule information, the execution of the task corresponding to the task information is scheduled for the current time and date or before, and wherein the second condition is satisfied if, according to the schedule information, the execution of the task corresponding to the task information is scheduled for the current time and date or within a predetermined time period therebefore. [10] The control method according to claim 9, wherein the execution control means for which the first mode is set stores an environment identifier indicating its own operation execution environment in the database. [11] Control method according to claim 10, wherein, if an execution controller is activated in an execution environment specified by the environment identifier stored in the database, the first mode is set as the operating mode for the activated execution controller, and wherein, if an execution controller is activated in an execution environment different from the execution environment specified by the environment identifier stored in the database, the second mode is set as the operation mode for the activated execution controller. [12] The control method according to claim 9, wherein, if a request for registering the task information is received, the execution control means registers the identification information of each execution control means in association with the task information in the database.

Citation Information

Patent Citations

  • Computer readable medium and recording medium therefor

    US20070038766A1

  • System and method for job scheduling in application servers

    US20090089785A1

  • Methods and system for executing a program in multiple execution environments

    US20090320026A1

  • Job processing method, computer-readable recording medium having stored job processing program and job processing system

    US20100251248A1

  • Systems and methods for establishing a cloud bridge between virtual storage resources

    US20110022812A1