Abstract:
A control apparatus includes a memory, and a processor that executing a procedure, the procedure including, receiving a request corresponding to a file which is one of a plurality of files stored in a database server apparatus; in the case that the file corresponding to the request is stored in the memory, executing a process based on the request by using the file stored in the memory, and in the case that the file corresponding to the request is not stored in the memory, obtaining the file from the database server apparatus, storing the file in the memory, and processing the process by using the file.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2011-161863, filed on Jul. 25, 2011, the entire contents of which are incorporated herein by reference. 
       FIELD 
       [0002]    The present invention relates to a computer, control method, and a recording medium of control program. 
       BACKGROUND 
       [0003]    An online system has application server apparatuses that perform processing according to a request from a client and send a response to the client that issued the request. Applications for processing requests are deployed previously in the application server apparatuses to process a request from a client. 
         [0004]    Tens or hundreds of application server apparatuses are included in an online system and, as a request type is added, the applications have to be updated and added in each of the application server apparatuses. The update and addition are manually made by the administrator and they are very complicated. 
         [0005]    When, for example, all applications are installed during introduction of application server apparatuses, it is sufficient to install them using a master disc including all the applications. Since the master disc is created at the initial installation, however, it does not support later updates of the applications. Accordingly, when an application server apparatus is additionally installed in an online system in which applications are frequently updated, to ensure the application server apparatus with the latest applications at that time, the applications have to be installed individually without using the master disc. 
         [0006]    When, for example, all applications are installed during introduction of an application server apparatus, the online system has to be stopped temporarily in consideration of loads on the server apparatus and communication paths at the time of the update. 
       SUMMARY 
       [0007]    According to an aspect of the invention, a control apparatus includes a memory, and a processor that executing a procedure, the procedure including, receiving a request corresponding to a file which is one of a plurality of files stored in a database server apparatus; in the case that the file corresponding to the request is stored in the memory, executing a process based on the request by using the file stored in the memory, and in the case that the file corresponding to the request is not stored in the memory, obtaining the file from the database server apparatus, storing the file in the memory, and processing the process by using the file. 
         [0008]    The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims. 
         [0009]    It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention, as claimed. 
     
    
     
       BRIEF DESCRIPTION OF DRAWINGS 
         [0010]      FIG. 1  illustrates an information processing system. 
           [0011]      FIG. 2  illustrates an example of the hardware structure of an application server apparatus. 
           [0012]      FIG. 3  is diagram 1 illustrating a table. 
           [0013]      FIG. 4  illustrates an example of the hardware structure of a KVS. 
           [0014]      FIG. 5  is diagram 2 illustrating a table. 
           [0015]      FIG. 6  illustrates an example of the hardware structure of a RDB. 
           [0016]      FIG. 7  is diagram 3 illustrating a table. 
           [0017]      FIG. 8  illustrates flowchart 1 of processing by the application server apparatus. 
           [0018]      FIG. 9  illustrates a flowchart of processing by the KVS. 
           [0019]      FIG. 10  is diagram 4 illustrating a table. 
           [0020]      FIG. 11  illustrates a flowchart of processing by the RDB. 
           [0021]      FIG. 12  illustrates flowchart 2 of processing by the application server apparatus. 
           [0022]      FIG. 13  illustrates flowchart 3 of processing by the application server apparatus. 
       
    
    
     DESCRIPTION OF EMBODIMENTS 
       [0023]    Preferred embodiments of the present invention will be explained with reference to accompanying drawings. 
         [0024]      FIG. 1  schematically illustrates an information processing system according to an embodiment. The information processing system includes a plurality of clients  100 , a network  500 , application server apparatuses  200 ,  210 , and  220 , a plurality of KVSs (key value stores)  300 , and a RDB (relational database)  400 . The KVSs  300  are servers that manage data. The plurality of clients  100  are connected to the network  500 . The application server apparatuses  200 ,  210 , and  220  are also connected to the network  500 . The application server apparatuses  200 ,  210 , and  220  are connected to each other. The KVSs  300  are connected to the application server apparatuses  200 ,  210 , and  220 . The RDB  400  is connected to the KVSs  300 . 
         [0025]      FIG. 2  is a block diagram schematically illustrating an example of the hardware structure of the application server apparatuses  200 ,  210 , and  220  according to the embodiment. The application server apparatus  200  will be described below. The application server apparatus  200  will be described below as an example; in the embodiment, the application server apparatuses  210  and  220  are assumed to have the same structure as the application server apparatus  200 . 
         [0026]    The application server apparatus  200  processes a request received from the client  100 . The application server apparatus  200  is controlled by a CPU (central processing unit)  201 . The CPU  201  is an example of a processor used in the embodiment and the processor may be a MPU (micro processing unit). 
         [0027]    A system controller  203  is connected to the CPU  201  and a main storage  202 . The system controller  203  controls the data transfer between the CPU  201  and the main storage  202  and the data transfer between the CPU  201  and a bus  204 . In addition, a network controller  207  and a disk controller  212  are connected to the system controller  203  through the bus  204 . 
         [0028]    The main storage  202  temporarily stores at least a part of an OS (operating system) program and an application program. The main storage  202  also stores various types of data to be used for processing by the CPU  201 . As the main storage  202 , for example, a RAM (random access memory) is used. 
         [0029]    A hard disk  213  is connected to the disk controller  212 . 
         [0030]    The hard disk  213  stores a plurality of application programs  1000 , which let the CPU  201  process a request from the OS or the client  100  in response to the request, a control program  2000 , which lets the CPU  201  make control such as a call of the application programs  1000 , and various types of data. 
         [0031]    The hard disk  213  also stores a table  600 , which contains uniform resource identifiers (URIs)  602  including the specification of the storage positions of applications and application information  604  of applications stored in the hard disk  213 , as illustrated in  FIG. 3 . The application information  604  includes information that identifies an application, such as an application name. 
         [0032]    The network controller  207  is connected to the network  500 , which is illustrated in  FIG. 1 , and sends data to or receives data from the CPU  201 , the hard disk  213 , the client  100 , another application server apparatus  200 , and the KVS  300 , through the network  500 . 
         [0033]    A power supply  209  supplies power to hardware components in the application server apparatus  200  through a power cable (not illustrated). 
         [0034]    These hardware components achieve the processing functions of the application server apparatus  200 . 
         [0035]      FIG. 4  is a block diagram schematically illustrating an example of the hardware structure of the KVS  300  according to the embodiment. The KVS  300  stores application programs executed by the application server apparatus  200 . Since the blocks having the same name as in the application server apparatus  200  described with reference to  FIG. 2  have the same functions, their descriptions will be omitted. 
         [0036]    A hard disk  313  functions as a cache  310 , which temporally stores the application programs  1000  executed by the application server apparatus  200 , and stores a cache control program  320 , which lets the CPU  301  control the cache  310 . 
         [0037]    The hard disk  313  also stores a table  700  illustrated in  FIG. 5 , which records URIs  702  and application information  704  of the application programs  1000  that are temporally stored in the cache  310 . 
         [0038]    A network controller  307  sends data to or receives data from the CPU  301 , the hard disk  313 , application server apparatuses  200 ,  210 , and  220 , and the RDB  400 . 
         [0039]      FIG. 6  is a block diagram schematically illustrating an example of the hardware structure of the RDB  400  according to the embodiment. The RDB  400  stores the plurality of application programs  1000  executed by the application server apparatuses  200 ,  210 , and  220 . Since the blocks having the same name as in the application server apparatus  200  described with reference to  FIG. 2  have the same functions, their descriptions will be omitted. 
         [0040]    A hard disk  413  stores the application programs  1000 , which are executed by the application server apparatuses  200 ,  210 , and  220 , and an RDB control program  420 , which lets a CPU  401  control the RDB  400 . 
         [0041]    The hard disk  413  also stores a table  800 . The table  800  records URIs  802  of the application programs  1000  stored in the hard disk  413  and application information  804  associated with the URIs  802 , as illustrated in  FIG. 7 . A network controller  407  sends data to or receives data from the CPU  401 , the hard disk  413 , the application server apparatuses  200 ,  210 , and  220 , and the KVS  300 . 
         [0042]    The following describes processing by an online system according to the embodiment configured as described above. 
         [0043]      FIG. 8  illustrates a flowchart of processing by the application server apparatus  200  according to the embodiment. Unless otherwise specified, it is assumed that the CPU  201  performs the following processing by executing the control program  2000  stored in the hard disk  213 . This flowchart illustrates processing by the application server apparatus  200 ; the application server apparatuses  210  and  220  are assumed to have the same structure as described above, so they perform the same processing as the application server apparatus  200 , illustrated in this flowchart. 
         [0044]    In S 101 , the CPU  201  receives a request from the client  100 . The processing proceeds to S 102 . 
         [0045]    In S 102 , the CPU  201  extracts a URI (uniform resource identifier) from the received request. The processing proceeds to S 103 . 
         [0046]    In S 103 , the CPU  201  decides whether the application associated with the extracted URI is stored in the hard disk  213  with reference to the table  600  stored in the hard disk  213 . As described above, the table  600  records the URIs  602  that the application server apparatus  200  stores in the hard disk  213  and the application information  604  associated with the URIs  602 . When the application associated with the extracted URI is stored in the hard disk  213 , the CPU  201  lets the processing proceed to S 105 . When the application associated with the extracted URI is not stored in the hard disk  213 , the CPU  201  lets the processing proceed to S 107 . 
         [0047]    It is assumed that the URI extracted by the CPU  201  in S 102  is “/xxx”. Since the application “aaa.war” associated with the URI “/xxx” is recorded in the table  600 , the CPU  201  decides that the application associated with the extracted URI is stored in the hard disk  213 . 
         [0048]    In S 105 , the CPU  201  loads the application “aaa.war” stored in the hard disk  213  into the main storage  202 , executes it, and processes the request received from the client. The processing proceeds to S 106 . 
         [0049]    In S 106 , the CPU  201  sends a response to the processed request to the client  100  through the network controller  207 , ends the processing, and goes to the next process. 
         [0050]    Next, the following describes the case where the application associated with the extracted URI is not stored in the hard disk  213  in S 103  in  FIG. 8 . 
         [0051]    It is assumed that the URI extracted by the CPU  201  in S 102  is “/zzz”. Since the application associated with the URI “/zzz” is not recorded in the table  600 , the CPU  201  decides that the application associated with the extracted URI is not stored in the hard disk  213 . The processing proceeds to S 107 . 
         [0052]    In S 107 , the CPU  201  sends the extracted URI “/zzz” to the KVS  300  through the network controller  207 , requests the application associated with the URI “/zzz”, and lets the processing proceed to S 108 . 
         [0053]    In S 108 , after requesting the application in S 107 , the CPU  201  receives the application “ccc.war” associated with the URI “/zzz” from the KVS  300  and stores the received application in hard disk  213 . The processing proceeds to S 109 . 
         [0054]    In S 109 , the table  600  is updated by adding the URI “/zzz” and application information “ccc.war” of the received application to the table  600 . The processing proceeds to S 104 . 
         [0055]    In S 104  shifting from S 109 , the CPU  201  loads the application “ccc.war” stored in the hard disk  213  into the main storage  202  and executes it. The processing proceeds to S 105 . 
         [0056]    In S 105 , the CPU  201  processes the request received from the client  100  by using the application “ccc.war” being executed in the main storage  202 . The processing proceeds to S 106 . 
         [0057]    In S 106 , the CPU  201  sends a response to the processed request to the client  100  through the network controller  207  and ends the processing. 
         [0058]    Next, processing by the KVS  300  will be described with reference to  FIG. 9 . 
         [0059]    In S 201 , the CPU  301  receives the URI “/zzz” requested by the application server apparatus  200  in the processing in S 107 . The processing proceeds to S 202 . 
         [0060]    In S 202 , the CPU  301  searches the table  700  stored in hard disk  313  by using the URI “/zzz” received from the application server apparatus  200 . The processing proceeds to S 203 . 
         [0061]    In S 203 , the CPU  301  decides whether the application associated with the received URI “/zzz” is stored in the hard disk  313  with reference to the table  700  stored in hard disk  313 . The table  700  records the URIs  702  and the application information  704  associated with the URIs  702  as described above. When the application associated with the received URI is stored in the hard disk  313 , the processing proceeds to S 204 . When the application associated with the extracted URI is not stored in the hard disk  313 , the processing proceeds to S 206 . In this case, since the application “ccc.war” associated with the received URI “/zzz” is recorded in the table  700 , the CPU  301  decides that the application associated with the received URI is stored in the hard disk  313 . The processing proceeds to S 204 . 
         [0062]    In S 204 , the CPU  301  obtains the application “ccc.war” associated with the received URI “/zzz” from the hard disk  313 . The processing proceeds to S 205 . 
         [0063]    In S 205 , the CPU  301  sends the obtained application “ccc.war” to the application server apparatus  200  through the network controller  307 . The processing ends. 
         [0064]    Next, the case where the application associated with the extracted URI is not stored in the hard disk  213  in S 203  in  FIG. 9  will be described. In the following description, it is assumed that the application server apparatus  200  requests the application associated with the URI “/yyy”. 
         [0065]    In S 201 , the CPU  301  receives the URI “/yyy” from the application server apparatus  200 . The processing proceeds to S 202 . 
         [0066]    In S 202 , the CPU  301  searches the table  700  stored in the hard disk  313  by using the URI “/yyy” received from the application server apparatus  200 . The processing proceeds to S 203 . 
         [0067]    In S 203 , the CPU  301  decides whether the application associated with the received URI “/yyy” is stored in the hard disk  313  with reference to the table  700  stored in the hard disk  313 . In this case, since the application associated with the received URI “/yyy” is not recorded in the table  700 , the CPU  301  decides that the application associated with the received URI is not stored in the hard disk  313 . The processing proceeds to S 206 . 
         [0068]    In S 206 , the CPU  301  requests the application associated with the received URI “/yyy” by sending the URI “/yyy” to the RDB  400  through the network controller  307 . The processing proceeds to S 207 . 
         [0069]    Next, in S 207 , the CPU  301  receives the application “bbb.war” associated with the URI “/yyy” received from the RDB  400 . The processing proceeds to S 208 . 
         [0070]    In S 208 , the CPU  301  stores the received application “bbb.war” in the cache  310  of the hard disk  313 . The processing proceeds to S 209 . 
         [0071]    In S 209 , the CPU  301  associates the URI “/yyy” with the application “bbb.war”, adds the association in the table  700 , and updates the table  700 .  FIG. 10  illustrates the updated table  700 . The processing proceeds to S 204 . 
         [0072]    In S 204  shifting from S 209 , the CPU  301  obtains the application “ccc.war” associated with the URI “/zzz” received from the hard disk  313 . The processing proceeds to S 205 . 
         [0073]    In S 205 , the CPU  301  sends the obtained application “ccc.war” to the application server apparatus  200  through the network controller  307 . The processing ends. 
         [0074]    Next, processing by the RDB  400  will be described with reference to  FIG. 11 . 
         [0075]    In S 301 , the CPU  401  receives the URI “/yyy” from the KVS  300 . The processing proceeds to S 302 . 
         [0076]    In S 302 , the CPU  401  searches the table  800  stored in the hard disk  413  by using the URI “/yyy” received from the KVS  300 . The processing proceeds to S 303 . 
         [0077]    In S 303 , the CPU  401  obtains the application associated with the received URI “/zzz” from the hard disk  413  with reference to the table  800  stored in the hard disk  413 . In this case, since the application “bbb.war” associated with the received URI “/yyy” is recorded in the table  800 , the CPU  401  obtains the application “bbb.war” associated with the received URI “/yyy” from the hard disk  413 . The processing proceeds to S 304 . 
         [0078]    In S 304 , the CPU  401  sends the obtained application “bbb.war” to the KVS  300  through the network controller  407 . The processing ends. 
         [0079]    As described above, according to the first embodiment, since the application server apparatus  200  deploys the application during reception of a request from the client  100 , the application server apparatus  200  can process a request from the client  100  without previously deploying applications in each of the application server apparatuses  200 ,  210 , and  220 . Accordingly, the administrator does not have to deploy the applications at a time, thereby reducing the load on the administrator. 
         [0080]    In addition, since the application server apparatus  200  installs only the application associated with a request when receiving the request, it does not have to install the application in the application server apparatus  200  at a time. This reduces a temporary increase in the network load caused by batch installation of applications and does away with temporary stop of the entire system. 
         [0081]    In the flowchart illustrated in  FIG. 11 , there is not description on the process to be performed when the table  800  does not store application information. In this case, information indicating that there is no associated application is sent to the KVS  300  and the KVS  300  sends this information to the application server apparatus  200 . After receiving this information, the application server apparatus  200  may return, to the client  100 , information indicating that there is difficulty in processing this request. 
         [0082]      FIG. 12  is a flowchart illustrating processing by the application server apparatus  200  according to the embodiment. 
         [0083]    In S 401 , the CPU  201  receives a request from the client  100 . The processing proceeds to S 402 . 
         [0084]    In S 402 , the CPU  201  searches the table  600  by using the URI extracted from the received request. The processing proceeds to S 403 . 
         [0085]    In S 403 , the CPU  201  decides whether the application associated with the extracted URI is stored in the hard disk  213  with reference to the table  600  stored in the hard disk  213 . 
         [0086]    When the application associated with the extracted URI is stored in the hard disk  213 , the processing proceeds to S 405 . 
         [0087]    In S 405 , the CPU  201  starts up the associated application stored in the hard disk  213  and processes the request received in S 401 . The processing proceeds to S 406 . 
         [0088]    In S 406 , the CPU  201  sends the result of the processing in S 405  to the client  100 . 
         [0089]    When the CPU  201  decides that the application is not stored in the hard disk  213  in the processing in S 403 , the processing proceeds to S 407 . 
         [0090]    In S 407 , the CPU  201  issues an inquiry to another application server apparatus  210  or  220  about the request received in S 401  and receives a response from the application server apparatus. The processing proceeds to S 408 . 
         [0091]    In S 408 , the CPU  201  decides whether the other application server apparatus  210  or  220  to which the inquiry has been issued can process the request based on the response received in S 407 . When the application server apparatus  210  or  220  can process the request, the processing proceeds to S 409 . 
         [0092]    In S 409 , the CPU  201  sends an inheritance request to the other application server apparatus  210  decided to be able to process the request. More specifically, the CPU  201  sends the inheritance request, the request received from the client  100  in the processing in S 401 , address information for identifying the client  100 , etc. The processing proceeds to S 410 . 
         [0093]    In S 410 , the CPU  201  requests the KVS  300  for the application to be used for the processing in S 401 . The processing proceeds to S 411 . 
         [0094]    In S 411 , the CPU  201  receives the application from the KVS  300 , loads it, and stores it in the hard disk  213 . The processing proceeds to S 412 . 
         [0095]    In S 412 , the CPU  201  records the URI of the application obtained from the KVS  300  and application information in the table  600 . The processing proceeds to S 404 . 
         [0096]    In S 404 , the CPU  201  starts up the associated application stored in the hard disk  213 . The processing ends. 
         [0097]    That is, after inheriting the processing of a request for the other application, the CPU  201  installs and stores the application and updates the table  600  of the application, but the CPU  201  does not process the request. 
         [0098]    Next, in S 408 , when the CPU  201  decides that the other application server apparatus  210  or  220  to which the inquiry has been issued is not able to process the request received in S 401 , the CPU  201  lets the processing proceed to S 413 . 
         [0099]    In S 413 , the CPU  201  decides whether an inquiry has been issued to all application server apparatuses. When the CPU  201  decides that an inquiry has not been issued to all application server apparatuses, the CPU  201  lets the processing proceed to S 407  and issues an inquiry to another application server apparatus to which an inquiry has not been issued. When the CPU  201  decides that an inquiry has been issued to all application server apparatuses, the CPU  201  lets the processing proceed to S 414 . 
         [0100]    In S 414 , the CPU  201  requests the KVS  300  for the application to be used for the processing in S 401 . The processing proceeds to S 415 . In S 415 , the CPU  201  receives the application from KVS  300 , loads it, and stores it in the hard disk  213 . The processing proceeds to S 416 . 
         [0101]    In S 416 , the CPU  201  stores the URI of the application obtained from the KVS  300  and application information in the table  600  and lets the processing proceed to S 405 . 
         [0102]    If a transition to S 414  is made in the processing in S 413 , it may not be possible for any of the other application server apparatuses to process the request. In this case, the CPU  201  installs the application in the application server apparatus  200  itself and performs processing as is. 
         [0103]    Next, in S 407 , the processing performed by the application server apparatus  210  that has received the inquiry sent by the application server apparatus  200  will be described with reference to  FIG. 13 . 
         [0104]    In S 501 , the CPU  201  of the application server apparatus  210  receives the URI from the application server apparatus  200 . The processing proceeds to S 502 . 
         [0105]    In S 502 , the CPU  201  of the application server apparatus  210  searches the table  600  stored in the hard disk  213  of the application server apparatus  210  by using the URI received from the application server apparatus  200 . The processing proceeds to S 503 . 
         [0106]    In S 503 , the CPU  201  of the application server apparatus  210  decides whether the application associated with the received URI is stored in the hard disk  213  of the application server apparatus  210  with reference to the table  600  stored in the hard disk  213 . When the application associated with the received URI is stored in the hard disk  213 , the processing proceeds to S 504 . When the application associated with the extracted URI is not stored in the hard disk  213 , the processing proceeds to S 508 . 
         [0107]    In S 508 , the CPU  201  of the application server apparatus  210  sends, through the network controller  207 , a response indicating that the application is not stored to the application server apparatus  200 . The processing ends. 
         [0108]    In S 504 , the CPU  201  of the application server apparatus  210  sends, through the network controller  207 , a response indicating that the application is stored to the application server apparatus  200 . The processing proceeds to S 505 . 
         [0109]    In S 505 , the CPU  201  of the application server apparatus  210  receives a processing inheritance request from the application server apparatus  200 . The processing proceeds to S 506 . 
         [0110]    In S 506 , the CPU  201  of the application server apparatus  210  obtains the application associated with the received URI from the hard disk  213  of the application server apparatus  210  with reference to the table  600  stored in the hard disk  213 , and performs processing based on a request from the client  100  included in the received inheritance information. The processing proceeds to S 507 . 
         [0111]    In S 507 , the CPU  201  of the application server apparatus  210  sends, to the client  100 , the result of the processing in S 506  based on the address information of the client  100  included in the inheritance request received from the application server apparatus  200 . 
         [0112]    As described above, according to the second embodiment, the application server apparatus  200  receives the request from the client  100  and, if the application server apparatus  200  does not store the associated application and another application server apparatus can process the request, transfers the request received from the client to the other application server apparatus. That is, in the first embodiment, it is not possible to send the response to the client until the application is obtained and installed; in the second embodiment, since another application server apparatus processes the request, it is possible to save the time waiting for the application to be installed. In addition, since the appropriate application is stored in the application server apparatus  200 , the next time a request to use the application is received, the application server apparatus  200  can process the request. 
         [0113]    According to an aspect of the disclosed technology, the server apparatus deploys the application when receiving a request from a client, so the server does not have to previously deploy unnecessary applications. Therefore, the load on the system for deploying application can be suppressed. 
         [0114]    All examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.