JP5428050B2 - Computer system and module execution method - Google Patents
Computer system and module execution method Download PDFInfo
- Publication number
- JP5428050B2 JP5428050B2 JP2010081827A JP2010081827A JP5428050B2 JP 5428050 B2 JP5428050 B2 JP 5428050B2 JP 2010081827 A JP2010081827 A JP 2010081827A JP 2010081827 A JP2010081827 A JP 2010081827A JP 5428050 B2 JP5428050 B2 JP 5428050B2
- Authority
- JP
- Japan
- Prior art keywords
- module
- data
- storage area
- execution
- executed
- 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
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Description
本発明は、計算機システムに関し、特に、モジュールの実行を管理する計算機システムに関する。 The present invention relates to a computer system, and more particularly to a computer system that manages the execution of modules.
鉄道運行管理システムのような情報制御システムは、システムが一度構築されると、10〜15年間程度、システムに含まれる既存のソースコードには手を加えられず、主に継ぎ足しによる部分的な改造又は改修がされる。このような改造又は改修が長年続くと、ソースコードが複雑化して読みにくいものとなる。また、有識者の異動又は退職によって、全体を俯瞰できる人材が少なくなる。その結果、システムがブラックボックス化してしまい、障害発生時の対策に多大な工数を要することになる。 An information control system such as a railway operation management system, once the system is built, is not modified for about 10 to 15 years, and the existing source code included in the system is mainly modified. Or refurbishment. If such modification or modification continues for many years, the source code becomes complicated and difficult to read. In addition, due to the transfer or retirement of experts, the number of human resources who can take a bird's-eye view is reduced. As a result, the system becomes a black box, and a lot of man-hours are required for countermeasures when a failure occurs.
そこで、システム内のブラックボックス化されたソースコードを、見通しの良いソースコード、すなわち、ユーザが理解しやすいソースコードへ移行することによって、これらの課題を解決することが求められている。特に、鉄道運行管理システムのような社会インフラシステムは、現行信頼性(すなわち、現行のシステムに備わる信頼性)の担保が強く求められるため、ソースコードをゼロから作り直すのではなく、すでにあるソースコードを元にホワイトボックス化して段階的に作り直す方法が取られる。 Therefore, it is required to solve these problems by shifting the black boxed source code in the system to a source code with good visibility, that is, a source code that is easy for the user to understand. In particular, social infrastructure systems such as railway operation management systems are strongly required to secure the current reliability (that is, the reliability of the current system), so the source code does not have to be recreated from scratch. Based on the above, a method of making a white box and recreating it step by step is taken.
鉄道運行管理システムは、複数のモジュールを組み合わせて構築されるため、開発者はモジュールごとにホワイトボックス化し、モジュールを作り直す。そのため、モジュールの入出力及び機能が同じである複数のバージョンのモジュールが存在することになる。 Since the railway operation management system is constructed by combining multiple modules, the developer creates a white box for each module and recreates the module. Therefore, there are a plurality of versions of modules having the same input / output and function of the module.
これらのバージョンの異なる複数のモジュールのうち一つは、現行信頼性を有しているが、ブラックボックス化された旧バージョンのモジュール(以降、旧モジュールと記載)である。他の一つは、ホワイトボックス化されて見通しの良い構造となった新バージョンのモジュール(以降、新モジュールと記載)である。 One of these different versions of the module is an old version module (hereinafter referred to as an old module) that has the current reliability but is black boxed. The other is a new version of the module (hereinafter referred to as “new module”) that has been white boxed and has a good structure.
この新モジュールは、旧モジュールのソースコードを受け継いでいるとはいえ、見通しの良い構造になるようにソースコードの構成を変更しているため、現行信頼性を保持しているか不安な面がある。万が一新モジュールにおいて障害が発生した場合、鉄道運行管理システムのような社会インフラシステムでは大きな問題となってしまう。また、鉄道運行管理システムは止めることができないため、すぐに復旧できるような仕組みが必要である。 Although this new module has inherited the source code of the old module, the source code configuration has been changed so that it has a good-looking structure. . In the unlikely event that a failure occurs in a new module, it becomes a big problem in a social infrastructure system such as a railway operation management system. Also, since the railway operation management system cannot be stopped, a mechanism that can be restored immediately is necessary.
このような中で、障害発生時に障害が発生したモジュールと置き換え可能なモジュールを検索し、障害発生モジュールと検索結果のモジュールとを置き換えることによって、システムとしての動作を継続させる技術が提案されている(例えば、特許文献1参照)。 Under such circumstances, a technique has been proposed in which a module that can be replaced with a failed module is searched for when a failure occurs, and the operation as a system is continued by replacing the failed module and the module of the search result. (For example, refer to Patent Document 1).
特許文献1に提案された技術は、障害が発生したモジュールを他の可換なモジュールと置き換えてしまう。このため、障害が発生したモジュールがどのような入力に対してどのように結果を出力するのか、どこに相違があるのかなどの、障害の原因を特定するための情報を取得することができず、改修が困難になる。また、改修箇所を特定するために、様々な入力データを用意して動作テストを行うこととなり、作業コストが膨大なものとなる。
The technique proposed in
本発明は、システムの動作を継続させながら、新モジュールの実行結果のどこに相違があるかを抽出し、モジュールに含まれるソースコードを修正するためのデータを取得することを目的とする。 An object of the present invention is to extract where there is a difference in the execution result of a new module while continuing the operation of the system, and to acquire data for correcting a source code included in the module.
本発明の代表的な一形態によると、メモリを備え、計算機で実行可能なプログラムである複数のモジュールを実行する計算機を備える計算機システムであって、前記モジュールは、第1の前記モジュールと、前記第1のモジュールの改版後の新しい世代の第2の前記モジュールとを含む、複数の世代の前記モジュールを含み、前記メモリは、第1の記憶領域と第2の記憶領域とを含み前記計算機システムは、前記第1の記憶領域と前記第2の記憶領域とに同じデータを格納し、前記第1の記憶領域に格納されるデータを用いて、前記第1のモジュールを実行し、その後、前記第2の記憶領域に格納されるデータを用いて、前記第2のモジュールを実行し、前記第1のモジュールの実行結果と、前記第2のモジュールの実行結果とを比較し、前記第2の記憶領域に複製されるデータを示す情報を保持し、前記保持される情報に従って、前記第1の記憶領域に格納されるデータのうち、値が変更されるデータを、前記第2の記憶領域に複製することによって、前記第1の記憶領域と前記第2の記憶領域とに同じデータを格納し、前記第2のモジュールは、その実行のために用いられるデータのうち、前記第2の記憶領域に格納されているデータについては、当該第2の記憶領域に格納されたデータを用いて実行され、前記第2の記憶領域に格納されず、値が変更されないデータについては、前記第1の記憶領域に格納されたデータを用いて実行される。 According to a representative aspect of the present invention, there is provided a computer system including a computer that includes a memory and includes a computer that executes a plurality of modules that are programs executable by the computer, the module including the first module, The computer system includes a plurality of generations of the modules including a second generation of the second module after the revision of the first module, and the memory includes a first storage area and a second storage area Stores the same data in the first storage area and the second storage area, executes the first module using the data stored in the first storage area, and then using the data stored in the second storage area, and executes the second module, compares the execution result of the first module, and an execution result of said second module, before Information indicating data to be copied to the second storage area is held, and data whose value is changed among the data stored in the first storage area according to the held information is changed to the second storage area. By replicating to the storage area, the same data is stored in the first storage area and the second storage area, and the second module uses the second data among the data used for execution thereof. The data stored in the storage area is executed using the data stored in the second storage area, and the data stored in the second storage area is not stored in the second storage area. It is executed using data stored in one storage area.
本発明の一実施形態によると、障害が発生したモジュールのうち、どこに相違があるのかを取得することができる。 According to an exemplary embodiment of the present invention, it is possible to obtain a difference between modules in which a failure has occurred.
以下、本発明の実施形態を、図1〜図11を参照して詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to FIGS.
図1は、本発明の実施形態のモジュール実行管理装置10のシステム構成を示すブロック図である。
FIG. 1 is a block diagram illustrating a system configuration of a module
なお、本実施形態のシステムには例として鉄道運行管理システムを用いるが、鉄道運行管理システムに限らず、プログラムによって動作するシステムであれば、本発明はいずれのシステムにおいても適用可能である。以下に記載されるシステムは、鉄道運行管理システムなどの社会インフラシステムとする。 In addition, although a railway operation management system is used as an example in the system of the present embodiment, the present invention is not limited to the railway operation management system, and the present invention can be applied to any system as long as the system operates by a program. The system described below is a social infrastructure system such as a railway operation management system.
モジュール実行管理装置10は、記憶部11、CPU12、メモリ13、入力部14、出力部15、及び、通信部16を備える。記憶部11は、データ及びプログラムを格納するハードディスクである。CPU12は、演算をすることによって、プログラムを実行するためのプロセッサである。メモリ13は、プログラム及び演算に関係する一時的な情報を記憶する。
The module
入力部14は、ユーザによって、モジュール実行管理装置10にデータを入力するためのキーボード又はマウスなどの装置である。出力部15は、ユーザに実行結果等を表示するためのディスプレイなどの装置である。通信部16は、Ethernet(登録商標、以下同じ)又は、インターネットなどに接続するためのインターフェースである。
The
記憶部11は、モジュール定義情報21、データ定義情報22、比較結果情報23、モジュール管理情報31、データ管理情報32、及び、時刻補正情報33などのデータを保持する。また、記憶部11は、モジュール実行手段41、モード変更手段42、比較結果表示手段43、及び、モジュール50群などのプログラムを保持する。モジュール実行管理装置10は、プログラムを記憶部11からメモリ13にロードし、CPU12を用いて演算することによって、各種プログラムを実行する。
The
なお、本実施形態のシステムは、複数のモジュール50を組み合わせることによって構築されており、モジュール50が順番にロードされることによって動作する。システムが動作する際、モジュール50間のデータは、メモリ13に含まれる共有メモリを介してやり取りされる。具体的には、モジュール50への入力は、共有メモリに含まれるデータをモジュール50が読み込むことであり、モジュール50からの出力は、共有メモリに出力することである。
Note that the system of the present embodiment is constructed by combining a plurality of
さらに、モジュール50には、アドレス解決手段501、時刻補正手段502、及び、ログ出力手段などの、モジュール50を実行するためのモジュール50が含まれる。
Further, the
本実施形態におけるメモリ13は、共有メモリ(正)131、共有メモリ(副)132、及び、共有メモリ(保存用)133を保持する。共有メモリ(正)131、共有メモリ(副)132、及び、共有メモリ(保存用)133は、モジュール50への入力値を格納する領域であり、モジュール50による演算結果をモジュール50によって出力される領域である。なお、共有メモリ(正)131、共有メモリ(副)132、及び、共有メモリ(保存用)133は、各々が別のメモリ領域に実装されてもよいし、論理的にデータを分割されることによって実装されてもよい。
The memory 13 in this embodiment holds a shared memory (primary) 131, a shared memory (secondary) 132, and a shared memory (for saving) 133. The shared memory (primary) 131, the shared memory (secondary) 132, and the shared memory (for saving) 133 are areas for storing input values to the
本実施形態において、システムの入出力となり、他のシステムへの入力となるデータは、共有メモリ(正)131に格納されるデータだけであり、共有メモリ(副)132及び共有メモリ(保存用)133に格納されるデータは、共有メモリ(正)131のコピーである。 In the present embodiment, the data that is input / output of the system and that is input to another system is only the data stored in the shared memory (primary) 131, and the shared memory (secondary) 132 and the shared memory (for storage) The data stored in 133 is a copy of the shared memory (primary) 131.
また、モジュール50は、プログラム作成時、すなわちモジュール50作成時に他のプログラムと静的リンクされることによって一つのファイルとして作成される場合、及び、別のファイルとして作成され、動的にリンクされる場合がある。本発明はどちらのプログラム作成方法においても使用することができるが、本実施形態におけるモジュール50は、DLL(Dynamic Link Library)又はSO(Shared Object)のような別ファイルとして用意されるプログラムであり、動的リンクされ、呼び出されるものである。
Further, the
図2A及び図2Bは、本発明の概要を示したものである。 2A and 2B show the outline of the present invention.
モジュール実行管理装置10は、モジュール50A、モジュール50B、モジュール50Cの3種類のモジュール50を管理し、それぞれのモジュール50ごとに、旧バージョン(以降、旧モジュール50と記載)と新バージョン(以降、新モジュール50と記載)を管理する。
The module
また、モジュール実行管理装置10は、モジュール50ごとに実行モードを持つ。実行モードには、「単独ラン」及び「共存ラン」の2つのモードがある。「単独ラン」は、旧モジュール50又は新モジュール50のいずれかのみが実行されるモードである。「共存ラン」は、旧モジュール50及び新モジュール50の双方が実行されるモードである。実行モードを変更することによって、新モジュール50において問題が発生した場合、システムとしての動作を継続させながら、問題解決のための情報を収集することができる。
Further, the module
なお、本実施形態において問題とは、モジュール50内にコーディングミスなどが存在することであり、これによって、本来システムが取得するべきデータが取得できなくなることを言う。
In the present embodiment, the problem is that there is a coding error or the like in the
図2Aは、本発明の実施形態のモジュール50が単独ランである場合のシステムを示す説明図である。
FIG. 2A is an explanatory diagram showing a system when the
図2Aは、モジュール50A、モジュール50B及びモジュール50Cのすべてが新バージョンの「単独ラン」によって実行されている。モジュール50A、モジュール50B及びモジュール50Cは、モジュール実行手段41によって制御され、モジュール50A、モジュール50B及びモジュール50Cの順に実行される。また、モジュール50A、モジュール50B及びモジュール50Cは、入力値を共有メモリ(正)131から取得し、出力結果を共有メモリ(正)131に返す。
In FIG. 2A,
ここで、モジュール50Aに問題が発生した場合、本実施形態のシステムは図2Bの状態となる。
Here, when a problem occurs in the
図2Bは、本発明の実施形態のモジュール50の一部が共存ランである場合のシステムを示す説明図である。
FIG. 2B is an explanatory diagram showing a system when a part of the
図2Bにおけるモジュール50Aは、「共存ラン」によって実行され、モジュール50B及びモジュール50Cは、旧バージョンの「単独ラン」によって実行される。これは、図2Aに示す新バージョンのモジュール50Aにおいて問題が発生したため、実行モードを変更した結果である。
The
旧モジュール50A、旧モジュール50B及び旧モジュール50Cは、入力値を共有メモリ(正)131から取得し、出力結果を共有メモリ(正)131に返す。また、新モジュール50Aは、入力値を共有メモリ(副)132から取得し、出力結果を共有メモリ(副)132に返す。
The
図2Bに示すすべてのモジュール50において、旧モジュール50が実行されているため、システムとしての動作は、過去に動作の実績がある旧バージョンのモジュール50によって実行される。すなわち、より安全に動作が可能なバージョンに切り替わる。
Since the
また、問題のあったモジュール50Aについては、新モジュール50と旧モジュール50とが実行されており、旧モジュール50と新モジュール50との結果を比較することによって、新モジュール50の実行結果のどこに相違があったかを抽出することができる。そして、相違のある実行結果部分を生成している部分のソースコードを見直すことによって、新モジュール50のソースコードを容易に修正することができる。
In addition, the
なお、本実施形態においては、問題が発生したモジュール50を「共存ラン」にした際に、問題が発生していないモジュール50も旧モジュール50に置き換えたが、すべてのモジュール50が独立していれば、問題が発生していないモジュール50は新モジュール50のままでもよい。
In this embodiment, when the
以降では、システムの開発において、新モジュール50の開発が完了し、図2Aのようにすべて新バージョンの「単独ラン」によって実行させる場合と、モジュール50のうち新バージョンのモジュール50Aにおいて問題が発生し、図2Bのように「共存ラン」によって実行させる場合と、問題のあった新バージョンのモジュール50Aの修正が終わり、再び図2Aのようにすべて新バージョンの「単独ラン」モードによって実行させる場合について説明する。
Thereafter, in the development of the system, the development of the
図3は、本発明の実施形態のモジュール定義情報21を示す説明図である。
FIG. 3 is an explanatory diagram illustrating the
図3は、モジュール実行管理装置10が使用するモジュール50に関する定義情報を管理するための、モジュール定義情報21を示す。図3に示すモジュール定義情報21は、本実施形態のシステムが使用するモジュール50である、モジュール50A、モジュール50B及びモジュール50Cに関する定義情報を保持する。
FIG. 3 shows
図3に示すモジュール定義情報21は、モジュール名2101、バージョン2102、ファイル名2103及び依存モジュール2104を含む。また、依存モジュール2104には、名称2105及びバージョン2106が含まれる。
The
モジュール名2101は、モジュール50の名称を示す。モジュール名2101の順番によって、システム内のモジュール50は実行される。
A
バージョン2102には、モジュール50のバージョン番号を一意に示す識別子が含まれる。本実施形態において、旧バージョンの識別子は、「1」(以下において、バージョン1と記載)であり、新バージョンの識別子は、「2」(以下において、バージョン2と記載)である。図3のモジュール定義情報21に含まれるそれぞれのモジュール50には、旧バージョンのバージョン1と、新バージョンのバージョン2とがある。なお、本実施形態においてバージョン2102は、「1」及び「2」のみであるが、三つ以上のバージョンが格納されてもよい。
The
そしてファイル名2103は、それぞれモジュール50のソースコード等を格納するモジュールファイルの名前を示す。
The
モジュール50が他のモジュール50と依存関係にある場合、モジュール定義情報21には依存関係のあるモジュール50を定義することができる。依存モジュール2104は、モジュール名2101に示されたモジュール50と依存関係にあるモジュール50の情報を示す。名称2105は、モジュール名2101に示されたモジュール50と依存関係にあるモジュール50の名称を示し、バージョン2106は、モジュール名2101に示されたモジュール50と依存関係にあるモジュール50のバージョンを示す。
When the
例えば、レコード213は、バージョン1のモジュール50Bを実行するためには、バージョン1のモジュール50Cを一緒に実行する必要があることを示す。
For example,
図4は、本発明の実施形態のデータ定義情報22を示す説明図である。
FIG. 4 is an explanatory diagram showing the
図4は、モジュール50が用いる共有メモリに含まれるデータに関する定義情報を管理するためのデータ定義情報22を示す。データ定義情報22は、データ名2201、サイズ2202、コピー規則2203、比較規則2204、共有メモリ(正)先頭アドレス2205、共有メモリ(副)先頭アドレス2206及び共有メモリ(保存用)先頭アドレス2207を含む。
FIG. 4 shows
データ名2201は、システムが使用する共有メモリに含まれるデータの名称を示す。本実施形態のデータ定義情報22は、データ名2201が「駅情報」、「列車情報」及び「信号機情報」である3種類のデータの定義を保持する。
The
サイズ2202は、データ名2201に示されるデータのサイズを示す。本実施形態において、サイズ2202の単位はバイトである。
A
コピー規則2203は、実行モードが「共存ラン」であるモジュール50が発生した場合に、データ名2201に示されるデータが、共有メモリ(正)131から共有メモリ(副)132及び共有メモリ(保存用)133にコピーする対象となるデータであるか否かを示す。
The
比較規則2204は、実行モードが「共存ラン」であるモジュール50が発生した場合に、データ名2201に示されるデータが、共有メモリ(正)131と共有メモリ(副)132との間で値の比較をする対象となるデータであるか否かを示す。本実施形態における比較は、データごとにデータサイズ分比較し、すべてが等しい場合か、それ以外かを判定する。
When the
共有メモリ(正)先頭アドレス2205、共有メモリ(副)先頭アドレス2206、及び、共有メモリ(保存用)先頭アドレス2207は、それぞれのデータがマッピングされる共有メモリ上のアドレスのうち先頭のアドレスを示す。
The shared memory (primary)
例えば、データ名2201が「駅情報」であるデータは、モジュール50によって書き換えられないデータであるため、コピー規則2203、比較規則2204、共有メモリ(副)先頭アドレス2206及び共有メモリ(保存用)先頭アドレス2207に値を格納しない。これによってモジュール50は、データ名2201が「駅情報」であるデータを読み出す場合は、常に共有メモリ(正)131を用いる。
For example, since data whose
一方、データ名2201が「列車情報」及び「信号機情報」であるデータは、モジュール50によって書き換わるデータであるため、コピー規則2203、共有メモリ(副)先頭アドレス2206及び共有メモリ(保存用)先頭アドレス2207に値を格納する。これによって旧モジュール50と新モジュール50とは、アクセスする先のアドレスをデータによって変更することができる。
On the other hand, data whose
すなわち、旧モジュール50が「列車情報」のデータを読み出す場合、旧モジュール50は、共有メモリ(正)先頭アドレス2205が「12000」である領域を読み出す。また、新モジュール50が「列車情報」のデータを読み出す場合、新モジュール50は、共有メモリ(副)先頭アドレス2206が「22000」である領域を読み出す。
That is, when the
また、必要に応じて、比較規則2204に値を設定することによって、旧モジュールと新モジュールとの実行結果を、各々比較し、相違がないかを検証する。
Further, if necessary, by setting a value in the
なお、本実施形態におけるコピー規則2203及び比較規則2204には、「○」が格納される。コピー規則2203の値が「○」である場合、コピー規則2203は、データ名2201が示すデータの全領域をコピーすることを示し、比較規則2204の値が「○」である場合、比較規則2204は、データ名2201が示すデータの全領域を比較することを示す。
Note that “◯” is stored in the
また、共有メモリ(正)先頭アドレス2205、共有メモリ(副)先頭アドレス2206、及び、共有メモリ(保存用)先頭アドレス2207は、格納される値が固定される方法と、格納される値が動的に割り当てられる方法とがある。
The shared memory (primary) start
格納される値が固定される方法は、あらかじめどの領域が使用されるか決められ、モジュール実行管理装置10に備わるOSにそのアドレスの領域を予約するものである。また、動的に割り当てる方法は、モジュール実行管理装置10が起動時にデータ定義情報22を参照し、データのサイズ2202から必要なサイズを求め、共有メモリ(正)131、共有メモリ(副)132、及び、共有メモリ(保存用)133において、求められたサイズ分の領域を確保し、確保された共有メモリの領域のアドレスをデータ定義情報22に格納するものである。
How the value to be stored is fixed is to be decide in advance which areas are used to reserve space for the addresses to the OS included in the module
図5は、本発明の実施形態の比較結果情報23を示す説明図である。
FIG. 5 is an explanatory diagram illustrating the comparison result
図5は、モジュール実行管理装置10が複数の新バージョン及び旧バージョンのモジュール50を実行した場合に、それぞれの実行結果を格納した共有メモリ(正)131と共有メモリ(副)132との内容、及び、その内容を比較した結果を格納する比較結果情報23を示す。比較結果情報23は、モジュール名2301、時刻2302、データ名2303、タイミング2304、データ2305及び判定結果2306を含む。
FIG. 5 shows the contents of the shared memory (primary) 131 and the shared memory (secondary) 132 storing the respective execution results when the module
モジュール名2301は、新バージョン及び旧バージョンを共存して実行させたモジュール50の名称を示す。時刻2302は、比較のためにモジュール名2301に示されるモジュール50を実行し始めた時刻を示す。
The
またデータ名2303は、比較を行った対象のデータ名称を示す。タイミング2304は、データ2305に格納されるデータがどのタイミングにおいて取得されたかを示し、データ2305は、各モジュール50の実行によって取得されたデータの内容を示す。タデータ2305には、モジュール50を実行する前のデータ、旧モジュール50を実行した結果のデータ、及び、新モジュール50を実行した結果のデータとが格納される。
A
そして判定結果2306は、新バージョン及び旧バージョンのモジュール50の各々の実行結果を比較した結果を示す。判定結果2306には、新モジュール50の実行結果と旧モジュール50の実行結果とに相違がない場合、「OK」が格納され、新モジュール50の実行結果と旧モジュール50の実行結果とに相違がある場合、「NG」が格納される。
The
また、判定結果2306に「NG」が格納される場合、実行結果に相違があったデータの位置を、「NG」の値と共に格納してもよい。例えば、図5に示す判定結果2306において、相違があったデータの位置を示す「(2バイト目〜2バイト目)」が格納されてもよい。
In addition, when “NG” is stored in the
図6Aは、本発明の実施形態のモジュール50が単独ランである場合のモジュール管理情報31aを示す説明図である。
FIG. 6A is an explanatory diagram illustrating the
図6Bは、本発明の実施形態のモジュール50の一部が共存ランである場合のモジュール管理情報31bを示す説明図である。
FIG. 6B is an explanatory diagram illustrating the
図6A及び図6Bは、実行対象となっているモジュール50に関する情報を管理するモジュール管理情報31を示す。図6Aは、図2Aの状態におけるモジュール管理情報31aであり、図6Bは図2Bの状態におけるモジュール管理情報31bを示す。
6A and 6B show
モジュール管理情報31は、実行する対象であるモジュール50ごとに、モジュール名3101、実行モード3102、単独ランのバージョン3103、共存ラン3104、旧バージョン3105及び新バージョン3106を含む。
The
モジュール名3101は、実行する対象であるモジュール50の名称を示す。実行モード3102は、モジュール名3101に示されるモジュール50の実行モードを示す。単独ランのバージョン3103は、モジュール名3101が示すモジュール50に「単独ラン」させる場合のモジュール50のバージョンを示す。
A
共存ラン3104に含まれる旧バージョン3105は、モジュール名3101が示すモジュール50に「共存ラン」させる場合の旧モジュール50のバージョンを示す。また、共存ラン3104に含まれる新モジュール50のバージョンを示す。
The
例えば、レコード31a1は、モジュール50Aの実行モードが「単独ラン」であり、バージョン2のモジュール50Aが実行されることを示す。また、レコード31b1は、モジュール50Aの実行モードが「共存ラン」であり、バージョン1の旧モジュール50と、バージョン2の新モジュール50とが、共存して実行されることを示す。
For example, the record 31a1 indicates that the execution mode of the
図7は、本発明の実施形態のデータ管理情報32を示す説明図である。
FIG. 7 is an explanatory diagram illustrating the
図7は、モジュール50によって参照されるデータを格納する共有メモリ上のアドレスについて管理するためのデータ管理情報32を示す。データ管理情報32は、実行モード及びデータの種類ごとに、共有メモリ(正)131及び共有メモリ(副)132のアドレスを保持する。
FIG. 7 shows
データ管理情報32は、データ名3201、単独ランの共有メモリ先頭アドレス3202、共存ラン3203、旧モジュール用共有メモリ先頭アドレス3204、及び、新モジュール用共有メモリ先頭アドレス3205を含む。
The
データ名3201は、共有メモリに格納されるデータの名称を示す。単独ランの共有メモリ先頭アドレス3202は、「単独ラン」においてデータが格納される共有メモリのアドレスのうち、先頭のアドレスを示す。単独ランの共有メモリ先頭アドレス3202は、すべて共有メモリ(正)のアドレスである。
A
共存ラン3203に含まれる旧モジュール用共有メモリ先頭アドレス3204は、「共存ラン」において旧モジュール50によって参照されるデータが格納される共有メモリのアドレスのうち、先頭のアドレスを示す。また、共存ラン3203に含まれる新モジュール用共有メモリ先頭アドレス3205は、「共存ラン」において新モジュール50によって参照されるデータが格納される共有メモリのアドレスのうち、先頭のアドレスを示す。
An old module shared
旧モジュール用共有メモリ先頭アドレス3204及び新モジュール用共有メモリ先頭アドレス3205の値は、データ定義情報22のコピー規則2203の値によって、単独ランの共有メモリ先頭アドレス3202と異なる。
The values of the old module shared
例えば、データ名3201が「駅情報」のように、モジュール50によって値が変更されないデータの場合、図4に示すコピー規則2203に値が格納されないため、データが共有メモリ(正)131から共有メモリ(副)132にコピーされない。このため、図7に示すレコード321に示すように、旧モジュール50と新モジュール50とは、同じアドレスを参照する。
For example, when the
一方、データ名3201が「列車情報」及び「信号機情報」のように、モジュール50によって値が変更されるデータの場合、図4に示すコピー規則2203に値が格納されるため、データが共有メモリ間でコピーされる。このため、図7に示すレコード322に示すように、旧モジュールと新モジュールとは、異なる共有メモリのアドレスを参照する。
On the other hand, when the
データ管理情報32は、図4に示すコピー規則2203に従って、データ定義22から生成される。このため、データ管理情報32は、共有メモリ(正)131、共有メモリ(副)132、及び、共有メモリ(保存用)133のアドレスと同じく、固定の値が格納される場合と、モジュール実行管理装置10の起動時に動的に値が格納される場合とがある。
The
図8は、本発明の実施形態の時刻補正情報33を示す説明図である。
FIG. 8 is an explanatory diagram showing the
図8は、実行モードが「共存ラン」において、旧モジュール50及び新モジュール50が実行される時刻の差を補正するための時刻補正情報33を示す。時刻補正情報33は、旧モジュールを実行開始する直前の時刻情報331と、新モジュールを実行する直前の時刻情報332とを保持する。
FIG. 8 shows
図9は、本発明の実施形態のモジュール実行手段41の処理を示すフローチャートである。
FIG. 9 is a flowchart showing processing of the
モジュール実行手段41は、モジュール定義情報21において決められた順番によって、モジュール50を順次実行する。
The module execution means 41 sequentially executes the
図2Aにおけるモジュール50Aの実行を例に説明する。
The execution of the
モジュール実行手段41は、モジュール管理情報31を参照し、実行させるモジュール50の実行モード3102を参照し、「単独ラン」であるか、「共存ラン」であるかを判定する(ステップ411)。モジュール実行手段41は、ステップ411において例えば、図6Aに示すモジュール管理情報31aのモジュール50Aに関するレコード31a1を参照し、実行モード3102が「単独ラン」であり、単独ランのバージョン3103が「2」である情報を取得する。そして、モジュール実行手段41は、実行モード3102が「単独ラン」であるため、ステップ412に進む。
The module execution means 41 refers to the
次にモジュール実行手段41は、モジュール定義情報21を参照し、ステップ411において取得された情報に該当するモジュール50を実行する(ステップ412)。例えば、ステップ411において取得された、実行するモジュール50Aのバージョンが「2」である場合、モジュール実行手段41は、図3に示すモジュール定義情報21のレコード212を参照し、ファイル「ma.so.2」を実行する。
Next, the module execution means 41 refers to the
以上によって、図2Aにおけるモジュール50Aを実行する。
The
その後モジュール実行手段41は、モジュール定義情報21のモジュール名2101に示すモジュール50をループ処理によって順次実行する。
Thereafter, the module execution means 41 sequentially executes the
次に、図2Bにおけるモジュール50Aの実行を例に説明する。
Next, the execution of the
モジュール実行手段41は、モジュール管理情報31を参照し、実行させるモジュール50の実行モード3102を参照し、「単独ラン」であるか、「共存ラン」であるかを判定する(ステップ411)。モジュール実行手段41は、ステップ411において、図6Bに示す31bのモジュール50Aに関するレコード31b1を参照し、実行モード3102が「共存ラン」であり、共存ラン3104に含まれる旧バージョン3105が「1」であり、共存ラン3104に含まれる新バージョン3106が「2」である情報を取得する。
The module execution means 41 refers to the
そしてモジュール実行手段41は、実行モード3102が「共存ラン」であるため、ステップ413に進む。
The module execution means 41 proceeds to step 413 because the
モジュール実行手段41は、データ定義情報22とデータ管理情報32とを参照し、共有メモリ(正)131上のデータを、共有メモリ(副)132と共有メモリ(保存用)133とにコピーする(ステップ413)。
The module execution means 41 refers to the
例えば、モジュール実行手段41はステップ413において、図4に示すデータ定義情報22を参照することによって、コピー規則2203に値が格納されているレコードが、データ名2201が列車情報であり、サイズ2202が2000であるレコード222と、データ名2201が信号機情報であり、サイズ2202が4000バイトであるレコード223のデータであることを取得する。すなわち、モジュール実行手段41は、データ名2201が「列車情報」(サイズ2202が2000バイト)であるデータとデータ名2201が「信号機情報」(サイズ2202が4000バイト)であるデータとがコピー対象であることを取得する。
For example, the module execution means 41 refers to the
さらにモジュール実行手段41は、図4に示すデータ定義情報22を参照し、共有メモリ上のコピー元とコピー先のアドレスとを取得する。モジュール実行手段41は、データ名2201が「列車情報」であるデータを示すレコード222の値によって、共有メモリ(副)132の先頭アドレス「22000」の領域と共有メモリ(保存用)133の先頭アドレス「32000」の領域との双方に、共有メモリ(正)131の先頭アドレス「12000」の「2000」バイト分の領域をコピーする。
Further, the module execution means 41 refers to the
さらにモジュール実行手段41は、データ名2201が「信号機情報」であるデータを示すレコード223の値によって、共有メモリ(副)132の先頭アドレス「26000」の領域と共有メモリ(保存用)133の先頭アドレス「36000」の領域との双方に、共有メモリ(正)131の先頭アドレス「16000」から「4000」バイト分の領域をコピーする。
Further, the module execution means 41 uses the value of the
ステップ413の後、モジュール実行手段41は、現在時刻をOSなどの機能によって取得し、取得された現在時刻を、時刻補正情報33に格納する(ステップ414)。ステップ414において取得される現在時刻は、旧モジュール50を実行する直前の時刻であり、旧モジュール50が開始される時刻の基点であるため、モジュール実行手段41は、図8に示す時刻補正情報33の旧モジュール実行開始時刻のレコードであるレコード331に、取得された現在時刻を格納する。
After
ステップ414の後、モジュール実行手段41は、モジュール定義情報21及びモジュール管理情報31を参照し、該当する旧モジュール50を実行する(ステップ415)。例えばモジュール実行手段41は、図6Bのモジュール管理情報31bのモジュール50Aに関するレコード31b1を参照し、旧モジュール50のバージョンが「1」である情報を取得する。そのため、モジュール実行手段41は、図3に示すモジュール定義情報21のレコード211を参照して、ファイル「ma.so.1」を実行する。
After
ステップ415の後、モジュール実行手段41は、現在時刻をOSなどの機能によって取得し、取得された現在時刻を、時刻補正情報33に格納する(ステップ416)。ステップ416において取得される現在時刻は、新モジュール50を実行する直前の時刻であり、新モジュール50が開始される時刻の基点であるため、モジュール実行手段41は、図8に示す時刻補正情報33の新モジュール実行開始時刻のレコードであるレコード332に、取得された現在時刻を格納する。
After
ステップ416の後、モジュール実行手段41は、モジュール定義情報21及びモジュール管理情報31を参照し、該当する新モジュール50を実行する(ステップ417)。例えばモジュール実行手段41は、図6Bのモジュール管理情報31bのモジュール50Aに関するレコード31b1を参照し、新モジュール50のバージョンが「2」である情報を取得する。そのため、モジュール実行手段41は、図3に示すモジュール定義情報21のレコード212を参照して、ファイル「ma.so.2」を実行する。
After
ステップ417の後、モジュール実行手段41は、データ定義情報22及びデータ管理情報32を参照し、旧モジュールの実行結果が出力された共有メモリ(正)131のデータと、新モジュールの実行結果が出力された共有メモリ(副)132のデータとを比較し、比較結果を比較結果情報23に格納する(ステップ418)。
After
例えばモジュール実行手段41は、図4のデータ定義情報22に示すレコード222及びレコード223を参照し、データ名2201が「列車情報」であり、サイズ2202が2000バイトであるデータと、データ名2201が「信号機情報」であり、サイズ2202が4000バイトであるデータとが、新旧モジュール50によって生成された結果を比較するデータであることを取得する。
For example, the
そこで、モジュール実行手段41は、図4に示すデータ名2201が「列車情報」であるデータについては、図4のデータ定義情報22に示すレコード222に従い、共有メモリ(正)131の先頭アドレス「12000」を基点とする「2000」バイト分の領域と、共有メモリ(副)132の先頭アドレス「22000」を基点とする「2000」バイト分の領域とを比較し、比較した結果を図5に示す比較結果情報23に出力する。
Therefore, the module execution means 41, for the data whose data name 2201 shown in FIG. 4 is “train information”, follows the
そしてモジュール実行手段41は、図5に示すレコード231、すなわち、モジュール名2301がモジュール50Aを示し、データ名2303が「列車情報」であるレコードについて、旧モジュール50の実行後のデータが「0010…」であることを取得する。また、レコード231によって、新モジュール50の実行後のデータが「0020…」であり、さらに新旧モジュール50の実行結果を比較した結果は、「NG(2バイト目〜2バイト目)」であることを取得する。前述の通り「NG」とは、新旧モジュール50の実行結果が相違することを意味する。
Then, the module execution means 41 records the
一方、モジュール実行手段41は、図4に示すデータ名2201が「信号機情報」であるデータについては、図4のデータ定義情報22のレコード223に従い、共有メモリ(正)131の先頭アドレス「16000」を基点とする「4000」バイト分の領域と、共有メモリ(副)132の先頭アドレス「26000」を基点とする「4000」バイト分の領域とを比較し、比較した結果を図5に示す比較結果情報23に出力する。
On the other hand, for the data whose data name 2201 shown in FIG. 4 is “traffic signal information”, the module execution means 41 follows the
そしてモジュール実行手段41は、図5に示すレコード232、すなわち、モジュール名2301がモジュール50Aを示し、データ名2303が「信号機情報」であるレコードについて、旧モジュール50の実行後のデータが「3333…」であることを取得する。また、レコード232によって、新モジュール50の実行後のデータも「3333…」であり、さらに新旧モジュール50の実行結果比較した結果は、「OK」であることを取得する。前述の通り「OK」とは、新旧モジュール50の実行結果が等しいことを意味する。
Then, the module execution means 41 records the
また、新旧モジュール50を実行する前のデータが、共有メモリ(保存用)133に保存されているため、モジュール実行手段41は、比較結果情報23に前述のデータの比較結果を格納する際、共有メモリ(保存用)133を参照し、該当するデータを図5のタイミング2304が「実行前」であるデータ2305に、新旧モジュール50を実行する前のデータを格納する。
In addition, since the data before the execution of the new and
以上によって、図2Bにおけるモジュール50Aの実行、すなわち図9に示すステップ413〜ステップ418を終了する。この後、モジュール50Aに続けて実行するべきモジュール50がある場合、モジュール実行手段41は、図9に示すフローを繰り返す。
The execution of the
なお、モジュール実行手段41がステップ412、ステップ415、及び、ステップ417においてモジュール50を実行する際、モジュール実行手段41は、アドレス解決手段501、時刻補正手段502、及び、ログ出力手段503を用いる。
Note that when the
前述の通り、ステップ412、ステップ415、及び、ステップ417などのモジュール50が共有メモリ上のデータにアクセスする場合、実行モードによってアクセス先のアドレスが異なる。そのため、モジュール実行手段41は、ステップ412、ステップ415、及び、ステップ417において、これから実行するモジュール50の実行モードに従って、データ管理情報32のようなデータ名3201と共有メモリ上のアドレスとの対応表を、モジュール50のアドレス解決手段501に通知する。
As described above, when the
アドレス解決手段501は、モジュール実行手段41から通知されたデータ名3201と共有メモリ上のアドレスとの対応表を参照し、アクセスしようとするデータ名3201からアドレスを解決してから、データにアクセスする。
The
さらに、実行モードが「単独ラン」である場合、モジュール実行手段41は現在の実時刻を使用すればよい。しかし、実行モードが「共存ラン」である場合、モジュール実行手段41は旧モジュール50を実行してから新モジュール50を実行するため、モジュール50実行時の時刻が異なる。システムにおけるわずかな時刻の差は、処理の結果に影響を与える可能性がある。
Further, when the execution mode is “single run”, the module execution means 41 may use the current actual time. However, when the execution mode is “coexistence run”, the module execution means 41 executes the
そこで時刻補正手段502は、時刻補正情報33を参照し、補正した時刻を算出し、ステップ417において、補正後の時刻を実行中のモジュール50に返す。補正後の時刻は、「実時刻−旧モジュール50と新モジュール50との実行開始時刻の差分+α」とする。「+α」は、処理の切り替え等のオーバーヘッドにかかる時間を調整するための値である。「α」は、負の値でもよい。
Therefore, the time correction means 502 refers to the
例えば、図8に示すように、旧モジュール50の実行開始時刻が「10:00:00.100」であり、新モジュール50の実行時刻が「10:00:00.150」である場合、旧モジュール50と新モジュール50との実行開始時刻の差分は0.050秒となる。さらに、ステップ417において、新モジュール50が実行中に取得する実際の時刻が「10:00:00.170」であり、「+α」が0である場合、時刻補正手段502は、「10:00:00.170」から0.050秒分だけ引いた「10:00:00.120」を算出し、算出された時刻を補正後の時刻として新モジュール50に返す。
For example, as shown in FIG. 8, when the execution start time of the
このように、時刻補正手段502は、実行モードに従って時刻を補正し、現在として扱う時刻を取得して、モジュール50に返す。
As described above, the
なお、時刻補正手段502は、旧モジュール50の実行開始時刻を保存しておき、旧モジュール50及び新モジュール50が現在時刻取得要求をしたときに保存した旧モジュール50の実行開始時刻を返すことによって、時刻を補正してもよい。
The
さらに、モジュール50がログ(ジャーナル)をファイルに出力する場合、旧モジュール50と新モジュール50とが同じログファイルにログを出力すると、ログが混ざり、最終的に実行されたモジュール50がいずれのログを出力したのかが不明となり、また、いずれのモジュール50が実行されたのかも不明になる。そこで、ログ出力手段503は、「単独ラン」において実行されるモジュール50、及び、「共存ラン」において旧モジュール50として実行されるモジュール50に、本来のログファイルに出力させ、「共存ラン」において新モジュールとして実行されるモジュール50に別のログファイルに出力させる。
Further, when the
本実施形態のシステムは、旧モジュールの実行結果を実際のデータとして採用するため、ログ出力手段503によって、最終的に実行された処理のログが本来のログファイルに残される。なお、ログ出力手段503は、「共存ラン」において実行される新モジュール50の実行結果も、新モジュール50の実行結果であることが認識できるような情報を付加し、本来のログファイルにログを出力してもよい。
Since the system of this embodiment employs the execution result of the old module as actual data, the
図10は、本発明の実施形態のモード変更手段42による処理を示すフローチャートである。
FIG. 10 is a flowchart showing processing by the
モード変更手段42は、モジュール実行手段41がモジュール50を実行した後、特にステップ412の後、ユーザによる実行結果の検証において、実行結果のデータに矛盾が検出され、そのままのシステムの動作が危険であると判定された場合、又は、外部コンソールなどの入力部14を介してユーザからパラメタの指定を受けた場合に起動する。すなわち、モード変更手段42は、システムに障害などの問題が発生した際、又は、ユーザによるテストを実施する際に、起動する。
After the
モード変更手段42は、切り替えるモジュール50の名称、すなわち、障害などの問題が発生したモジュール50の名称、障害時フラグ、変更後の実行モード、及び、実行モードを変更した後のバージョンを指定され起動する。「障害時フラグ」は、前述のように特定のモジュール50において問題が発生した場合に、自動又は手動によって、モジュール実行管理装置10に格納されるフラグである。
The mode change means 42 is activated by specifying the name of the
以下では、モジュール50Aにおいて問題が発生した際、図2Aから図2Bに実行モードが変更する例について説明する。図10においてモード変更手段42は、モジュール50Aで問題が発生したため、モジュール50の名称が「A(モジュール50A)」であり、障害時フラグが「ON」であり、変更後の実行モードが「共存ラン」であるパラメタを指定され起動したものとする。
Hereinafter, an example in which the execution mode is changed from FIG. 2A to FIG. 2B when a problem occurs in the
なお、本実施形態においては、実行モードが「共存ラン」になる場合、一つ前のバージョンと共存されることがあらかじめ指定されているが、ユーザによって任意のバージョンを指定されてよい。 In the present embodiment, when the execution mode is “coexistence run”, it is designated in advance that it coexists with the previous version, but an arbitrary version may be designated by the user.
モード変更手段42は、障害時フラグがONであるかOFFであるかを判定する(ステップ421)。ここでは、障害時フラグがONであるため、ステップ422に進む。
The
モード変更手段42は、指定されたモジュール50Aの実行モードを、「共存ラン」に変更する(ステップ422)。モード変更手段42は、ステップ422において、問題が発生するまで用いていたモジュール管理情報31のモジュール50Aに関するレコードを、図6Bのモジュール管理情報31bに示すレコード31b1の実行モード3102のように変更する。
The
さらにモード変更手段42は、図3に示すモジュール定義情報21を参照し、問題が発生するまでモジュール50Aとして実行されていたバージョン2の、前のバージョンが「1」であることを取得する。そして、モジュール管理情報31のモジュール50Aに関するレコードの旧バージョン3105に「1」を格納し、新バージョン3106に問題が発生するまでのモジュール50Aのバージョンである「2」を格納する。これによってモード変更手段42は、図6Bに示すレコード31b1を生成する。
Further, the
ステップ422の後、モード変更手段42は、指定されたモジュール50A以外のモジュール50の実行モード3102を、旧モジュール50による「単独ラン」に変更する(ステップ423)。モード変更手段42は、ステップ423において、モジュール50Aの旧バージョン3105が「1」であるため、モジュール50Bに関するレコード及びモジュール50Cに関するレコードについても、図6Bのモジュール管理情報31bのレコード31b2、レコード31b3のように、実行モード3102に「単独ラン」を格納し、単独ランのバージョン3103に「1」を格納する。
After
これによってモード変更手段42は、図6Bに示すレコード31b2及びレコード31b3を生成する。なお、本実施形態において。モジュール50B及びモジュール50Cのバージョン3103は、モジュール50Aの旧バージョン3105と同じ「1」であるが、モジュール50Aのバージョン「1」とともに動作した場合に、システムが現行信頼性を保持できるバージョンであれば、いずれのバージョンでもよい。
Thereby, the mode changing means 42 generates the record 31b2 and the record 31b3 shown in FIG. 6B. In the present embodiment. The
以上によってモード変更手段42は、図2Aから図2Bのように、モジュール50Aの実行モードを「共存ラン」に変更する。
As described above, the
以下では、モジュール50Aの実行モードを、「共存ラン」から新モジュールによる「単独ラン」に変更する例について説明する。このため、モード変更手段42は、モジュール50の名称が「A(モジュール50A)」であり、障害時フラグが「OFF」であり、実行モードが「単独ラン」であり、バージョンが「2」であるパラメタを指定されて起動したものとする。
Hereinafter, an example in which the execution mode of the
モード変更手段42は、障害時フラグがONであるかOFFであるかを判定し(ステップ421)、障害時フラグが「OFF」であるため、ステップ424に進む。
The
モード変更手段42は、指定されたモジュール50Aの実行モードを、指定されたバージョン「2」による「単独ラン」に変更する(ステップ424)。モード変更手段42は、ステップ424において、図6Aのモジュール管理情報31aのモジュール50Aに関するレコード31a1のように、実行モード3102に「単独ラン」を格納し、単独ランのバージョン3103に「2」を格納する。
The
モード変更手段42は、以上の処理をモジュール50A、モジュール50B、及び、モジュール50Cのすべてに繰り返すことによって、図2Bに示すような「共存ラン」の状態を、図2Aに示すようなすべて新モジュールによる「単独ラン」の状態に変更する。
The mode changing means 42 repeats the above processing for all of the
以上によって、図2Bから図2Aのように、モジュール50Aの実行モードを新モジュール50による「単独ラン」に変更することができる。
As described above, the execution mode of the
なお、本実施形態のステップ422及びステップ424において、モード変更手段42は、指定されたモジュール50のみの実行モードを変更した。しかし、モジュール50の特定のバージョン間に依存関係がある場合、指定されたモジュール50の実行モードの変更とともに、依存関係のあるモジュール50についても、実行モードを変更する。
In
例えば、図3のモジュール定義情報21は、モジュール名称2101が「B」のモジュール50(モジュール50B)のバージョン2102「1」と、名称2105が「C」のモジュール50(モジュール50C)のバージョン2106「1」との間、及び、モジュール名称2101が「B」のモジュール50(モジュール50B)のバージョン2102「2」と、名称2105が「C」のモジュール50(モジュール50C)のバージョン2106「2」との間において、依存関係があることを示す。
For example, the
本実施形態のシステムが図3に示すモジュール定義情報21の状態である場合、モード変更手段42は、モジュール50Bをバージョン1の「単独ラン」にする場合、モジュール50Cをバージョン1の「単独ラン」に変更する。また、モジュール50Bをバージョン1とバージョン2の「共存ラン」にする場合、モジュール50Cについてもバージョン1とバージョン2の「共存ラン」に変更する。
When the system of the present embodiment is in the state of the
さらに、問題が発生したモジュール50Aと他のモジュール50に依存関係がある場合も、問題が発生したモジュール50Aの実行モードを「共存ラン」にするとともに、問題は発生していないがモジュール50Aと依存関係のある他のモジュール50の実行モードを「共存ラン」にする。
Further, when there is a dependency relationship between the
また、モード変更手段42は、前述のステップ423において、指定されていないモジュール50について、実行モードを旧バージョンにおける「単独ラン」に変更したが、新バージョンの信頼性が十分確認されている場合には、ステップ423を実施せず、新バージョンによる「単独ラン」のまま実行させてもよい。
Further, the mode changing means 42 changes the execution mode to “single run” in the old version for the
図11は、本発明の実施形態の比較結果表示手段43による表示例を示す説明図である。
FIG. 11 is an explanatory diagram illustrating a display example by the comparison
図11は、モジュール50が「共存ラン」によってモジュール実行手段41に実行される際に生成される比較結果情報23を、比較結果表示手段43がユーザに表示する例を示す。比較結果表示手段43は、比較されたモジュール50の一定期間分の比較結果情報23を集計し、集計結果を表示する。
FIG. 11 shows an example in which the comparison result display means 43 displays the comparison result
比較結果表示手段43によって表示される内容には、比較されたモジュール名431、「共存ラン」によって実行された期間432、モジュール50が実行された回数433、比較の判定結果434がある。また、比較結果表示手段43は、モジュール50による実行結果を比較した結果を比較結果435に表示する。
The contents displayed by the comparison result display means 43 include the compared
図11に示す期間432において、図5に示す比較結果情報23の判定結果2306のうち「NG」が1つでもある場合、判定結果434には「NG」が表示される。また、図11に示す期間432において、図5に示す比較結果情報23の判定結果2306がすべて「OK」である場合、判定結果434には「OK」が表示される。
In the
比較結果435には、データ名4351、位置4352、及び、NG回数4353が含まれる。比較結果情報23の判定結果2306のうち「NG」があった場合、比較結果表示手段43は、その「NG」となったデータ名2303を、データ名4351に表示し、どの位置のデータがNGであったのかを位置4352に表示し、そして、NGになったのはモジュール50が実行された回数433中、何回あったのかをNG回数4353に表示する。
The
位置4352は、図11に示す「進行許可フラグ」のデータ項目のように、データ構造定義(構造体定義:図示せず)を参照することによって、データ内のどのデータ項目が「NG」に該当するかを表示してもよい。
The
ユーザは、比較結果435を参照することによって、新モジュール50の実行結果のどこに相違があったかを抽出することができる。そして、相違のあった実行結果部分を生成しているソースコードの部分を見直すことによって、新モジュール50のソースコードの修正に結びつけることができる。
The user can extract the difference in the execution result of the
またユーザは、24時間などの長期間、新モジュール50を「共存ラン」によって試験することによって、新モジュール50が旧モジュール50と同じ処理を実行していることを確認することができる。長期間の試験において判定結果が「OK」であり、旧モジュール50と新モジュール50との実行結果が等しいことがわかれば、新モジュール50が現行信頼性(現行のモジュール50によってシステムに備わる信頼性)を持つことを確認できる。そして、新モジュール50が現行信頼性を持っている場合、ユーザは、「共存ラン」から新モジュールによる「単独ラン」に切り替えても良いと判断することができる。
Further, the user can confirm that the
なお、図4に示すデータ定義情報22の比較規則2204は、「○」が格納され、データのサイズ2202分等しいか否かを検証する「全比較」を示す。しかし、データのサイズ2202分すべての比較だけでなく、比較規則2204に比較しない領域を指定してもよい。
The
例えば、旧モジュール50から新モジュール50への開発にあたり、変更していないため比較による検証をする必要がない部分、又は、十分検証をしており更なる比較による検証が不要である場合、比較規則2204に指定された領域を比較範囲から外すよう、比較規則2204を設定してもよい。
For example, in the development from the
また、旧モジュール50から新モジュール50への開発にあたり、機能拡張を行っているため、共有メモリへの出力が異なることがわかっている領域についても、その領域を比較範囲から外すよう比較規則2204の値を格納してもよい。さらに、比較する方法についても「等しい」だけでなく、データ内の特定のデータ項目について、比較規則2204を、「旧モジュール50の出力結果と新モジュール50の出力結果との相違が一定範囲以内」としてもよい。また、新モジュール50において機能拡張されたデータについては、「特定の値になっているか」を比較規則2204としてもよい。
In addition, since the function is expanded when developing from the
また、一般的に旧モジュール50は、アドレス解決手段501のように参照先である共有メモリ上のアドレスを切り替える機能を持たず、固定の共有メモリ(正)131のアドレスを直接参照する場合が多い。本発明は、実行モードが「単独ラン」又は「共存ラン」のいずれであっても、旧モジュール50は常に共有メモリ(正)131を参照するために、アドレスを切り替える機能を持たなくても対応することができる。新モジュール50がアドレス解決手段501を持てばよい。特に、見通しの良いソースコードになるように新モジュール50を開発するにあたり、データと処理とを分離し、データを管理する部分をアドレス解決手段501が持つようにすることができる。
In general, the
以上のように本発明は、鉄道運行管理システムのような長期間運用され高信頼が求められる大規模な情報制御システムにおいて、システムを構成するモジュール50を管理及び実行する。
As described above, the present invention manages and executes the
本発明のシステムは、複数のバージョンのモジュール50を管理し、モジュール50ごとに単一バージョンの「単独ラン」モードと、複数バージョンの「共存ラン」モードの2種類の実行モードを持つ。そして、モジュール50において問題発生時に、システムは「単独ラン」モードから「共存ラン」モードに切り替わる。
The system of the present invention manages a plurality of versions of the
「単独ラン」モードでは、共有メモリ(正)131を使用してモジュール50を実行する。「共存ラン」モードでは、モジュール50の入力となる共有メモリ(正)のデータを別の共有メモリ(副)132にコピーし、共有メモリ(正)131を使用して旧バージョンのモジュール50を実行し、共有メモリ(副)132を使用して新バージョンのモジュール50を実行する。旧バージョンのモジュール50の出力を格納する共有メモリ(正)131と、新バージョンのモジュール50の出力を格納する共有メモリ(副)132の内容を比較し、実行前のデータとともに、新旧の実行結果の違いを出力する。
In the “single run” mode, the
本発明によれば、システムとしての動作を継続させながら、信頼性のある旧モジュール50の実行結果と、問題の発生した新モジュール50の実行結果を比較し検証することによって、新モジュール50の実行結果のどこに相違があるかを抽出することができる。そして、相違のある実行結果部分を生成している部分のソースコードを見直すことにより、新モジュール50のソースコードの修正に結びつけることができる。その際に、モジュール50を実行する前の入力となったデータを含めて参照することによって、どのような入力のときに相違が発生するかを把握することができる。
According to the present invention, the execution of the
10 モジュール実行管理装置
11 記憶部
12 CPU
13 メモリ
14 入力部
15 出力部
16 通信部
21 モジュール定義情報
22 データ定義情報
23 比較結果情報
31、31a、31b モジュール管理情報
32 データ管理情報
33 時刻補正情報
41 モジュール実行手段
42 モード変更手段
43 比較結果表示手段
50、50A、50B、50C モジュール
131 共有メモリ(正)
132 共有メモリ(副)
133 共有メモリ(保存用)
501 アドレス解決手段
502 時刻補正手段
503 ログ出力手段
10 Module
13
132 Shared memory (secondary)
133 Shared memory (for storage)
501 Address resolution means 502 Time correction means 503 Log output means
Claims (13)
前記モジュールは、第1の前記モジュールと、前記第1のモジュールの改版後の新しい世代の第2の前記モジュールとを含む、複数の世代の前記モジュールを含み、
前記メモリは、第1の記憶領域と第2の記憶領域とを含み
前記計算機システムは、
前記第1の記憶領域と前記第2の記憶領域とに同じデータを格納し、
前記第1の記憶領域に格納されるデータを用いて、前記第1のモジュールを実行し、
その後、前記第2の記憶領域に格納されるデータを用いて、前記第2のモジュールを実行し、
前記第1のモジュールの実行結果と、前記第2のモジュールの実行結果とを比較し、
前記第2の記憶領域に複製されるデータを示す情報を保持し、
前記保持される情報に従って、前記第1の記憶領域に格納されるデータのうち、値が変更されるデータを、前記第2の記憶領域に複製することによって、前記第1の記憶領域と前記第2の記憶領域とに同じデータを格納し、
前記第2のモジュールは、その実行のために用いられるデータのうち、前記第2の記憶領域に格納されているデータについては、当該第2の記憶領域に格納されたデータを用いて実行され、前記第2の記憶領域に格納されず、値が変更されないデータについては、前記第1の記憶領域に格納されたデータを用いて実行されることを特徴とする計算機システム。 A computer system including a computer and a computer that executes a plurality of modules that are programs executable by the computer,
The module includes a plurality of generations of the modules, including the first module and a second generation of the second module after revision of the first module ;
The memory includes a first storage area and a second storage area. The computer system includes:
Storing the same data in the first storage area and the second storage area;
Executing the first module using data stored in the first storage area;
Thereafter, using the data stored in the second storage area, the second module is executed,
Comparing the execution result of the first module with the execution result of the second module ;
Holding information indicating data to be replicated in the second storage area;
According to the held information, among the data stored in the first storage area, the data whose value is changed is duplicated in the second storage area, whereby the first storage area and the first storage area are copied. Store the same data in two storage areas,
The second module is executed using the data stored in the second storage area for the data stored in the second storage area among the data used for the execution, The computer system is characterized in that data that is not stored in the second storage area and whose value is not changed is executed using the data stored in the first storage area .
前記第2のモジュールにおいて問題が発生する前、前記第1の記憶領域に格納されるデータを用いて、前記第2のモジュールを実行し、
前記第2のモジュールにおいて問題が発生した場合、前記第1のモジュールを実行した後、前記第2のモジュールを実行することを特徴とする請求項1に記載の計算機システム。 The computer system is
Before the problem occurs in the second module, the second module is executed using the data stored in the first storage area,
The computer system according to claim 1, wherein when a problem occurs in the second module, the second module is executed after the first module is executed.
前記複数のモジュール間の依存関係を保持し、
前記第1のモジュールと第2のモジュールとを実行する場合、前記第2のモジュールと依存関係にある第4の前記モジュールを特定し、
前記第1のモジュールと依存関係があり、かつ、前記第4のモジュールの改版前の古い世代の第3のモジュールを特定し、
前記第3のモジュールと、前記第4のモジュールとを実行することを特徴とする請求項1又は2に記載の計算機システム。 The computer system is
Holding dependencies between the plurality of modules;
When executing the first module and the second module, the fourth module that is dependent on the second module is identified,
A third module of an old generation that is dependent on the first module and that is before the revision of the fourth module;
The computer system according to claim 1, wherein the third module and the fourth module are executed.
前記第1のモジュールの実行結果と、前記第2のモジュールの実行結果とのうち、比較すべきデータを示す情報を保持し、 Of the execution results of the first module and the execution results of the second module, information indicating data to be compared is retained,
前記比較すべきデータを示す情報に従って、前記第1のモジュールの実行結果と、前記第2のモジュールの実行結果とを比較するためのデータを生成することを特徴とする請求項1から4のいずれか一つに記載の計算機システム。 5. The data for comparing the execution result of the first module and the execution result of the second module according to the information indicating the data to be compared is generated. The computer system as described in one.
前記計算機システムは、 The computer system is
前記第1の記憶領域に格納されるデータを、前記第3の記憶領域に複製し、 Copying the data stored in the first storage area to the third storage area;
前記第1のモジュールの実行結果と、前記第2のモジュールの実行結果と、前記第3の記憶領域に複製されたデータとを、比較するためのデータを生成することを特徴とする請求項1から5のいずれか一つに記載の計算機システム。 The data for comparing the execution result of the first module, the execution result of the second module, and the data copied to the third storage area is generated. To 5. The computer system according to any one of 5 to 5.
前記第1のモジュールが実行される時刻と、前記第2のモジュールが実行される時刻とを取得し、 Obtaining a time at which the first module is executed and a time at which the second module is executed;
前記取得された第1のモジュールが実行される時刻と、前記取得された第2のモジュールが実行される時刻との時間差を算出し、 Calculating a time difference between the time when the acquired first module is executed and the time when the acquired second module is executed;
前記取得された第2のモジュールが実行される時刻と、前記算出された時間差とによって、前記第2のモジュールを実行するために用いる時刻を補正することを特徴とする請求項1から6のいずれか一つに記載の計算機システム。 7. The time used for executing the second module is corrected based on the time when the acquired second module is executed and the calculated time difference. The computer system as described in one.
前記第1のモジュールが実行される時刻を取得し、 Obtaining a time at which the first module is executed;
前記第1のモジュールが実行される時刻によって、前記第1及び前記第2のモジュールを実行することを特徴とする請求項1から6のいずれか一つに記載の計算機システム。 7. The computer system according to claim 1, wherein the first and second modules are executed according to a time at which the first module is executed. 8.
前記モジュールは、第1の前記モジュールと、前記第1のモジュールの改版後の新しい世代の第2の前記モジュールとを含む、複数の世代の前記モジュールを含み、 The module includes a plurality of generations of the modules, including the first module and a second generation of the second module after revision of the first module;
前記メモリは、第1の記憶領域と第2の記憶領域とを含み The memory includes a first storage area and a second storage area.
前記方法は、 The method
前記計算機が、前記第1の記憶領域と前記第2の記憶領域とに同じデータを格納し、 The computer stores the same data in the first storage area and the second storage area,
前記計算機が、前記第1の記憶領域に格納されるデータを用いて、前記第1のモジュールを実行し、 The computer executes the first module using data stored in the first storage area,
その後、前記計算機が、前記データを複製された第2の記憶領域に格納されるデータを用いて、前記第2のモジュールを実行し、 Thereafter, the computer executes the second module using the data stored in the second storage area where the data is duplicated,
前記計算機が、前記第1のモジュールが実行された結果と、前記第2のモジュールが実行された結果とを比較し、 The computer compares the result of the execution of the first module with the result of the execution of the second module;
前記計算機は、前記第2の記憶領域に複製されるデータを示す情報を保持し、 The computer holds information indicating data to be copied to the second storage area,
前記方法は、 The method
前記計算機が、前記保持される情報に従って、前記第1の記憶領域に格納されるデータのうち、値が変更されるデータを、前記第2の記憶領域に複製することによって、前記第1の記憶領域と前記第2の記憶領域とに同じデータを格納し、 The computer copies the data whose value is changed among the data stored in the first storage area in accordance with the held information to the second storage area, thereby the first storage. Storing the same data in the area and the second storage area;
前記計算機が、前記第2のモジュールは、その実行のために用いられるデータのうち、前記第2の記憶領域に格納されているデータについては、当該第2の記憶領域に格納されたデータを用いて実行され、前記第2の記憶領域に格納されず、値が変更されないデータは、前記第1の記憶領域に格納されたデータを用いて実行されることを特徴とするモジュール実行方法。 The computer uses the data stored in the second storage area for the data stored in the second storage area among the data used for the execution of the second module. The module execution method is characterized in that data that is executed and is not stored in the second storage area and whose value is not changed is executed using the data stored in the first storage area.
前記第2のモジュールにおいて問題が発生した場合、前記計算機が、前記第1のモジュールを実行した後、前記第2のモジュールを実行することを特徴とする請求項9に記載のモジュール実行方法。 10. The module execution method according to claim 9, wherein when a problem occurs in the second module, the computer executes the second module after executing the first module.
前記方法は、 The method
前記第1のモジュールと第2のモジュールとを実行する場合、前記計算機が、前記第2のモジュールと依存関係にある第4の前記モジュールを特定し、 When executing the first module and the second module, the computer specifies the fourth module that is dependent on the second module;
前記計算機が、前記第1のモジュールと依存関係があり、かつ、前記第4のモジュールの改版前の古い世代の第3のモジュールを特定し、 The computer identifies a third module of an older generation that is dependent on the first module and that is before the revision of the fourth module;
前記計算機が、前記第3のモジュールと、前記第4のモジュールとを実行し、 The computer executes the third module and the fourth module;
前記計算機が、前記第2のモジュールと依存関係にないモジュールについては、前記第1のモジュールと整合する世代のモジュールを実行することを特徴とする請求項9又は10に記載のモジュール実行方法。 11. The module execution method according to claim 9, wherein the computer executes a module of a generation that matches the first module for a module that is not dependent on the second module.
前記メモリは、第3の記憶領域を含み、 The memory includes a third storage area;
前記方法は、 The method
前記計算機が、前記第1の記憶領域に格納されるデータを、前記第3の記憶領域に複製し、 The computer replicates data stored in the first storage area to the third storage area;
前記計算機が、前記比較すべきデータを示す情報に従って、前記第1のモジュールが実行された結果と、前記第2のモジュールが実行された結果とを比較するためのデータを生成し、 The computer generates data for comparing the result of executing the first module and the result of executing the second module according to the information indicating the data to be compared,
前記計算機が、前記第1のモジュールの実行結果と、前記第2のモジュールの実行結果と、前記第3の記憶領域に複製されたデータとを、比較するためのデータを生成することを特徴とする請求項9から11のいずれか一つに記載のモジュール実行方法。 The computer generates data for comparing the execution result of the first module, the execution result of the second module, and the data copied to the third storage area. The module execution method according to any one of claims 9 to 11.
前記計算機が、前記第1のモジュールが実行される時刻と、前記第2のモジュールが実行される時刻とを取得し、 The computer obtains a time at which the first module is executed and a time at which the second module is executed;
前記計算機が、前記取得された第1のモジュールが実行される時刻と、前記取得された第2のモジュールが実行される時刻との時間差を算出し、 The calculator calculates a time difference between a time at which the acquired first module is executed and a time at which the acquired second module is executed;
前記計算機が、前記取得された第2のモジュールが実行される時刻と、前記算出された時間差とによって、前記第2のモジュールを実行するために用いる時刻を補正することを特徴とする請求項9から12のいずれか一つに記載のモジュール実行方法。 The computer corrects a time used to execute the second module based on the time when the acquired second module is executed and the calculated time difference. The module execution method according to any one of 1 to 12.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2010081827A JP5428050B2 (en) | 2010-03-31 | 2010-03-31 | Computer system and module execution method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2010081827A JP5428050B2 (en) | 2010-03-31 | 2010-03-31 | Computer system and module execution method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2011215760A JP2011215760A (en) | 2011-10-27 |
| JP5428050B2 true JP5428050B2 (en) | 2014-02-26 |
Family
ID=44945437
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2010081827A Expired - Fee Related JP5428050B2 (en) | 2010-03-31 | 2010-03-31 | Computer system and module execution method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5428050B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2018018121A (en) * | 2016-07-25 | 2018-02-01 | 富士通株式会社 | Database control program, database control method, and database control apparatus |
| US10571901B2 (en) * | 2017-08-08 | 2020-02-25 | Fisher-Rosemount Systems, Inc. | Controlled roll-out of module classes |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0962626A (en) * | 1995-08-21 | 1997-03-07 | Hitachi Ltd | Online test method for distributed processing system |
| JPH10320234A (en) * | 1997-05-21 | 1998-12-04 | Hitachi Ltd | How to test software automatically |
| JP2000293365A (en) * | 1999-02-03 | 2000-10-20 | Matsushita Electric Ind Co Ltd | Program configuration management device |
| JP2005165600A (en) * | 2003-12-02 | 2005-06-23 | Nec Corp | Transaction processing system, transaction processing method and program |
| JP2007241432A (en) * | 2006-03-06 | 2007-09-20 | Mitsubishi Electric Corp | Software test apparatus, software test method, and software test program |
| JP2008077215A (en) * | 2006-09-19 | 2008-04-03 | Toshiba Corp | Payment program inspection apparatus and inspection method |
-
2010
- 2010-03-31 JP JP2010081827A patent/JP5428050B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2011215760A (en) | 2011-10-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111538719B (en) | Data migration method, device, equipment and computer storage medium | |
| JP5970617B2 (en) | Development support system | |
| US10019256B2 (en) | Systems and methods for incremental software development | |
| JP6050342B2 (en) | Managing replicated virtual storage at the recovery site | |
| RU2554847C2 (en) | Reference points for file system | |
| CN107102916B (en) | Replaying jobs at a secondary location of a service | |
| US7509544B2 (en) | Data repair and synchronization method of dual flash read only memory | |
| US20130198134A1 (en) | Online verification of a standby database in log shipping physical replication environments | |
| JP2014142678A (en) | Virtual server transfer plan generation method and system | |
| CN113515303B (en) | Project transformation method, device and equipment | |
| US20160266924A1 (en) | Apparatus and method for identifying a virtual machine having changeable settings | |
| US20140181791A1 (en) | Software development work item management system | |
| CN118567692A (en) | Basic input and output system firmware upgrade method, product, device and medium | |
| CN111400256A (en) | Method and device for calling resource file by application program | |
| Chen et al. | Replication-based fault-tolerance for large-scale graph processing | |
| US6073126A (en) | Multi-computer system capable of abstractly and integrally describing system configuration and control contents | |
| JP5428050B2 (en) | Computer system and module execution method | |
| WO2012104991A1 (en) | Program test method, program test system, and program | |
| JP2013161219A (en) | Code generation device and code generation program | |
| CN113448493B (en) | Method, electronic device and computer readable medium for backing up data | |
| US11429537B2 (en) | Method, device, and computer program product for managing storage system | |
| JP6327028B2 (en) | Object storage system, control method thereof, and control program thereof | |
| WO2012066635A1 (en) | Test method, test device, and test execution program | |
| Miles et al. | Software resilience using kokkos ecosystem | |
| JP7676926B2 (en) | Version control method, version control program, and version control system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120309 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120312 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130626 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130702 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130830 |
|
| 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: 20131111 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 5428050 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| LAPS | Cancellation because of no payment of annual fees |