Server device, computer-readable storage medium and movement control method

A specification unit specifies a cycle in which data to be processed by queries is distributed, the queries being arranged at a node and movable between the nodes and performing a processing when the data matches with a set condition. An instruction unit instructs a node as a movement source to move the queries during a period when the data to be processed by the queries to be moved is not distributed on the basis of the specified cycle.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2011-263050, filed on Nov. 30, 2011, the entire contents of which are incorporated herein by reference.

FIELD

The embodiments discussed herein are directed to a server device, a movement control program and a movement control method.

BACKGROUND

In recent years, there is known a CEP (complex event processing) as a technique for processing many items of data always corrected from various objects in parallel. With the complex event processing, an event is detected for received data and a processing for the detected event is performed. The complex event processing may be called ESP (Event Stream Processing), but is generally called CEP including ESP herein.

In the CEP system that performs a complex event processing, a large amount of received data may be temporarily processed, and thus a processing load may increase and a processing capability may decrease. Since the CEP system processes data in real-time, the CEP system is expected to be always running, and is not allowed to be stopped.

Thus, in the CEP system, a system technique capable of flexibly allocating resources used for cloud and the like is used to distribute processings into a plurality of servers or virtual machines (VM) according to a variation in processing load. For example, a processing request sentence called query and data associated with the query, which are arranged in a server or virtual machine with a high processing load, are moved as processing elements to other servers or virtual machines to distribute the processings.

However, in the CEP system, when the processing elements are moved, a processing of a query as a processing element to be moved is stopped, which causes a delay in the data processing.

SUMMARY

According to an aspect of an embodiment, a server device includes a memory; and a processor coupled to the memory, wherein the processor executes a process includes, specifying a cycle in which data to be processed by queries is distributed, the queries being arranged at a node and movable between the nodes and performing a processing when the data matches with a set condition, and instructing a node as a movement source to move queries during a period when data to be processed by the queries to be moved is not distributed on the basis of the cycle specified.

DESCRIPTION OF EMBODIMENTS

Preferred embodiments of the present invention will be explained with reference to accompanying drawings. The present invention is not limited to the embodiments. Each embodiment can be combined as needed without departing from the processing contents.

[a] First Embodiment

A server device according to a first embodiment will be described.FIG. 1is a diagram illustrating an entire structure of a CEP system including the server device according to the first embodiment. A server device10is a physical server for managing the CEP system, and is a management server computer provided in a data sensor or each enterprise. The server device10is communicable with a plurality of nodes11. The node11is a server device or a virtual machine operating on a server device. Each node11is distributed and arranged with a plurality of queries12for executing processings when data matches with a set condition. Each node11is distributed with data collected from various objects. The node11performs a processing set for the queries12when the received data matches with the set condition in the queries12. The queries12arranged in each node11are movable between the nodes11.

As illustrated inFIG. 1, the server device10includes a specification unit13and an instruction unit14.

The specification unit13makes various specifications. For example, the specification unit13specifies a cycle in which data to be processed by queries is distributed. For example, when each node11detects a time interval when data to be processed by the queries12is distributed, and a phase relative to a predetermined reference and transmits the same to the server device10, the specification unit13may specify a cycle based on the detection result transmitted from each node11. By way of example, when the data to be processed is distributed at 00:00:10, 00:01:10, 00:02:10, . . . , and 00:00:00 is assumed as a predetermined reference, the time interval is detected as one minute and the phase relative to the reference is detected as 10 seconds. The predetermined reference may be any time. For example, when a plurality of items of data are distributed to the queries at the same cycle, the phase may be found with reference to a cycle in which any data is distributed.

For example, when the data to be processed by the queries is distributed to the server device10, the specification unit13may detect a time interval when the data is distributed and a phase relative to a predetermined reference to specify a cycle. In this case, the data to be processed by the queries may be distributed to the node11and the server device10. The node11may transfer the data to be processed by the queries to the server device10.

For example, a time interval when the data to be processed by the queries is distributed and a phase are determined and cycle information indicating the time interval and the phase is stored in a storage unit (not illustrated) in the server device10, the specification unit13may specify a cycle based on the stored cycle information.

The instruction unit14makes various instructions. For example, while the data to be processed by the queries12to be moved is not distributed, an instruction of moving the queries12is transmitted to the node11as a movement source based on the cycle specified by the specification unit13.

When receiving the movement instruction, each node11moves the queries12instructed to move to other node11.

The example inFIG. 1illustrates a functional structure and thus the specification unit13and the instruction unit14are separated, but may be configured in one device, for example. An exemplary device may be an electronic circuit such as a CPU (Central Processing Unit) or MPU (Micro Processing Unit). The device may employ an integrated circuit such as ASIC (Application Specific Integrated Circuit) or FPGA (Field Programmable Gate Array).

The data to be processed by the queries12may be cyclic for a distribution timing. For example, when the data to be processed is stock price data on specific securities codes and the stock price data is repeatedly distributed in the order of the securities codes, the stock price data on specific securities codes is repeatedly distributed at predetermined time intervals. For example, when the data to be processed is to be transmitted from a sensor and a transmission cycle of the sensor data is determined, the sensor data is repeatedly distributed in the sensor transmission cycle.

While the data is not distributed, the server device10transmits an instruction of moving the queries12the node11. When receiving the instruction of moving the queries12, the node11moves the queries12.

In this way, the server device10specifies a cycle in which the data to be processed by the queries12is distributed, the queries being arranged in the node11and being movable between the nodes11and performing a processing when the data matches with a set condition. Then, the server device10instructs the node11as a movement source to move the queries12while the data to be processed by the queries12to be moved are not distributed, on the basis of the specified cycle. Thereby, the server device10can prevent the processing of the data to be processed by the queries12and the movement timing of the queries12from being overlapped, thereby restricting a delay in the data processing.

[b] Second Embodiment

A second embodiment will be described.FIG. 2is a diagram illustrating an entire structure of a CEP system including the server device according to the second embodiment. The same parts as those in the first embodiment are denoted with the same reference numerals, and an explanation thereof will be omitted.

As illustrated inFIG. 2, the server device10further includes a selection unit15.

The selection unit15makes various selections. For example, when a plurality of queries12as movement candidates are present, the selection unit15selects a query whose period until data to be processed next is distributed is long, as a movement target, on the basis of the cycle specified by the specification unit13. The query12as a movement candidate may be designated by a manager, for example. A query12meeting a predetermined condition, such as a large number of items of data to be distributed or a small number of items of data may be the query12as a movement candidate.

The instruction unit14transmits an instruction of moving the query12to the node11as a movement source while the data to be processed by the query12selected by the selection unit15is not distributed, on the basis of the cycle specified by the specification unit13.

In this way, when a plurality of queries12as movement candidates are present, the server device10selects a query whose period until data to be processed next is distributed is long as a movement target. Then, the server device10transmits an instruction of moving the query12while the data to be processed by the selected query12is not distributed. Thereby, the server device10can secure the period until the data is distributed to be longer, thereby preventing the processing of the data to be processed by the query12and the movement timing of the query12from being overlapped.

A third embodiment will be described. According to the third embodiment, there will be described a CEP system20in which a plurality of VM (Virtual machine)31operate on a plurality of server devices30, respectively, and a plurality of queries33are distributed and arranged on the VMs31, respectively.FIG. 3is a diagram illustrating an exemplary structure of the CEP system according to the third embodiment. The CEP system20includes a server device21, a plurality of server devices30and a management server40. The server device21, each server device30and the management server40are communicable via a network22. One form of the network22may be an arbitrary communication network such as LAN (local Area Network) or VPN (Virtual Private Network) irrespective of being wired or wireless.

The VM31operates on the server device30. Each VM31is distributed and arranged with the plurality of queries33. The server device21receives data from various objects via an external network23and distributes the received data to the VMs31where the queries33for processing the data are arranged. The management server40manages the server device21and each server device30, and controls the movement of the queries33arranged in each VM31. Three server devices30are illustrated in the example ofFIG. 3, but any number of server devices30may be employed.

FIG. 4is a diagram schematically illustrating the structure of the CEP system according to the third embodiment. The server device21, the VM31and the management server40each store a routing table50storing arrangement destinations of the queries33per data to be processed by each query33.

The server device21receives many items of data from various objects via the external network23. The server device21performs a preprocessing of adjusting the received data in a predetermined data structure. Then, the server device21specifies the arrangement destinations of the queries33for processing the received data based on the routing table50, and transmits the data subjected to the preprocessing to the VMs31at the specified arrangement destinations. In the present embodiment, one server device21is illustrated, but the plurality of server devices21may be provided and the received data may be classified by the server devices21.

The VM31operates a data stream processing engine32. The data stream processing engine32is software for realizing a complex event processing. The data stream processing engine32matches the received data with a conditional equation of the query33to detect an event, and controls to perform a processing of the detected event. The CEP system20can cause the queries33to perform a series of processings. For example, an execution result data of an upper query33is transmitted to a lower query33to be input data of the lower query33. When the plurality of queries33perform a series of processings, the data stream processing engine32transmits the execution result data of the queries33to the VM31operating on the lower query33. The data stream processing engine32controls to move the query33to the data stream processing engine32operating on other VM31in response to an instruction of moving the query33from the management server40.

The movement of the query33will be described. The query33may have associated data. For example, when a processing of finding an average of certain periods of the data to be processed by the query33is performed, the data received in a certain period is held for calculating an average. The query33may use predetermined data such as a table for the processing. When moving the query33, the data stream processing engine32moves the query33and data associated with the query33as processing elements.

The movement of the queries33will assume the following cases.FIG. 5Ais a diagram illustrating exemplary movements of the queries. As illustrated in FIG.5A, when data to be processed is different per query33, the queries33are moved to process the data to be processed at the movement destinations. For example, when the processings are distributed, each query33is moved to a different VM31where the data is processed. On the other hand, for example, when a processing load is low, the queries33are moved to one VM31where the data is processed.

On the other hand, the query33may process a plurality of items of data. For example, it is assumed that securities codes and stock prices as data are distributed to the VMs31and a processing of finding a movement average of the stock prices in a certain period per securities code is performed by one query33.FIG. 5Bis a diagram illustrating other exemplary movements of the queries. As illustrated in the left ofFIG. 5B, the queries33are to process data1to n. In this case, the queries33are moved for the data1to n to be processed. For example, when the processings are distributed, the query33is copied to be moved to another VM31and the data1to n to be processed is processed by different VMs31, respectively. On the other hand, for example, when the processing load is low, the queries33are collected in one VM31and the data1to n to be processed is processed by one VM31.

When each query33is individually instructed to move and is moved, as a larger number of queries33to be moved are present, a larger number of times of movement instructions are made. When an arrangement destination is stored in the routing table50per data to be processed by the query33, the routing table50has a larger amount of data as the number of items of data to be processed by the query33increases. In the present embodiment, a plurality of queries33are divided into a plurality of groups and are moved per group. The routing table50manages a storage destination per group.FIG. 6is a diagram illustrating exemplary grouping of the queries33. For example, it is assumed that each data to be processed contains a key for identifying each data by 32-bit integer data and a different key is set for the processing conditions of the queries33, respectively. In this case, for example, the queries33having the same remainder obtained by dividing the key set for the processing condition by a predetermined integer value are grouped into the same group. By way of example, the queries33having the same remainder obtained by dividing the key set for the processing condition by 8191 are statically grouped in the same group. Thereby, each query33is divided into 8191 groups. In the example ofFIG. 6, each group of queries33is indicated as V-Node. Then, in the present embodiment, the queries33are arranged in a VM31per V-node.

The routing table50stores therein an arrangement destination per V-Node.FIG. 7is a diagram illustrating an exemplary data structure of the routing table. As illustrated inFIG. 7, the touring table50includes the respective items of ID and storage destination. The item of ID is a region for storing an ID for identifying a V-Node. The item of storage destination is a region for storing an ID indicating the VM31as a storage destination. In the example ofFIG. 7, a V-Node with the ID “12” indicates that the ID of the VM31as a storage destination is “1”.

The server device21and the data stream processing engine32in each VM31determine a storage destination of the query33based on the key. For example, when the key contained in the received data is 8203, the server device21finds 12 which is a remainder obtained by dividing 8203 by 8191. Then, the server device21finds a storage destination where the ID of the V-node is 12 from the routing table50. In the example ofFIG. 7, the ID of the VM31as a storage destination for the V-Node ID with the ID of 12 is found to be 1.

An IP address and a port number for making communication are determined for each VM31and a file descriptor is allocated corresponding to the IP address and the port number of each VM31. The server device21, each VM31and the management server40store a file descriptor number and the ID indicating each VM31in the storage destination table, respectively.FIG. 8is a diagram illustrating an exemplary data structure of the storage destination table. As illustrated inFIG. 8, the storage destination table has the respective items of ID and file descriptor. The item of ID is a region for storing an ID of the VM31. The item of file descriptor is a region for storing a file descriptor number allocated to a communication path to the VM31with the ID. The example ofFIG. 8indicates that the file descriptor number allocated to the communication path to the VM31with the ID “0” is “6”.

When communication is made with the VM31, a file descriptor number corresponding to the ID of the VM31to be communicated is found from the storage destination table. For example, when the ID of the VM31to be communicated is “1”, the file descriptor number of the VM31with the ID “1” is found to be “7” from the storage destination table. Then, the found file descriptor number is used to communicate with the VM31to be communicated via a TCP/IP socket.

Each VM31detects a time interval when data to be processed by each arranged query33is distributed, and a phase relative to a predetermined reference, and transmits the detected interval and phase as cycle information indicating a cycle to the management server40. The management server40specifies a cycle in which the data to be processed by each query33is distributed on the basis of the received cycle information.

Each VM31detects a resource load state such as a use rate of the allocated CPU or memory from the server device30, and transmits load information indicating the detected load state to the management server40. The management server40specifies a query33to be moved based on the load information transmitted from each VM31. Then, the management server40transmits a movement instruction to the query33to be moved while data is not distributed. In the present embodiment, the query33is moved in units of V-Node. The management server40transmits a movement instruction containing the ID of the VM31as a movement destination and the ID of the V-Node to be moved to the VM31as a movement source. The data stream processing engine32in the VM31having received the movement instruction serializes the processing elements such as the query33belonging to the V-Node to be moved and the data associated with the query33and transmits the same to the VM31as a movement destination.

The data stream processing engine32in the VM31as a movement destination deserializes and recovers the transmitted data and starts driving the recovered query33. The data stream processing engine32updates the storage destination of the query33belonging to the V-Node to be moved, which is stored in the routing table50, to the ID of the VM31operated by the data stream processing engine32. Then, the data stream processing engine32notifies the ID of the V-Node to be moved and the ID of the VM31as a movement destination to each VM31, the server device21and the management server40.

When being notified of the movement, each VM31, the server device21and the management server40update the storage destination of the query33belonging to the V-Node to be moved, which is stored in the routing table50, to the notified ID of the VM31as a movement destination.

FIG. 9is a diagram illustrating exemplary functional structures of the management server and the VM according to the third embodiment. As illustrated inFIG. 9, the VM31includes the data stream processing engine32, a detection unit34, a transmission unit35, a reception unit36and a movement unit37.

The data stream processing engine32matches the data distributed to the VM31with the conditional equation of the query33to detect an event, and performs a processing on the detected event.

The detection unit34performs various detections. For example, the detection unit34periodically detects a time interval when data to be processed by the query33is distributed and a phase relative to a predetermined reference per arranged query33. The detection unit34periodically detects a resource load state of the VM31.

The transmission unit35performs various transmissions. For example, the transmission unit35periodically transmits the time interval when the data to be processed by each query33is distributed and the phase, which are detected by the detection unit34, as cycle information indicating a cycle to the management server40. The transmission unit35moves load information indicating the load state periodically detected by the detection unit34to the management server40.

The reception unit36receives various instructions. For example, the reception unit36receives an instruction of moving a V-Node.

The movement unit37performs various movements. For example, when having received the instruction of moving a V-Node, the movement unit37moves each query33in the V-Node to be moved to the VM31as a movement destination. The respective processings of the detection unit34, the transmission unit35, the reception unit36and the movement unit37may be performed by the data stream processing engine32.

On the other hand, the management server40includes a communication control I/F unit41, a storage unit42and a control unit43.

The communication control I/F unit41is an interface which has at least one port and controls communication with each VM31and the server device21. The communication control I/F unit41exchanges various items of information with each VM31and the server device21. For example, the communication control I/F unit41receives the cycle information or the load information from the VM31. The communication control I/F unit41transmits various instructions to the VM31.

The storage unit42stores various items of information therein. For example, the storage unit42stores the routing table50and a cycle information51therein. Exemplary devices of the storage unit42may include a data rewritable semiconductor memory such as flash memory or NVSRAM (Non Volatile Static Random Access Memory), and a storage device such as hard disk or optical disk.

The control unit43is an electronic circuit such as a CPU having an internal memory, for example, and includes a determination unit43a, a specification unit43band an instruction unit43c.

The determination unit43amakes various determinations. For example, the determination unit43adetermines whether the load state of each VM31indicated by the load information transmitted from each VM31is a permitted load or more.

The specification unit43bperforms various specifications. For example, the specification unit43bspecifies a cycle in which data to be processed by the queries belonging to each V-Node is distributed per V-Node on the basis of the cycle information51stored in the storage unit42. The specification unit43bre-specifies the cycle whenever receiving the cycle information51from each VM31.

When the determination unit43adetermines that a VM31having a permitted load or more is present, the specification unit43bspecifies the VM31having a permitted load or more as a movement source. The specification unit43bspecifies any VM31having a low load state as a movement destination. The specification unit43bspecifies any V-Node arranged in the VM31having a permitted load or more as a movement target. Then, the specification unit43bspecifies a period when data to be processed by each query33in the V-Node to be moved is not distributed on the basis of the cycle in which the data is distributed per V-Node. For example, the specification unit43bdetermines whether the data to be processed by any query33belonging to the V-Node to be moved is received in a predetermined period per predetermined period when the queries33can move in units of V-Node from a current time, and specifies a period when the data is not received. For example, the specification unit43bspecifies a period when the data to be processed by each query33in the V-Node to be moved is not distributed on the basis of the cycle in which the data per V-Node is distributed. Then, when the specified period is equal to or more than the predetermined period when the queries33can move in units of V-Node, the specification unit43bspecifies the specified period as a period when the data is not received.

The instruction unit43cinstructs to move the V-Node in the specified period by the specification unit43bwhen the data is not received. For example, the instruction unit43ctransmits the instruction of moving the V-Node to be moved while the data is not received assuming that the VM31determined to have a permitted load or more is a movement source and the VM31having a low load state is a movement destination.

A flow of the processings, by the management server40, of instructing to move a query33according to the present embodiment will be described below.FIG. 10is a flowchart illustrating a procedure of the movement control processings. The movement control processings are performed when a VM31is in a load state with a permitted load or more, for example.

As illustrated inFIG. 10, the specification unit43bspecifies a cycle in which data is distributed per V-Node on the basis of the cycle information51stored in the storage unit42(step S10). The specification unit43bspecifies a VM31having a permitted load or more as a movement source, a VM31having a low load state as a movement destination, and any V-Node arranged in a VM31having a permitted load or more as V-Node to be moved (step S11). Then, the specification unit43bspecifies a period when data is not distributed on the basis of the cycle specified per V-Node (step S12). The instruction unit43cinstructs to move the V-Node in the specified period (step S13), and terminates the processing.

In this way, the management server40specifies a cycle in which data to be processed by queries belonging to the V-Node is distributed per V-Node. Then, the management server40instructs the VM32as a movement source to move each query33in the V-Node to be moved during the period when data to be processed by each query33in the V-Node to be moved is not distributed on the basis of the specified cycle. Thereby, the management server40can prevent the data processing by each query33in the V-Node to be moved and the movement timing of each query33in the V-Node to be moved from being overlapped, thereby restricting a delay in the data processing.

The management server40periodically re-specifies the cycle, and thus can prevent the data processing of the query33and the movement timing of the query33from being overlapped even when the cycle in which data to be processed by the query33is distributed is varied.

A fourth embodiment will be described. A structure of a CEP system according to the fourth embodiment is almost the same as the third embodiment described above, and only different parts will be described. Also in the present embodiment, a plurality of queries33are divided into a plurality of groups, and are moved per group as in the third embodiment. In the present embodiment, a group to which the queries33belong can be dynamically changed.FIG. 11is a diagram illustrating exemplary query grouping. As illustrated inFIG. 11, the queries33can dynamically change their belonging V-Node. Also in the present embodiment, the queries33are arranged in the VMs31per V-Node.

FIG. 12is a diagram schematically illustrating the structure of the CEP system according to the fourth embodiment. The same parts as those in the third embodiment are denoted with the same reference numerals and an explanation thereof will be omitted. As illustrated inFIG. 12, a server device21, a VM31and a management server40further store therein a node table52storing V-Node to which each query33belongs, respectively.

The node table52is directed for storing a V-Node to which each query33belongs.FIG. 13is a diagram illustrating an exemplary data structure of the node table. As illustrated inFIG. 13, the node table52includes items of key and node ID. The item of key is a region for storing a key for identifying data to be processed by each equerry33. The item of ID is a region for storing an ID of V-Node. The example ofFIG. 13indicates that a query33with the key “1234” as a processing condition belongs to a V-Node with the ID “12”. In the present embodiment, a data distribution destination is found based on the key contained in the data to be processed by the query33. An arrangement destination of the query33is found based on the key set as the processing condition of the query33. For example, when receiving data, the server device21finds an ID of the V-Node corresponding to the key contained in the received data on the basis of the node table52. Then, the server device21finds an ID of the VM31as a storage destination corresponding to the ID of the V-Node on the basis of the routing table50, and transmits the received data to the VM31as a storage destination.

FIG. 14is a diagram illustrating exemplary functional structures of the management server and the VM according to the fourth embodiment. The same parts as those in the third embodiment are denoted with the same reference numerals, and an explanation thereof will be omitted. As illustrated inFIG. 14, the control unit43in the management server40further includes a classification unit43d.

The specification unit43bspecifies a cycle in which data to be processed is distributed for a plurality of queries33on the basis of the cycle information51stored in the storage unit42. The cycle information51is periodically transmitted from each VM31. The specification unit43bre-specifies the cycle whenever receiving new cycle information51.

The classification unit43dmakes various classifications. For example, the classification unit43dassumes the queries33having the same cycle and a close phase in the same group on the basis of the cycle specified by the specification unit43b, and classifies the queries33into a plurality of groups. By way of example, the classification unit43dsorts the queries33having the same cycle in an order of phase, and classifies a predetermined number of queries into groups. By way of other example, the classification unit43ddivides the cycle into a plurality of periods for the queries33having the same cycle, and groups the queries33having the phases belonging to the same period into the same group. Then, the classification unit43ddetermines an ID of the V-Node per group.

When a query33changes its belonging V-Node as a result of the classification by the classification unit43d, the instruction unit43ctransmits an instruction of moving the query33to an arrangement destination of the new V-Node. The instruction unit43cupdates the ID of the V-Node for the query33whose belonging V-Node is changed in the node table52stored in the storage unit42to the ID of the new V-Node. Further, the instruction unit43ctransmits an instruction of updating the node table52containing the key of the query33whose belonging V-Node is changed and the ID of the new V-Node to each VM31and the server device21.

When receiving the instruction of updating the node table52, each VM31and the server device21update the ID of the V-Node of the query33whose belonging V-Node is changed in the node table52to the ID of the new-V-Node on the basis of the instruction.

A flow of the processings, by the management server40, of classifying the queries33according to the present embodiment will be described below.FIG. 15is a flowchart illustrating a procedure of the classification processings. The classification processings are periodically performed at a timing when the manager instructs or a timing when a cycle in which data is transmitted is specified by the specification unit43b.

As illustrated inFIG. 15, the classification unit43dassumes the queries33having the same cycle and a close phase in the same group and classifies the queries33into a plurality of groups on the basis of the cycle specified by the specification unit43b(step S20). The instruction unit43cdetermines whether a query33has changed its belonging V-Node as a result of the classification (step S21). When there is no query33whose belonging V-Node has changed (No in step S21), the processing ends. On the other hand, when there is a query33whose belonging V-Node has changed (Yes in step S21), the instruction unit43cupdates the ID of the V-Node of the query33whose belonging V-Node has changed in the node table52to the ID of the new V-Node (step S22). Then, the instruction unit43ctransmits an instruction of updating the node table52to each VM31and the server device21(step S23), and terminates the processing.

In this way, the management server40assumes the queries33having the same cycle and a close phase in the same group, and classifies the queries33into a plurality of V-Nodes. Thus, a period when data to be processed by each query belonging to the V-Node is distributed is focused on a specific period. Thereby, when moving the queries33in units of V-Node, the management server40moves the queries33in a period other than the specific period, thereby preventing the processing of the data to be processed by the queries33and the movement timing of the queries33from being overlapped.

The management server40periodically re-specifies the cycle in which data is distributed, and re-classifies the groups based on the re-specified cycle. Thereby, even when the cycle in which data to be processed by the query33is distributed is changed, the management server40can prevent the data processing by the query33and the movement timing of the query33from being overlapped.

A fifth embodiment will be described. A structure of a CEP system according to the fifth embodiment is almost the same as the third embodiment, and only different parts will be described.

FIG. 16is a diagram illustrating exemplary functional structures of a management server and a VM according to the fifth embodiment. The same parts as those in the third embodiment are denoted with the same reference numerals and an explanation thereof will be omitted. As illustrated inFIG. 16, the VM31further includes a specification unit38.

The specification unit38specifies a cycle in which data to be processed by the queries33belonging to each V-Node is distributed per V-Node on the basis of the time interval when the data to be processed by each query33is distributed and the phase which are detected by the detection unit34. Then, the specification unit38specifies a period when data to be processed by each query33in the V-Node is not distributed on the basis of the cycle in which data per V-Node is distributed.

When there is a VM31determined to have a permitted load or more, the instruction unit43cin the management server40instructs to move the V-Node. For example, the instruction unit43cassumes the VM31determined to have a permitted load or more as a movement source and the VM31in a low load state as a movement destination, and transmits an instruction of moving any V-Node to be moved in the VM31having a permitted load or more.

When receiving the instruction of moving the V-Node, the movement unit37moves each query33in the V-Node to be moved to the VM31as a movement destination during the period when data is not distributed, which is specified by the specification unit43b.

In this way, when the data to be processed by the arranged query33is distributed, the VM31performs a processing on the query33. The VM31specifies a cycle in which the data to be processed by the query33is distributed. The VM31receives an instruction of moving the query33. Then, when having received the instruction of moving the query33, the VM31moves the query33to the VM31as a movement destination during a period when the data to be processed by the query33is not distributed, on the basis of the specified cycle. Thereby, the VM31can prevent the data processing of the query33to be moved and the movement timing of the query33to be moved from being overlapped, thereby restricting a delay in the data processing.

The embodiments for the disclosed device have been described above, but the disclosed technique may be implemented in various different forms other than the above embodiments. Other embodiments contained in the present invention will be described below.

For example, the third embodiment has described the case where the specification unit43bdetermines whether data is to be received, and specifies a period when the data is not received per predetermined period from a current time, but the disclosed device is not limited thereto. For example, when there is no predetermined period when data is not received, within a predetermined permitted period in which a delay in movement is permitted from a current time, the specification unit43bmay specify a predetermined period when a smallest number of items of data are received as a period when a V-Node is to be moved. The specification unit43bmay specify an earliest predetermined period when the number of items of data to be received is a predetermined number or less, instead of the period when a smallest number of items of data are received, as a period when the V-Node is to be moved. Thereby, when a predetermined period when data is not received is not present or when a time up to a predetermined period is a permitted period or more, a period when the V-Node is to be moved can be specified.

The third to fifth embodiments have described the case in which the queries33are moved in units of V-Node when the queries33are divided into a plurality of groups, but the disclosed device is not limited thereto. For example, a movement may be possible in units of query33. In this case, the routing table50may be configured to store a storage destination in units of query33.

Each illustrated constituent in each device is functionally conceptual, and does not necessarily need to be physically configured as in the figures. That is, specific forms of distribution and integration of the respective devices are not limited to the illustrated ones, and all or part of the constituents may be functionally or physically distributed or integrated as needed in an arbitrary unit according to various loads or use situations. For example, the specification unit13, the instruction unit14and the selection unit15illustrated inFIG. 1andFIG. 2may be integrated as needed. For example, the determination unit43a, the specification unit43b, the instruction unit43cand the classification unit43dillustrated inFIG. 9,FIG. 14andFIG. 16may be integrated as needed. For example, the data stream processing engine32, the detection unit34, the transmission unit35, the reception unit36, the movement unit37, and the specification unit38illustrated inFIG. 9,FIG. 14andFIG. 16may be integrated as needed. Further, all or part of the processing functions performed in the processing parts may be realized in the CPU or in an program analyzed and executed in the CPU, or may be realized in wired logic hardware.

Movement Control Program

Various processings described in the above embodiments may be realized by executing the previously-prepared programs in a computer system such as personal computer or work station. An exemplary computer system for executing the programs having the same functions as the embodiments will be described below.FIG. 17is a diagram illustrating a computer for executing a movement control program.

As illustrated inFIG. 17, a computer300includes a CPU (Central Processing Unit)310, a ROM (Read Only Memory)320, a HDD (Hard Disk Drive)330, and a RAM (Random Access Memory)340. The respective parts310to340are connected to each other via a bus400.

The ROM320previously stores therein a movement control program320afor exercising the same functions as the processing parts according to the first to fifth embodiments. For example, the movement control program320afor exercising the same functions as the specification unit13, the instruction unit14, and the selection unit15according to the first embodiment and the second embodiment is stored. Alternatively, for example, the movement control program320afor exercising the same functions as the determination unit43a, the specification unit43b, the instruction unit43cand the classification unit43daccording to the third embodiment and the fourth embodiment is stored. Alternatively, the movement control program320afor exercising the same functions as the detection unit34, the transmission unit35, the reception unit36, the movement unit37and the specification unit38according to the third to fifth embodiments is stored. The movement control program320amay be separated as needed.

Then, the CPU310reads and executes the movement control program320afrom the ROM320thereby to perform the same operation as the control unit according to the first to fifth embodiments. That is, the movement control program320aexecutes the same operations as the specification unit13, the instruction unit14and the selection unit15according to the first embodiment and the second embodiment. Alternatively, the movement control program320aexecutes the same operations as the determination unit43a, the specification unit43b, the instruction unit43cand the classification unit43daccording to the third embodiment and the fourth embodiment. Alternatively, the movement control program320aexecutes the same operations as the detection unit34, the transmission unit35, the reception unit36, the movement unit37and the specification unit38according to the third to fifth embodiments.

The movement control program320adoes not necessarily need to be originally stored in the ROM320. The movement control program320amay be stored in the HDD330.

For example, the program is stored in a “portable physical medium” such as flexible disk (FD), CR-ROM, DVD disk, magneto-optical disk or IC card inserted into the computer300. The computer300may read and execute the program therefrom.

The program is stored in “other computer (or server)” connected to the computer300via a public line, Internet, LAN or WAN. The computer300may read and execute the program therefrom.

A delay in the data processing can be restricted.