This application is based on and claims priority under 35 USC 119 from Japanese Patent Application No. 2018-176618 filed Sep. 20, 2018.
The present disclosure relates to a relay system.
There is provided a system having a function of monitoring operation conditions of job processing apparatuses and increasing tasks of any one job processing apparatus when the number of processes of the job processing apparatuses exceeds a reference.
Japanese Unexamined Patent Application Publication No. 2014-149690 is an example of related art.
Aspects of non-limiting embodiments of the present disclosure relate to the following circumstances. In a system in which an instruction is given so as to increase or reduce computational resources depending on conditions of requests, additional computational resources may be allocated even if requests increase due to failure.
It is desirable to suppress allocation of additional computational resources even if requests increase due to failure.
Aspects of certain non-limiting embodiments of the present disclosure overcome the above disadvantages and/or other disadvantages not described above. However, aspects of the non-limiting embodiments are not required to overcome the disadvantages described above, and aspects of the non-limiting embodiments of the present disclosure may not overcome any of the disadvantages described above.
According to an aspect of the present disclosure, there is provided a relay system comprising a detector that detects occurrence of failure related to a processor that reads and processes requests from a memory, a monitor that monitors statuses of the requests stored in the memory and gives an instruction to increase or reduce a computational resource depending on the statuses of the requests stored in the memory, and a controller that performs control in response to detection of the failure by the detector so that a status of the memory is set to a state in which the monitor determines that addition of the computational resource is unnecessary.
An exemplary embodiment of the present disclosure will be described in detail based on the following figures, wherein:
An exemplary embodiment of the present disclosure is described below with reference to the drawings.
<System Configuration>
The cloud cooperation system 1 includes input apparatuses 100 that request document processing, a relay apparatus 200 that processes requests received from the input apparatuses 100 to achieve cooperation with services on a cloud (hereinafter referred to also as “cloud service”), a cloud network 300, and a storage cloud server 400A and a business support cloud server 400B that are examples of the cloud service.
The relay apparatus 200 is an example of a relay system and is connected to the cloud network 300.
The input apparatus 100 is a terminal to be operated by a user registered in the cloud service. In this exemplary embodiment, the input apparatus 100 is assumed to be, for example, an image processing apparatus or a smartphone.
For example, the image processing apparatus is provided with a FAX function for transmitting and receiving FAX documents, a copying function for producing copies, a scanning function for reading images of documents, and a printing function for printing images on paper or other recording media. The image processing apparatus need not have all the functions but may specialize in any one function.
In this exemplary embodiment, the FAX document is used in the meaning of a document containing a photograph, characters, or a graphical object to be transmitted and received by facsimile.
For example, the input apparatus 100 is used for directly registering a scanned document in a cloud service desired by the user. For example, the input apparatus 100 is used for searching a plurality of cloud services for a document desired by the user to print out the document. For example, the input apparatus 100 is used for printing a document file or an image file without using a print driver or a computer.
In the case of
<Configuration of Relay Apparatus>
The relay apparatus 200 illustrated in
Therefore, the relay apparatus 200 includes a CPU 201 that controls the entire apparatus through execution of programs (including firmware), a ROM 202 that stores programs such as a basic input/output system (BIOS), a RAM 203 for use as a program execution area, a hard disk drive (HDD) 204 that stores programs to be executed by the CPU 201, image data, management data, and the like, and a communication interface (communication IF) 205 for use in communication with the outside.
Those parts are connected together through a bus 206 or signal lines (not illustrated).
Functions illustrated in
The relay apparatus 200 illustrated in
The start of the plug-in service 214 involves adding a computational resource on the cloud network. The stop of the plug-in service 214 involves freeing a computational resource on the cloud network. The autoscaling management part 215 manages the start and stop.
For example, the computational resource is an execution environment for operating an application such as a plug-in service.
In this exemplary embodiment, all the functions illustrated in
<Core Service 211>
The core service 211 includes a task service 211A that communicates with the input apparatus 100, a communication service 211B that communicates with the business support cloud server 400B, and a communication service 211C that communicates with the storage cloud server 400A.
The task service 211A starts an event processing module 212A of the task definition module 212 based on a notification or request received from the input apparatus 100 (see
The “task” is a series of operations to be executed by one or a plurality of plug-in services 214. In a task definition library 212B, combinations of plug-in services 214 to be called are recorded in addition to the tasks.
The task service 211A of this exemplary embodiment includes a plug-in status request function 211A1 and an unacquirable request storage function 211A2.
The plug-in status request function 211A1 requests a status of the plug-in service 214 (see
If the status of the plug-in service 214 that is confirmed by a response from the request control part 217 is “inactive”, the unacquirable request storage function 211A2 sets the status of the request stored in the queue 213 (see
In other words, the request stored in the queue 213 after failure detection is controlled to become invisible to the autoscaling management part 215. As a result, if unprocessed requests accumulated while being held in the queue 213 increase but the accumulation is caused by failure, the autoscaling management part 215 does not erroneously determine that the processing capability is insufficient. That is, the autoscaling management part 215 can be prevented from adding the plug-in service 214 (see
The description returns to
<Queue 213>
The queue 213 is an example of a memory that holds a request to call the plug-in service 214.
In this exemplary embodiment, the queue 213 is prepared for each plug-in service 214. As described later, the queue 213 may be shared among a plurality of plug-in services 214.
<Plug-in Service 214>
A plurality of types of plug-in service 214 are provided depending on details of processing to be executed. Examples of the plug-in service 214 include a plug-in service 214A for use in document processing and a plug-in service 214B for use in registration of documents in the storage.
The plug-in service 214A includes a document processing plug-in 214A1, a plug-in library 214A2, and a request processing completion notification function 214A3.
The plug-in service 214B includes a storage registration plug-in 214B1, a plug-in library 214B2, and a request processing completion notification function 214B3.
Each of the request processing completion notification functions 214A3 and 214B3 notifies the request control part 217 of completion of processing related to a request.
The plug-in service 214 is an example of a processor that reads and processes a request from the queue 213. The storage cloud server 400A (see
<Autoscaling Management Part 215>
The autoscaling management part 215 manages the start and stop of the plug-in service based on the number of requests held in the queues 213.
If the number of requests held in the queues 213 is larger than a predetermined value (first value), the autoscaling management part 215 additionally secures a computational resource and then starts a new plug-in service 214. If the number of requests held in the queues 213 is smaller than a predetermined value (second value), the autoscaling management part 215 partially stops the plug-in services 214 and then frees a surplus of the secured computational resources. That is, the number of plug-in services 214 is increased or reduced depending on the number of unprocessed requests. The first value is larger than the second value.
The autoscaling management part 215 of this exemplary embodiment counts the number of visible requests. Thus, a request set to an invisible state is excluded from targets to be counted by the autoscaling management part 215.
Therefore, also when unprocessed requests continue to increase due to trouble with the plug-in service 214 or the cloud server, the requests may be excluded from counting targets to avoid starting the plug-in service 214 that does not contribute to reduction of the number of accumulated requests. The trouble with the cloud server is independent of the trouble with the plug-in service 214.
The autoscaling management part 215 is an example of a monitor that monitors statuses of requests held in the queues 213.
<Failure Detection Part 216>
The failure detection part 216 monitors logs of the plug-in services 214 or the like to detect the occurrence of failure involving a stop of operation (so-called fatal error) and recovery from the failure. The failure detection part 216 is an example of a detector.
The failure detection part 216 of this exemplary embodiment includes a failure detection function 216A, a failure recovery detection function 216B, a plug-in failure notification function 216C, and a plug-in recovery notification function 216D.
The failure detection function 216A monitors the logs of the plug-in services 214 (see
The failure recovery detection function 216B monitors the logs of the plug-in services 214 to detect recovery from failure. In this exemplary embodiment, the recovery from failure means that a state in which a message indicating failure involving a stop of operation of the plug-in service 214 (failure message) is detected is switched to a state in which a message indicating normal operation (normal operation message) is detected. Thus, the failure recovery detection function 216B detects the normal operation message.
The plug-in failure notification function 216C is used for notifying the request control part 217 (see
The plug-in recovery notification function 216D is used for notifying the request control part 217 of information on the plug-in service 214 whose recovery has been detected.
The description returns to
<Request Control Part 217>
The request control part 217 controls statuses of processing requests held in the queues 213 based on a notification from the failure detection part 216. Specifically, the request control part 217 performs control so that a status of a request to call a specific plug-in service 214 for which a failure notification is given is set to “invisible” and so that a status of a request to call a specific plug-in service 214 for which a notification of recovery from failure is given is set to “visible”.
As described above, “visible” or “invisible” is determined depending on whether the request is counted by the autoscaling management part 215. Thus, a request controlled to become invisible is handled as not existing in the queue 213 for the autoscaling management part 215.
The request control part 217 is an example of a controller.
The request control part 217 of this exemplary embodiment includes a request acquisition disabling function 217A, a plug-in status management function 217B, a plug-in status response function 217C, and a request acquisition inability termination function 217D.
If the failure detection part 216 (see
For a request related to a plug-in service 214 having no failure involving a stop of operation, the request acquisition disabling function 217A does not change a status of the request to “invisible”. That is, the request acquisition disabling function 217A selectively controls the statuses of requests.
The plug-in status management function 217B performs management based on a notification from the failure detection part 216 (see
If the notification from the failure detection part 216 (see
If the notification from the failure detection part 216 (see
The plug-in status response function 217C responds to an inquiry from the task service 211A about whether the inquired plug-in service 214 is active or inactive.
If the notification from the failure detection part 216 is the recovery notification, the request acquisition inability termination function 217D performs control so that a status of the request to be processed by the specific plug-in service 214 of the notification target among the requests held in the queue 213 is set to “visible”. In other words, the request acquisition inability termination function 217D terminates an invisible state.
<Processing Operations of Relay Apparatus 200>
Processing operations to be executed by the relay apparatus 200 are described below for respective operation conditions of the plug-in service 214 (see
<Operation in Case in which No Failure Occurs>
The sequence illustrated in
The symbol “S” in the figure represents “step”.
Step 1
The task service 211A that has received a processing request from the input apparatus 100 (see
Next, the task service 211A inquires of the request control part 217 about an operation status of the plug-in service 214 for use in the processing of the request. For example, if the request is made for a business support cloud service, the task service 211A inquires an operation status of the plug-in service 214A (see
In the case of
Step 2
The task service 211A stores the processing request in the queue 213.
The status table 500 includes a request ID 501, a request status 502, a plug-in service ID 503, and a plug-in service status 504.
In the case of
The description returns to
Step 3
The queue 213 calls the plug-in service 214 that processes the request.
The plug-in service 214 to be called is identified by the plug-in service ID 503 (see
Step 4
The plug-in service 214 processes the request.
Step 5
When completion of the processing has been detected, the plug-in service 214 notifies the request control part 217 of the request processing completion.
By receiving the notification, the request control part 217 grasps that the plug-in service 214 that has transmitted the notification is operating normally.
<Operation 1 in Case in Which Failure Has Occurred in Plug-In Service>
The sequence illustrated in
The symbol “S” in the figure represents “step”.
Step 1
The failure detection part 216 detects failure involving a stop of operation.
In the case of
Three out of the four requests are processed by the plug-in service 214 having the plug-in service ID 503 of “PLUG001” and the remaining one request is processed by a plug-in service 214 having a plug-in service ID 503 of “PLUG002”.
Since the failure has not been detected yet, the request status 502 of every request is “visible”. The plug-in service status 504 is “active”.
The description returns to
Step 2
The failure detection part 216 notifies the request control part 217 of the failure in the plug-in service 214.
In the case of
Step 3
The request control part 217 notified of the failure changes the status of the first request stored in the queue 213 to “invisible”. The queue 213 replies to the request control part 217 that the status has been changed successfully.
Step 4
The request control part 217 changes the statuses of the second and subsequent requests to “invisible” until the request control part 217 confirms that the first request is processed successfully. The queue 213 replies to the request control part 217 that the statuses have been changed successfully.
In the case of
In
The status of the request that uses the plug-in service 214 in which the failure involving the stop of operation is not detected, that is, the plug-in service 214 having the plug-in service ID 503 of “PLUG002” remains “visible”. The plug-in service status 504 of the plug-in service for use in the processing of the request remains “active”.
The description returns to
Step 5
The following description is directed to an operation in a case in which a new request is input from the input apparatus 100 to the task service 211A after the failure in the plug-in service 214 has been detected.
Step 6
The task service 211A that has received the new request from the input apparatus 100 acquires information on the plug-in service 214 for use in processing of the received request through the task definition module 212. Then, the task service 211A inquires of the request control part 217 about the operation status of the plug-in service 214 for use in the processing of the request.
In the example of
Step 7
In the case of
In
In the case of
The plug-in service ID for identifying the plug-in service 214 for use in the processing of the request is “PLUG001” and therefore the plug-in service status 504 is “inactive”.
In the example of
As illustrated in
<Operation 2 in Case in which Failure has Occurred in Plug-In Service>
Description is made of another example of the operation in the case in which failure has occurred in the plug-in service 214.
The sequence illustrated in
The symbol “S” in the figure represents “step”.
Step 1 to Step 4
Details and procedures of operations of Step 1 to Step 4 of
Step 5 to Step 7
When a new request is input from the input apparatus 100 to the task service 211A after the failure involving the stop of operation has been detected, the task service 211A inquires of the request control part 217 about the status of the plug-in service 214 that processes the request.
In this case, the task service 211A receives a response indicating that the status of the plug-in service 214 that processes the request is “inactive”. Up to this operation, the operations are identical to those described in
The subsequent operation is different. The task service 211A discards the received new request without storing the request in the queue 213 and gives an error notification to the input apparatus 100 that has transmitted the request.
In
In the case of
If no failure occurs in the plug-in service 214 to be called for the new request, the new request is stored in the queue 213 without being discarded. Examples of this case include a case in which the plug-in service ID 503 of the plug-in service to be read for the request is “PLUG002”.
If the new request that uses the plug-in service 214 in which the failure has occurred is discarded without being stored in the queue 213 as in this operation example, the autoscaling management part 215 does not add a computational resource and a plug-in service 214 in order to accelerate the processing of the requests accumulated in the queue 213.
By giving the error notification to the input apparatus 100, the output of the same request from the input apparatus 100 is suppressed.
<Operation 1 after Failure has been Detected>
Description is made of an example of an operation after failure has been detected.
As described above, all the statuses of the requests that use the plug-in service 214 in which the failure has occurred are changed to “invisible” among the requests stored in the queue 213 when the failure has been detected. The new request input after failure detection is stored in the queue 213 with its status set to “invisible” or is discarded without being stored in the queue 213.
The following description is directed to subsequent operations.
The sequence illustrated in
Step 1
When a predetermined time has elapsed from the failure detection, the request control part 217 changes the status of the first request to “visible” in the status table 500.
The status table 500 illustrated in
In this operation example, the request control part 217 changes the status of the first request “REQ00001” to “visible”. In
The description returns to
Step 2
Since the status of the first request is changed to “visible” in the status table 500, the queue 213 reads the plug-in service 214 written for the first request. The queue 213 reads the plug-in service 214 having the plug-in service ID of “PLUG001”.
Step 3
The read plug-in service 214 processes the request.
Step 4
The failure detection part 216 detects failure in the read plug-in service 214 again.
Step 5
The failure detection part 216 notifies the request control part 217 of the failure in the plug-in service 214.
Step 6
The request control part 217 changes the status of the first request stored in the queue 213 to “invisible”.
In the case of
In this sequence example, the status of the first request alone is changed from “invisible” to “visible” in Step 1 but the statuses of all the requests to call the plug-in service having the same plug-in service ID 503 as that of the first request may also be changed from “invisible” to “visible”.
When the failure is detected in Step 4 and the status of the request is returned to “invisible”, it is appropriate that the statuses of the other requests be returned to “invisible” as well.
<Operation 2 after Failure has been Detected>
Description is made of a case in which the plug-in service 214 called before a recovery notification is given completes processing the request.
The sequence illustrated in
Step 1 to Step 3
Details and procedures of operations of Step 1 to Step 3 of
Step 4
In this example, the read plug-in service 214 operates to process the request and therefore the plug-in service 214 notifies the request control part 217 of request processing completion.
In the case of
Step 5
Next, the request control part 217 instructs the queue 213 to change the status of the second request to “visible”.
The term “second” means that the request is located in the second row in Step 1.
Thus, the request corresponds to the first request in the status table 500 after the request having the request ID of “REQ00001” has been deleted from the status table 500.
In the status table 500 illustrated in
The status of the request managed to have the request ID of “REQ00004” remains “invisible”.
This sequence example shows an operation before recovery from the failure is detected by the failure detection part 216 and therefore the statuses are changed one by one.
Step 6
The task service 211A receives a new request from the input apparatus 100.
Step 7
The task service 211A inquires of the request control part 217 about the status of the plug-in service 214 to be used by the received request. The task service 211A receives a response “inactive”.
Step 8
The task service 211A stores the new request in the queue 213 with its status set to “invisible”.
In the case of
In this sequence example, an attempt is made to process the requests while carrying out a check one by one even before the recovery is detected by the failure detection part 216.
<Operation in Case in which Recovery from Failure has been Detected>
The sequence illustrated in
Step 1
The failure detection part 216 detects normal completion of the first request. The normal completion corresponds to normal completion of processing by the plug-in service 214 in which failure is detected. For example, the failure detection part 216 detects normal completion of the processing executed in Step 3 of
Step 2
The failure detection part 216 notifies the request control part 217 of recovery from the failure in the plug-in service in which the normal completion has been detected.
In the case of
Step 3
The request control part 217 notified of the recovery from the failure changes the statuses of the second and subsequent requests to “visible”.
In
In the case of
In the example of
Step 4
The queue 213 calls the plug-in service 214 that processes the requests.
Step 5
The called plug-in service 214 processes the requests.
Step 6
The task service 211A receives a new request from the input apparatus 100.
Step 7
The task service 211A inquires of the request control part 217 about the status of the plug-in service 214 to be used by the received request. The task service 211A receives a response “active”.
Step 8
The task service 211A stores the new request in the queue 213 with its status set to “visible”.
In
In the case of
Thus, “visible” is stored as the status of the request managed as “REQ00005” and “active” is stored as the status of the plug-in service 214.
The foregoing description of the exemplary embodiment of the present disclosure has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the disclosure to the precise forms disclosed. Obviously, many modifications and variations will be apparent to practitioners skilled in the art. The embodiment was chosen and described in order to best explain the principles of the disclosure and its practical applications, thereby enabling others skilled in the art to understand the disclosure for various embodiments and with the various modifications as are suited to the particular use contemplated. It is intended that the scope of the disclosure be defined by the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
JP2018-176618 | Sep 2018 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
7324438 | Savoldi | Jan 2008 | B1 |
20100146045 | Moore | Jun 2010 | A1 |
20110078697 | Smittle | Mar 2011 | A1 |
20130179895 | Calder | Jul 2013 | A1 |
20130239115 | Kato | Sep 2013 | A1 |
20150242214 | Busaba | Aug 2015 | A1 |
20180300174 | Karan | Oct 2018 | A1 |
20190205164 | Kumar | Jul 2019 | A1 |
Number | Date | Country |
---|---|---|
2014149690 | Aug 2014 | JP |
Entry |
---|
Office Action of Japan Counterpart Application, with English translation thereof, dated May 31, 2022, pp. 1-3. |
Number | Date | Country | |
---|---|---|---|
20200097375 A1 | Mar 2020 | US |