Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5419166B2 - Checkpoint creation device, checkpoint creation system, checkpoint creation method, and checkpoint creation program - Google Patents
[go: Go Back, main page]

JP5419166B2 - Checkpoint creation device, checkpoint creation system, checkpoint creation method, and checkpoint creation program - Google Patents

Checkpoint creation device, checkpoint creation system, checkpoint creation method, and checkpoint creation program Download PDF

Info

Publication number
JP5419166B2
JP5419166B2 JP2010164607A JP2010164607A JP5419166B2 JP 5419166 B2 JP5419166 B2 JP 5419166B2 JP 2010164607 A JP2010164607 A JP 2010164607A JP 2010164607 A JP2010164607 A JP 2010164607A JP 5419166 B2 JP5419166 B2 JP 5419166B2
Authority
JP
Japan
Prior art keywords
checkpoint
service
thread
list
stop
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.)
Active
Application number
JP2010164607A
Other languages
Japanese (ja)
Other versions
JP2012027634A (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.)
University of Osaka NUC
NTT Inc
NTT Inc USA
Original Assignee
Nippon Telegraph and Telephone Corp
Osaka University NUC
NTT Inc USA
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 Nippon Telegraph and Telephone Corp, Osaka University NUC, NTT Inc USA filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2010164607A priority Critical patent/JP5419166B2/en
Publication of JP2012027634A publication Critical patent/JP2012027634A/en
Application granted granted Critical
Publication of JP5419166B2 publication Critical patent/JP5419166B2/en
Active 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 technique for creating a checkpoint in a distributed processing apparatus constituting a distributed system.

分散処理装置のクラッシュ故障に対応する従来技術として、チェックポイント法とメッセージログ法とが知られている。   A checkpoint method and a message log method are known as conventional techniques corresponding to a crash failure of a distributed processing apparatus.

チェックポイント法では、分散システムを構成する計算機のある時点における状態(以下「チェックポイント」という)を定期的にハードディスク等の安定記憶手段に保存する。そして、クラッシュ故障発生時にいくつかの計算機が過去の記録状態にロールバックして矛盾のない実行を回復する。   In the checkpoint method, the state (hereinafter referred to as “checkpoint”) of a computer constituting the distributed system at a certain point in time is periodically saved in a stable storage means such as a hard disk. Then, when a crash failure occurs, some computers roll back to a past recording state to recover consistent execution.

分散システムを構成する各計算機においてチェックポイントを作成する場合には、最新の状態へロールバックしたときに計算機間で矛盾が生じないようにするために、他の計算機とも協調してチェックポイントを作成する。このような協調チェックポイント法が、長期間のサービス提供を行う分散システムでは効果的である。なお、エージェント数が変化しないシステムのチェックポイントを作成する方法として非特許文献1が、エージェント数が変化するシステムのチェックポイントを作成する方法として非特許文献2が知られている。   When creating checkpoints on each computer that constitutes a distributed system, checkpoints are also created in cooperation with other computers to prevent inconsistencies between computers when rolling back to the latest state. To do. Such a coordinated checkpoint method is effective in a distributed system that provides a long-term service. Note that Non-Patent Document 1 is known as a method for creating a checkpoint of a system in which the number of agents does not change, and Non-Patent Document 2 is a method of creating a checkpoint in a system in which the number of agents varies.

メッセージログ法は、各計算機がサービス実行中に送受信したメッセージを各計算機のメモリ(揮発性記憶媒体)または安定記憶手段に保存し、クラッシュ故障発生時、クラッシュした計算機は、初期状態にする。クラッシュした計算機は、正常なプロセスから、そのメモリや安定記憶手段に記憶されている通信記録をもとに、他の計算機から過去にどのようなメッセージを送受信したかの情報を送信してもらい、その情報をもとに、アプリケーションを再実行して全体として矛盾の無い状態に復帰する。但し、メッセージログ法単独では、メッセージ記録が累積する問題があるため、通常は前述した協調チェックポイント法と組み合わせて利用する。なお、メッセージログ法では故障した計算機だけをロールバックすればよいが、同時に複数の計算機が故障する場合には、その回復が難しいという問題がある。   In the message log method, messages sent and received by each computer during service execution are stored in the memory (volatile storage medium) or stable storage means of each computer, and when a crash occurs, the crashed computer is set to an initial state. The crashed computer, from the normal process, based on the communication record stored in its memory and stable storage means, have other computers send information on what messages have been sent and received in the past, Based on this information, the application is re-executed to return to a consistent state as a whole. However, since the message log method alone has a problem that message records accumulate, it is usually used in combination with the cooperative checkpoint method described above. In the message log method, only the failed computer needs to be rolled back. However, when a plurality of computers fail at the same time, there is a problem that recovery is difficult.

K.M. Chandy and L. Lamport, "Distributed snapshots: Determining global states of distributed systems", ACM Transactions on Computer Systems, 1985, Volume 3, Issue 1, pp.63 - 75K.M. Chandy and L. Lamport, "Distributed snapshots: Determining global states of distributed systems", ACM Transactions on Computer Systems, 1985, Volume 3, Issue 1, pp.63-75 守屋宣, 櫟粛之著、"インターネットエージェントのための動的スナップショットアルゴリズムと部分ロールバックアルゴリズム"、電子情報通信学会論文誌、2003,Vol. J86-D-I, No.5, pp.301-317Noboru Moriya, Tomoyuki, “Dynamic Snapshot Algorithm and Partial Rollback Algorithm for Internet Agents”, IEICE Transactions, 2003, Vol. J86-D-I, No.5, pp.301-317

従来技術は1台の分散処理装置上で1つのアプリケーションやサービスエージェント等のプログラムが動作することを想定しているため、1台の分散処理装置上で1以上のサービススレッドが動作する際に、効率よくマーカ等を送受信する方法がないという問題がある。   Since the prior art assumes that a single application or a service agent program operates on one distributed processing device, when one or more service threads operate on one distributed processing device, There is a problem that there is no method for efficiently transmitting and receiving markers and the like.

上記の課題を解決するために、本発明に係るチェックポイント作成技術では、分散処理装置上で、1つ以上のサービススレッドと、1つ以上のフラグスレッドと、チェックポイントスレッドとが動作し、停止フラグは分散処理装置上で動作するサービススレッドの停止を意味するか否かを示す情報とし、実行リストは分散処理装置上で動作するサービススレッドのリストとし、停止リストは分散処理装置上で動作を停止しているサービススレッドのリストとしたとき、サービススレッドが、分散システム上で動作するアプリケーションまたは他のサービススレッドの要求に応じて処理を行い、各サービススレッドの実行履歴をリクエストログとして記憶し、チェックポイントスレッドが、分散処理装置に最初にマーカが届いたときに、または、分散処理装置がスナップショットを起動したときに、停止フラグをこのチェックポイント作成装置上で動作するサービススレッドの停止を意味するものに更新し、サービススレッドが要求に応じて処理を行う前に、または、フラグスレッドが定期的に、停止フラグを参照し、停止フラグがチェックポイント作成装置上で動作するサービススレッドの停止を意味するものであった場合に、サービススレッドの処理を停止し、実行リストと停止リストに記憶されるサービススレッドが一致すると、故障によって失われない記憶領域にリクエストログを記憶する。   In order to solve the above problems, in the checkpoint creation technique according to the present invention, one or more service threads, one or more flag threads, and a checkpoint thread operate and stop on the distributed processing device. The flag is information indicating whether or not the service thread operating on the distributed processing device is to be stopped, the execution list is a list of service threads operating on the distributed processing device, and the stop list is operating on the distributed processing device. When it is a list of stopped service threads, the service thread performs processing according to the request of the application running on the distributed system or other service threads, and stores the execution history of each service thread as a request log. When the checkpoint thread first receives a marker on the distributed processing unit, or When the distributed processing device starts the snapshot, update the stop flag to something that indicates the stop of the service thread that runs on this checkpoint creation device, and before the service thread performs processing on demand, or When the flag thread periodically refers to the stop flag, and the stop flag means stop of the service thread operating on the checkpoint creation device, the service thread processing is stopped, and the execution list and When the service threads stored in the stop list match, the request log is stored in a storage area that is not lost due to a failure.

本発明は、1台の分散処理装置上で動作する1以上のサービススレッドを一括して管理するため、効率よくマーカを送受信することができ、分散システムにおけるネットワークの通信量を減らし、送受信に係る処理(計算量)を減らすことができるという効果を奏する。   Since the present invention collectively manages one or more service threads operating on one distributed processing apparatus, markers can be efficiently transmitted / received, the network traffic in the distributed system is reduced, and transmission / reception is performed. There is an effect that processing (calculation amount) can be reduced.

分散システム10の構成例を示す図。1 is a diagram illustrating a configuration example of a distributed system 10. FIG. チェックポイント作成装置100−nのソフトウェア構成例を示す図。The figure which shows the software structural example of checkpoint production apparatus 100-n. チェックポイント作成装置100−nの機能ブロック図。The functional block diagram of checkpoint creation apparatus 100-n. リクエストログ記憶手段103aに記憶されるリクエストログのデータ例を示す図。The figure which shows the example of data of the request log memorize | stored in the request log memory | storage means 103a. 停止フラグ記憶手段103bに記憶される停止フラグのデータ例を示す図。The figure which shows the example of data of the stop flag memorize | stored in the stop flag memory | storage means 103b. マーカリスト記憶手段103cに記憶されるマーカリストのデータ例を示す図。The figure which shows the example of data of the marker list memorize | stored in the marker list memory | storage means 103c. 実行リスト記憶手段103dに記憶される実行リストのデータ例を示す図。The figure which shows the example of data of the execution list memorize | stored in the execution list memory | storage means 103d. 停止リスト記憶手段103eに記憶される停止リストのデータ例を示す図。The figure which shows the example of data of the stop list memorize | stored in the stop list memory | storage means 103e. サービススレッドの処理フローを示す図。The figure which shows the processing flow of a service thread. チェックポイントスレッドの処理フローを示す図。The figure which shows the processing flow of a checkpoint thread | sled. フラグスレッドの処理フロー例を示す図。The figure which shows the example of a processing flow of a flag thread. 分散システム10の処理フロー例を示す図。The figure which shows the example of a processing flow of the distribution system. 分散システム10の処理フロー例を示す図。The figure which shows the example of a processing flow of the distribution system. 分散処理装置100−nのハードウェア構成を例示したブロック図。The block diagram which illustrated the hardware constitutions of distributed processor 100-n.

以下、本発明の実施の形態について、詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail.

<分散システム10>
実施例1に係る分散システム10を説明する。図1に示すように分散システム10は、ネットワークでつながれたN個の分散処理装置100−n(n=1,2,…,Nである。図1ではN=3)からなる。エンドユーザは利用者端末90を用い、インターネットを介して、分散処理システム10にアクセスしサービスを要求する。分散システム10において、N個の分散処理装置100−nがネットワークを通じて互いに情報を送受信して処理を行い、エンドユーザに対しサービスを提供する。
<Distributed system 10>
A distributed system 10 according to the first embodiment will be described. As shown in FIG. 1, the distributed system 10 includes N distributed processing devices 100-n (n = 1, 2,..., N, N = 3 in FIG. 1) connected by a network. The end user uses the user terminal 90 to access the distributed processing system 10 via the Internet and request a service. In the distributed system 10, N distributed processing devices 100-n transmit and receive information to and from each other through a network, and provide services to end users.

<分散処理装置100−n>
図2及び図3を用いて分散処理装置100−nを説明する。分散システム10において一部の分散処理装置のクラッシュ故障に備えて、各分散処理装置100−nは、他の分散処理装置100−p(n≠p)と矛盾しない内容でハードディスクなどの安定記憶手段に、その状態を記録する。つまり、各分散処理装置100−nは、チェックポイントを作成しながら処理を進めていく。そのため、分散処理装置をチェックポイント作成装置とも呼ぶ。
<Distributed processing apparatus 100-n>
The distributed processing apparatus 100-n will be described with reference to FIGS. In preparation for a crash failure of some of the distributed processing devices in the distributed system 10, each distributed processing device 100-n has stable storage means such as a hard disk with contents consistent with the other distributed processing devices 100-p (n ≠ p). Record the status. That is, each distributed processing apparatus 100-n proceeds with processing while creating checkpoints. Therefore, the distributed processing device is also called a checkpoint creation device.

図2に示すように、分散システム10を構成する一つの分散処理装置100−n上にwebサービスミドルウェア21が実装される。さらに、webサービスミドルウェア21上でサービスを処理するM個のサービススレッド22−m(m=1,2,…,M)が動作している。1つの分散処理装置100−nにはQ個のデータベース23−q(q=1,2,…,Q)があり、各サービススレッドはこれらのデータベースを共有することができる。サービススレッドの詳細については後述する。   As shown in FIG. 2, the web service middleware 21 is mounted on one distributed processing device 100-n configuring the distributed system 10. Further, M service threads 22-m (m = 1, 2,..., M) that process services on the web service middleware 21 are operating. One distributed processing apparatus 100-n has Q databases 23-q (q = 1, 2,..., Q), and each service thread can share these databases. Details of the service thread will be described later.

図3に示すように、分散処理装置100−nは、入出力手段101、記憶手段103、制御手段105、M個のサービススレッド手段110−m(m=1,2,…,M)、チェックポイントスレッド130、R個のフラグスレッド手段140−r(r=1,2,…,R、但し、フラグスレッドは、実行中の各サービススレッドに高々1個付随するため、R≦Mである)を備える。   As shown in FIG. 3, the distributed processing apparatus 100-n includes an input / output unit 101, a storage unit 103, a control unit 105, M service thread units 110-m (m = 1, 2,..., M), a check. Point thread 130, R flag thread means 140-r (r = 1, 2,..., R, however, since at most one flag thread is associated with each service thread being executed, R ≦ M) Is provided.

なお、webサービスミドルウェアとは、オペレーションシステム(以下「OS」という)とwebサービスソフトの中間的な処理・動作を行うソフトウェアのことであり、webサービスソフトに共通して使用する機会の多い処理や機能を提供する。   Web service middleware refers to software that performs intermediate processing and operations between an operation system (hereinafter referred to as “OS”) and web service software. Provide functionality.

本実施例では、webサービスの構築でよく利用されるwebサービスミドルウェアに直接協調チェックポイント法を導入する手段を与える。特に、各分散処理装置で再実行可能な無矛盾チェックポイントの作成法を与える。   In the present embodiment, a means for directly introducing a coordinated checkpoint method is provided to web service middleware often used in building a web service. In particular, a method for creating a consistent checkpoint that can be re-executed by each distributed processing device is provided.

このような構成とすることで、アプリケーション開発と耐故障方式の実装作業を分離することができる。そのため、アプリケーション開発者は耐故障方式を意識することなく、その機能を利用することができ、アプリケーション開発に専念できる。その結果、アプリケーション開発が促進される。   By adopting such a configuration, it is possible to separate application development and fault-tolerant mounting work. Therefore, the application developer can use the function without being aware of the fault tolerance method, and can concentrate on application development. As a result, application development is facilitated.

また、ユーザもwebサービスに高度な耐故障機能が保証されているため、安心してサービスを利用することができ、webサービスの利用も促進される。   In addition, since the user is guaranteed a high fault-tolerant function in the web service, the user can use the service with peace of mind, and the use of the web service is promoted.

<入出力手段101>
入出力手段101は、例えば、データが入力される入力デバイス(例えばキーボード、マウス等)の出力信号や外部記憶装置より読み出される信号やネットワークから受信した信号等を入力するための入力インタフェースと、例えば、データが出力される出力デバイス(例えばディスプレイ、プリンタ等)の出力信号や外部記憶装置に書き出す信号やネットワークへ送信する信号等を出力するための出力インタフェースからなる。
<Input / output means 101>
The input / output unit 101 includes, for example, an input interface for inputting an output signal of an input device (for example, a keyboard, a mouse, etc.) to which data is input, a signal read from an external storage device, a signal received from a network, etc. , And an output interface for outputting an output signal of an output device (for example, a display or a printer) from which data is output, a signal to be written to an external storage device, a signal to be transmitted to a network, or the like.

<記憶手段103及び制御手段105>
記憶手段103は、入力デジタル信号や、処理途中の信号や各種パラメータ等が記憶する。制御手段105は、記憶手段103に対し、各処理過程で所定の信号やパラメータの読み書きを行う。但し、制御手段105は、必ずしも記憶手段103に対し各データの読み書きを行わなければならないわけではなく、各手段間で直接データを受け渡すように制御してもよい。
<Storage unit 103 and control unit 105>
The storage means 103 stores input digital signals, signals being processed, various parameters, and the like. The control means 105 reads / writes predetermined signals and parameters from / to the storage means 103 in each processing step. However, the control means 105 does not necessarily have to read / write each data with respect to the memory | storage means 103, You may control so that data may be passed directly between each means.

例えば、記憶手段103は、リクエストログ記憶手段103aと、停止フラグ記憶手段103bと、マーカリスト記憶手段103cと、実行リスト記憶手段103dと、停止リスト記憶手段103e及び安定記憶手段103fを含む。   For example, the storage unit 103 includes a request log storage unit 103a, a stop flag storage unit 103b, a marker list storage unit 103c, an execution list storage unit 103d, a stop list storage unit 103e, and a stable storage unit 103f.

なお、リクエストログは、後述するサービススレッドの状態を表現するために用いられるデータである。例えば、リクエストログは、サービス内容、実行カウンタ、実行履歴の組合せからなる(図4参照)。サービス内容とは、そのサービススレッドが呼び出されたときのサービス名と引数の対である。このとき、呼び出し元のアプリケーション名やサービススレッド名や出された順番や時間等を引数としてもよく、このようなデータとすることで、サービススレッド手段を一意に特定することができる。実行カウンタとは、現在そのサービススレッドがその生成から数えて何番目のサービススレッド動作を実行しているかを表す数であり、ロールバックにより復旧するときには、記憶した実行カウンタが示す実行の部分から処理を再開する。実行履歴とは、例えば、過去に行ったサービススレッドの動作(以下「サービススレッド動作」という)のうち、同期型リクエスト送信及びデータベースの読み出し動作の履歴データである。   The request log is data used to express the state of a service thread described later. For example, the request log includes a combination of service contents, an execution counter, and an execution history (see FIG. 4). The service content is a pair of a service name and an argument when the service thread is called. At this time, the caller application name, service thread name, output order, time, and the like may be used as arguments, and by using such data, the service thread means can be uniquely identified. The execution counter is a number indicating the number of service thread operations that the service thread is currently counting from its generation. When recovering by rollback, processing is performed from the execution part indicated by the stored execution counter. To resume. The execution history is, for example, history data of synchronous request transmission and database read operations among service thread operations performed in the past (hereinafter referred to as “service thread operations”).

停止フラグとはこのチェックポイント作成装置100−n上で動作するM個のサービススレッド手段110−1,…,110−Mの停止を意味するか否かを示す情報であり(例えば、本実施例では停止フラグが「on」であればサービススレッド手段の停止を意味し、「off」であれば停止を意味しないものとする、図5参照)、マーカリストとはチェックポイントスレッド130がマーカを送信するチェックポイント作成装置のリストであり(サービススレッド毎ではなくチェックポイント作成装置毎に登録される、図6参照)、実行リストとはこのチェックポイント作成装置100−n上で動作するサービススレッド手段110−mのリストであり(図7参照)、停止リストとはこのチェックポイント作成装置100−n上で動作を停止しているサービススレッド手段110−mのリストである(図8参照)。なお、停止フラグ、マーカリスト、実行リスト、停止リストは各チェックポイント作成装置に1つ設けられ、リクエストログはサービススレッド毎に設けられる。   The stop flag is information indicating whether or not the M service thread means 110-1,..., 110-M operating on the checkpoint creation apparatus 100-n are stopped (for example, in this embodiment). In FIG. 5, if the stop flag is “on”, it means that the service thread means is stopped, and if it is “off”, it means that the service thread means is not stopped. (Refer to FIG. 6 registered for each checkpoint creation device, not for each service thread, refer to FIG. 6). The execution list is a service thread means 110 operating on this checkpoint creation device 100-n. -M list (see FIG. 7), and the stop list is for stopping operations on the checkpoint creation apparatus 100-n. A list of service thread means 110-m that (see FIG. 8). One stop flag, marker list, execution list, and stop list are provided for each checkpoint creation device, and a request log is provided for each service thread.

安定記憶手段103fは故障によって失われない記憶領域(例えば、不揮発性メモリであるハードディスクやROM等)である。   The stable storage means 103f is a storage area (for example, a hard disk or ROM that is a nonvolatile memory) that is not lost due to a failure.

<サービススレッド手段110−m>
サービススレッドは、分散システム上で動作するアプリケーションまたは他のサービススレッド手段の要求に応じて処理を行うサービススレッド手段110−mとしてコンピュータを機能させるためのプログラムである。サービススレッド手段を単にサービススレッドとも呼ぶ。
<Service thread means 110-m>
The service thread is a program for causing a computer to function as service thread means 110-m that performs processing in response to a request from an application or other service thread means operating on the distributed system. The service thread means is also simply called a service thread.

外部から観測できるサービススレッド動作は、他の分散処理装置のwebサービスミドルウェアへのリクエストの送信、自分の動作している分散処理装置のデータベースへのアクセスである。リクエストの送信は、リクエストの応答を必要としない非同期型と、結果の応答を待つ同期型にわかれる。またデータベースへのアクセスは「書き込み」と「読み出し」がある。その他に、サービススレッドは、内部計算等の処理を行うである。   Service thread operations that can be observed from the outside are transmission of a request to the web service middleware of another distributed processing device, and access to the database of the distributed processing device that is operating. Request transmission is classified into an asynchronous type that does not require a response to a request and a synchronous type that waits for a response of a result. Database access includes “write” and “read”. In addition, the service thread performs processing such as internal calculation.

図9を用いてサービススレッドの処理フローを説明する。サービススレッドは生成されると、チェックポイントスレッドに実行リストの登録申請を行い、サービス内容からなるリクエストログ(図4参照)を生成する(s111)。次に、サービススレッドは、停止フラグ記憶手段103bを参照し(s112)、停止フラグがonの場合には、チェックポイントスレッド130に停止リストへ登録申請を行い(s113)、定期的に停止フラグを参照する(s114)。s112、s114において、停止フラグがoffの場合には、以下の処理を行う。なお、停止フラグは後述するチェックポイントスレッドによりonまたはoffに更新される。サービススレッド動作の種類が同期型リクエスト送信動作またはデータベース読み出し動作の場合には(s115)、サービススレッドは、後述するフラグスレッドを生成する(s116)。   The service thread processing flow will be described with reference to FIG. When the service thread is generated, an application for registration of an execution list is made to the checkpoint thread, and a request log (see FIG. 4) including service contents is generated (s111). Next, the service thread refers to the stop flag storage unit 103b (s112). If the stop flag is on, the service thread applies to the checkpoint thread 130 for registration to the stop list (s113), and periodically sets the stop flag. Refer to (s114). In s112 and s114, when the stop flag is off, the following processing is performed. The stop flag is updated to on or off by a checkpoint thread described later. When the service thread operation type is a synchronous request transmission operation or a database read operation (s115), the service thread generates a flag thread described later (s116).

サービススレッドは、リクエストログ記憶手段103aに記憶されているリクエストログの実行カウンタを1つ増やし、実行履歴にサービス処理の内容を登録し(s117)、サービスを提供し(s118)、処理結果に応じてリクエストログの実行履歴を更新する(s119)。   The service thread increments the execution counter of the request log stored in the request log storage unit 103a, registers the contents of the service processing in the execution history (s117), provides the service (s118), and responds to the processing result. The execution history of the request log is updated (s119).

サービススレッド動作の種類が同期型リクエスト送信動作またはデータベース読み出し動作の場合には(s120)、サービススレッドは、フラグスレッドを終了する(s121)。このサービススレッド動作でサービス要求が終了の場合には(s122)、そのサービス要求に対応するリクエストログをリクエストログ記憶手段103aから消去する。さらに、サービススレッドは、チェックポイントスレッドに実行リストからの削除申請を行う(s123)。サービス要求が終了ではない場合には(s122)、s112〜s121をサービスの終了まで繰り返す。   If the service thread operation type is a synchronous request transmission operation or a database read operation (s120), the service thread ends the flag thread (s121). When the service request is completed by this service thread operation (s122), the request log corresponding to the service request is deleted from the request log storage means 103a. Further, the service thread makes an application for deletion from the execution list to the checkpoint thread (s123). If the service request is not finished (s122), s112 to s121 are repeated until the service is finished.

(リクエストログの更新)
リクエストログの更新はサービススレッドによって以下のように行われる。他の分散処理装置からリクエストが届いたとき、そのリクエストを処理するため、新たにサービススレッドが生成される。このとき、そのサービススレッドに対応したリクエストログを生成する。例えば、サービス内容(サービス名とその呼び出し元や呼び出された順番等である引数)と実行カウンタ(例えば生成時は実行カウンタを0に設定する)を登録する。その後、そのサービススレッドがサービススレッド動作を行う毎に実行カウンタを1ずつ増加させる。また、同期型リクエスト送信、またはデータベース読み出しを行う場合は、リクエスト送信動作、データベース読み出し動作に加えて、各々応答結果、読み出し結果も実行履歴に登録する。登録は実行順に並べられる。なお、リクエスト送信動作の場合には、実行履歴として、サービス名(図4中、service1、service2と示す)、引数(図4中、v2、v3と示す)、対象チェックポイント装置名(図4中、分散処理装置100−2、100−1と示す)及び応答結果を登録する。また、データベース読み出し動作の場合には、実行履歴として、SQL文(図4中、read1,read2,read3と示す)と対象データベース名(図4中、d1,d2,d3と示す)及び読み出し結果(図4中、w1、w2、w3と示す)を登録する。なお、応答結果、読み出し結果得られるまで、実行履歴の応答結果、読み出し結果部分は未定として登録しておく。
(Update request log)
The request log is updated by the service thread as follows. When a request arrives from another distributed processing apparatus, a new service thread is generated to process the request. At this time, a request log corresponding to the service thread is generated. For example, the service content (service name, its caller, argument that is the order of call, etc.) and execution counter (for example, the execution counter is set to 0 at the time of generation) are registered. Thereafter, the execution counter is incremented by 1 each time the service thread performs a service thread operation. When synchronous request transmission or database reading is performed, in addition to the request transmission operation and the database reading operation, the response result and the reading result are also registered in the execution history. Registrations are arranged in order of execution. In the case of a request transmission operation, as an execution history, a service name (shown as service1 and service2 in FIG. 4), an argument (shown as v2 and v3 in FIG. 4), a target checkpoint device name (shown in FIG. 4). , Distributed processing apparatuses 100-2 and 100-1) and response results are registered. In the case of a database read operation, as an execution history, an SQL statement (shown as read1, read2, read3 in FIG. 4), a target database name (shown as d1, d2, d3 in FIG. 4) and a read result ( In FIG. 4, w1, w2, and w3) are registered. Until the response result and the read result are obtained, the response result and the read result portion of the execution history are registered as undecided.

<チェックポイントスレッド手段130>
チェックポイントスレッドは分散処理装置間で送受信するマーカメッセージの送受信を行い、停止フラグ及びマーカリストを更新するようにコンピュータを機能させるチェックポイントスレッド手段130としてコンピュータを機能させるためのプログラムである。なお、チェックポイントスレッドは各分散処理装置に1つ存在する。チェックポイントスレッド手段を単にチェックポイントスレッドとも呼ぶ。
<Checkpoint thread means 130>
The checkpoint thread is a program for causing the computer to function as the checkpoint thread means 130 that performs transmission / reception of marker messages transmitted / received between the distributed processing devices and causes the computer to function to update the stop flag and the marker list. One checkpoint thread exists in each distributed processing device. The checkpoint thread means is also simply called a checkpoint thread.

また、チェックポイントスレッドはサービススレッドmが送信したリクエストの送信先、サービススレッドmの生成元をマーカリストに登録し、更新する。なお、webサービスの通信においては、メッセージの通信は、サービススレッドを生成するためのリクエスト送信か、リクエストの返り値を返す送信に限られるので、上記2つを登録すればよい。マーカリストの作成方法、更新法やマーカの送信については、説明を省略する。詳しくは非特許文献2に詳述されている。但し、非特許文献2ではマーカの送受信をエージェント単位で行っているが、本発明は分散処理装置単位でマーカの送受信を行う点が異なる。   In addition, the checkpoint thread registers and updates the transmission destination of the request transmitted by the service thread m and the generation source of the service thread m in the marker list. In web service communication, message communication is limited to request transmission for generating a service thread or transmission for returning a return value of the request, so the above two may be registered. The description of the marker list creation method, update method, and marker transmission will be omitted. Details are described in Non-Patent Document 2. However, in Non-Patent Document 2, marker transmission / reception is performed in units of agents, but the present invention is different in that marker transmission / reception is performed in units of distributed processing devices.

図10を用いてチェックポイントスレッドの処理フローを説明する。チェックポイントスレッドは、サービススレッドから実行リストへの登録申請または削除申請がある場合には(s130)、実行リストへの登録または実行リストから削除を行う(s131)。チェックポイントスレッドは、他の分散処理装置から最初にマーカが届くか、または、この分散処理装置がスナップショットを起動した場合には(s132)、停止フラグをonに更新する(s133)。その後、サービススレッドまたはフラグスレッドから停止リストの登録申請がある場合には(s134)、対象のサービススレッドを停止リストに登録し(s135)、実行状態を登録している全てのサービススレッドから停止報告があったか判断し(つまり、実行リストに登録されているサービススレッドと停止リストに登録されているサービススレッドが一致するか否か判断する、s136)、全てのサービススレッドから停止報告があった場合(一致する場合)には、停止リストをリセットし、停止フラグをoffに更新する(s137)。そしてマーカをマーカリストに登録されている分散処理装置に送信する。実行リストに登録されているサービススレッドと停止リストに登録されているサービススレッドが一致しない場合には(s136)、一致するまでs134及びs135を繰り返す。   The processing flow of the checkpoint thread will be described with reference to FIG. When there is an application for registration or deletion from the service thread to the execution list (s130), the checkpoint thread performs registration or deletion from the execution list (s131). The checkpoint thread updates the stop flag to on (s133) when a marker arrives first from another distributed processing device or when this distributed processing device starts a snapshot (s132). Thereafter, when there is a stop list registration application from the service thread or flag thread (s134), the target service thread is registered in the stop list (s135), and a stop report is issued from all the service threads that register the execution status. (That is, it is determined whether or not the service thread registered in the execution list matches the service thread registered in the stop list, s136), and if there is a stop report from all the service threads ( If they match, the stop list is reset and the stop flag is updated to off (s137). Then, the marker is transmitted to the distributed processing apparatus registered in the marker list. If the service thread registered in the execution list does not match the service thread registered in the stop list (s136), s134 and s135 are repeated until they match.

<フラグスレッド手段140−r>
フラグスレッドは、停止フラグを参照するフラグスレッド手段140−rとしてコンピュータを機能させるためのプログラムである。例えば、サービススレッドのサービススレッド動作が同期型リクエスト送信動作またはデータベース読み出し動作の場合にフラグスレッドを生成する。フラグスレッド手段を単にフラグスレッドとも呼ぶ。
<Flag thread means 140-r>
The flag thread is a program for causing a computer to function as flag thread means 140-r that refers to a stop flag. For example, the flag thread is generated when the service thread operation of the service thread is a synchronous request transmission operation or a database read operation. The flag thread means is also simply called a flag thread.

図11を用いてフラグスレッドの処理フローを説明する。生成されたフラグスレッドは定期的に(例えば所定時間経過する毎に(s141))停止フラグ記憶手段103bの停止フラグを参照し(s143)、停止フラグがonの場合には(s145)、チェックポイントスレッドに、対応するサービススレッドの停止リストへの登録を申請する(s147)。   The processing flow of the flag thread will be described with reference to FIG. The generated flag thread refers to the stop flag of the stop flag storage means 103b periodically (for example, every time a predetermined time elapses (s141)) (s143), and when the stop flag is on (s145), checkpoint The thread is requested to register the corresponding service thread in the stop list (s147).

協調チェックポイント法では、分散処理装置間でマーカを送受信して、チェックポイントの開始、終了、保存すべきメッセージの決定を行う。本実施例では、このマーカに基づいて、チェックポイントが作成される。   In the coordinated checkpoint method, a marker is transmitted and received between distributed processing devices, and a checkpoint is started, ended, and a message to be stored is determined. In this embodiment, a checkpoint is created based on this marker.

なお、リクエストログの安定記憶手段103fへの記録時には、同期リクエスト送信や、データベース読み出しの応答結果が得られていない場合がある。データベース読み出しに関しては、応答があった時点で、安定記憶手段103fに追加する。同期型リクエスト送信の戻り値に関しては、送信先の分散処理装置のマーカが到達する前に戻り値が返った場合にはその値を安定記憶に追加する。戻り値よりもそのマーカが先に届いた場合には戻り値未定でそのサービススレッドのリクエストログの記録を確定する。このような処理を行うことにより分散システムについて、無矛盾なチェックポイントを作成することができる。   When the request log is recorded in the stable storage unit 103f, there may be a case where a synchronous request transmission or a database read response result is not obtained. Regarding the database reading, when there is a response, it is added to the stable storage means 103f. As for the return value of the synchronous request transmission, if the return value is returned before the destination distributed processing apparatus marker arrives, the value is added to stable storage. If the marker arrives before the return value, the return value is undecided and the request thread record of the service thread is confirmed. By performing such processing, consistent checkpoints can be created for the distributed system.

<動作例>
図12及び図13を用いて、動作例を説明する。分散処理装置100−1、分散処理装置100−2があり、分散システム10で動作するアプリケーションの要求により、分散処理装置100−1にサービス名service1、引数v1でサービススレッド1が生成されたとする(s61)。チェックポイントスレッドがサービススレッド1を実行リストに登録し、サービススレッド1がリクエストログを生成し、リクエストログ記憶手段103aにリクエストログとしてサービス内容(service1,v1)を記憶する(s62)。サービススレッド1の最初のサービススレッド動作がデータベースd1の読み出しだったとする。サービススレッド1は、実行前に停止フラグ記憶手段103bに記憶されている停止フラグを参照する。この動作例では、停止フラグの初期状態はoffとし、チェックポイントスレッドにより更新される。サービススレッド1は、停止フラグがoffなので、フラグスレッドを生成し、実行カウンタを1増やし、リクエストログの実行履歴にサービススレッド動作であるデータベース読み出し(read1,d1)を登録する(s63)。次に、データベースを読み出して、サービス処理を実行する(s64)。また、フラグスレッドは定期的に停止フラグ記憶手段103bの停止フラグを参照している。本実施例では、未だ停止フラグはoffなので、フラグスレッドは停止リストの登録申請等は行わない。サービススレッド1は、動作の結果、データベースd1の読み出しから値w1を得て、その値をリクエストログに記録してリクエストログを更新し、フラグスレッドを終了させる(s65)。次に、サービススレッド1のサービススレッド動作が、分散処理装置100−2への同期型リクエスト送信であり、サービス名service2、引数v2とする。まず、サービススレッド1は停止フラグを参照し、停止フラグがoffなので、サービススレッド1は新たにフラグスレッドを生成し、リクエストログに同期リクエスト送信(service2,v2,分散処理装置100−2)を登録する(s66)。リクエスト送信を行い、サービス処理を実行する(s67)。
<Operation example>
An example of the operation will be described with reference to FIGS. It is assumed that there are a distributed processing device 100-1 and a distributed processing device 100-2, and a service thread 1 is generated in the distributed processing device 100-1 with a service name service1 and an argument v1 in response to a request from an application operating in the distributed system 10 ( s61). The checkpoint thread registers the service thread 1 in the execution list, the service thread 1 generates a request log, and stores the service contents (service1, v1) as the request log in the request log storage unit 103a (s62). Assume that the first service thread operation of the service thread 1 is to read the database d1. The service thread 1 refers to the stop flag stored in the stop flag storage unit 103b before execution. In this operation example, the initial state of the stop flag is set to off and is updated by the checkpoint thread. Since the stop flag is off, the service thread 1 generates a flag thread, increments the execution counter by 1, and registers database read (read1, d1), which is a service thread operation, in the execution history of the request log (s63). Next, the database is read and service processing is executed (s64). The flag thread periodically refers to the stop flag in the stop flag storage unit 103b. In this embodiment, since the stop flag is still off, the flag thread does not make a stop list registration application. As a result of the operation, the service thread 1 obtains the value w1 from the reading of the database d1, records the value in the request log, updates the request log, and terminates the flag thread (s65). Next, the service thread operation of the service thread 1 is a synchronous request transmission to the distributed processing apparatus 100-2, and it is assumed that the service name is service2 and the argument is v2. First, the service thread 1 refers to the stop flag, and since the stop flag is off, the service thread 1 newly generates a flag thread and registers the synchronous request transmission (service2, v2, distributed processing device 100-2) in the request log. (S66). Request transmission is performed and service processing is executed (s67).

このリクエストを受信した分散処理装置100−2のwebサービスミドルウェアは、サービス内容(serviece2,v2)のサービススレッド2を生成する(s68)。チェックポイントスレッドはサービススレッド2を実行リストに登録し、サービススレッド2は、そのリクエストログを生成する(s69)。サービススレッド2の最初のサービススレッド動作が分散処理装置100−1に同期型リクエスト送信(service3,v3)だったとする。サービススレッド2は、停止フラグを参照する。このとき、チェックポイント処理装置100−2の停止フラグはoffだったとする。サービススレッド2は、フラグスレッドを生成し、リクエストログに(service3,v3,分散処理装置100−1)を登録する(s70)。サービススレッド2はリクエスト送信し、サービス処理を行う(s71)。   Upon receiving this request, the web service middleware of the distributed processing device 100-2 generates a service thread 2 of the service content (service2, v2) (s68). The checkpoint thread registers the service thread 2 in the execution list, and the service thread 2 generates its request log (s69). It is assumed that the first service thread operation of the service thread 2 is a synchronous request transmission (service 3, v3) to the distributed processing device 100-1. The service thread 2 refers to the stop flag. At this time, it is assumed that the stop flag of the checkpoint processing device 100-2 is off. The service thread 2 creates a flag thread and registers (service 3, v 3, distributed processing device 100-1) in the request log (s70). The service thread 2 transmits a request and performs service processing (s71).

このリクエストを受信した分散処理装置100−1のwebサービスミドルウェアは、サービス内容(serviece3,v3)のサービススレッド3を生成する(s72)。分散処理装置100−1のチェックポイントスレッドがサービススレッド3を実行リストに登録する。サービススレッド3はサービス内容を(service3,v3)としてリクエストログを生成する(s73)。サービススレッド3の最初のサービススレッド動作がデータベースd2の読み出しだったとする。サービススレッド3は、停止フラグを参照し、停止フラグがoffなので、フラグスレッドを生成し、リクエストログの実行履歴に(read2,d2)を登録する(s74)。データベースを読み出し、サービス処理を行う(s75)。その後、サービススレッド3は、戻り値w2を得て、これをリクエストログの実行履歴に記録し、リクエストログを更新し、フラグスレッドを終了させる(s76)。   Upon receiving this request, the web service middleware of the distributed processing device 100-1 generates a service thread 3 of service contents (service3, v3) (s72). The checkpoint thread of the distributed processing device 100-1 registers the service thread 3 in the execution list. The service thread 3 generates a request log with the service content as (service3, v3) (s73). Assume that the first service thread operation of the service thread 3 is to read the database d2. The service thread 3 refers to the stop flag. Since the stop flag is off, the service thread 3 generates a flag thread and registers (read2, d2) in the execution history of the request log (s74). The database is read and service processing is performed (s75). Thereafter, the service thread 3 obtains the return value w2, records it in the request log execution history, updates the request log, and terminates the flag thread (s76).

このとき、分散処理装置100−1に最初のマーカが届いたとする。チェックポイントスレッドは停止フラグをonに更新する。なお、最初のマーカは、各チェックポイント作成装置にサービススレッドの停止を開始させる役割を持つ。マーカには、スナップショットを起動したサービススレッドの識別子や起動した順番や時刻等が含まれ、同じスナップショットプログラムに起因するマーカをチェックポイントスレッドは判別することができる。最初のマーカとは同じスナップショットプログラムに起因する最初のマーカを意味する。   At this time, it is assumed that the first marker reaches the distributed processing apparatus 100-1. The checkpoint thread updates the stop flag to on. The first marker has a role of causing each checkpoint creation device to start stopping the service thread. The marker includes the identifier of the service thread that activated the snapshot, the activation order, the time, and the like, and the checkpoint thread can determine the marker that originates from the same snapshot program. The first marker means the first marker resulting from the same snapshot program.

その後、サービススレッド3が次のサービススレッド動作がデータベースd4の読み出しだったとする。サービススレッド3は、データベースd4の読み出しを実行する前に停止フラグを参照する。停止フラグはonなので、サービススレッド3は、チェックポイントスレッドに対し、サービススレッド3の停止リスト登録申請を行い、実行を停止する(s77)。   Thereafter, it is assumed that the service thread 3 is to read the database d4 for the next service thread operation. The service thread 3 refers to the stop flag before executing reading of the database d4. Since the stop flag is on, the service thread 3 makes a stoplist registration application for the service thread 3 to the checkpoint thread, and stops execution (s77).

そのうち、サービススレッド1に対応するフラグスレッドが停止フラグを参照し、停止フラグがonなので、フラグスレッドは、チェックポイントスレッドに対し、サービススレッド1の停止リスト登録申請を行い、サービススレッド1に対し実行の停止を指示する。サービススレッド1はこの停止支持を受け実行を停止する(s78)。   Among them, the flag thread corresponding to the service thread 1 refers to the stop flag, and the stop flag is on. Therefore, the flag thread applies to the checkpoint thread for registering the stop list of the service thread 1 and executes the service thread 1 Instruct to stop. The service thread 1 receives this stop support and stops execution (s78).

チェックポイントスレッドは、停止リストにサービススレッド1とサービススレッド3を登録する。これにより、実行リストと停止リストの内容が一致したので、チェックポイントスレッドはサービススレッド1及びサービススレッド3に対するリクエストログをそれぞれ安定記憶手段103fに記録するように指示する。さらに、マーカを分散処理装置100−2に送信し、停止リストをリセットし(サービススレッドの登録が全くない状態にする)、停止フラグをoffに更新する。   The checkpoint thread registers service thread 1 and service thread 3 in the stop list. As a result, since the contents of the execution list and the stop list match, the checkpoint thread instructs to record the request logs for the service thread 1 and the service thread 3 in the stable storage means 103f. Further, the marker is transmitted to the distributed processing apparatus 100-2, the stop list is reset (the service thread is not registered at all), and the stop flag is updated to off.

最初のマーカを受信した分散処理装置100−2のチェックポイントスレッドは停止フラグをonにする。その後、サービススレッド2に対応するフラグスレッドは、この停止フラグを参照し、チェックポイントスレッドに対し、サービススレッド2の停止リスト登録申請を行い、サービススレッド2に実行の停止を指示する。この指示を受け、サービススレッド2はその実行を停止する(s79)。このとき、分散処理装置100−2の実行リストと停止リストが一致するので、チェックポイントスレッドは、サービススレッド2に対するリクエストログを安定記憶手段103fに記録し、マーカを分散処理装置100−1に送信し、停止リストをリセットし、停止フラグをoffに更新する。   The checkpoint thread of the distributed processing device 100-2 that has received the first marker turns on the stop flag. Thereafter, the flag thread corresponding to the service thread 2 refers to the stop flag, makes a stoplist registration application for the service thread 2 to the checkpoint thread, and instructs the service thread 2 to stop execution. Upon receiving this instruction, the service thread 2 stops its execution (s79). At this time, since the execution list and stop list of the distributed processing device 100-2 match, the checkpoint thread records the request log for the service thread 2 in the stable storage means 103f and transmits the marker to the distributed processing device 100-1. Then, the stop list is reset and the stop flag is updated to off.

実行を再開したサービススレッド3は、フラグスレッドを生成し、リクエストログの実行履歴にデータベースd4の読み出し(read4,d4)を登録する(s80)。サービススレッド3は、データベースd4の読み出しを実行し、実行結果をリクエストログの実行履歴に記録し、リクエストログを更新する。さらにフラグスレッドを終了する(s81)。そしてサービススレッド3は、サービススレッド2に取得した戻り値w4を返す。この処理により、サービススレッド3は、サービス要求を終了したとする。サービススレッド3は、リクエストログ記憶部103fから対応するリクエストログを消去し、実行リストからサービススレッド3を削除するようにチェックポイントスレッドに申請し、消滅する(s82)。   The service thread 3 that has resumed execution generates a flag thread and registers the reading (read4, d4) of the database d4 in the request log execution history (s80). The service thread 3 reads the database d4, records the execution result in the execution history of the request log, and updates the request log. Further, the flag thread is terminated (s81). Then, the service thread 3 returns the acquired return value w4 to the service thread 2. By this process, it is assumed that the service thread 3 ends the service request. The service thread 3 deletes the corresponding request log from the request log storage unit 103f, applies to the checkpoint thread to delete the service thread 3 from the execution list, and disappears (s82).

このとき、サービススレッド2も戻り値w4を受信し、その実行を進める。   At this time, the service thread 2 also receives the return value w4 and advances its execution.

一方、分散処理装置100−1は分散処理装置100−2よりマーカを受信し、サービススレッド1は、分散処理装置100−2のサービススレッド2からの戻り値より先に分散処理装置100−2からのマーカを受信したので、リクエストログのサービススレッドからの戻り値は未定のまま、リクエストログの記録は確定する。   On the other hand, the distributed processing device 100-1 receives the marker from the distributed processing device 100-2, and the service thread 1 is sent from the distributed processing device 100-2 before the return value from the service thread 2 of the distributed processing device 100-2. As a result, the return value from the request log service thread remains undecided, and the request log record is fixed.

<効果>
本実施例の分散処理装置は、非特許文献1と同様に無矛盾なチェックポイントを作成することができ、さらに、1台の分散処理装置上で1以上のサービススレッドを一括して管理するため、効率よくマーカを送受信することができ、分散システムにおけるネットワークの通信量を減らし、送受信に係る処理(計算量)を減らすことができるという効果を奏する。
<Effect>
The distributed processing apparatus according to the present embodiment can create consistent checkpoints similarly to Non-Patent Document 1, and moreover, one or more service threads can be collectively managed on one distributed processing apparatus. The marker can be transmitted and received efficiently, and the amount of network communication in the distributed system can be reduced, and the processing (calculation amount) related to transmission and reception can be reduced.

従来、耐クラッシュ故障の実現(実装)は、運用するサービスアプリケーション毎に工夫されてきた。しかし、耐クラッシュ故障の実現には耐故障に関する専門知識が必要で、サービスアプリケーション開発者にはその実装が容易ではなかった。本実施例のような構成であれば、耐クラッシュ故障の実現をwebサービスミドルウェアにより行うことができ、アプリケーション開発と耐故障方式の実装作業を分離することができる。よって、大規模な分散システムの耐クラッシュ故障に適した協調チェックポイント法を対象に、各計算機でチェックポイントを作成することができる。   Conventionally, the realization (implementation) of crash-resistant faults has been devised for each service application to be operated. However, the realization of crash-tolerant faults requires expert knowledge about fault-tolerance, and it has not been easy for service application developers to implement. With the configuration as in the present embodiment, the crash-resistant failure can be realized by the web service middleware, and the application development and the failure-resistant mounting operation can be separated. Therefore, it is possible to create checkpoints in each computer for the coordinated checkpoint method suitable for crash-resistant failures in large-scale distributed systems.

[変形例]
サービススレッドの実行リスト及び停止リストへの登録は、チェックポイントスレッドが行うのではなく、サービススレッドまたはフラグスレッドが行ってもよい。また、サービススレッドの実行リストからの削除は、チェックポイントスレッドが行うのではなく、サービススレッド自身が終了前に行ってもよい。
[Modification]
Registration of the service thread in the execution list and stop list may be performed not by the checkpoint thread but by the service thread or flag thread. Also, the deletion of the service thread from the execution list may be performed by the service thread itself before termination, not by the checkpoint thread.

<ハードウェア構成>
図14は、本実施例における分散処理装置100−nのハードウェア構成を例示したブロック図である。図14に例示するように、この例の分散処理装置100−nは、それぞれCPU(Central Processing Unit)11、入力部12、出力部13、補助記憶装置14、ROM(Read Only Memory)15、RAM(Random Access Memory)16及びバス17を有している。
<Hardware configuration>
FIG. 14 is a block diagram illustrating a hardware configuration of the distributed processing device 100-n according to the present embodiment. As illustrated in FIG. 14, the distributed processing device 100-n in this example includes a CPU (Central Processing Unit) 11, an input unit 12, an output unit 13, an auxiliary storage device 14, a ROM (Read Only Memory) 15, and a RAM. (Random Access Memory) 16 and a bus 17 are provided.

この例のCPU11は、制御部11a、演算部11b及びレジスタ11cを有し、レジスタ11cに読み込まれた各種プログラムに従って様々な演算処理を実行する。また、入力部12は、データが入力される入力インタフェース、キーボード、マウス等であり、出力部13は、データが出力される出力インタフェース、ディスプレイ、プリンタ等である。補助記憶装置14は、例えば、ハードディスク、半導体メモリ等であり、分散処理装置100−nとしてコンピュータを機能させるためのプログラムや各種データが格納される。また、RAM16には、上記のプログラムや各種データが展開され、CPU11等から利用される。また、バス17は、CPU11、入力部12、出力部13、補助記憶装置14、ROM15及びRAM16を通信可能に接続する。なお、このようなハードウェアの具体例としては、例えば、パーソナルコンピュータの他、サーバ装置やワークステーション等を例示できる。   The CPU 11 in this example includes a control unit 11a, a calculation unit 11b, and a register 11c, and executes various calculation processes according to various programs read into the register 11c. The input unit 12 is an input interface for inputting data, a keyboard, a mouse, and the like. The output unit 13 is an output interface for outputting data, a display, a printer, and the like. The auxiliary storage device 14 is, for example, a hard disk, a semiconductor memory, or the like, and stores programs and various data for causing the computer to function as the distributed processing device 100-n. Further, the above program and various data are expanded in the RAM 16 and used by the CPU 11 or the like. The bus 17 connects the CPU 11, the input unit 12, the output unit 13, the auxiliary storage device 14, the ROM 15, and the RAM 16 so that they can communicate with each other. In addition, as a specific example of such hardware, a server apparatus, a workstation, etc. other than a personal computer can be illustrated, for example.

<プログラム構成>
上述のように、補助記憶装置14には、本実施例の分散処理装置100−nの各処理を実行するための各プログラムが格納される。チェックポイント作成プログラムを構成する各プログラムは、単一のプログラム列として記載されていてもよく、また、少なくとも一部のプログラムが別個のモジュールとしてライブラリに格納されていてもよい。
<Program structure>
As described above, each program for executing each process of the distributed processing device 100-n of the present embodiment is stored in the auxiliary storage device 14. Each program constituting the checkpoint creation program may be described as a single program sequence, or at least a part of the program may be stored in the library as a separate module.

<ハードウェアとプログラムとの協働>
CPU11は、読み込まれたOSプログラムに従い、補助記憶装置14に格納されている上述のプログラムや各種データをRAM16に展開する。そして、このプログラムやデータが書き込まれたRAM16上のアドレスがCPU11のレジスタ11cに格納される。CPU11の制御部11aは、レジスタ11cに格納されたこれらのアドレスを順次読み出し、読み出したアドレスが示すRAM16上の領域からプログラムやデータを読み出し、そのプログラムが示す演算を演算部11bに順次実行させ、その演算結果をレジスタ11cに格納していく。
<Cooperation between hardware and program>
The CPU 11 expands the above-described program and various data stored in the auxiliary storage device 14 in the RAM 16 according to the read OS program. The address on the RAM 16 where the program and data are written is stored in the register 11c of the CPU 11. The control unit 11a of the CPU 11 sequentially reads these addresses stored in the register 11c, reads a program and data from the area on the RAM 16 indicated by the read address, causes the calculation unit 11b to sequentially execute the operation indicated by the program, The calculation result is stored in the register 11c.

図3は、このようにCPU11に上述のプログラムが読み込まれて実行されることにより構成される分散処理装置100−nの機能構成を例示したブロック図である。   FIG. 3 is a block diagram illustrating a functional configuration of the distributed processing device 100-n configured by reading and executing the above-described program in the CPU 11 in this manner.

ここで、記憶部103は、補助記憶装置14、RAM16、レジスタ11c、その他のバッファメモリやキャッシュメモリ等の何れか、あるいはこれらを併用した記憶領域に相当する。また、サービススレッド手段110−m、チェックポイントスレッド手段130
及びフラグスレッド140−rは、CPU11にチェックポイント作成プログラムを実行させることにより構成されるものである。
Here, the storage unit 103 corresponds to any one of the auxiliary storage device 14, the RAM 16, the register 11 c, other buffer memory and cache memory, or a storage area using these in combination. Also, service thread means 110-m, checkpoint thread means 130
The flag thread 140-r is configured by causing the CPU 11 to execute a checkpoint creation program.

本発明で作成したチェックポイントを用いてロールバックに利用することができる。   The checkpoint created in the present invention can be used for rollback.

10 分散システム
100−n チェックポイント作成装置
103 記憶手段
110−m サービススレッド手段
130 チェックポイントスレッド手段
140−r フラグスレッド手段
DESCRIPTION OF SYMBOLS 10 Distributed system 100-n Checkpoint creation apparatus 103 Storage means 110-m Service thread means 130 Checkpoint thread means 140-r Flag thread means

Claims (4)

分散システムを構成し、チェックポイントを作成しながら処理を進めていくチェックポイント作成装置であって、
前記分散システム上で動作するアプリケーションまたは他のサービススレッド手段の要求に応じて処理を行う1以上のサービススレッド手段と、
このチェックポイント作成装置上で動作するサービススレッド手段の停止を意味するか否かを示す停止フラグと、このチェックポイント作成装置上で動作するサービススレッド手段のリストである実行リストと、このチェックポイント作成装置上で動作を停止している前記サービススレッド手段のリストである停止リストと、各前記サービススレッド手段の実行履歴からなるリクエストログと、を記憶する記憶手段と、
故障によって失われない記憶領域である安定記憶手段と、
前記停止フラグを更新するチェックポイントスレッド手段と、
前記停止フラグを参照するフラグスレッド手段と、を備え、
前記チェックポイントスレッド手段は、このチェックポイント作成装置に最初にマーカが届いたときに、または、このチェックポイント作成装置がスナップショットを起動したときに、停止フラグをこのチェックポイント作成装置上で動作するサービススレッド手段の停止を意味する停止フラグにし、前記実行リストと前記停止リストとに記憶されるサービススレッド手段が一致すると、前記安定記憶手段に前記リクエストログを記憶する、
ことを特徴とするチェックポイント作成装置。
A checkpoint creation device that configures a distributed system and proceeds with processing while creating checkpoints,
One or more service thread means for performing processing in response to a request of an application or other service thread means operating on the distributed system;
A stop flag indicating whether or not the service thread means operating on the checkpoint creation device is to be stopped, an execution list which is a list of service thread means operating on the checkpoint creation device, and the checkpoint creation Storage means for storing a stop list that is a list of the service thread means that has stopped operating on the device, and a request log that includes an execution history of each service thread means;
Stable storage means that is a storage area that is not lost by failure;
Checkpoint thread means for updating the stop flag;
Flag thread means for referring to the stop flag,
The checkpoint thread means operates a stop flag on the checkpoint creation device when a marker reaches the checkpoint creation device for the first time or when the checkpoint creation device starts a snapshot. When the service thread means stored in the execution list and the stop list coincides with the stop flag that means stop of the service thread means, the request log is stored in the stable storage means.
A checkpoint creation device characterized by that.
チェックポイントを作成しながら処理を進めていく1以上のチェックポイント作成装置からなるチェックポイント作成システムであって、
このチェックポイント作成システムを構成する各前記チェックポイント作成装置は、
このチェックポイント作成システム上で動作するアプリケーションまたは他のサービススレッド手段の要求に応じて処理を行う1以上のサービススレッド手段と、
このチェックポイント作成装置上で動作するサービススレッド手段の停止を意味するか否かを示す停止フラグと、チェックポイント作成システムを構成するチェックポイント作成装置間で送受信されるマーカメッセージの送信先のリストであるマーカリストと、このチェックポイント作成装置上で動作するサービススレッド手段のリストである実行リストと、このチェックポイント作成装置上で動作を停止している前記サービススレッド手段のリストである停止リストと、各前記サービススレッド手段の実行履歴からなるリクエストログと、を記憶する記憶手段と、
故障によって失われない記憶領域である安定記憶手段と、
前記マーカメッセージの送受信を行い、前記停止フラグと前記マーカリストを更新するチェックポイントスレッド手段と、
前記停止フラグを参照するフラグスレッド手段と、を備え、
各前記チェックポイント作成装置のチェックポイントスレッド手段は、他のチェックポイント作成装置から最初にマーカが届いたときに、または、このチェックポイント作成装置がスナップショットを起動したときに、停止フラグをこのチェックポイント作成装置上で動作するサービススレッド手段の停止を意味する停止フラグにし、前記実行リストと前記停止リストとに記憶されるサービススレッド手段が一致すると、前記安定記憶手段に前記リクエストログを記憶し、前記停止フラグをこのチェックポイント作成装置上で動作するサービススレッド手段の停止を意味しない停止フラグにし、前記停止リストをリセットし、他のチェックポイントスレッド手段にマーカメッセージの送信する、
ことを特徴とするチェックポイント作成システム。
A checkpoint creation system comprising one or more checkpoint creation devices that process while creating a checkpoint,
Each of the checkpoint creation devices constituting this checkpoint creation system is:
One or more service thread means for performing processing in response to a request of an application or other service thread means operating on the checkpoint generation system;
A stop flag indicating whether or not the service thread means operating on this checkpoint creation device is stopped, and a list of transmission destinations of marker messages transmitted and received between checkpoint creation devices constituting the checkpoint creation system A marker list, an execution list that is a list of service thread means operating on the checkpoint creation device, and a stop list that is a list of service thread means that has stopped operating on the checkpoint creation device; A storage unit for storing a request log including an execution history of each service thread unit;
Stable storage means that is a storage area that is not lost by failure;
Checkpoint thread means for transmitting and receiving the marker message and updating the stop flag and the marker list;
Flag thread means for referring to the stop flag,
The checkpoint thread means of each checkpoint creation device checks the stop flag when a marker arrives for the first time from another checkpoint creation device or when this checkpoint creation device starts a snapshot. When the service thread means stored in the execution list and the stop list coincides with the stop flag that means stop of the service thread means operating on the point creation device, the request log is stored in the stable storage means, The stop flag is set to a stop flag that does not mean stop of service thread means operating on the checkpoint creation device, the stop list is reset, and a marker message is transmitted to other checkpoint thread means.
A checkpoint creation system characterized by that.
分散システムを構成する分散処理装置のチェックポイント作成方法であって、
前記分散処理装置上で、1つ以上のサービススレッドと、1つ以上のフラグスレッドと、チェックポイントスレッドとが動作し、停止フラグは分散処理装置上で動作するサービススレッドの停止を意味するか否かを示す情報とし、実行リストは分散処理装置上で動作するサービススレッドのリストとし、停止リストは分散処理装置上で動作を停止している前記サービススレッドのリストとし、
前記サービススレッドが、前記分散システム上で動作するアプリケーションまたは他のサービススレッドの要求に応じて処理を行うサービススレッドステップと、
各前記サービススレッドの実行履歴をリクエストログとして記憶するリクエストログ記憶ステップと、
前記チェックポイントスレッドが、前記分散処理装置に最初にマーカが届いたときに、または、前記分散処理装置がスナップショットを起動したときに、前記停止フラグをこのチェックポイント作成装置上で動作するサービススレッドの停止を意味するものに更新するステップと、
前記サービススレッドが要求に応じて処理を行う前に、または、前記フラグスレッドが定期的に、停止フラグを参照し、停止フラグがチェックポイント作成装置上で動作するサービススレッドの停止を意味するものであった場合に、サービススレッドの処理を停止するステップと、
前記実行リストと前記停止リストに記憶されるサービススレッドが一致すると、故障によって失われない記憶領域に前記リクエストログを記憶する安定記憶ステップと、を備える、
ことを特徴とするチェックポイント作成方法。
A checkpoint creation method for a distributed processing device constituting a distributed system,
One or more service threads, one or more flag threads, and a checkpoint thread operate on the distributed processing device, and whether or not the stop flag means stop of a service thread that operates on the distributed processing device The execution list is a list of service threads operating on the distributed processing device, the stop list is a list of service threads that have stopped operating on the distributed processing device,
A service thread step in which the service thread performs processing in response to a request of an application or other service thread operating on the distributed system;
A request log storage step for storing an execution history of each service thread as a request log;
A service thread that operates the stop flag on the checkpoint creation device when the checkpoint thread first reaches the distributed processing device or when the distributed processing device starts a snapshot. Updating to something that means stopping,
Before the service thread performs processing on demand, or the flag thread refers to the stop flag periodically, and the stop flag means stop of the service thread that operates on the checkpoint creation device. If there is a step to stop processing of the service thread;
A stable storage step of storing the request log in a storage area that is not lost due to a failure when the service threads stored in the execution list and the stop list match.
A checkpoint creation method characterized by this.
請求項1記載のチェックポイント作成装置として、コンピュータを機能させるためのプログラム。   A program for causing a computer to function as the checkpoint creation apparatus according to claim 1.
JP2010164607A 2010-07-22 2010-07-22 Checkpoint creation device, checkpoint creation system, checkpoint creation method, and checkpoint creation program Active JP5419166B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010164607A JP5419166B2 (en) 2010-07-22 2010-07-22 Checkpoint creation device, checkpoint creation system, checkpoint creation method, and checkpoint creation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010164607A JP5419166B2 (en) 2010-07-22 2010-07-22 Checkpoint creation device, checkpoint creation system, checkpoint creation method, and checkpoint creation program

Publications (2)

Publication Number Publication Date
JP2012027634A JP2012027634A (en) 2012-02-09
JP5419166B2 true JP5419166B2 (en) 2014-02-19

Family

ID=45780503

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010164607A Active JP5419166B2 (en) 2010-07-22 2010-07-22 Checkpoint creation device, checkpoint creation system, checkpoint creation method, and checkpoint creation program

Country Status (1)

Country Link
JP (1) JP5419166B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6318031B2 (en) * 2014-07-08 2018-04-25 株式会社野村総合研究所 Batch server maintenance method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3154942B2 (en) * 1995-09-11 2001-04-09 株式会社東芝 Distributed checkpoint generation method and computer system to which the method is applied
JP2003150568A (en) * 2001-11-08 2003-05-23 Nippon Telegr & Teleph Corp <Ntt> Network system backup method, backup program, and recording medium recording the program
JP4773715B2 (en) * 2004-12-01 2011-09-14 富士通株式会社 How to get checkpoint

Also Published As

Publication number Publication date
JP2012027634A (en) 2012-02-09

Similar Documents

Publication Publication Date Title
US9471444B2 (en) Management of a distributed computing system through replication of write ahead logs
JP5191062B2 (en) Storage control system, operation method related to storage control system, data carrier, and computer program
CN104427002B (en) Group system and the method for providing service availability in group system
US20180150501A1 (en) Database system, server device, computer program product, and information processing method
US12086037B2 (en) Scalable low-loss disaster recovery for data stores
CN111090699A (en) Method and device for synchronizing service data, storage medium, and electronic device
US8707085B2 (en) High availability data storage systems and methods
US20170315886A1 (en) Locality based quorum eligibility
KR20150035507A (en) Data sending method, data receiving method, and storage device
JP4560074B2 (en) Virtual computer system and virtual computer restoration method in the same system
US10146648B1 (en) Preserving disaster recovery protection for a data storage object
US20200349036A1 (en) Self-contained disaster detection for replicated multi-controller systems
CN115878269A (en) Cluster migration method, related device and storage medium
CN112333283B (en) Autonomous high-end storage array system architecture
Gog et al. Falkirk wheel: Rollback recovery for dataflow systems
US9367413B2 (en) Detecting data loss during site switchover
CN107168774A (en) It is a kind of based on the virtual machine migration method being locally stored and system
JP5419166B2 (en) Checkpoint creation device, checkpoint creation system, checkpoint creation method, and checkpoint creation program
JP2007207250A (en) Software duplication
CN101459690B (en) Error tolerance method in wireless public object request proxy construction application
JP4461777B2 (en) Transaction processing system and method, and program
CN110502460A (en) The method and node of data processing
JP3467750B2 (en) Distributed object processing system
CN115202803A (en) Fault processing method and device
CN113312209A (en) Data hot standby method, device, server and storage medium

Legal Events

Date Code Title Description
RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20111121

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20111121

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121220

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20121220

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131028

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: 20131105

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131114

R150 Certificate of patent or registration of utility model

Ref document number: 5419166

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

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

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250