This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2014-099426, filed on May 13, 2014, the entire contents of which are incorporated herein by reference.
The embodiments discussed herein are related to a technology for determining a transmission order.
Computer systems using recent ICT (information and communications technology) often have large-scale and complicated configurations. As an example, an increasing number of a variety of business services, such as payment or transfer processing in online banking, are provided in Web-based three-tier systems configured of a Web server, an application server, and a database (DB) server. These systems have large-scale and complicated configurations due to business efficiency, security measures or the like. In addition, immediacy is requested for many business services, and the stoppage of services or the deterioration in response is a problem. Therefore, grasping in detail of an operation status and the prompt resolution of performance problems for a large-scale system are desired.
Further, in a complicated system (e.g., a Web-based three-tier system) in which a plurality of applications operate in cooperation, the performance of the entirety of a system in addition to behaviors of respective servers is desired to be observed and analyzed in order to investigate the causes of performance deterioration and a failure. In a Web-based three-tier system, for example, a processing request to the application server is sometimes generated in response to a processing request to the Web server. The same applies to the application server and the DB server. A processing call relationship between applications as described above is used to examine repercussions of a performance problem in the system.
In view of the foregoing, the following technologies have been proposed as a system analyzing method for analyzing an operation mode of a network to which a plurality of servers are connected by using a computer.
As a first technology, a technology for executing a test of a man-machine function in a client-server system has been proposed (for example, Patent Document 1). In the first technology, test pattern generating means is incorporated into at least one client of a plurality of clients, and generates a test pattern including operation procedure and display information for a response test that have been operation-input by using a man-machine function of the client. The generated test pattern is stored in a test pattern file. Test executing means is incorporated into each of the clients, and executes response simulation tests to the clients and servers by using the test pattern file and the operation procedure and the display information that the test pattern stored in the test pattern file indicates. Test result collecting means collects test results of the response simulation tests executed in the respective clients.
As a second technology, a technology for executing a performance evaluating test has been proposed (for example, Patent Document 2). In the second technology, a computer obtains a first packet and a second packet transmitted to a first device. The computer transmits a third packet which is a copy of the first packet except for its destination (the destination is replaced with a second device), on the basis of the obtained first packet. When a time period that is equal to a time interval between the obtainment of the first packet and the obtainment of the second packet has passed after the transmission of the third packet, the computer transmits a fourth packet in which a destination of the second packet has been set to be the second device, on the basis of the obtained second packet.
As a third technology, a telegram message recording apparatus has been proposed for example (for example, Patent Document 3). The telegram message recording apparatus is capable of executing a reproduction test of an occurrence of a failure by performing retransmission at the same timing as an actual distribution interval, and of performing efficient simulation by performing high-speed retransmission at short telegram message intervals for a portion that does not need to be faithfully reproduced.
As a fourth technology, a technology has been proposed for supporting the automatic designing of a linkage system that is capable of performing a highly efficient linkage process in the linkage of transactions (for example, Patent Document 4). As an example, in a system in which processing is advanced while messages are exchanged between multi-layer servers, such as electronic commerce, the messages are often exchanged using, as a key, a character string that associates a message such as a request ID. Further, different ID character strings may be used between respective layers such as a Web server or an application server. When monitoring behavior of a system, or analyzing a request delay problem, a process of putting together related requests (a linkage process) is performed at a high speed by using the ID character strings as clues, and a route and a timing through or at which a specific request is transmitted are analyzed. In the fourth technology, a linkage supporting apparatus that supports a linkage process for linking related messages from among a plurality of messages transmitted and received between a plurality of communication terminals includes an information acquisition unit, an unneeded character string exclusion unit, and a processing order determination unit. The information acquisition unit acquires respective message types of the plurality of messages, character strings that are respectively included in the plurality of messages, and amounts of data flow when the character strings are transferred. The unneeded character string exclusion unit excludes character strings that are not needed as keywords in the linkage process from among the plurality of character strings acquired by the information acquisition unit, on the basis of the information acquired by the information acquisition unit. The processing order determination unit determines an order of using, in the linkage process, each of the plurality of character strings from which the character strings have been excluded by the unneeded character strings exclusion unit, on the basis of the information acquired by the information acquisition unit.
Patent Document 1: Japanese Laid-open Patent Publication No. 9-244913
Patent Document 2: Japanese Laid-open Patent Publication No. 2011-199680
Patent Document 3: Japanese Laid-open Patent Publication No. 2010-81194
Patent Document 4: Japanese Laid-open Patent Publication No. 2009-238069
Patent Document 5: Japanese Laid-open Patent Publication No. 2006-011683
Patent Document 6: Japanese Laid-open Patent Publication No. 3-240137
A transmission order determination program according to one aspect of the embodiments causes a computer to execute the following process. The computer obtains communication information that is transmitted/received between tiers in an information processing system constructed of a plurality of tiers, the information processing system providing a result of a process performed in an n-th (n>2) tier in reply to received request information. The computer identifies pairs of the request information and response information corresponding to the request information in each of the plurality of tiers from the obtained communication information, compares the pairs in each of the plurality of tiers, and extracts an order relationship wherein the request information of a second pair is transmitted after the response information of a first pair is obtained. The computer obtains the order relationship in an (n-i)th (i=1, 2, . . . , n-1) tier on the basis of the order relationship between the pairs in an (n-i+1)th tier that respectively correspond to the pairs in the (n-i)th tier, sequentially from the n-th tier to a first tier. The computer determines a transmission order of the request information to the information processing system on the basis of the obtained order relationship.
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.
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.
The following method is given as an example of a verification method using an access reproduction device. In this verification method, the access reproduction device obtains a communication message, such as a request message or a response message, that is transmitted/received between devices included in a normally operating system. The access reproduction device obtains a response message in reply to a request message that has been transmitted on the basis of the obtained communication message in a system that is operating in an environment different from the operation environment of the normally operating system. The access reproduction device compares the obtained message with the response message, and verifies whether the same operation as the operation performed in the normally operating system is performed in the system that is operating in the different environment, by using the comparison result.
Transmission messages include a message for which a transmission order needs to be considered on the basis of another message, and a message for which the transmission order does not need to be considered. Messages constructed from obtained packets do not include information relating to the transmission order, and therefore the messages are transmitted in the obtaining order of the messages.
However, in the verification method above, a processing time equivalent to the processing time in the normally operating system environment is taken. As an example, when a process in the system operating in the different environment can be distributed in parallel, it is difficult to transmit the message for which the transmission order needs to be considered to the same apparatus, and to transmit the message for which the transmission order does not need to be considered to a different apparatus, because there is no information relating to the transmission order.
As a method for estimating the transmission message for which the transmission order needs to be considered and the transmission message for which the transmission order does not need to be considered, a method using a constraint on an access order is considered. In verification in a single tier, for example, between a Web server and a DB server, a transmission message for which sequentiality needs to be considered can be estimated by using the constraint on the access order.
However, in a multi-tier system including, for example, a client, a Web server, and a DB server, it is not sufficient to only consider an access order for respective tiers, and transmission or reception in one tier may be influenced by transmission or reception in another tier.
One aspect of the embodiments discussed herein is related to a technology that enables transmission of request information taking into consideration the order in a plurality of tiers in a multi-tier information processing system.
As an example, a case is assumed in which a Web server 3 and a data (DB) server 4 provide a service in cooperation in reply to a request from a client device (hereinafter referred to as a “client”) 2.
First, in the reproduction source environment 1, a request (for example, a message based on the HyperText Transfer Protocol (HTTP)) is transmitted from the client 2 to the Web server 3. Then, the Web server 3 issues a query based on the request to the DB server 4.
The DB server 4 transmits a result of the query to the Web server 3. Upon receipt of a query execution result from the DB server 4, the Web server 3 transmits the query execution result to the client 2. A series of processes in a system (the Web server, the application (AP) server, the DB server, and the like) from the execution of a process based on a request from a client to the transmission of a result of the process to the client as described above are referred to as a transaction.
As described above, communication packets such as a request packet or a response packet are communicated between the client 2 and the Web server 3 and/or between the Web server 3 and the DB server 4. The communication packets are collected in a packet collecting device (not illustrated), and are stored as access information in a storage device 5 (packet capturing). Records of the communication packets as described above (capture data) are collected for the respective clients 2.
An access reproduction device 6 obtains a packet of the capture data, analyzes information (a session ID, the date and time, an IP address, a port number, and the like) that is peculiar to a system in header information of the packet, and converts the peculiar information so as to adapt to the reproduction performing environment 7. As a result, a difference between system environments can be absorbed.
As an example, when the request packet stored in the storage device 5 is input, the access reproduction device 6 analyzes the request packet (actual data), and converts information peculiar to a system in the reproduction source environment 1 into information peculiar to a system in the reproduction performing environment 7. The access reproduction device 6 outputs the converted request packet (verification data) to the reproduction performing environment 7 that is constructed of a Web server 8 and a DB server 9.
In the reproduction performing environment 7, the Web server 8 and the DB server 9 perform processing similarly to the Web server 3 and the DB server 4, and the Web server 8 transmits a response packet including a processing result to the access reproduction device 6.
The access reproduction device 6 compares the response message (verification data) that has been transmitted from the reproduction performing environment 7 with a response message (actual data) of the capture data, and confirms the processing result. This allows a verification of whether the reproduction source environment 1 can be reproduced in the reproduction performing environment 7.
In the access reproduction technology described above, a change in an access reproduction timing such as the advancement of a data transmission timing, as illustrated in
In access reproduction, it is assumed that the access reproduction timing is changed, for example, from the state illustrated in
The change in the access timing as described above is constrained in a case in which a Web server transmits a request by using data that is included in a response received from a DB server or the like, or in other cases, or is influenced by a change in the order of access to the DB. The influence on the change in the access timing is further described with reference to
The following is performed in a transaction 1. When a request 1 (req1) is transmitted from a client 2, a WEB/AP server 3a issues a query 1 (query) to the DB server 4. The DB server 4 transmits a result 1 (result1) in reply to the query1. Upon receipt of the result1, the WEB/AP server transmits a response 1 (res1) to the client.
The following is performed in a transaction 2. When a request 2 (req2) is transmitted from a client 2, the WEB/AP server 3a issues a query 2 (query2) to the DB server 4. The DB server 4 transmits a result 2 (result2) in reply to the query2. Upon receipt of the result2, the WEB/AP server 3a transmits a response 2 (res2) to the client 2.
When the req2 does not use data of the res1, it is assumed that the req2 is changed so as to be issued without awaiting the res1, as illustrated in
In this case, in an information processing system including a plurality of tiers (hereinafter referred to as a “multi-tier system”), a result of a response may be changed as a result of a change in a processing order in any one of the plurality of tiers. In other words, when the order of the query1 and the query2 is changed as illustrated in
In a method for determining a reproduction timing in an existing system, reproduction is performed at the same timing as the timing at the time of observation, or a reproduction time is determined without considering other tiers. However, result comparison fails to be performed in the latter case.
In view of the foregoing, according to the embodiment, a technology is provided for determining a transmission order of request transmission in access reproduction by incorporating an order constraint in another tier into an order constraint in a target tier.
The obtainment unit 12 obtains communication information that is transmitted or received between tiers in an information processing system that provides a result of a process performed in the n-th (n>2) tier in accordance with received request information and that is constructed of multiple tiers. As an example of the obtainment unit 12, a constraint extraction unit 23, which performs the process of S1 as described later, is given.
The extraction unit 13 identifies pairs of request information and response information corresponding to the request information in respective tiers from the obtained communication information. The extraction unit 13 compares the pairs in the respective tiers, and extracts an order relationship in which request information of the second pair is transmitted after response information of the first pair is obtained. As an example of the extraction unit 13, the constraint extraction unit 23, which performs the process of S2 as described later, is given.
The determination unit 14 extracts the order relationship in the (n-i)th (i=1, 2, . . . , n-1) tier on the basis of the order relationship between pairs in the (n-i+1) th tier that respectively correspond to pairs in the (n-i)th tier, sequentially from the n-th tier to the first tier. The determination unit 14 determines a transmission order of request information to the information processing system on the basis of the extracted order relationship. As an example of the determination unit 14, the constraint extraction unit 23, which performs the process of S3 as described later, is given.
The configuration above enables the transmission of request information taking into consideration an order in a plurality of tiers in access reproduction in a multi-tier system. A transaction relating to the updating of a system can be clarified by associating a request and a response over tiers, and therefore which request and response have a dependency on the transaction is clarified. As a result, a change in a request transmission timing (shortening of intervals, or order changing) is performed. In addition, a dependency between transactions is clarified, and therefore an independently reproducible transaction can be divided. As a result, parallel execution using a plurality of access reproduction devices can be performed. In addition, access reproduction of a desired portion can be performed.
When the n-th tier is a tier in which data has been stored, the extraction unit 13 extracts an order relationship from pieces of request information that requests the updating of the same data region in the n-th tier. As an example of this process, the process of S31, which is performed by the constraint extraction unit 23 as described later, is given.
In the configuration above, an issuing order can be set to be an order constraint between queries for updating the same table in a DB.
When the n-th tier is a tier in which data has been stored, the extraction unit 13 does not set an order of continuous pieces of reading request information from among pieces of reading request information that requests reading from the same data region in the n-th tier. As an example of this process, the process of S32, which is performed by the constraint extraction unit 23 as described later, is given.
The configuration above enables queries that access the same table to be classified into queries for performing updating and queries for not performing updating, and enables the queries for not performing updating between the queries for performing updating to not be put in order.
When pairs to be compared in the (n-i)th tier have the order relationship, the determination unit 14 extracts the order relationship between the pairs in the (n-i)th tier in accordance with the order relationship between pairs in the (n-i+1)th tier that respectively correspond to the pairs in the (n-i)th tier. As an example of this process, the process of S23, which is performed by the constraint extraction unit 23 as described later, is given.
When pairs to be compared in the (n-i)th tier do not have the order relationship, but when pairs in the (n-i+1)th tier that respectively correspond to the pairs in the (n-i)th tier have the order relationship, the determination unit 14 extracts the order relationship between the pairs in the (n-i)th tier in accordance with the order relationship between the pairs in the (n-i+1)th tier. As an example of this process, the process of S26, which is performed by the constraint extraction unit 23 as described later, is given.
When pairs to be compared in the (n-i)th tier do not have the order relationship, the determination unit 14 compares pairs in the (n-i+1)th tier that respectively correspond to the pairs in the (n-i)th tier. When the compared pairs in the (n-i+1)th tier satisfy the following two conditions, the determination unit 14 maintains the order relationship between the pairs to be compared in the (n-i)th tier. A condition 1 is that one of request information and response information of the third pair be transmitted or received before one of request information and response information of the fourth pair is transmitted or received. A condition 2 is that one of request information and response information of the fifth pair be transmitted or received after one of request information and response information of the fourth pair is transmitted or received. As an example of this process, the process of S27, which is performed by the constraint extraction unit 23 as described later, is given.
The configuration above enables the order relationship in the (n-i)th tier to be extracted on the basis of the order relationship between pairs of a request and a response in the (n-i+1)th tier that respectively correspond to pairs of a request and a response in the (n-i)th tier.
The transmission order determination device 1 further includes an output unit 15. The output unit 15 outputs information relating to a timing of transmitting request information to the information processing system, on the basis of the determined transmission order. As an example of the output unit 15, a reproduction time determination unit 24 is given.
The configuration above enables a change in a request transmission timing (shortening of intervals or order changing) to be performed.
The timing determination device 21 obtains the capture data 25, determines a time of transmitting a communication packet included in the capture data 25 (a reproduction time), and generates reproduction time information 26.
The timing determination device 21 outputs the capture data 25 and the reproduction time information 26 to the access reproduction device 6. In the embodiment, the timing determination device 21 is provided separately from the access reproduction device 6, but the timing determination device 21 may be included in the access reproduction device 6. In
The timing determination device 21 includes a controller 22. The controller 22 functions as the constraint extraction unit 23 and the reproduction time determination unit 24 by reading and executing a program according to the embodiment that has been stored in a storage device (not illustrated) in the timing determination device 21.
The constraint extraction unit 23 reads the capture data 25 from the storage device 5. The constraint extraction unit 23 obtains constraint information of a message transmission order in respective tiers in order from a side of a processing server that performs processing in reply to a request from a client in a system in which a plurality of servers perform communication according to a prescribed communication protocol. The reproduction time determination unit 24 determines a reproduction time on the basis of the obtained constraint information of the message transmission order in the respective tiers. The servers are not limited to server devices, and may be server programs.
In the embodiment, access reproduction can be performed on not only a two-tier system constructed of an HTTP server, a DB server, and the like but also on a multi-tier system constructed of three or more tiers.
Here, when a plurality of tiers are considered, a tier on an input (presentation tier) side is referred to as a “higher tier”. In
When a plurality of tiers are considered, a tier (database tier) that is far from the input is referred to as a “lower tier”. In
In a case of an n-tier system, the constraint extraction unit 23 extracts a transmission order constraint of a message in the (n-1)th tier from a constraint on a timing of transmitting a message between the (n-1)th tier and the n-th tier, in order from an end (a side of the n-th tier). Then, the constraint extraction unit 23 extracts the transmission order constraint of a message in the (n-2) th tier from a constraint on a timing of transmitting a message between the (n-2)th tier and the (n-1)th tier.
As an example, in a case of a three-tier system, the constraint extraction unit 23 extracts the transmission order constraint in the second tier from a constraint on a timing of transmitting a message between the second tier and the third tier. Then, the constraint extraction unit 23 extracts the transmission order constraint on a message in the first tier (a tier of input) from a constraint on a timing of transmitting a message between the first tier and the second tier.
As described above, the constraint extraction unit 23 extracts the transmission order constraint of a message in the (n-i)th tier from a constraint on a timing of transmitting a message between the (n-i)th tier and the (n-i+1)th tier (i=1, 2, . . . , n-1).
Here, the constraint on a timing of transmitting a message refers to, for example, a constraint whereby a message B is not transmitted until a response to a message A is received, or to other constraints because an execution result of a server based on the message A influences an execution result of a server based on the message B. This is described with reference to
As an example, when the earlier execution of the query2 influences a result of the query1, it is requested that the query1 and the query 2 be executed in this order. In order that the query2 not be transmitted to the DB server earlier than the query1, the constraint extraction unit 23 extracts a constraint whereby the req2 is not transmitted until the res1 is received as the constraint on a timing of transmitting a message.
When there are two AP servers and a query to the DB server has an order constraint, as illustrated in
Accordingly, even when there are a plurality of servers in the same tier, it is a message transmission order that is focused on, and which AP server a message reaches does not matter. Therefore, a case in which there are a plurality of servers in the same tier is handled similarly to a case in which there is one server in one tier.
The extraction of a constraint on an order of a transmitted message is described next. A “partial order” is used to extract the constraint on an order of a transmitted message. The partial order is an order that satisfies the following relationships:
Reflexive property (a≦a)
Transitive property (a≦b̂b ≦ca≦c)
Anti-symmetric property (a≦b̂b≦aa=b)
Meanwhile, a relationship that satisfies a partial-order relationship with respect to a combination of arbitrary elements is referred to as a “total order relationship”. As an example that has a partial order but does not have a total order, the following inclusion relationship of a family of subsets is given.
As an example, when considering a subset of {1, 2, 3}, {φ, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}}, the inclusion relationship is a partial order. Accordingly, {1, 2} and {2, 3} have no inclusion relationship, and are not put in order. Events such as a response or a request, e.g., a pair of HTTP requests that has no dependency, such as a transfer of data using cookies, have no order relationship, and therefore the partial order is used in the embodiment.
Log data relating to communication that has been stored in a server in each of the tiers may be used instead of the capture data 25. As an example, the constraint extraction unit 23 may obtain a history of an HTTP or IIOP request message and an HTTP response message that are output in a communication log stored in the server in each of the tiers, and history information of a query to the DB and a result thereof.
Then, the constraint extraction unit 23 generates pairs of a request and a response transmitted between tiers from the capture data 25, and extracts a partial-order relationship between the pairs (S2). Details of S2 are described with reference to
Then, the constraint extraction unit 23 performs a process of determining a constraint in a higher tier based on a constraint in a lower tier on the basis of the partial-order relationship between the pairs of a request and a response that has been extracted in S2 (S3). Details of S3 are described with reference to
The constraint extraction unit 23 adjusts a reproduction timing on the basis of the constraint information determined in S3 (S4). Details of S4 are described with reference to
The constraint extraction unit 23 extracts a partial-order relationship between pairs of a request transmitted to the (n-i)th tier (higher-side tier) and a response to the request (S11). This is described with reference to
In
First, in the (n-i)th tier, the partial-order relationship between the pairs of the request transmitted to the (n-i+1)th tier and the response received from the (n-i+1)th tier is defined as described below.
(Definition 1) Pairs <request1, response1>, <request2, response2>, . . . , <request n, response n>, and the like are expressed as H1, H2, . . . , Hn, and the like. In addition, <request X, response X>≦<request Y, response Y>, namely, HX≦HY, is defined to be “time of response X≦time of request Y”. In the example of
(Definition 2) The order of requests is defined on the basis of the order of the time. Namely, the transmission of the request2 after the request1 is defined to be “request1≦request2”.
The constraint extraction unit 23 extracts pairs of a request and a response to the request in the (n-i)th tier from the capture data 25 on the basis of information set in a packet header included in the capture data 25. The constraint extraction unit 23 determines the order of the pairs of a request and a response according to the definition 1, and generates a partial-order relationship. Return now to the description of
The constraint extraction unit 23 extracts a partial-order constraint in the (n-i)th tier (higher-side tier) from the capture data 25 (S12). The partial-order constraint in the (n-i)th tier (higher-side tier) is a constraint whereby an HTTP response transfers data to a HTTP request that follows by using, for example, cookies or other constraints.
The constraint extraction unit 23 then extracts a partial-order constraint in the (n-i+1)th tier (lower-side tier) from the capture data 25 (S13). The partial-order constraint in the (n-i+1)th tier (lower-side tier) is an order constraint on a query to, for example, the DB and the result, and this is described with reference to
In the case of
When retransmission is performed due to a packet loss in a communication network, or when no partial-order relationship is established between pairs of a request and a response, the order of requests to the DB may be changed. In view of this, a technology for reproducing the order of accesses to the DB is used in the embodiment. As an example, a transmission order of requests may be stored in advance when observing packet communication, and the constraint extraction unit 23 may maintain an issuing order of the requests, i.e., queries, by using information relating to the stored transmission order.
A method for composing partial-order relationships is as described below. When partial-order relationships R and R′ are given, the composition R+R′ is defined as a transitive closure of R ∪ R′. The transitive closure refers to a set obtained by performing addition if one partial-order relationship has a relationship that another partial-order relationship does not satisfy and adding a relationship according to the transitive property (a≦b̂b≦ca≦c). As an example, when R={a≦b} and R′={b ≦c}, the composition R+R′={a≦b, b≦c, a≦c} is obtained.
In
The constraint extraction unit 23 extracts a correspondence relationship between a request/response in the (n-i)th tier (higher-side tier) and that in the (n-i+1) th tier (lower-side tier) from the capture data 25 (S14). In other words, the constraint extraction unit 23 detects from the capture data 25 which request in the (n-i)th tier has caused a request in the (n-i+1)th tier to be issued.
In the process of S14, the constraint extraction unit 23 uses a system visualization technology for visualizing a behavior inside a system and for determining which request in a higher tier has caused which request in an lower tier to be issued. One of the system visualization technologies is a technology for supporting a linkage process for linking messages associated with each other from among a plurality of messages transmitted/received between a plurality of communication terminals (for example, Patent Document 4). In this system visualization technology, a computer receives a message type of a message transmitted/received as input between servers, an ID character string included in the message, and a data flow rate of the message. The computer outputs information indicating an execution order of linkage processes using respective ID character strings, and ID character strings that enable the performing of the linkage processes in parallel in the form of a partial-order graph on the basis of the received information. As a result, messages associated between tiers can be linked in the same transaction.
In
The constraint extraction unit 23 defines a pair of a request and a response in the transaction 1 in the (n-i)th tier (higher-sider tier) as P1, and defines a pair of a request and a response in the transaction 2 as P2. The constraint extraction unit 23 further defines pairs in the (n-i+1) th tier (lower-side tier) corresponding to P1 as c1, c2, . . . , and defines pairs in the (n-i+1)th tier (lower-side tier) corresponding to P2 as d1, d2, . . . (S21).
When the pairs P1 and P2 of a request and a response have a partial-order relationship (when P1 and P2 are not processed simultaneously) (“Yes” in S22), the constraint extraction unit 23 performs the following process. Namely, when pairs ci and dj (i, j=1, 2, . . . ) have a relationship of ci≦dj according to a partial-order constraint in the (n-i+1)th tier, the constraint extraction unit 23 adds P1≦P2 to a constraint in the (n-i)th tier (S23). When a direction of ≦ in ci≦dj is inverted, a direction of ≦ in P1≦P2 is also inverted. In other words, when the pairs have a relationship of ci≧dj according to the partial-order constraint in the (n-i+1)th tier, the constraint extraction unit 23 adds P1≧P2 to the constraint in the (n-i)th tier.
When none of the pairs of ci and dj have the partial-order constraint in the (n-i+1)th tier, the constraint in the (n-i)th tier has no change. In this case, the constraint extraction unit 23 determines that the order of requests can be changed (S24).
In a case of a multi-tier system, the constraint extraction unit 23 determines that a partial-order relationship fails to be determined between pairs of a request and a response in the (n-i)th tier that corresponds to pairs of a request and a response between which a partial-order relationship fails to be determined in the (n-i+1)th tier (S25).
When the pairs P1 and P2 of a request and a response do not have a partial-order relationship (when P1 and P2 are processed simultaneously) (“No” in S22), the constraint extraction unit 23 performs the following process. Namely, when all of the arbitrary pairs ci and dj that have a partial-order relationship have a relationship of ci≦dj or ci≧dj, the constraint extraction unit 23 respectively adds a constraint of P1≦P2 or P1≧P2 (S26).
When pairs ci and dj have a relationship of ci≦dj and other pairs ci and dj have a relationship of ci≧dj, the constraint extraction unit 23 determines that an order fails to be determined because results of P1 and P2 may be changed. However, the same does not apply when an execution order of threads is determined in the order of reception or priority. The constraint extraction unit 23 also adds a constraint whereby transmission timing intervals of P1 and P2 are not shifted (S27).
When none of the pairs ci and dj have the partial-order constraint, the constraint extraction unit 23 determines that the constraint has no change (S28).
In a case of a multi-tier system, the constraint extraction unit 23 determines that a partial-order relationship also fails to be determined between pairs of a request and a response in the (n-i)th tier that correspond to pairs of a request and a response between which a partial-order relationship in the (n-i+1)th tier fails to be determined (S29).
When the processes of S21-S29 are finished for all of the combinations of the pairs of a request and a response in the (n-i)th tier, the constraint extraction unit 23 outputs a partial-order constraint between the pairs of a request and a response and an order constraint on requests in the (n-i)th tier (S30).
The processes of S21-S29 are described with reference to
A pair in a lower tier that corresponds to H1 is (W1{T1}, R1{T1}). A pair in a lower tier that corresponds to H2 is (W2{T1}). A pair in a lower tier that corresponds to H3 is (W3{T2}). A pair in a lower tier that corresponds to H4 is (R2{T1}, W4{T1}).
Comparing H1 and H2, H1 and H2 do not have the partial-order relationship (“No” in S22), and W1{T1}≦W2{T1}≦R1{T1} is satisfied, and therefore the constraint extraction unit 23 determines that the order of H1 and H2 fails to be determined because an execution result may be changed. In this case, a constraint whereby an access order of H1 and H2 is not changed with no change in transmission timing intervals (access reproduction constraint: request of H1≦request of H2) is established (S27).
Comparing H1 and H3, H1 and H3 have the partial-order relationship (“Yes” in S22), but (W1{T1}, R1{T1}) and (W3{T2}) do not have the partial-order relationship, and therefore the constraint extraction unit 23 determines that no constraints are added to the constraint in the HTTP tier (S24). Comparing H2 and H3, H2 and H3 have the partial-order relationship (“Yes” in S22), but W2{T1} and W3{T2} do not have the partial-order relationship, and therefore the constraint extraction unit 23 determines that no constraints are added to the constraint in the HTTP tier (S24).
Comparing H1 and H4, the partial-order relationship between pairs of a request and a response is H1≦H4 (“Yes” in S22), and a constraint of R1{T1}≦W4{T1} is established, and therefore the constraint extraction unit 23 adds a constraint of H1≦H4 to the constraint in the HTTP tier (S23).
Comparing H2 and H4, the partial-order relationship between pairs of a request and a response is H2≦H4 (“Yes” in S22), and a constraint of W2{T1}≦W4{T1} is established. Therefore, the constraint extraction unit 23 adds a constraint of H2≦H4 to the constraint in the HTTP tier (S23).
Comparing H3 and H4, H3 and H4 do not have the partial-order relationship (“No” in S22), and (W3{T2}) and (R2{T1}, W4{T1}) do not have the partial-order relationship. Therefore, the constraint extraction unit 23 determines that no constraints are added to the constraint in the HTTP tier (S28).
The constraint in the HTTP tier obtained as a result of the foregoing is as follows.
Details of a process (S4) of adjusting a reproduction timing on the basis of the constraint information determined in S3 are described next.
As illustrated in
As described with reference to
According to the embodiment, requests can be transmitted taking into consideration an order in a plurality of tiers by obtaining pairs of a request and a response that have a partial-order relationship for respective tiers and by determining an order of transmitting requests to a multi-tier system on the basis of an order relationship in a higher tier that is extracted according to a partial-order relationship in a lower tier.
Examples of the embodiment are described below.
In Example 1, an example of the process described above (S13) for extracting an order constraint on requests is described. An order constraint on queries for updating the same table from among queries to the DB is assumed to be the issuing order of the queries. It is assumed that, from among the queries to the DB, non-update queries (namely, queries for only performing reference) are unordered unless an update query exists between the non-update queries.
In a system in which updating is performed, it is assumed that an order constraint on requests that update the same region to be accessed is an issuing order of the requests. It is assumed that an order constraint on non-update requests (namely, requests only for performing referring) is that the non-update requests are unordered unless an update request exists between the non-update queries.
Whether the content of a request is the updating of data is defined according to a syntax. As an example, the SQL defines that an “update” statement is executed so as to perform updating, that a “select” statement is executed so as to not perform updating, or the like.
A region to be accessed is also defined by a syntax. In the SQL, for example, the region to be accessed is defined by a variable of a position of Table, such as “select * from Table” in the “select” statement.
In generating a constraint in the (n-i)th tier based on a constraint in the (n-i+1) th tier (S13), when the (n-i+1) th tier is the DB tier and the (n-i)th tier is the HTTP tier, an order constraint in the HTTP tier is generated from an order constraint in the DB tier. The process of S13 for extracting a constraint in the DB tier is described below.
Then, the constraint extraction unit 23 extracts an order relationship between reference and updating of the table in the DB (S32). The process of S32 is described with reference to
Here, a query for updating tables T1 and T2 in the DB is expressed as u{T1, T2}. A time axis in
A partial-order relationship of queries u1{T1}, u2{T2}, u3{T3}, u4{T1}, u5{T2}, u6{T1, T2}, u7{T2}, and u8{T3} is extracted as illustrated in a lower portion of
Queries that access the same table are classified into queries that include updating and queries that do not include updating. In addition, a plurality of non-update queries between update queries are not put in order. In other words, a result has no change even when the order of non-update queries is changed, and therefore a partial-order relationship is set such that an order is not determined for non-update queries.
In
The constraint extraction unit 23 initializes a partial-order relationship R and a set B in which the smallest element is stored for each Ti to an empty set (φ) (S41). The constraint extraction unit 23 determines whether an update query string is empty (S42). Here, the update query string is u1{T1}, u2{T2}, u3{T3}, u4{T1}u5{T2}, u6{T1, T2}, u7{T2{, u8{T3} in the case illustrated in
When the update query string is not empty (“No” in S42), the constraint extraction unit 23 extracts the first query q{T1, . . . , Tn} from the update query string (S43).
The constraint extraction unit 23 obtains the largest query p{. . . } that includes Ti from among R's for respective Ti's (S44). Here, because p{. . . }'s that include the same Ti have a total order relationship, the largest query p{. . . } exists. There is a possibility that q{. . . } does not include Ti because q{. . . }<q′{. . . , Ti, . . . }. In this case, q′f . . . , Ti, . . . } is defined to be a maximum.
When one or more Ti's have a maximum value (“No” in S45), the constraint extraction unit 23 defines the maximum value to be p{. . . } for all of the Ti's having the maximum value, and stores the union of R and {p{. . . }<q{T1, . . . , Tn}} in R (S46).
When no Ti's have a maximum value (“Yes” in S45), the constraint extraction unit 23 determines whether q{. . . } that includes one of the Ti's exists in B (S47). When q{. . . } that includes one of the Ti's does not exist in B (“No” in S47), the constraint extraction unit 23 stores the union of B and q{T1, . . . , Tn}} in B (S48).
When q{. . . } that includes one of the Ti's exists in B (“Yes” in S47), the constraint extraction unit 23 stores the union of R and {q′{. . . }<q{T1, . . . , Tn}}} in R with respect to q′{. . . }∈B that includes Ti (S49).
The processes of S43-S49 are repeated until the update query string becomes an empty string. When the update query string becomes empty (“Yes” in S42), this flow is finished.
The constraint extraction unit 23 classifies a list of queries that have been sequentially issued according to read/write, as illustrated in
The constraint extraction unit 23 sets an order relationship with an element in a subsequent read/write list sequentially from the first read/write list, as illustrated in
Assuming, for example, that a partial-order constraint as illustrated in
In Example 2, reproduction with a request issuing time changed is performed in order to satisfy a partial-order relationship obtained by extraction. This allows a test time to be shortened by advancing an issuing time.
The reproduction time determination unit 24 initializes the set B in which preceding requests are stored to an empty set (φ) (S61).
The constraint extraction unit 23 determines whether a request string is empty (S62). Here, the request string is “request 1 (H1), request 2 (H2), request 3 (H3), request 4 (H4)” in the case of
When the request string is not empty (“No” in S62), the constraint extraction unit 23 extracts the first request H from the request string (S63). When an H′ that satisfies H′≦H exists among elements H′ included in B (“Yes” in S64), the constraint extraction unit 23 sets a timing of H so as to be a timing after “response”s of all of the elements H′ that satisfy H′≦H (S65).
When an H′ that satisfies H′≦H does not exist among the elements H′ included in B (“No” in S64), the constraint extraction unit 23 sets a timing of H so as to be as early a timing as possible (such as a head timing, or as long as the order of requests is stored) (S66).
After the process of S65 or S66, the union of B and {H} is stored in B (S67).
The processes of S63 to S67 are repeated until the request string becomes empty. When the request string becomes empty (“Yes” in S62), this flow is finished.
As a result, parallel processing can be performed, and therefore a load on an access reproduction device can be reduced. In addition, only a desired portion can be executed, and therefore undesired tests can be deleted.
Here, the CPU indicates a central processing unit. The ROM indicates a read only memory. The RAM indicates a random access memory. The I/F indicates an interface. To the bus 49, the CPU 42, the ROM 43, the RAM 46, the communication I/F 44, the storage device 47, the output I/F 41, the input I/F 45, and the reading device 48 are connected. The reading device 48 is a device that reads a portable recording medium. The output device 51 is connected to the output I/F 41. The input device 52 is connected to the input I/F 45.
Various types of storage devices, such as a hard disk, a flash memory, or a magnetic disk, can be used for the storage device 47. In the storage device 47 or the ROM 43, a program for causing the CPU 42 to function as the constraint extraction unit 23 and the reproduction time determination unit 24 is stored. In addition, in the storage device 47 or the ROM 43, the capture data 25 read from the storage device 5, or the reproduction time information 26 is stored. In the RAM 46, constraint information is temporarily stored.
The CPU 42 reads a program for realizing a process described in the embodiment above, which has been stored in the storage device 47 or the like, and executes the program.
The program for realizing the process described in the embodiment above may be stored in, for example, the storage device 47 via a communication network 50 and the communication I/F 44 from a program provider. The program for realizing the process described in the embodiment above may also be stored in a portable storage medium that is commercially available and is distributed. In this case, the portable storage medium may be provided in the reading device 48, and the program stored therein may be read and executed by the CPU 42. Various types of storage mediums, such as a CD-ROM, a flexible disk, an optical disk, a magneto-optical disk, an IC card, or a USB memory device, may be used for the portable storage medium. A program stored in the storage medium as described above is read by the reading device 48.
In addition, a keyboard, a mouse, an electronic camera, a web camera, a microphone, a scanner, a sensor, a tablet, or the like can be used for the input device 52. A display, a printer, a speaker, or the like can be used for the output device 51. The network 50 may be a communication network such as the internet, a LAN, a WAN, a dedicated line, a wired network, a wireless network, or the like.
According to an aspect of the embodiments, request information can be transmitted to a multi-tier information processing system taking into consideration an order in a plurality of tiers.
The present invention is not limited to the embodiment above, and can have various configurations or embodiments without departing from the spirit of the present invention.
All examples and conditional language provided herein are intended for the pedagogical purposes of aiding the reader in understanding the invention and the concepts contributed by the inventor to further the art, and are not to be construed as limitations 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 one or more 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.
Number | Date | Country | Kind |
---|---|---|---|
2014-099426 | May 2014 | JP | national |