JP4571090B2 - Scheduler program, server system, scheduler device - Google Patents

Scheduler program, server system, scheduler device Download PDF

Info

Publication number
JP4571090B2
JP4571090B2 JP2006089542A JP2006089542A JP4571090B2 JP 4571090 B2 JP4571090 B2 JP 4571090B2 JP 2006089542 A JP2006089542 A JP 2006089542A JP 2006089542 A JP2006089542 A JP 2006089542A JP 4571090 B2 JP4571090 B2 JP 4571090B2
Authority
JP
Japan
Prior art keywords
task
node
data
transaction
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2006089542A
Other languages
Japanese (ja)
Other versions
JP2007265043A (en
Inventor
弘美 宇和田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nomura Research Institute Ltd
Original Assignee
Nomura Research Institute Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nomura Research Institute Ltd filed Critical Nomura Research Institute Ltd
Priority to JP2006089542A priority Critical patent/JP4571090B2/en
Publication of JP2007265043A publication Critical patent/JP2007265043A/en
Application granted granted Critical
Publication of JP4571090B2 publication Critical patent/JP4571090B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

本発明は、複数のノードを含むサーバシステムにおけるタスク処理技術に関する。   The present invention relates to a task processing technique in a server system including a plurality of nodes.

ユーザがウェブブラウザ等を使用してインターネット経由でサーバシステムに送信するサービス要求は、年々増大している。このようなウェブブラウザからなされるサービス要求は、ユーザが対話的に実行するためにサーバとのセッションが長時間に及ぶ場合がある。セッションからの断続的な要求にも即時応答するためには、セッション情報やプログラムをサーバのメモリ上に保持しておかなくてはならない。サービス要求の増大とともにサーバが必要とするメモリリソースも増加する傾向にあるため、メモリリソースを安価に確保したいという要請が存在する。   Service requests that users transmit to server systems via the Internet using a web browser or the like are increasing year by year. A service request made from such a web browser may be executed for a long time by a session with the server because the user interactively executes the service request. In order to respond immediately to intermittent requests from a session, session information and programs must be stored in the server's memory. As the service demand increases, the memory resources required by the server tend to increase, and there is a demand for securing memory resources at a low cost.

そこで、比較的安価な複数のサーバまたはパーソナルコンピュータを網目状に接続してサービス要求から派生するタスクを分散することで、高速処理を実現するグリッドコンピューティングが注目されている。グリッドコンピューティングのユーザは、グリッドにプーリングされている膨大な処理能力や記憶容量を利用することができる。   Accordingly, attention has been paid to grid computing that realizes high-speed processing by connecting a plurality of relatively inexpensive servers or personal computers in a network and distributing tasks derived from service requests. Grid computing users can use the enormous processing power and storage capacity pooled in the grid.

一般に、サービス要求においては、データベースからのデータの読み出しやデータベースへの書き込みが頻繁に実施される。そのため、データベースとのトランザクションに要する時間を短縮できれば、サービス要求に対する応答時間の短縮が期待できる。例えば、特許文献1には、データベースとのトランザクションにおいて永続化すべきデータをデータベースに保存させる処理であるコミットに必要な時間を削減するために、ディスクよりも高速に書き込みできる揮発性のメモリを利用するものが開示されている。
特開2006−12142号公報
In general, in a service request, data reading from a database and data writing to the database are frequently performed. Therefore, if the time required for the transaction with the database can be shortened, the response time for the service request can be shortened. For example, Patent Document 1 uses a volatile memory that can be written at a speed higher than that of a disk in order to reduce the time required for commit, which is processing for storing data to be persisted in a database in a transaction with the database. Are disclosed.
JP 2006-12142 A

実行順序の定められている複数のタスクを実行するとき、タスクを複数のノードに分散配置しても、前のタスクが終了しない限り後のタスクの処理を開始できない。この制約をもたらす大きな要因として、前のタスクでデータベースとのトランザクションを実施する場合、該トランザクションにおけるデータの変更がコミットで確定されるまでは、後のタスクを開始できないことが挙げられる。すなわち、トランザクションのコミットに時間がかかると、その分サービス要求に対する応答が遅くなる。   When a plurality of tasks having a predetermined execution order are executed, even if the tasks are distributed to a plurality of nodes, the processing of the subsequent task cannot be started unless the previous task is completed. A major factor causing this restriction is that when a transaction with a database is performed in the previous task, the subsequent task cannot be started until the data change in the transaction is confirmed by the commit. That is, if it takes time to commit the transaction, the response to the service request is delayed accordingly.

本発明はこうした状況に鑑みてなされたものであり、その目的は、サービス要求の応答速度を改善する技術を提供することにある。   The present invention has been made in view of such circumstances, and an object thereof is to provide a technique for improving the response speed of a service request.

本発明のある態様は、それぞれがプロセッサを備える複数のノードと所定のデータを格納するデータベースとを含むサーバシステムにおいて、該サーバシステム内のノードにおけるタスクのスケジューリングを担当するスケジュールノードで実行されるスケジューラプログラムである。このプログラムは、クライアント端末から与えられるサービス要求に応じて、実行順序が定められた複数タスクの各ノード上での実行を制御する。このプログラムは、複数タスクをサーバシステム内の異なるタスク実行ノードに割り当てる割り当て機能と、1つのタスク実行ノードにおける、データベース内のデータの利用または編集を含む現行のタスクの処理が完了する前に、そのタスクでの処理結果の予測をもとに別のタスク実行ノードにおいて後続のタスクの処理を先行して実行させるタスク先行実行指示機能と、クライアント端末との接続に必要となるデータを、後続のタスクに引き渡すために前記別のタスク実行ノードに対して送信するデータ複製機能と、をスケジュールノードに発揮させる。   An aspect of the present invention is a server system including a plurality of nodes each including a processor and a database storing predetermined data, and a scheduler executed by a schedule node responsible for scheduling tasks in the nodes in the server system It is a program. This program controls the execution on each node of a plurality of tasks whose execution order is determined in response to a service request given from a client terminal. This program has an assignment function that assigns multiple tasks to different task execution nodes in the server system, and before one task execution node completes the processing of the current task, including the use or editing of data in the database. Based on the prediction of the processing result of the task, the task pre-execution instruction function that executes the processing of the succeeding task in advance in another task execution node and the data required for the connection with the client terminal are sent to the succeeding task. The schedule node is caused to exhibit a data replication function to be transmitted to the other task execution node for delivery to the other node.

この態様では、実行順序が定められた複数のタスクを異なるノードに割り当てる分散コンピューティングにおいて、実行中の現行タスクの処理が完了する前に後続のタスクの実行を先行して開始する。これによって、後続のタスクをより早く完了できるので、サービス要求に対する全体としての応答時間を短縮することができる。また、実行の順序が決まっているタスクでも、実質的な並列処理を実現できる。   In this aspect, in distributed computing in which a plurality of tasks having a predetermined execution order are assigned to different nodes, execution of the subsequent task is started before the processing of the current task being executed is completed. As a result, subsequent tasks can be completed earlier, and the overall response time to a service request can be reduced. In addition, substantial parallel processing can be realized even for tasks whose execution order is determined.

タスク先行実行指示機能は、現行のタスクの処理が、当該タスクの処理が割り当てられたタスク実行ノードとデータベースとの間のトランザクションで発生したデータ書き込みまたはデータ書き換えを確定させるデータ永続化処理であるときに、後続のタスクの処理を先行して実行させてもよい。   In the task advance execution instruction function, when the current task process is a data persistence process that confirms data write or data rewrite that occurred in the transaction between the task execution node to which the task process is assigned and the database In addition, the processing of the subsequent task may be executed in advance.

データ永続化処理が終了するまで現行のタスクは待機しなければならないが、この態様によると後続のタスクがその待機時間の間に先行して実行されるので、データベースにおけるトランザクションの負荷の大小にかかわらず、現行タスクの実質的な待機時間を削減することができる。   The current task must wait until the data persistence process is finished, but according to this aspect, subsequent tasks are executed in advance during the waiting time, so the transaction load in the database is large or small. Therefore, the substantial waiting time of the current task can be reduced.

本発明の別の態様は、それぞれがプロセッサを備える複数のノードと所定のデータを格納するデータベースとを含むサーバシステムである。このシステムは、上述のスケジューラプログラムを実行するスケジュールノードである子ノードと、上述の割り当て機能により割り当てられたタスクを実行するタスク実行ノードである孫ノードと、データベースに対する処理を取り扱うトランザクションノードと、を含む。   Another aspect of the present invention is a server system including a plurality of nodes each including a processor and a database storing predetermined data. This system includes a child node that is a schedule node that executes the scheduler program, a grandchild node that is a task execution node that executes a task assigned by the assignment function, and a transaction node that handles processing for a database. Including.

サーバシステムは、複数のノードと接続されいずれのノードからもアクセス可能に構成され、上述のスケジューラプログラムを格納する記憶装置をさらに備えてもよい。これによって、サーバシステム内のいずれのノードが子ノードに決定された場合であっても、そのノードにスケジューラプログラムをロードすることができる。   The server system may be connected to a plurality of nodes and configured to be accessible from any node, and may further include a storage device that stores the above-described scheduler program. Thus, even if any node in the server system is determined as a child node, the scheduler program can be loaded on that node.

なお、以上の構成要素の任意の組合せ、本発明を方法、装置、システム、記録媒体、コンピュータプログラムにより表現したものもまた、本発明の態様として有効である。   It should be noted that any combination of the above-described components and a representation of the present invention by a method, apparatus, system, recording medium, and computer program are also effective as an aspect of the present invention.

本発明によれば、サービス要求の応答速度を改善することができる。   According to the present invention, the response speed of service requests can be improved.

本発明の一実施形態は、それぞれがプロセッサを備える複数のノードを含むサーバシステムにおいて、サービス要求から派生する実行順序の定められた複数のタスクをシステム内の異なるノードに展開しておき、あるタスクの処理が完了する前に、そのタスクの処理結果の予測をもとに別のノードにおいて後続するタスクを先行して実行するものである。前のタスクが完了する前に後続のタスクの処理を開始することによって、サービス要求への応答時間を改善することができる。
以下、図面を参照してこの実施形態について詳細に説明する。
According to an embodiment of the present invention, in a server system including a plurality of nodes each including a processor, a plurality of tasks having a predetermined execution order derived from a service request are expanded to different nodes in the system. Before the process is completed, the subsequent task is executed in advance in another node based on the prediction of the processing result of the task. By starting the processing of the subsequent task before the previous task is completed, the response time to the service request can be improved.
Hereinafter, this embodiment will be described in detail with reference to the drawings.

図1は、本発明の一実施形態に係る格子型コンピュータシステム100と、これに接続されるクライアント端末12の全体構成図である。ここで、本実施形態が対象とする「格子型コンピュータシステム」とは、サーバまたはパーソナルコンピュータ等のそれぞれがプロセッサを備える複数のノードを格子状に接続させたシステムのことを言う。   FIG. 1 is an overall configuration diagram of a lattice computer system 100 according to an embodiment of the present invention and a client terminal 12 connected thereto. Here, the “lattice computer system” targeted by the present embodiment refers to a system in which a plurality of nodes each including a processor, such as a server or a personal computer, are connected in a lattice form.

図1に示すように、格子型コンピュータシステム100は、クライアント端末12から発行される要求に対して特定のサービスを提供するノード群10を備える。ノード群10は、複数列複数行(図1では四行四列)の格子を形成するようにノードが配置される。図1では、各ノードを白抜きの正方形で表している。これら格子状に配列されたノードが他のノードの全てと通信可能なように複数のルータ(図示せず)がノード間に設けられ、これらのルータはインターネット、LAN、WAN等のネットワーク14に接続される。格子型コンピュータシステム100は、企業のデータセンタ等に配置され、多数のサービス要求に同時に応答することが可能である。   As shown in FIG. 1, the lattice computer system 100 includes a node group 10 that provides a specific service in response to a request issued from a client terminal 12. In the node group 10, nodes are arranged so as to form a lattice having a plurality of columns and a plurality of rows (four rows and four columns in FIG. 1). In FIG. 1, each node is represented by a white square. A plurality of routers (not shown) are provided between the nodes so that the nodes arranged in a lattice form can communicate with all of the other nodes, and these routers are connected to a network 14 such as the Internet, LAN, WAN or the like. Is done. The lattice computer system 100 is arranged in a company data center or the like, and can respond to a large number of service requests simultaneously.

図1のノード群10は、各ノードを論理ノードとして表した格子モデルとして示されている。論理ノードとは、一台のルータに複数のサーバまたはパーソナルコンピュータが接続されているときそれらを1つのノードに代表させて表したものである。しかしながら、図1の各ノードが一台のサーバまたはパーソナルコンピュータに対応していてもよい。また、図1ではノード群10を四行四列としているが、より多数またはより少数のノードで構成されていてもよいことは言うまでもない。   The node group 10 in FIG. 1 is shown as a lattice model in which each node is represented as a logical node. A logical node represents a plurality of servers or personal computers connected to a single router, represented by a single node. However, each node in FIG. 1 may correspond to one server or personal computer. In FIG. 1, the node group 10 is arranged in four rows and four columns, but it goes without saying that it may be composed of a larger number or a smaller number of nodes.

ノード群10内の各ノードは、ルータを介して記憶装置24にアクセス可能に構成されている。サービス要求の処理に必要となるスケジューラプログラム、アプリケーションプログラムは記憶装置24に格納されており、必要に応じてプログラムやデータは記憶装置24から各ノードに送信可能となっている。また、アプリケーションの実行に必要なテーブルはデータベース26に格納されている。ノード群10内の各ノードは、トランザクションノード16を介してデータベース26にアクセス可能に構成されている。トランザクションノード16の詳細については、図3を参照して後述する。
記憶装置24とデータベース26は、一般にはハードディスク装置であり、多数のノードからの書き込み要求に見合った性能を発揮するように複数のディスクをまとめて構成される。記憶装置24とデータベース26は光磁気ディスク装置や不揮発性メモリであってもよい。
Each node in the node group 10 is configured to be accessible to the storage device 24 via a router. The scheduler program and application program necessary for processing the service request are stored in the storage device 24, and the program and data can be transmitted from the storage device 24 to each node as necessary. A table necessary for executing the application is stored in the database 26. Each node in the node group 10 is configured to be able to access the database 26 via the transaction node 16. Details of the transaction node 16 will be described later with reference to FIG.
The storage device 24 and the database 26 are generally hard disk devices, and are configured by collecting a plurality of disks so as to exhibit performance commensurate with write requests from a large number of nodes. The storage device 24 and the database 26 may be a magneto-optical disk device or a nonvolatile memory.

クライアント端末12は、キーボードやマウスなどの入力装置とディスプレイなどの出力装置を備えるパーソナルコンピュータ、または、それに準ずる入出力装置を備える携帯電話であってもよい。ただし、携帯電話の場合には、無線で通信することを想定する。ユーザは、クライアント端末12上でウェブブラウザ等を使用して、格子型コンピュータシステム100に対してサービス要求を発行する。このサービス要求は、例えば、証券の発注処理や、旅行の予約処理などが考えられる。これらの例に見られるサービス要求をサーバで処理する際に、ユーザはウェブブラウザを使用して対話的にサービス要求を具体化していく。   The client terminal 12 may be a personal computer including an input device such as a keyboard and a mouse and an output device such as a display, or a mobile phone including an input / output device equivalent thereto. However, in the case of a mobile phone, wireless communication is assumed. The user issues a service request to the lattice computer system 100 using a web browser or the like on the client terminal 12. The service request may be, for example, securities ordering processing or travel reservation processing. When a server processes a service request found in these examples, a user interactively materializes the service request using a web browser.

図2は、ノード群10を構成する各ノードの構成を示す。ノードは、プログラムにしたがって各種処理を実行するプロセッサ92と、一時的にデータやプログラムを記憶するメモリ94と、ノードの再起動があっても記録内容が失われないハードディスクドライブ、DVDドライブなどの記憶装置96と、ネットワークに接続し各種の入出力処理を実行するネットワークインタフェース98と、これらを相互接続するバス90とを少なくとも含む。各ノードは、必要に応じて、キーボードやマウスなどの入力装置、ディスプレイなどの出力装置を有していてもよい。なお、1つのノードが2つ以上のネットワークインタフェース98を有していてもよい。   FIG. 2 shows the configuration of each node constituting the node group 10. The node stores a processor 92 that executes various processes according to a program, a memory 94 that temporarily stores data and programs, and a hard disk drive, a DVD drive, or the like that does not lose recorded contents even when the node is restarted. It includes at least a device 96, a network interface 98 connected to the network and executing various input / output processes, and a bus 90 interconnecting them. Each node may have an input device such as a keyboard and a mouse and an output device such as a display as necessary. One node may have two or more network interfaces 98.

各ノードは、格子型コンピュータシステムを構成するのに適したコンパクトな形状、すなわちプロセッサ、メモリ、ハードディスク、バスなどが搭載されたブレード型の筐体を有する。ノード群10は、このブレード型筐体がラックに多数並ぶ配置となることが好ましいが、他の態様であってもよい。   Each node has a compact shape suitable for configuring a lattice type computer system, that is, a blade-type housing on which a processor, a memory, a hard disk, a bus, and the like are mounted. The node group 10 is preferably arranged with a large number of blade-type housings arranged in a rack, but may be in other forms.

ところで、図1に示すような複数のノードを接続して使用するグリッドコンピューティングにおいては、グリッドを構成するノード間で、サービス要求から派生するタスクをどのように割り当てるかが大きな問題となる。   By the way, in grid computing using a plurality of nodes connected to each other as shown in FIG. 1, how to assign a task derived from a service request between nodes constituting the grid is a big problem.

例えば、1つのサービス要求からいくつものタスクが派生し、それらのタスク間で情報を交換する場合には、タスクが割り当てられるノードを近傍にまとめた方が効率的に要求を処理することができる。しかしながら、いくつかのサービス要求に対してグリッド内のノードの占有を自由に認めると、データフローの交差などにより特定のノードの負荷が増大し、その結果システム全体のパフォーマンスが低下してしまうおそれがある。したがって、グリッドコンピューティングにおいては、サービス要求の特性を考慮したタスク割り当ての必要性が高い。
そこで、本実施形態では、サービス要求の特性に応じたタスク割り当てを実行するスーパースケジューラとスケジューラとをノード群10内のノードに配置している。
For example, when a number of tasks are derived from one service request and information is exchanged between the tasks, the request can be processed more efficiently if the nodes to which the tasks are assigned are grouped in the vicinity. However, if it is possible to freely occupy a node in the grid for some service requests, the load on a specific node may increase due to the crossing of data flows, and as a result, the performance of the entire system may decrease. is there. Therefore, in grid computing, there is a high need for task assignment in consideration of the characteristics of service requests.
Therefore, in the present embodiment, a super scheduler and a scheduler that execute task assignment according to the characteristics of the service request are arranged in the nodes in the node group 10.

図1に戻り、本明細書においては、ノード群10の中で、スーパースケジューラ22を有し格子型コンピュータシステム100全体のタスク割り当てを監視するノードを「親ノード」、スケジューラ30を有しサービス要求に応じて一定範囲内でのタスク割り当てを監視するノードを「子ノード」、子ノードのスケジューラ30によりタスク割り当てがなされるノードを「孫ノード」と呼ぶことにする。   Returning to FIG. 1, in this specification, among the node group 10, a node that has a super scheduler 22 and monitors task assignment of the entire lattice computer system 100 is a “parent node”, and a scheduler 30 has a service request. Accordingly, a node that monitors task assignment within a certain range is called a “child node”, and a node to which task assignment is performed by the child node scheduler 30 is called a “grandchild node”.

また、本明細書において「タスク」とは、ある目的を達成するアプリケーションのプログラムコードを分割したものを指し、「サービス要求」から「タスク」が派生するとき、それらのタスクの間には並列や直列といった実行の順序関係が明確になっていることが前提となる。タスクは、トランザクションを含む場合もあれば、含まない場合もある。後者の例として、ウェブページに埋め込まれているスクリプトの実行やコンポーネント呼出しを伴うもののデータベースにはアクセスしないタスクが挙げられる。本実施形態が効果をもたらすのは、サービス要求から派生したタスクのうち、少なくとも1つのタスクがトランザクションを含む場合である。   Further, in this specification, “task” refers to a division of the program code of an application that achieves a certain purpose, and when “task” is derived from “service request”, these tasks are processed in parallel. It is assumed that the order relationship of execution such as serial is clear. A task may or may not include a transaction. As an example of the latter, there is a task that does not access the database although it involves execution of a script embedded in a web page or component call. This embodiment is effective when at least one task among transactions derived from a service request includes a transaction.

続いてスーパースケジューラ22とスケジューラ30の動作の概略を説明する。   Next, an outline of operations of the super scheduler 22 and the scheduler 30 will be described.

クライアント端末12から格子型コンピュータシステム100に対して発行されたサービス要求は、まず親ノード18により受け取られる。サービス要求を受け取ると、親ノード18のスーパースケジューラ22は、そのサービス要求を分析する。具体的には、システム100に到来するサービス要求の種類や同時トランザクション数などの見積もりにしたがって、必要リソース量を推定する。この見積もりは、システム100のオペレータによって手作業で入力されてもよいし、過去の統計に基づいてスーパースケジューラ22が算出してもよい。   A service request issued from the client terminal 12 to the lattice computer system 100 is first received by the parent node 18. When receiving the service request, the super scheduler 22 of the parent node 18 analyzes the service request. Specifically, the required resource amount is estimated according to an estimate such as the type of service request coming to the system 100 and the number of concurrent transactions. This estimate may be manually input by an operator of the system 100, or may be calculated by the super scheduler 22 based on past statistics.

続いて、スーパースケジューラ22は、この見積もりにしたがって、サービス要求毎に必要となるノード数をノード群10内で確保し、サービス要求処理の起点となる子ノード20の数を決定し、子ノード20をノード群10内に展開させて配置する。   Subsequently, according to this estimate, the super scheduler 22 secures the number of nodes required for each service request in the node group 10, determines the number of child nodes 20 as a starting point of service request processing, and determines the number of child nodes 20. Are expanded and arranged in the node group 10.

子ノードの配置が決定すると、子ノードと決定されたノードに対して記憶装置24からスケジューラプログラムが送信され、子ノード20においてスケジューラ30として機能する。スケジューラ30は、自身のサービス要求を処理するために必要なリソースをスーパースケジューラ22に通知する。スーパースケジューラ22は、システム外部のクライアント端末12に対して子ノード20のネットワークアドレスを通知する。これ以降のサービス要求は、子ノード20に直接送られる。   When the placement of the child node is determined, the scheduler program is transmitted from the storage device 24 to the node determined as the child node, and functions as the scheduler 30 in the child node 20. The scheduler 30 notifies the superscheduler 22 of resources necessary for processing its service request. The super scheduler 22 notifies the client terminal 12 outside the system of the network address of the child node 20. Subsequent service requests are sent directly to the child node 20.

スケジューラ30は、サービス要求の特性に基づいて、タスクをノード群10内のいくつかのノードに割り当てる処理を実行する。まず、スケジューラ30は、サービス要求毎に予め対応させているアプリケーションを呼び出し、アプリケーションを構成するタスクを処理するために、タスク処理プログラムをノード群10内の他のノードに割り当てる。これらが孫ノード50、54になる。タスク処理プログラムのコードは、記憶装置24から孫ノード50、54に送信されて、メモリに読み込まれた後、サービス要求に備えてメモリ上に待機する。そして、タスクが割り当てられた孫ノード50、54において、タスク処理プログラムによりタスクの処理が実行される。タスク処理の結果は、ネットワーク14経由でクライアント端末12に送信される。クライアント端末12は、送信されたデータに基づいてディスプレイに結果を表示する。   The scheduler 30 executes processing for assigning tasks to several nodes in the node group 10 based on the characteristics of the service request. First, the scheduler 30 calls an application previously associated with each service request, and assigns a task processing program to other nodes in the node group 10 in order to process tasks constituting the application. These become grandchild nodes 50 and 54. The task processing program code is transmitted from the storage device 24 to the grandchild nodes 50 and 54, read into the memory, and then waits on the memory in preparation for a service request. Then, in the grandchild nodes 50 and 54 to which the task is assigned, the task processing is executed by the task processing program. The result of the task processing is transmitted to the client terminal 12 via the network 14. The client terminal 12 displays the result on the display based on the transmitted data.

一般に、サービス要求から派生するタスクを複数のノードに展開することによって、以下のようなメリットがある。
第1に、タスクの実行に必要なリソースを確保することができる。また、同一のノードで複数のタスクを同時に起動する場合に発生するリソースの競合が起こりにくい。
さらに、同一ノードで複数のタスクを実行する場合と比べて、オペレーティングシステムにおけるタスク切り換えのオーバーヘッドが少ない。したがって、タスクを別ノードに分けることで、レスポンスおよびスループットの向上が期待できる。
In general, deploying a task derived from a service request to a plurality of nodes has the following advantages.
First, it is possible to secure resources necessary for executing a task. Also, resource contention that occurs when a plurality of tasks are activated simultaneously on the same node is less likely to occur.
Furthermore, the task switching overhead in the operating system is less than when a plurality of tasks are executed on the same node. Therefore, the response and throughput can be improved by dividing the task into different nodes.

ところで、高度なサービス要求の場合には、タスク間の依存関係を反映した実行順序制御が必要になる。例えば、インターネット経由で海外旅行の予約を受け付けるウェブサイトでは、「希望旅程の入力」に続いて「交通機関の予約」「宿泊施設の予約」などのタスクを逐次実行していく必要がある。このような場合、後のタスクを実行するためには前のタスクの情報を引き継ぐ必要がある。   By the way, in the case of an advanced service request, execution order control reflecting the dependency between tasks is required. For example, on a website that accepts reservations for overseas travel via the Internet, it is necessary to sequentially execute tasks such as “reservation of transportation facilities” and “reservation of accommodation facilities” following “input of desired itinerary”. In such a case, it is necessary to take over the information of the previous task in order to execute the subsequent task.

このようなタスク間に依存関係があり直列的に処理する必要のあるタスクを、本明細書では「直列関係にあるタスク」と呼ぶ。直列関係にあるタスクは、通常は前のタスクが正常に終了するまでは、後のタスクを開始することができない。例えば、後述する分散トランザクションにおける2フェーズコミットでは、コミットの結果がタスクに通知されるまでの間、そのタスクは待機する必要があり、次のタスク処理に移行することができない。   Such a task that has a dependency relationship between tasks and needs to be processed in series is called a “task in a serial relationship” in this specification. A task in a serial relationship usually cannot start a subsequent task until the previous task is completed normally. For example, in a two-phase commit in a distributed transaction described later, the task needs to wait until the commit result is notified to the task, and cannot move to the next task process.

そこで、本実施形態では、ある孫ノードで実行中のタスク(以下、「現行タスク」という)とデータベースとの間のトランザクションが完了する前に、実行中のタスクの結果、具体的にはトランザクションの結果を予測した上で、その予測に基づいて別の孫ノードにおいて後続のタスクを先行して実行するようにした。   Therefore, in this embodiment, before a transaction between a task being executed on a grandchild node (hereinafter referred to as “current task”) and the database is completed, the result of the task being executed, specifically, the transaction After predicting the result, the subsequent task is executed in advance in another grandchild node based on the prediction.

図3は、タスクの先行実行を可能にする子ノード20のスケジューラ30と、トランザクションノード16の構成を示す機能ブロック図である。これらの構成は、ハードウェア的には、プロセッサ、メモリ、バス等で実現でき、ソフトウェア的にはメモリにロードされたプログラムなどによって実現されるが、ここではそれらの連携によって実現される機能ブロックを描いている。したがって、これらの機能ブロックがハードウェアのみ、ソフトウェアのみ、またはそれらの組合せによっていろいろな形で実現できることは、当業者には理解されるところである。   FIG. 3 is a functional block diagram showing a configuration of the scheduler 30 of the child node 20 and the transaction node 16 that enable the prior execution of the task. These configurations can be realized in terms of hardware by a processor, a memory, a bus, and the like, and in terms of software, they are realized by a program loaded in the memory. Here, functional blocks realized by their cooperation are shown. I'm drawing. Accordingly, those skilled in the art will understand that these functional blocks can be realized in various forms by hardware only, software only, or a combination thereof.

スケジューラ30は、もっぱらソフトウェアとして実装され、そのプログラムはノードの記憶装置96、またはノードに共有される記憶装置24からロードされる。図3によれば、スケジューラ30には、タスク割り当て部32、タスク先行実行指示部34、データ複製部42、画面表示制御部44、障害処理部46が含まれる。   The scheduler 30 is implemented exclusively as software, and the program is loaded from the storage device 96 of the node or the storage device 24 shared by the nodes. According to FIG. 3, the scheduler 30 includes a task allocation unit 32, a task advance execution instruction unit 34, a data replication unit 42, a screen display control unit 44, and a failure processing unit 46.

タスク割り当て部32は、上述した手順にしたがって、サービス要求から派生した各タスクをノード群10内の適切な孫ノードに割り当てる。図3では、孫ノードAと孫ノードBにそれぞれ現行タスク52、次タスク56を割り当てている。現行タスク52と次タスク56とは直列関係にある。   The task assigning unit 32 assigns each task derived from the service request to an appropriate grandchild node in the node group 10 according to the above-described procedure. In FIG. 3, the current task 52 and the next task 56 are assigned to the grandchild node A and the grandchild node B, respectively. The current task 52 and the next task 56 are in a serial relationship.

タスク先行実行指示部34は、データベース26内のデータの利用または編集を含む現行タスクの処理が完了する前に、現行タスクでの処理結果の予測をもとに、別のノードに割り当てた次タスクの処理を先行して実行させる。より具体的には、孫ノードAにおける現行タスク52が、現行タスク52とデータベース26との間のトランザクションで発生したデータ書き込みまたはデータ書き換えを確定させる命令であるコミット(データ永続化)をトランザクションマネージャ36に依頼したとき、タスク先行実行指示部34は、そのコミットの完了通知を待たずに、トランザクションが成功したものとして、次タスク56の処理開始を孫ノードBに指示する。トランザクションマネージャ36の機能および処理については後述する。   The task pre-execution instruction unit 34 determines the next task assigned to another node based on the prediction of the processing result of the current task before the processing of the current task including use or editing of data in the database 26 is completed. This process is executed in advance. More specifically, the current task 52 in the grandchild node A performs a commit (data persistence), which is an instruction for confirming data writing or data rewriting generated in a transaction between the current task 52 and the database 26, as the transaction manager 36. The task predecessor execution instructing unit 34 instructs the grandchild node B to start processing the next task 56 on the assumption that the transaction has succeeded without waiting for the completion notification of the commit. The function and processing of the transaction manager 36 will be described later.

データ複製部42は、現行タスク52のコミットの完了を待たずに次タスク56を先行して実行するときに必要となるセッションデータを、次タスク56に引き渡すために次タスク56が割り当てられた孫ノードBに送信する。孫ノードAの現行タスク52のメモリイメージに保持されているセッションデータをデータ複製部42が複製した上で、孫ノードBに送信してもよいし、孫ノードAに対して、セッションデータを孫ノードBに送信するように指示してもよい。   The data duplication unit 42 is a grandchild to which the next task 56 is assigned to deliver the session data necessary for executing the next task 56 in advance without waiting for the completion of the commit of the current task 52 to the next task 56. Transmit to node B. The session data held in the memory image of the current task 52 of the grandchild node A may be transmitted to the grandchild node B after the data duplicating section 42 has replicated, or the session data is transmitted to the grandchild node A. The node B may be instructed to transmit.

セッションデータは、クライアント端末のIPアドレス、ユーザ名、タスクが実行されているノードのID、タスクの状態などのクライアント端末との通信に必要となるデータと、現行タスクがトランザクションでデータベースに書き込むべきデータのうち次タスクの実行に必要となるデータとを含む。   Session data includes data required for communication with the client terminal, such as the IP address of the client terminal, the user name, the ID of the node on which the task is executed, and the task status, and data that the current task should write in the database in a transaction Data necessary for executing the next task.

データ複製部42により、セッションデータが孫ノードAと孫ノードBとに二重化されることになる。そのため、いずれかのノードで障害が発生したときにもセッションデータが維持され、その後のクライアント端末との通信が可能になるので、障害時のシステムの耐性を上げることができるという効果もある。   The data duplication unit 42 duplicates the session data into the grandchild node A and the grandchild node B. Therefore, even when a failure occurs in any node, session data is maintained, and subsequent communication with the client terminal becomes possible, so that there is also an effect that the tolerance of the system at the time of failure can be increased.

データ複製部42によってセッションデータを次タスク56に複製し、タスク先行実行指示部34が孫ノードBに対して次タスク56の実行を指示することで、現行タスク52のトランザクションにおけるコミットの待ち時間の間に、次タスク56の実行を開始することができる。   The data duplication unit 42 duplicates the session data to the next task 56, and the task preceding execution instruction unit 34 instructs the grandchild node B to execute the next task 56. In the meantime, the execution of the next task 56 can be started.

現行タスク52と次タスク56のいずれにもクライアント端末12への画面表示が伴う場合には、現行タスク52と次タスク56とを並列的に実行し、それぞれのタスクの処理結果がクライアント端末12に送信され画面表示がなされると、ユーザを混乱させることになる。そこで、画面表示制御部44は、複数のタスクが同時実行されているときの画面表示を調整する。   When both the current task 52 and the next task 56 are accompanied by a screen display on the client terminal 12, the current task 52 and the next task 56 are executed in parallel, and the processing result of each task is sent to the client terminal 12. When sent and displayed on the screen, the user is confused. Therefore, the screen display control unit 44 adjusts the screen display when a plurality of tasks are simultaneously executed.

図4は、画面表示制御部44による制御を説明する図である。図中、横軸は時間経過を表し、実線は、クライアント端末12のディスプレイに画面が表示される状態を表している。   FIG. 4 is a diagram for explaining control by the screen display control unit 44. In the figure, the horizontal axis represents the passage of time, and the solid line represents the state in which the screen is displayed on the display of the client terminal 12.

現行タスクについての画面表示がなされている間に、現行タスクによりトランザクションマネージャ36に対してコミットが依頼され、これを契機にタスク先行実行指示部34により次タスクの開始が指示されると(t1)、画面表示制御部44は、タスクの処理結果としての画面表示データの受け取り先を現行タスクから次タスクに切り換える。そして、現行タスクの画面表示データをバッファに蓄積するとともに、現行タスクの処理結果の予測に基づいた次タスクの画面表示データをクライアント端末12に対して送信する(t1〜t2)。これによって、ユーザには、現行タスクは終了して次のタスクに制御が移ったように見える。   While the screen for the current task is being displayed, a commit is requested to the transaction manager 36 by the current task, and when this is triggered, the task preceding execution instruction unit 34 instructs the start of the next task (t1). The screen display control unit 44 switches the reception destination of the screen display data as the task processing result from the current task to the next task. Then, the screen display data of the current task is accumulated in the buffer, and the screen display data of the next task based on the prediction of the processing result of the current task is transmitted to the client terminal 12 (t1 to t2). This makes it appear to the user that the current task is finished and control is transferred to the next task.

現行タスクのトランザクションが正常に完了すると(t2)、バッファに蓄積された現行タスクの画面表示データは破棄し、次タスク56の画面表示データの送信を継続する(t2以降)。現行タスクが正常に完了しなかった場合には、後述する障害処理部46によって障害処理プロセスが実行される。   When the transaction of the current task is completed normally (t2), the screen display data of the current task accumulated in the buffer is discarded, and transmission of the screen display data of the next task 56 is continued (after t2). When the current task is not completed normally, a failure processing process is executed by the failure processing unit 46 described later.

画面表示制御部44は、画面表示データの受け取り先を現行タスクから次タスクに切り換える間(t1〜t2)に、ユーザからクライアント端末12を介してなされた入力をバッファする機能を備えていてもよい。この間になされた入力は、現行タスクのトランザクションが正常に完了した後(t2以降)、次タスクに送られる。   The screen display control unit 44 may have a function of buffering input made by the user via the client terminal 12 while switching the receiving destination of the screen display data from the current task to the next task (t1 to t2). . The input made during this time is sent to the next task after the transaction of the current task is completed normally (after t2).

このように、データ複製部42と画面表示制御部44とによって、クライアント端末12を操作するユーザからは2つのタスクが同時に実行されていることが見えなくなり、ユーザに意識させずに次タスクの先行実行を進めることができる。   In this way, the data duplicating unit 42 and the screen display control unit 44 make it impossible for the user operating the client terminal 12 to see that two tasks are being executed simultaneously, and the preceding task of the next task is unaware of the user. Execution can proceed.

図3に戻り、障害処理部46は、現行タスク52のトランザクションの完了前に障害が発生したとき、現行タスクまたはサービス要求毎に予め定められている障害処理プロセスを、現行タスク52および次タスク56が割り当てられた孫ノードA、孫ノードBに実行させる。現行タスク52のトランザクションが正常に終了した場合には何もしない。障害処理プロセスは、例えば、1.次タスクに割り込み処理をする、2.現行タスクのコミットの成功予測に基づいて次タスクにおいてデータベースへの書き込みや変更が既になされていた場合には、データベースをロールバックする、3.現行タスクのコミットの成功予測に基づいてクライアント端末に既にメッセージが送信されていた場合には、クライアント端末にエラーメッセージを送信する、4.障害の状況をログに残す、などがある。   Returning to FIG. 3, when a failure occurs before the completion of the transaction of the current task 52, the failure processing unit 46 performs a failure processing process predetermined for each current task or service request as the current task 52 and the next task 56. Are assigned to grandchild node A and grandchild node B. If the transaction of the current task 52 ends normally, nothing is done. The fault handling process is, for example, 1. 1. Interrupt the next task. 2. If the database has been written or changed in the next task based on the predicted success of the commit of the current task, roll back the database. 3. If a message has already been sent to the client terminal based on the predicted success of committing the current task, send an error message to the client terminal. Such as leaving the failure status in a log.

次に、トランザクションノード16の説明に移る。トランザクションノード16は、データベースへのデータの書き込み、書き換え、データの読み取りなどを担当するノードである。図1では、トランザクションノード16をノード群10の外部に描いているが、ノード群10に含まれるノードであってもよい。トランザクションノード16には、トランザクションマネージャ36、データベースライタ38、ログライタ40が含まれる。   Next, the description of the transaction node 16 will be given. The transaction node 16 is a node in charge of data writing, rewriting, data reading, etc. to the database. In FIG. 1, the transaction node 16 is drawn outside the node group 10, but it may be a node included in the node group 10. The transaction node 16 includes a transaction manager 36, a database writer 38, and a log writer 40.

トランザクションマネージャ36は、タスクとデータベースの間に位置し、トランザクションを制御、監視する機能を有する。孫ノードAで実行されている現行タスク52は、データベース26にアクセスする必要がある場合、トランザクションにトランザクションIDを割り当てた上で、予め有している呼出しライブラリを参照してトランザクションノード16にあるトランザクションマネージャ36を呼び出す。トランザクションIDは、スケジューラ30とデータベースライタ38に渡される。現行タスク52がトランザクションマネージャ36に対してコミットを依頼すると、そのことが現行タスク52を経由してスケジューラ30にも伝達される。   The transaction manager 36 is located between the task and the database, and has a function of controlling and monitoring the transaction. When the current task 52 executed in the grandchild node A needs to access the database 26, a transaction ID is assigned to the transaction, and the transaction in the transaction node 16 is referred to by referring to a call library that is held in advance. Call manager 36. The transaction ID is passed to the scheduler 30 and the database writer 38. When the current task 52 requests the transaction manager 36 to commit, this is also transmitted to the scheduler 30 via the current task 52.

スケジューラ30のタスク先行実行指示部34は、コミット依頼の情報を受け取ると、現行タスクのコミットの結果を予測する。通常は、現行タスクによるコミットが成功すると予測する。コミットが成功するとの前提の上で、タスク先行実行指示部34は孫ノードBに割り当てた次タスク56の実行開始を指示する。   When the task predecessor execution instruction unit 34 of the scheduler 30 receives the commit request information, it predicts the commit result of the current task. Usually, we expect the current task to commit successfully. On the assumption that the commit is successful, the task predecessor execution instructing unit 34 instructs the start of the next task 56 assigned to the grandchild node B.

一旦タスクからトランザクションマネージャ36に対してデータのコミットが依頼されると、以降の処理はトランザクションマネージャ36が実行する。そのため、タスク側で複数の命令をデータベースに対して発する必要が無くなり、タスクからトランザクションの処理が隠蔽される。   Once the task requests the transaction manager 36 to commit data, the transaction manager 36 executes the subsequent processing. Therefore, it is not necessary to issue a plurality of instructions to the database on the task side, and the transaction processing is hidden from the task.

トランザクションマネージャ36は、コミットの成功または失敗についても現行タスクを経由してスケジューラに伝達する。スケジューラの障害処理部46は、これに基づいて障害処理の実行を判断する。   The transaction manager 36 also communicates the success or failure of the commit to the scheduler via the current task. The failure processing unit 46 of the scheduler determines the execution of the failure processing based on this.

データベースライタ38は、データベース26へのデータの書き込み、書き換えを実行する。   The database writer 38 writes and rewrites data in the database 26.

ログライタ40は、データベースライタ38によるデータベースの状態の変更やコミットの順序などをログに記録する。このログを参照することで、障害発生時にデータベースのロールバックが可能になる。「ロールバック」とは、データベースの変更を取り消す処理であり、新しいデータをデータベースに書き込んだ場合であっても、コミットする前なら書き込みを破棄することができる。ロールバックが実施されると、データベースはデータを変更していない元の状態に維持される。   The log writer 40 records changes in the database state by the database writer 38 and the order of commits in a log. By referring to this log, the database can be rolled back when a failure occurs. “Rollback” is a process of canceling database changes, and even when new data is written to the database, the writing can be discarded before committing. When a rollback is performed, the database is maintained in its original state with no data changes.

図5は、トランザクションマネージャ36による分散トランザクションの一般的な処理手順を示す。1つのトランザクションで複数のデータベースにアクセスする分散トランザクションでは、それぞれのデータベースのデータ一貫性を維持するために2フェーズコミットという手法が採用される。2フェーズコミットでは、全てのデータベースに対する変更がともに反映されるか、いずれも変更しないで終了するかのいずれかをとる。   FIG. 5 shows a general processing procedure of a distributed transaction by the transaction manager 36. In a distributed transaction that accesses a plurality of databases in one transaction, a method called two-phase commit is adopted to maintain data consistency of each database. In the two-phase commit, changes to all databases are reflected together, or the process is terminated without changing any of them.

一回のトランザクションは、1つ以上のSQL文で構成される。まず、タスクは、トランザクションマネージャに対してコミット(commit)を依頼する(S100)。続いて、第1のフェーズとして、トランザクションマネージャ36は、データベースA、データベースBに対してそれぞれ、SQL文とともにコミットできる状態であるか否かを確認する準備命令(prepare)を送信する(S102,S106)。この時点では、書き込まれるべきデータがSQL文としてデータベースのログに書き込まれた状態になり、トランザクションマネージャからデータベースに対してコミットの命令がくるまでは実際の書き込みは行われない。これを受けたデータベースA、データベースBは、ログ書き込みが正常に行われたか否かをトランザクションマネージャ36に伝える。ログ書き込みが正常に行われたことがログライタ40によって確認されると、トランザクションマネージャ36に対して準備完了(ok)を伝える(S104,S108)。ログ書き込みが異常終了していれば、トランザクションマネージャに対して準備未了であることを伝える。   One transaction is composed of one or more SQL statements. First, the task requests the transaction manager to commit (S100). Subsequently, as a first phase, the transaction manager 36 transmits a preparation command (prepare) for checking whether or not the database A and the database B can be committed together with the SQL statement (S102, S106). ). At this point, the data to be written is written in the database log as an SQL statement, and actual writing is not performed until a commit command is issued from the transaction manager to the database. Upon receiving this, the database A and the database B inform the transaction manager 36 whether or not the log writing has been normally performed. When it is confirmed by the log writer 40 that log writing has been normally performed, preparation completion (ok) is transmitted to the transaction manager 36 (S104, S108). If log writing has terminated abnormally, the transaction manager is informed that preparation has not been completed.

第2フェーズでは、トランザクションマネージャ36は、データベースA、データベースBからの準備完了か準備未了かの通知をもとに、全てのデータベースに対してコミット命令またはロールバック命令を送信する。データベースA、データベースBの両方から準備完了の通知を受け取った場合にのみ、トランザクションマネージャは両データベースに対してコミットの命令を送る(S110,S114)。データベースA、データベースBは、ログに書かれたSQL文を解釈してテーブルに反映させる。   In the second phase, the transaction manager 36 transmits a commit command or a rollback command to all the databases based on the notification from the databases A and B that the preparation is completed or not. Only when the notification of preparation completion is received from both the database A and the database B, the transaction manager sends a commit command to both databases (S110, S114). Database A and database B interpret SQL statements written in the log and reflect them in the table.

トランザクションマネージャがコミットを命令する前に何らかの障害が発生し、データベースから1つでも不可の通知を受け取った場合、トランザクションマネージャは、全てのデータベースに対してロールバック命令を送る。   If some failure occurs before the transaction manager commands a commit and if any notification is received from the database, the transaction manager sends a rollback command to all databases.

障害の例としては、データベースの更新ルールに合わないタイムスタンプ(時間外など)、別のプロセスによるテーブルのロック、指定時間内にデータベースからの通知がないなどの他、ハードウェア障害や通信障害なども含まれる。   Examples of failures include time stamps that do not match the database update rules (out of hours, etc.), table locking by another process, no notification from the database within the specified time, hardware failures, communication failures, etc. Is also included.

データベースA、データベースBにおけるデータ更新が成功すると(S112,S116)、その情報がトランザクションマネージャに伝えられる(S118、S119)。トランザクションマネージャ36は、トランザクションの実行結果を現行タスクに通知する。トランザクションマネージャがコミット命令を出し、データベースでの更新が成功した場合には、トランザクション成功の情報をタスクに送る(S120)。トランザクションマネージャがロールバックを命令した場合、および、コミットを命令したがデータベースから指定時間内にデータ更新成功の通知がない場合には、トランザクション失敗の情報をタスクに送る。   When the data update in the databases A and B is successful (S112, S116), the information is transmitted to the transaction manager (S118, S119). The transaction manager 36 notifies the current task of the transaction execution result. If the transaction manager issues a commit command and the update in the database is successful, the transaction success information is sent to the task (S120). When the transaction manager commands rollback, and when the commit is commanded but the data update success notification is not received from the database within the specified time, the transaction failure information is sent to the task.

このように、複数のデータベースに対する全ての書き込み操作を1つのトランザクション内で実行することで、トランザクションの途中で何らかの障害が生じた場合であっても、全てのデータベースのデータ一貫性を保つことができる。   In this way, by executing all the write operations for a plurality of databases within one transaction, it is possible to maintain the data consistency of all databases even if some failure occurs during the transaction. .

本実施形態におけるトランザクションは、OASIS(Organization for the Advancement of Structured Information Standards)で策定が行われているBTP(Business Transaction Protocol)にしたがうことが好ましいが、これに限定されず、他のプロトコルにしたがっていてもよい。   The transaction in the present embodiment preferably conforms to BTP (Business Transaction Protocol) established by OASIS (Organization for the Advancement of Structured Information Standards), but is not limited thereto, and is in accordance with other protocols. Also good.

図6は、本実施形態による格子型コンピュータシステム100におけるタスクの先行実行を説明するフローチャートである。   FIG. 6 is a flowchart for explaining the pre-execution of a task in the lattice type computer system 100 according to the present embodiment.

現行タスク52がトランザクションマネージャ36に対してデータのコミットを依頼すると(S10)、現行タスク52はスケジューラ30に対してコミット依頼中であることを伝える(S12)。タスク先行実行指示部34は、これに応じてコミットが正常に完了すると予測し、次タスク56を割り当てた孫ノードBに対して、コミットが正常に完了するという前提のもとに次タスク56の実行を開始するように指示する(S14)。なお、次タスク56のタスク処理プログラムは、S14の前に予め孫ノードBに対してロードしておいてもよいし、S14において、対応するタスク処理プログラムを記憶装置24から取得するように孫ノードBに対して指示してもよい。   When the current task 52 requests the transaction manager 36 to commit data (S10), the current task 52 informs the scheduler 30 that a commit request is being made (S12). In response to this, the task predecessor execution instruction unit 34 predicts that the commit is normally completed, and for the grandchild node B to which the next task 56 has been assigned, An instruction is given to start execution (S14). Note that the task processing program of the next task 56 may be loaded in advance to the grandchild node B before S14, or the grandchild node so that the corresponding task processing program is acquired from the storage device 24 in S14. B may be instructed.

データ複製部42は、現行タスク52のセッションデータを複製して次タスク56に送信し、次タスク56の先行実行が開始される(S16)。トランザクションマネージャ36は、データベース26とのトランザクションを制御し、現行タスク52を介してトランザクションの結果をスケジューラ30に通知する(S18)。トランザクションが成功していれば(S20のY)、現行タスク52を終了し、孫ノードBにおいて次タスク56の実行をそのまま継続する(S22)。トランザクションが失敗していれば(S20のN)、次タスクを終了させた上で、障害処理部46によって所定の障害処理プロセスが実行される(S24)。   The data duplication unit 42 duplicates the session data of the current task 52 and transmits it to the next task 56, and the preceding execution of the next task 56 is started (S16). The transaction manager 36 controls the transaction with the database 26 and notifies the scheduler 30 of the transaction result via the current task 52 (S18). If the transaction is successful (Y in S20), the current task 52 is terminated, and the execution of the next task 56 is continued in the grandchild node B (S22). If the transaction has failed (N in S20), the next task is terminated, and a predetermined failure processing process is executed by the failure processing unit 46 (S24).

なお、S18のトランザクションの結果通知は、次タスク56の実行が開始された後でなく、その前になされることも当然考えられる。その場合、タスク先行実行指示部34は、次タスク56の先行実行をさせずに、現行タスク52のコミットの結果を確認した上で次タスク56の実行を孫ノードBに指示することが好ましい。   Of course, the notification of the result of the transaction in S18 may be made before the start of the execution of the next task 56 but before that. In this case, it is preferable that the task predecessor execution instructing unit 34 instructs the grandchild node B to execute the next task 56 after confirming the result of the commit of the current task 52 without causing the predecessor execution of the next task 56.

現行タスクのコミットが失敗した場合には、タスクの種類や障害のケース毎に応じて予め定められている障害処理プロセス、またはスケジューラで予め定められている障害処理プロセスにしたがって処理がなされる。ただし、サービス要求に応じたアプリケーションレベルで障害処理プロセスが定められている場合には、こちらを優先することが望ましい。例えば、コミットが失敗したときには全てのタスクを終了させるという障害処理プロセスがアプリケーションで定義されている場合、個々のタスクに関わる障害処理プロセスを実行しても無意味だからである。   When the commit of the current task fails, processing is performed according to a failure processing process predetermined according to the type of task and each failure case, or a failure processing process predetermined by the scheduler. However, if a failure handling process is defined at the application level according to the service request, it is desirable to give priority to this. For example, if a fault handling process that terminates all tasks when a commit fails is defined in the application, it is meaningless to execute the fault handling process related to each task.

続いて、格子型コンピュータシステム100において分散トランザクションを含むサービス要求を処理する場合を2つ挙げて、本実施形態におけるタスクの先行実行処理をより具体的に説明する。   Next, two cases of processing a service request including a distributed transaction in the lattice type computer system 100 will be described, and the task pre-execution process in this embodiment will be described more specifically.

(実施例1)
図7は、インターネットを介して車の購入予約をするシステムの全体的な構成図である。図7中、図1、図3と同一の符号を付した要素は、図1、図3に関して上述したのと同様の機能を有するので、詳細な説明を省略する。また、図7においては、1つのサービス要求にのみ対応する場合を想定しているので、子ノードの割り当てを行う親ノードとスーパースケジューラ、およびサービスに関与しない他のノードを省略して示している。
Example 1
FIG. 7 is an overall configuration diagram of a system for making a reservation for purchasing a car via the Internet. 7, elements denoted by the same reference numerals as those in FIGS. 1 and 3 have the same functions as those described above with reference to FIGS. 1 and 3, and thus detailed description thereof is omitted. Further, in FIG. 7, since it is assumed that only one service request is supported, the parent node that assigns child nodes, the super scheduler, and other nodes that are not involved in the service are omitted. .

ユーザがクライアント端末12を介して車の購入予約を受け付けるサイトにアクセスすると、希望車種データ入力画面70と顧客属性データ入力画面72がクライアント端末12のディスプレイに表示される。ユーザがこれらに所定の事項を入力して送信ボタンをクリックすると、希望車種データと顧客属性データとを含むサービス要求が子ノード20に対して送信される。希望車種データには、購入の予約をしたい車名、モデル、色などの情報が含まれ、顧客属性データには、ユーザの氏名、電話番号、メールアドレスなどの情報が含まれる。   When the user accesses a site for accepting a car purchase reservation via the client terminal 12, a desired vehicle type data input screen 70 and a customer attribute data input screen 72 are displayed on the display of the client terminal 12. When the user inputs predetermined items into these items and clicks the send button, a service request including desired vehicle type data and customer attribute data is transmitted to the child node 20. The desired vehicle type data includes information such as the name, model, and color of the vehicle to be reserved for purchase, and the customer attribute data includes information such as the user's name, telephone number, and mail address.

子ノード20のスケジューラ30は、サービス要求を受け取ると、予め対応付けのされているアプリケーションを記憶装置から読み出す。ここでは、このアプリケーションは購入予約タスク62と納期通知タスク66とを含むものとする。スケジューラ30のタスク割り当て部32は、購入予約タスク62を孫ノードAに、納期通知タスク66を孫ノードBに割り当てる。   When the scheduler 30 of the child node 20 receives the service request, it reads out an application associated in advance from the storage device. Here, it is assumed that this application includes a purchase reservation task 62 and a delivery date notification task 66. The task assignment unit 32 of the scheduler 30 assigns the purchase reservation task 62 to the grandchild node A and the delivery date notification task 66 to the grandchild node B.

まず、孫ノードAにおいて、購入予約タスク62が実行される。購入予約タスク62は、顧客属性データをデータベース内の顧客管理テーブル80に書き込むと同時に、希望車種データを発注管理テーブル82に書き込む必要がある。そこで、購入予約タスク62は、トランザクションノード16にあるトランザクションマネージャを呼び出し、データのコミットを依頼する。   First, the purchase reservation task 62 is executed in the grandchild node A. The purchase reservation task 62 needs to write the desired vehicle type data to the order management table 82 at the same time as writing the customer attribute data to the customer management table 80 in the database. Therefore, the purchase reservation task 62 calls the transaction manager in the transaction node 16 and requests data commit.

スケジューラ30のタスク先行実行指示部34は、購入予約タスク62がトランザクションマネージャに対してデータのコミットを依頼したことを知ると、孫ノードBに対して、コミットの完了前に納期通知タスク66の実行を開始するように指示する。また、スケジューラ30のデータ複製部42は、購入予約タスク62に保持され、発注管理テーブル82に対して書き込み中である希望車種データ68を複製し、納期通知タスク66に引き渡す。   When the task advance execution instructing unit 34 of the scheduler 30 knows that the purchase reservation task 62 has requested the transaction manager to commit data, the grandchild node B executes the delivery date notification task 66 before the commit is completed. To start. In addition, the data duplication unit 42 of the scheduler 30 duplicates the desired vehicle type data 68 held in the purchase reservation task 62 and being written to the order management table 82, and delivers it to the delivery date notification task 66.

納期通知タスク66は、購入予約タスク62によるコミット依頼が成功する前提で、希望車種データ68を参照して、希望する車がいつ頃出荷可能であるかを、データベース26の在庫管理テーブル84または生産管理テーブル86を検索して調べる。在庫管理テーブル84には、車名、モデル、色毎の在庫台数が記録されており、生産管理テーブル86には、車名、モデル、色毎の生産予定台数が記録されている。これらを調べることで、納期通知タスク66は車の納入可能日を計算し、納入可能日を含むメッセージ74をクライアント端末12に対して送信する。クライアント端末12は、メッセージ74を画面表示する。   The delivery date notification task 66 refers to the desired vehicle type data 68 on the premise that the commit request by the purchase reservation task 62 is successful, and indicates when the desired vehicle can be shipped when the inventory management table 84 of the database 26 or the production. The management table 86 is searched and examined. The inventory management table 84 records the number of stocks for each car name, model, and color, and the production management table 86 records the planned number of cars for each car name, model, and color. By checking these, the delivery date notification task 66 calculates the delivery date of the car and transmits a message 74 including the delivery date to the client terminal 12. The client terminal 12 displays the message 74 on the screen.

購入予約タスク62によるコミットが成功であれば、購入予約タスク62は終了し、納期通知タスク66がそのまま実行される。コミットが失敗であれば、スケジューラ30の障害処理部46が所定の障害処理プロセスを実行し、クライアント端末12に対してエラーメッセージ76を送信する。   If the commit by the purchase reservation task 62 is successful, the purchase reservation task 62 ends and the delivery date notification task 66 is executed as it is. If the commit fails, the failure processing unit 46 of the scheduler 30 executes a predetermined failure processing process and transmits an error message 76 to the client terminal 12.

このように、購入予約タスクによるコミット依頼が完了する前に納期通知タスクを先行して実行することで、サービス要求に対する全体としての応答時間を短縮することができる。このようなタスクの先行開始ができるのは、トランザクションマネージャによるテーブルの更新処理が高い確率で成功することに基づいている。   Thus, by executing the delivery date notification task before the commit request by the purchase reservation task is completed, the overall response time to the service request can be shortened. The reason why such a task can be started in advance is based on the fact that table update processing by the transaction manager succeeds with high probability.

図8は、図7のシステムにおけるタスクの先行実行処理を説明するフローチャートである。まず、クライアント端末12からサービス要求がなされる(S30)。スケジューラ30のタスク割り当て部32は、サービス要求に対応する購入予約タスク62と納期通知タスク66とをシステム内の適切なノードに割り当てる(S32)。購入予約タスク62の実行が開始され、トランザクションノード16のトランザクションマネージャ36に対してデータのコミットが依頼される(S34)。これに続いて、データ複製部42により購入予約タスク62から複製された希望車種データが納期通知タスク66に送信され、タスク先行実行指示部34により納期通知タスク66の実行開始が指示される(S36)。納期通知タスク66はデータベース26を参照して、納入可能日を含むメッセージ74をクライアント端末12に送信する(S38)。   FIG. 8 is a flowchart for explaining the task pre-execution process in the system of FIG. First, a service request is made from the client terminal 12 (S30). The task assignment unit 32 of the scheduler 30 assigns the purchase reservation task 62 and the delivery date notification task 66 corresponding to the service request to appropriate nodes in the system (S32). The execution of the purchase reservation task 62 is started, and the transaction manager 36 of the transaction node 16 is requested to commit data (S34). Subsequently, the desired vehicle type data copied from the purchase reservation task 62 by the data copying unit 42 is transmitted to the delivery date notification task 66, and the task advance execution instructing unit 34 instructs the start of execution of the delivery date notification task 66 (S36). ). The delivery date notification task 66 refers to the database 26 and transmits a message 74 including a delivery date to the client terminal 12 (S38).

トランザクションマネージャ36は、購入予約タスク62から依頼されたコミットの成否を、購入予約タスク62を介してスケジューラ30に伝える(S40)。コミットが成功していれば(S42のY)、購入予約タスク62を終了し、納期通知タスク66を継続する(S44)。コミットが失敗していれば(S42のN)、障害処理部46が所定の障害処理プロセスを実施する(S46)。   The transaction manager 36 notifies the scheduler 30 of the success or failure of the commit requested from the purchase reservation task 62 via the purchase reservation task 62 (S40). If the commit is successful (Y in S42), the purchase reservation task 62 is terminated and the delivery date notification task 66 is continued (S44). If the commit has failed (N in S42), the failure processing unit 46 executes a predetermined failure processing process (S46).

S46における障害処理プロセスは、障害の発生原因によって異なる。
図9は、障害処理プロセスの一例のフローチャートである。ここでは、データベースの容量不足やハードウェアの故障によって、コミットが失敗した場合を想定する。この場合、トランザクションマネージャ36は、購入予約タスク62を介してスケジューラ30に対してコミットが失敗したことを通知する(S50)。購入予約タスク62は、障害発生時に出力するために予め準備されていたエラーメッセージ76をクライアント端末12に送信する(S52)。スケジューラ30の障害処理部46は、納期通知タスク66に割り込みをかけ、強制終了させる(S54)。納期通知タスク66は、データベース26とのトランザクションを既に実施していた場合は、そのトランザクションをロールバックするようにトランザクションマネージャ36に通知する(S56)。
The failure processing process in S46 differs depending on the cause of the failure.
FIG. 9 is a flowchart of an example of a failure handling process. Here, it is assumed that the commit fails due to insufficient database capacity or hardware failure. In this case, the transaction manager 36 notifies the scheduler 30 that the commit has failed via the purchase reservation task 62 (S50). The purchase reservation task 62 transmits to the client terminal 12 an error message 76 prepared in advance for output when a failure occurs (S52). The failure processing unit 46 of the scheduler 30 interrupts the delivery date notification task 66 and forcibly terminates it (S54). If a transaction with the database 26 has already been executed, the delivery date notification task 66 notifies the transaction manager 36 to roll back the transaction (S56).

図10は、障害処理プロセスの別の例のフローチャートである。ここでは、購入予約タスク62の異常停止などのアプリケーションのエラーによって、コミットが失敗した場合を想定する。この場合、トランザクションマネージャ36からのエラー通知はなされない。したがって、スケジューラ30が購入予約タスク62の動作状況を定期的に調べることによって、コミットの失敗を検出する(S60)。障害処理部46は、購入予約タスク62から事前に受け取っていたトランザクションIDを使用して、トランザクションマネージャ36に対して、購入予約タスク62とのトランザクションをロールバックするように通知する(S62)。今回は、購入予約タスク62からエラーメッセージが出力されないので、スケジューラ30が予め準備されているエラーメッセージ76をクライアント端末12に送信する(S64)。障害処理部46は、納期通知タスク66に割り込みをかけ、強制終了させる(S66)。納期通知タスク66は、データベース26とのトランザクションを実施していた場合は、そのトランザクションをロールバックするようにトランザクションマネージャ36に通知する(S68)。   FIG. 10 is a flowchart of another example of the failure handling process. Here, it is assumed that the commit fails due to an application error such as an abnormal stop of the purchase reservation task 62. In this case, an error notification from the transaction manager 36 is not made. Therefore, the scheduler 30 periodically checks the operation status of the purchase reservation task 62 to detect a commit failure (S60). The failure processing unit 46 notifies the transaction manager 36 to roll back the transaction with the purchase reservation task 62 using the transaction ID received in advance from the purchase reservation task 62 (S62). Since no error message is output from the purchase reservation task 62 this time, the scheduler 30 transmits an error message 76 prepared in advance to the client terminal 12 (S64). The failure processing unit 46 interrupts the delivery date notification task 66 and forcibly terminates it (S66). If a transaction with the database 26 has been executed, the delivery date notification task 66 notifies the transaction manager 36 to roll back the transaction (S68).

(実施例2)
図7では、システム内のデータベースへのアクセスで完結する場合のタスクの先行実施について説明したが、システム外のデータベースにアクセスする場合にも本実施形態を適用できる。
(Example 2)
In FIG. 7, the prior implementation of the task when it is completed by accessing the database in the system has been described, but this embodiment can also be applied to accessing a database outside the system.

図11は、旅行代理店における旅行手配システムの全体的な構成図である。このシステムでは、外部に構築された別のシステムにアクセスしてタスクの処理を完了する。図11においても、図1、図3と同一の符号を付した要素は、図1、図3に関して上述したのと同様の機能を有するので、詳細な説明を省略する。また、図11においては、1つのサービス要求にのみ対応する場合を想定しているので、子ノードの割り当てを行う親ノードとスーパースケジューラ、およびサービスに関与しない他のノードを省略して示している。   FIG. 11 is an overall configuration diagram of a travel arrangement system in a travel agency. In this system, another system constructed outside is accessed to complete task processing. Also in FIG. 11, elements having the same reference numerals as those in FIGS. 1 and 3 have the same functions as those described above with reference to FIGS. In FIG. 11, since it is assumed that only one service request is supported, the parent node that assigns child nodes, the super scheduler, and other nodes that are not involved in the service are omitted. .

この例では、航空券予約システムおよび宿泊先予約システムがそれぞれ独立したサービスとしてネットワーク上で提供されており、旅行手配システムはこれらの外部のシステムにアクセスして旅行の手配処理を完結させる。   In this example, the air ticket reservation system and the accommodation reservation system are provided as independent services on the network, and the travel arrangement system accesses these external systems to complete the travel arrangement processing.

ユーザがクライアント端末12を介して旅行の手配を受け付けるサイトにアクセスすると、旅程入力画面160がクライアント端末12のディスプレイに表示される。ユーザが自身の氏名、飛行機の搭乗日時、出発地、目的地などのデータを入力して送信ボタンをクリックすると、これらのデータを含むサービス要求が子ノード20に送信される。   When the user accesses a site that accepts travel arrangements via the client terminal 12, an itinerary input screen 160 is displayed on the display of the client terminal 12. When the user inputs data such as his / her name, flight boarding date / time, departure place, destination, and the like and clicks the send button, a service request including these data is sent to the child node 20.

子ノード20のスケジューラ30は、サービス要求を受け取ると、予め対応付けのされているアプリケーションを記憶装置から読み出す。このアプリケーションは、旅程管理タスク112、航空券手配タスク114、宿泊先手配タスク116および料金請求タスク118とを含むものとする。スケジューラ30のタスク割り当て部32は、旅程管理タスク112を孫ノードAに、航空券手配タスク114を孫ノードBに、宿泊先手配タスク116を孫ノードCに、料金請求タスク118を孫ノードDに割り当てる。   When the scheduler 30 of the child node 20 receives the service request, it reads out an application associated in advance from the storage device. This application includes an itinerary management task 112, an airline ticket arranging task 114, an accommodation destination arranging task 116, and a charge billing task 118. The task assigning unit 32 of the scheduler 30 sets the itinerary management task 112 to the grandchild node A, the airline ticket arranging task 114 to the grandchild node B, the accommodation destination arranging task 116 to the grandchild node C, and the billing task 118 to the grandchild node D. assign.

まず、孫ノードAにおいて、旅程管理タスク112が実行される。旅程管理タスク112は、旅程データをデータベース内の旅程管理テーブル156に書き込む必要がある。そこで、旅程管理タスク112は、トランザクションノード16にあるトランザクションマネージャ36を呼び出し、データのコミットを依頼する。   First, in the grandchild node A, the itinerary management task 112 is executed. The itinerary management task 112 needs to write the itinerary data in the itinerary management table 156 in the database. Therefore, the itinerary management task 112 calls the transaction manager 36 in the transaction node 16 and requests data commit.

スケジューラ30のタスク先行実行指示部34は、旅程管理タスク112がトランザクションマネージャ36に対してデータのコミットを依頼したことを知ると、孫ノードB、孫ノードCに対して、コミットの完了前に、航空券手配タスク114、宿泊先手配タスク116の実行を開始するようにそれぞれ指示する。スケジューラ30のデータ複製部42は、旅程管理タスク112に保持され旅程管理テーブル156に対して書き込み中である旅程データのうち、航空券の手配に必要となる航空券データ120を複製し、航空券手配タスク114に引き渡す。また、データ複製部42は、旅程データのうち、宿泊先の手配に必要となる宿泊先データ122を複製し、宿泊先手配タスク116に引き渡す。   When the task predecessor execution instruction unit 34 of the scheduler 30 knows that the itinerary management task 112 has requested the transaction manager 36 to commit data, the grandchild node B and the grandchild node C are notified before the completion of the commit. Instructions are given to start execution of the airline ticket arrangement task 114 and the accommodation destination arrangement task 116, respectively. The data duplication unit 42 of the scheduler 30 duplicates the airline ticket data 120 necessary for airline ticket arrangement out of the itinerary data held in the itinerary management task 112 and being written to the itinerary management table 156. Deliver to arrangement task 114. Further, the data duplicating unit 42 duplicates the accommodation destination data 122 necessary for arranging the accommodation destination in the itinerary data, and delivers it to the accommodation destination arrangement task 116.

航空券手配タスク114と宿泊先手配タスク116とは、旅程管理タスク112によるコミット依頼が成功する前提で動作する。航空券手配タスク114は、ネットワークを経由してシステムの外部にある航空券予約システム140にアクセスし、座席予約テーブル142を参照して、航空券データ120に基づいて航空券の予約手続を実行する。座席予約テーブル142には、日時や出発地、目的地に応じた多数の航空便の予約状況が記録されており、航空券手配タスク114はこれらの航空便のうち条件に適合するものを予約する。   The airline ticket arranging task 114 and the accommodation destination arranging task 116 operate on the premise that the commit request by the itinerary management task 112 is successful. The air ticket arrangement task 114 accesses the air ticket reservation system 140 outside the system via the network, refers to the seat reservation table 142, and executes the air ticket reservation procedure based on the air ticket data 120. . In the seat reservation table 142, the reservation status of a large number of flights is recorded according to the date and time, the departure place, and the destination, and the flight ticket arrangement task 114 reserves those flights that meet the conditions. .

また、宿泊先手配タスク116は、ネットワークを経由してシステムの外部にある宿泊先予約システム150にアクセスし、宿泊予約テーブル152を参照して、宿泊先データ122に基づいて宿泊先の予約手続を実行する。宿泊予約テーブル152には、日時と目的地に応じた多数の宿泊施設の予約状況が記録されており、宿泊先手配タスク116は、これらの宿泊施設のうち条件に適合するものを予約する。   The accommodation arrangement task 116 accesses the accommodation reservation system 150 outside the system via the network, refers to the accommodation reservation table 152, and performs the accommodation reservation procedure based on the accommodation data 122. Execute. The accommodation reservation table 152 records the reservation status of a large number of accommodation facilities according to the date and destination, and the accommodation arrangement task 116 reserves those accommodation facilities that meet the conditions.

航空券手配タスク114と宿泊先手配タスク116においても、アクセス先の外部システムにおいてデータベースとのトランザクションが発生し、予約をする場合にはデータの更新が必要になる。そこで、航空券手配タスク114と宿泊先手配タスク116とが外部システムにアクセスしデータのコミットを依頼したとき、スケジューラ30のタスク先行実行指示部34は、孫ノードDに対して料金請求タスク118の実行を開始するように指示してもよい。このとき、データ複製部42は、航空券手配タスク114から航空券データ124を、宿泊先手配タスク116から宿泊先データ126をそれぞれ複製し、料金請求タスク118に引き渡す。このときの航空券データ124には、航空券手配タスク114が予約しようとしている航空便の情報が含まれ、宿泊先データ126には、宿泊先手配タスク116が予約しようとしている宿泊施設の情報が含まれる。   Also in the airline ticket arranging task 114 and the accommodation destination arranging task 116, a transaction with the database occurs in the external system of the access destination, and the data needs to be updated when making a reservation. Therefore, when the airline ticket arranging task 114 and the accommodation destination arranging task 116 access the external system and request data commit, the task advance execution instruction unit 34 of the scheduler 30 You may instruct to start execution. At this time, the data duplicating unit 42 duplicates the air ticket data 124 from the air ticket arranging task 114 and the accommodation data 126 from the accommodation arranging task 116, and delivers them to the charge billing task 118. At this time, the air ticket data 124 includes information on the flight to be reserved by the air ticket arranging task 114, and the accommodation data 126 includes information on the accommodation facility to be reserved by the accommodation arranging task 116. included.

料金請求タスク118は、航空券手配タスク114と宿泊先手配タスク116において予約のためのコミット依頼が成功する前提で動作する。料金請求タスク118は、ネットワークを経由して航空券予約システム140にアクセスし、航空運賃テーブル144を参照して、航空券手配タスク114が予約するであろう航空便の航空運賃を調べる。航空運賃テーブル144には、航空便毎の航空運賃が記録されている。また、料金請求タスク118は、ネットワークを経由して宿泊先予約システム150にアクセスし、宿泊料金テーブル154を参照して、宿泊先手配タスク116が予約するであろう宿泊施設の料金を調べる。宿泊料金テーブル154には、宿泊施設毎の料金が記録されている。料金請求タスク118は、こうして調べた航空運賃と宿泊料金のデータを含むメッセージ162をクライアント端末12に送信する。クライアント端末12は、メッセージ162を画面表示する。   The billing task 118 operates on the premise that the commit request for the reservation is successful in the airline ticket arranging task 114 and the accommodation destination arranging task 116. The billing task 118 accesses the air ticket reservation system 140 via the network, and refers to the air fare table 144 to check the air fare of the flight that the air ticket arranging task 114 will make a reservation. The air fare table 144 records the air fare for each air flight. The billing task 118 accesses the accommodation reservation system 150 via the network, and refers to the accommodation fee table 154 to check the fee of the accommodation facility that the accommodation arrangement task 116 will reserve. In the accommodation fee table 154, a fee for each accommodation facility is recorded. The billing task 118 transmits to the client terminal 12 a message 162 that includes the air fare and accommodation fee data thus examined. The client terminal 12 displays the message 162 on the screen.

旅程管理タスク112、航空券手配タスク114、および宿泊先手配タスク116によるコミットが成功であれば、これらのタスクは終了し、料金請求タスク118がそのまま実行される。これらのコミットのうちいずれかが失敗した場合は、スケジューラ30の障害処理部46が所定の障害処理プロセスを実行し、各タスクにより実行されたトランザクションは全てロールバックされ、またクライアント端末12に対してエラーメッセージが送信される。   If the commitment by the itinerary management task 112, the airline ticket arrangement task 114, and the accommodation destination arrangement task 116 is successful, these tasks are terminated, and the charge request task 118 is executed as it is. If any of these commits fails, the failure processing unit 46 of the scheduler 30 executes a predetermined failure processing process, and all the transactions executed by each task are rolled back, and the client terminal 12 An error message is sent.

図12は、図11のシステムにおけるタスクの先行実行処理を説明するフローチャートである。まず、クライアント端末12からサービス要求がなされる(S70)。スケジューラ30のタスク割り当て部32は、サービス要求に対応する各タスク112〜118をシステム内の適切なノードに割り当てる(S72)。旅程管理タスク112の実行が開始され、トランザクションノード16のトランザクションマネージャ36に対してデータのコミットが依頼される(S74)。これに応じて、データ複製部42により旅程管理タスク112から複製された航空券データ120が航空券手配タスク114に送信され、タスク先行実行指示部34により航空券手配タスク114の実行開始が孫ノードBに対して指示される。また、旅程管理タスク112から複製された宿泊先データ122が宿泊先手配タスク116に送信され、タスク先行実行指示部34により宿泊先手配タスク116の実行が孫ノードCに指示される(S76)。さらに、航空券手配タスク114および宿泊先手配タスク116が、それぞれ対応するテーブルに対するデータのコミットを依頼している間に、データ複製部42により航空券データ124および宿泊先データ126が複製され、料金請求タスク118に送信されてもよく、料金請求タスク118は、これらのデータをもとにユーザに請求する料金を計算してもよい(S78)。料金請求タスク118は航空運賃テーブル144、宿泊料金テーブル154を参照して、請求料金を含むタスクの処理結果を表すメッセージをクライアント端末12に送信する(S80)。   FIG. 12 is a flowchart for explaining a task pre-execution process in the system of FIG. First, a service request is made from the client terminal 12 (S70). The task allocation unit 32 of the scheduler 30 allocates each task 112 to 118 corresponding to the service request to an appropriate node in the system (S72). Execution of the itinerary management task 112 is started, and the transaction manager 36 of the transaction node 16 is requested to commit data (S74). In response to this, the air ticket data 120 duplicated from the itinerary management task 112 by the data duplicating unit 42 is transmitted to the air ticket arranging task 114, and the execution of the air ticket arranging task 114 is started by the task advance execution instructing unit 34. Directed to B. The accommodation destination data 122 copied from the itinerary management task 112 is transmitted to the accommodation destination arrangement task 116, and the task advance execution instruction unit 34 instructs the grandchild node C to execute the accommodation destination arrangement task 116 (S76). Further, while the airline ticket arranging task 114 and the accommodation destination arranging task 116 are requesting the commit of data for the corresponding tables, the air ticket data 124 and the accommodation data 126 are duplicated by the data duplicating unit 42, and the fee is charged. The charge task 118 may be transmitted to the charge task 118, and the charge task 118 may calculate a charge charged to the user based on these data (S78). The billing task 118 refers to the airfare table 144 and the accommodation table 154, and transmits a message representing the processing result of the task including the billing fee to the client terminal 12 (S80).

トランザクションマネージャ36は、旅程管理タスク112から依頼されたコミットの成否を、旅程管理タスク112を介してスケジューラ30に伝える(S82)。コミットが成功していれば(S84のY)、旅程管理タスク112を終了し、その他のタスクを継続する(S86)。コミットが失敗していれば(S84のN)、障害処理部46が所定の障害処理プロセスを実施する(S88)。   The transaction manager 36 notifies the scheduler 30 of the success or failure of the commit requested from the itinerary management task 112 via the itinerary management task 112 (S82). If the commit is successful (Y in S84), the itinerary management task 112 is terminated and other tasks are continued (S86). If the commit has failed (N in S84), the failure processing unit 46 performs a predetermined failure processing process (S88).

以上説明したように、本実施形態によれば、サービス要求から派生する、直列関係のある複数のタスクを異なるノードに割り当てる分散コンピューティングにおいて、実行中のタスクのコミットが完了する前に後続タスクの実行を先行して開始するようにした。これによって、データベースにおけるトランザクションの負荷の大小にかかわらず、現行タスクのコミットの待機時間が実質的に削減され、サービス要求に対する全体としての応答時間を短縮することができる。このように、本実施形態では、直列関係のある複数のタスクを一時的に並列して処理するような状況を作り出すことができる。   As described above, according to the present embodiment, in distributed computing in which a plurality of serially related tasks derived from a service request are assigned to different nodes, the subsequent task is not committed before the task being committed is completed. The execution was started in advance. As a result, regardless of the transaction load on the database, the waiting time for committing the current task is substantially reduced, and the overall response time to the service request can be shortened. Thus, in this embodiment, it is possible to create a situation in which a plurality of tasks having a serial relationship are temporarily processed in parallel.

以上、本発明をいくつかの実施の形態をもとに説明した。これらの実施の形態は例示であり、それらの各構成要素や各処理プロセスの組合せにいろいろな変形例がありうること、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。   The present invention has been described based on some embodiments. Those skilled in the art will understand that these embodiments are exemplifications, and that there may be various modifications to the combinations of the respective constituent elements and processing processes, and such modifications are also within the scope of the present invention. By the way.

請求項に記載の各構成要件が果たすべき機能は、本実施例において示された各機能ブロックの単体もしくはそれらの連係によって実現されることも当業者には理解されるところである。   It should also be understood by those skilled in the art that the functions to be fulfilled by the constituent elements described in the claims are realized by a single function block shown in the present embodiment or a combination thereof.

ノード間のデータ通信は、共有の記憶装置を利用して行ってもよいし、例えばDAFS(Direct Access File System)プロトコルを利用してノード間で直接通信してもよい。   Data communication between nodes may be performed using a shared storage device, or may be performed directly between nodes using, for example, a DAFS (Direct Access File System) protocol.

トランザクションマネージャが存在せず、タスク自身がデータベースとのトランザクションを直接実行してもよい。この場合、トランザクションの成否の状況は、スケジューラが定期的に監視する必要がある。   There is no transaction manager, and the task itself may directly execute a transaction with the database. In this case, the scheduler needs to periodically monitor the success or failure of the transaction.

実施形態では、トランザクションマネージャが2フェーズコミットの手法を用いてデータベースとのトランザクションを調整することを述べた。しかしながら、上述の実施形態は、データベースへの書き込みを確定させるコミットが完了するまでの間に待ち時間がある任意の手法に対して適用することができる。   In the embodiment, it has been described that the transaction manager uses a two-phase commit technique to coordinate transactions with the database. However, the above-described embodiment can be applied to any method in which there is a waiting time until the commit for finalizing writing to the database is completed.

実施形態では、スケジューラが直列タスクを子ノードの近隣の孫ノードに割り当てることを述べた。直列タスクを互いに近接するノードに配置することで処理の高速化が期待されるためであるが、本発明は、タスクを実行するノードがノード群内のいずれに位置していようと関係なく適用できる。   In the embodiment, it has been described that the scheduler assigns the serial task to the grandchild node adjacent to the child node. This is because high-speed processing is expected by arranging serial tasks at nodes adjacent to each other, but the present invention can be applied regardless of where the node executing the task is located in the node group. .

実施形態では格子型コンピュータシステムを用いて説明したが、本発明はタスクを分散配置できる任意の処理システムに適用することができる。   Although the embodiment has been described using a lattice computer system, the present invention can be applied to any processing system capable of distributing tasks.

本発明の一実施形態に係る格子型コンピュータシステムと、これに接続されるクライアント端末の全体構成図である。1 is an overall configuration diagram of a lattice type computer system according to an embodiment of the present invention and a client terminal connected thereto. FIG. ノード群を構成する各ノードの構成を示す図である。It is a figure which shows the structure of each node which comprises a node group. タスクの先行実行を可能にする子ノードのスケジューラと、トランザクションノードの構成を示す機能ブロック図である。It is a functional block diagram showing a configuration of a scheduler of a child node that enables pre-execution of a task and a transaction node. 画面表示制御部による制御を説明する図である。It is a figure explaining control by a screen display control part. トランザクションマネージャによる分散トランザクションの一般的な処理手順を示す図である。It is a figure which shows the general processing procedure of the distributed transaction by a transaction manager. 本実施形態による格子型コンピュータシステムにおけるタスクの先行実行を説明するフローチャートである。It is a flowchart explaining the prior | preceding execution of the task in the lattice type computer system by this embodiment. インターネットを介して車の購入予約をするシステムの全体的な構成図である。1 is an overall configuration diagram of a system for making a car purchase reservation via the Internet. FIG. 図7のシステムにおけるタスクの先行実行処理を説明するフローチャートである。It is a flowchart explaining the prior | preceding execution process of the task in the system of FIG. 障害処理プロセスの一例のフローチャートである。It is a flowchart of an example of a failure processing process. 障害処理プロセスの別の例のフローチャートである。It is a flowchart of another example of a failure handling process. 旅行代理店における旅行手配システムの全体的な構成図である。It is a whole block diagram of the travel arrangement system in a travel agency. 図11のシステムにおけるタスクの先行実行処理を説明するフローチャートである。FIG. 12 is a flowchart illustrating a task pre-execution process in the system of FIG. 11. FIG.

符号の説明Explanation of symbols

10 ノード群、 12 クライアント端末、 14 ネットワーク、 16 トランザクションノード、 18 親ノード、 20 子ノード、 22 スーパースケジューラ、 24 記憶装置、 30 スケジューラ、 32 タスク割り当て部、 34 タスク先行実行指示部、 36 トランザクションマネージャ、 38 データベースライタ、 40 ログライタ、 42 データ複製部、 44 画面表示制御部、 46 障害処理部、 50 孫ノードA、 52 現行タスク、 54 孫ノードB、 56 次タスク、 100 格子型コンピュータシステム。
10 node group, 12 client terminal, 14 network, 16 transaction node, 18 parent node, 20 child node, 22 super scheduler, 24 storage device, 30 scheduler, 32 task allocation unit, 34 task advance execution instruction unit, 36 transaction manager, 38 database writer, 40 log writer, 42 data replication unit, 44 screen display control unit, 46 fault processing unit, 50 grandchild node A, 52 current task, 54 grandchild node B, 56th task, 100 grid computer system.

Claims (8)

それぞれがプロセッサを備える複数のノードにおけるタスクのスケジューリングを担当するスケジュールノードと、
前記スケジュールノードにより割り当てられるタスクを実行するタスク実行ノードと、
所定のデータを格納するデータベースに対する処理を取り扱うトランザクションノードと、
を含むサーバシステムにおいて、前記スケジュールノードで実行されるスケジューラプログラムであって、
前記サーバシステムに接続されたクライアント端末から与えられるサービス要求に応じて、実行順序が定められた複数タスクを前記サーバシステム内の異なるタスク実行ノードに割り当てる割り当て機能と、
1つのタスク実行ノードと前記データベースとの間のトランザクションで発生したデータ書き込みまたはデータ書き換えを確定させるデータ永続化処理が前記トランザクションノードに依頼されたとき、該永続化処理が正常に完了したとの通知が前記トランザクションノードから前記1つのタスク実行ノードで実行中の現行のタスクに来る前に、別のタスク実行ノードにおいて後続のタスクの処理を開始させるタスク先行実行指示機能と、
前記後続のタスクの処理を実行するときに必要となるデータを、該後続のタスクが実行される別のタスク実行ノードに対して送信するデータ複製機能と、
を含むことを特徴とするスケジューラプログラム。
A schedule node responsible for scheduling tasks in a plurality of nodes each having a processor;
A task execution node for executing a task assigned by the schedule node;
A transaction node that handles processing for a database that stores predetermined data; and
A scheduler program executed by the schedule node, comprising:
An allocation function for allocating a plurality of tasks with execution orders determined to different task execution nodes in the server system in response to a service request given from a client terminal connected to the server system;
When the transaction node is requested to perform data perpetuation processing for confirming data writing or data rewriting that occurs in a transaction between one task execution node and the database , the notification that the perpetuation processing has been completed normally A task predecessor execution instruction function that starts processing of a subsequent task at another task execution node before the current task from the transaction node is being executed at the one task execution node ;
The data required for executing the processing of the subsequent tasks, and data replication to be transmitted to another task execution node the subsequent task is executed,
A scheduler program comprising:
前記後続のタスクの処理が開始されるときに、タスクの処理結果としての画面表示データの受け取り先を前記現行のタスクから前記後続のタスクに切り換え、現行のタスクの画面表示データをバッファに蓄積するとともに後続のタスクの画面表示データを前記クライアント端末に送信する画面表示制御機能をさらに含むことを特徴とする請求項1に記載のスケジューラプログラム。 When the processing of the subsequent task is started, switching the delivery point of the screen display data as a processing result of the task from the current task to the subsequent task, storing the screen display data of the current task in the buffer The scheduler program according to claim 1, further comprising a screen display control function for transmitting screen display data of a subsequent task to the client terminal. 現行のタスクのトランザクション完了前に障害が発生したとき、該現行のタスクまたは前記サービス要求毎に予め定められている障害処理プロセスを、該現行のタスクおよび前記後続のタスクが割り当てられたタスク実行ノードに実行させる障害処理機能をさらに含むことを特徴とする請求項1または2に記載のスケジューラプログラム。   When a failure occurs before the transaction of the current task is completed, a failure processing process predetermined for each of the current task or the service request is designated as a task execution node to which the current task and the subsequent task are assigned. The scheduler program according to claim 1, further comprising a failure processing function to be executed. それぞれがプロセッサを備える複数のノードと所定のデータを格納するデータベースとを含むサーバシステムであって、
請求項1ないし3のいずれかに記載のスケジューラプログラムを実行するスケジュールノードである子ノードと、
前記割り当て機能により割り当てられたタスクを実行するタスク実行ノードである孫ノードと、
前記データベースに対する処理を取り扱うトランザクションノードと、
を含むことを特徴とするサーバシステム。
A server system including a plurality of nodes each including a processor and a database storing predetermined data,
A child node that is a schedule node for executing the scheduler program according to claim 1;
A grandchild node that is a task execution node for executing a task assigned by the assignment function;
A transaction node that handles processing for the database;
A server system comprising:
前記複数のノードと接続されいずれのノードからもアクセス可能に構成され、請求項1ないし3のいずれかに記載のスケジューラプログラムを格納する記憶装置をさらに備えることを特徴とする請求項4に記載のサーバシステム。   5. The storage device according to claim 4, further comprising a storage device connected to the plurality of nodes and configured to be accessible from any node and storing the scheduler program according to claim 1. Server system. それぞれがプロセッサを備え割り当てたれたタスクを実行する複数のタスク実行ノードと、所定のデータを格納するデータベースに対する処理を取り扱うトランザクションノードと、を含むサーバシステムに配置されるスケジューラ装置であって、
前記サーバシステムに接続されたクライアント端末から与えられるサービス要求に応じて、実行順序が定められた複数タスクを前記サーバシステム内の異なるタスク実行ノードに割り当てるタスク割り当て部と、
1つのタスク実行ノードと前記データベースとの間のトランザクションで発生したデータ書き込みまたはデータ書き換えを確定させるデータ永続化処理が前記トランザクションノードに依頼されたとき、該永続化処理が正常に完了したとの通知が前記トランザクションノードから前記1つのタスク実行ノードで実行中の現行のタスクに来る前に、別のタスク実行ノードにおいて後続のタスクの処理を開始させるタスク先行実行指示部と、
前記後続のタスクの処理を実行するときに必要となるデータを、該後続のタスクが実行される別のタスク実行ノードに対して送信するデータ複製部と、
を備えることを特徴とするスケジューラ装置。
A scheduler device arranged in a server system including a plurality of task execution nodes each having a processor and executing an assigned task, and a transaction node handling a process for a database storing predetermined data,
A task assigning unit that assigns a plurality of tasks in which an execution order is determined to different task execution nodes in the server system in response to a service request given from a client terminal connected to the server system;
When the transaction node is requested to perform data perpetuation processing for confirming data writing or data rewriting that occurs in a transaction between one task execution node and the database , the notification that the perpetuation processing has been completed normally A task pre-execution instruction unit that starts processing of a subsequent task at another task execution node before the current task from the transaction node is being executed at the one task execution node ;
The data required for executing the processing of the subsequent tasks, and data replication unit to be transmitted to another task execution node the subsequent task is executed,
A scheduler device comprising:
前記後続のタスクの処理が開始されるときに、タスクの処理結果としての画面表示データの受け取り先を前記現行のタスクから前記後続のタスクに切り換え、現行のタスクの画面表示データをバッファに蓄積するとともに後続のタスクの画面表示データを前記クライアント端末に送信する画面表示制御部をさらに備えることを特徴とする請求項6に記載のスケジューラ装置。 When the processing of the subsequent task is started, switching the delivery point of the screen display data as a processing result of the task from the current task to the subsequent task, storing the screen display data of the current task in the buffer The scheduler apparatus according to claim 6, further comprising a screen display control unit that transmits screen display data of a subsequent task to the client terminal. 現行のタスクのトランザクション完了前に障害が発生したとき、該現行のタスクまたは前記サービス要求毎に予め定められている障害処理プロセスを該現行のタスクおよび前記後続のタスクが割り当てられたタスク実行ノードに実行させる障害処理部をさらに備えることを特徴とする請求項6または7に記載のスケジューラ装置。   When a failure occurs before the transaction of the current task is completed, a failure handling process predetermined for each of the current task or the service request is transferred to the task execution node to which the current task and the subsequent task are assigned. The scheduler device according to claim 6, further comprising a failure processing unit to be executed.
JP2006089542A 2006-03-28 2006-03-28 Scheduler program, server system, scheduler device Expired - Fee Related JP4571090B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006089542A JP4571090B2 (en) 2006-03-28 2006-03-28 Scheduler program, server system, scheduler device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006089542A JP4571090B2 (en) 2006-03-28 2006-03-28 Scheduler program, server system, scheduler device

Publications (2)

Publication Number Publication Date
JP2007265043A JP2007265043A (en) 2007-10-11
JP4571090B2 true JP4571090B2 (en) 2010-10-27

Family

ID=38637962

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006089542A Expired - Fee Related JP4571090B2 (en) 2006-03-28 2006-03-28 Scheduler program, server system, scheduler device

Country Status (1)

Country Link
JP (1) JP4571090B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5326308B2 (en) * 2008-03-13 2013-10-30 日本電気株式会社 Computer link method and system
US8549536B2 (en) 2009-11-30 2013-10-01 Autonomy, Inc. Performing a workflow having a set of dependancy-related predefined activities on a plurality of task servers
CN111782390B (en) * 2020-06-28 2024-03-22 武汉安辰鑫信息科技有限公司 Scheduling method of timing task and related equipment
CN112269647A (en) * 2020-10-26 2021-01-26 广州华多网络科技有限公司 Node scheduling, switching and coordinating method and corresponding device, equipment and medium thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000047887A (en) * 1998-07-30 2000-02-18 Toshiba Corp Speculative multi-thread processing method and its device
JP2001075802A (en) * 1999-09-08 2001-03-23 Fujitsu Ltd Speculative execution device and verification device
JP2001101045A (en) * 1999-09-29 2001-04-13 Toshiba Corp Method and system for processing transaction
JP2005063139A (en) * 2003-08-12 2005-03-10 Toshiba Corp Computer system and program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06332773A (en) * 1993-05-21 1994-12-02 Nec Corp Data base updating system
JPH1031606A (en) * 1996-07-17 1998-02-03 Nec Corp Method and system for updating interactive file
JP3550289B2 (en) * 1997-11-28 2004-08-04 富士通株式会社 Operation information management method in multi-cluster system, multi-cluster system and program storage medium for online operation information management

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000047887A (en) * 1998-07-30 2000-02-18 Toshiba Corp Speculative multi-thread processing method and its device
JP2001075802A (en) * 1999-09-08 2001-03-23 Fujitsu Ltd Speculative execution device and verification device
JP2001101045A (en) * 1999-09-29 2001-04-13 Toshiba Corp Method and system for processing transaction
JP2005063139A (en) * 2003-08-12 2005-03-10 Toshiba Corp Computer system and program

Also Published As

Publication number Publication date
JP2007265043A (en) 2007-10-11

Similar Documents

Publication Publication Date Title
US11425194B1 (en) Dynamically modifying a cluster of computing nodes used for distributed execution of a program
US10474547B2 (en) Managing contingency capacity of pooled resources in multiple availability zones
US8966030B1 (en) Use of temporarily available computing nodes for dynamic scaling of a cluster
KR102013005B1 (en) Managing partitions in a scalable environment
US11061884B2 (en) Method and system to accelerate transaction commit using non-volatile memory
US8418181B1 (en) Managing program execution based on data storage location
US9413604B2 (en) Instance host configuration
US8260840B1 (en) Dynamic scaling of a cluster of computing nodes used for distributed execution of a program
US8321558B1 (en) Dynamically monitoring and modifying distributed execution of programs
US20180129570A1 (en) Saving program execution state
KR102013004B1 (en) Dynamic load balancing in a scalable environment
JP6254949B2 (en) Pricing resources in virtual machine pools
US8966025B2 (en) Instance configuration on remote platforms
EP4053699A1 (en) Instance host configuration
CN113886089A (en) Task processing method, device, system, equipment and medium
CN110402435B (en) Monotonic transactions in multi-master database with loosely coupled nodes
JP4571090B2 (en) Scheduler program, server system, scheduler device
US20200389546A1 (en) State replication, allocation and failover in stream processing
AU2019371362B2 (en) Methods, devices and systems for non-disruptive upgrades to a distributed coordination engine in a distributed computing environment
Elgedawy DCaaS: Data consistency as a service for managing data uncertainty on the clouds

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080908

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091203

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091222

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100222

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100601

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100716

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100810

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100811

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130820

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees