JP4811364B2 - Terminal device, system, terminal control method, and terminal program - Google Patents
Terminal device, system, terminal control method, and terminal program Download PDFInfo
- Publication number
- JP4811364B2 JP4811364B2 JP2007174043A JP2007174043A JP4811364B2 JP 4811364 B2 JP4811364 B2 JP 4811364B2 JP 2007174043 A JP2007174043 A JP 2007174043A JP 2007174043 A JP2007174043 A JP 2007174043A JP 4811364 B2 JP4811364 B2 JP 4811364B2
- Authority
- JP
- Japan
- Prior art keywords
- server
- information
- connection destination
- servers
- destination list
- 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
- 238000000034 method Methods 0.000 title claims description 38
- 238000004891 communication Methods 0.000 claims description 75
- 238000012545 processing Methods 0.000 claims description 30
- 230000005540 biological transmission Effects 0.000 claims description 3
- 238000001514 detection method Methods 0.000 description 15
- 238000012544 monitoring process Methods 0.000 description 13
- 230000004044 response Effects 0.000 description 10
- 230000006870 function Effects 0.000 description 9
- 238000011084 recovery Methods 0.000 description 6
- 230000005856 abnormality Effects 0.000 description 5
- 230000000694 effects Effects 0.000 description 5
- 101100454361 Arabidopsis thaliana LCB1 gene Proteins 0.000 description 4
- 101100171146 Oryza sativa subsp. japonica DREB2C gene Proteins 0.000 description 4
- 230000002159 abnormal effect Effects 0.000 description 4
- 230000000903 blocking effect Effects 0.000 description 3
- 230000015556 catabolic process Effects 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 2
- 238000006731 degradation reaction Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000009499 grossing Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 235000006719 Cassia obtusifolia Nutrition 0.000 description 1
- 235000014552 Cassia tora Nutrition 0.000 description 1
- 244000201986 Cassia tora Species 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
Images
Landscapes
- Information Transfer Between Computers (AREA)
- Computer And Data Communications (AREA)
Description
本発明は、端末装置、システム、端末制御方法および端末プログラムに関する。 The present invention relates to a terminal device, a system, a terminal control method, and a terminal program.
特許文献1には、複数あるサーバの一と通信するクライアントが、あるサーバが選択したサーバと通信するシステムが開示されている。この技術はクライアントが主体となって、通信先サーバを決定するものではない。
特許文献2には、サーバ(受信先)が中継コンピュータを通じてサーバ(送信元)の通知コードを受信するシステムが開示されている。この技術はサーバ(受信先)が主体となって、通信先中継コンピュータを選択するものではない。
特許文献1および2の技術は、各々単独またはその組み合わせのいずれにおいても、端末の通信先サーバは端末以外のものが主体となって選択しなければならないという課題があった。本発明はこの課題を解決するための端末装置、システム、端末制御方法および端末プログラムを提供することにある。
The techniques of
本発明の一例の端末装置は、記憶域に格納された接続先リストと、端末APと、接続された複数の第1サーバの各々から取得した第1情報に基づいて前記複数の第1サーバの各々の状態情報を前記接続先リストに記憶し、前記複数の第1サーバの状態情報に基づいて前記複数の第1サーバからひとつを選択して当該選択した第1サーバと前記端末APとの間の通信接続を行う端末プログラムを備える。 The terminal device according to an example of the present invention includes a plurality of first servers based on first information acquired from a connection destination list stored in a storage area, a terminal AP, and a plurality of connected first servers. Each state information is memorize | stored in the said connecting point list, based on the state information of said several 1st server, one is selected from these several 1st servers, Between the said selected 1st server and said terminal AP The terminal program which performs communication connection of is provided.
本発明の一例の端末制御方法は、コンピュータが、前記コンピュータに接続された複数の第1サーバの各々から第1情報を取得する取得行程と、前記第1情報に基づいて前記複数の第1サーバの各々の状態情報を記憶域に格納された接続先リストに記憶する記憶行程と、前記複数の第1サーバの状態情報に基づいて前記複数の第1サーバからひとつを選択して当該選択した第1サーバと前記コンピュータに搭載された端末APとの間の通信接続を行う接続行程を有する。 The terminal control method according to an example of the present invention includes an acquisition process in which a computer acquires first information from each of a plurality of first servers connected to the computer, and the plurality of first servers based on the first information. And selecting the one of the plurality of first servers based on the storage process of storing the state information of each in the connection destination list stored in the storage area and the state information of the plurality of first servers. 1 has a connection process for performing communication connection between the server and the terminal AP mounted on the computer.
本発明の一例の端末プログラムは、コンピュータに、前記コンピュータに接続された複数の第1サーバの各々から第1情報を取得する取得処理と、前記第1情報に基づいて前記複数の第1サーバの各々の状態情報を記憶域に格納された接続先リストに記憶する記憶処理と、前記複数の第1サーバの状態情報に基づいて前記複数の第1サーバからひとつを選択して当該選択した第1サーバと前記コンピュータに搭載された端末APとの間の通信接続を行う接続処理を実行させる。 The terminal program of an example of the present invention includes: an acquisition process for acquiring first information from each of a plurality of first servers connected to the computer; and a plurality of first servers based on the first information. A storage process for storing each state information in a connection destination list stored in a storage area, and a first one selected from the plurality of first servers based on the state information of the plurality of first servers. Connection processing for performing communication connection between the server and the terminal AP installed in the computer is executed.
本発明によれば、端末が主体となって通信先サーバを選択することができる。 According to the present invention, a communication destination server can be selected mainly by a terminal.
本発明の第1の実施例(実施例1)は以下の通りである。本実施例は、図1および図2が示すように以下の3層の構造から構成されている店舗システム10である。
1)クライアントAP12を備え、オペレータが操作するクライアントPC1n。
2)サーバAP22を備えるAPサーバ2m。
3)業務用のデータベースを制御するDBMS32を備えるDBサーバ3p。
The first embodiment (embodiment 1) of the present invention is as follows. A present Example is the
1) A client PC 1n having a
2) AP
3) A
ここで、APは、アプリケーションプログラムを意味する。クライアントPC1nは端末装置とも呼ばれるコンピュータである。APサーバ2mは第2サーバとも呼ばれる。DBMS32はデータベース管理システムを意味する。また、DBサーバ3pは第2サーバとも呼ばれる。
Here, AP means an application program. The client PC 1n is a computer also called a terminal device. The
店舗システム10は、店舗にクライアントPC1nを備え、センタにAPサーバ2m、DBサーバ3pを備える。
店舗には業務処理用のサーバコンピュータを備えていない。店舗システム10は、クライアントPC1n、APサーバ2m、DBサーバ3pの各々を一台備えていても複数台備えていてもよい。各々の台数は一致している必要はない。サーバAP22は業務処理用のロジックを含んでいる。本実施例では、クライアントAP12は操作性の観点からNET Frameworkアプリケーションであると仮定する。サーバAP22は、再利用性、信頼性などの観点からのEnterprise JavaBean(登録商標)(EJB)アプリケーションとしている。通信はCORBA(Common Object Request Broker Architecture)やSOAP(Simple Object Access Protocol)の規約に準拠して行う。
The
The store does not have a server computer for business processing. The
店舗システム10において、接続タイムアウト設定値は、クライアントPC1nがタイムアウトによる接続エラーを検出したさいに、APサーバ2m内で生き残るプロセスが無いように設定される。すなわち、クライアントPC1nがAPサーバ2mの応答監視に使用する接続タイムアウト設定値は、APサーバ2mがDBサーバ3pの応答監視に使用する接続タイムアウト設定値より長い。このため、DBサーバ3pで異常が発生した時は、クライアントPC1nがタイムアウトを検出する前に、APサーバ2mが異常を検出しAPサーバ2m内の関連プロセスは異常終了することとなる。
In the
なお、本発明の実施例は店舗システムに限定されない。本発明は、倉庫システムや放送システムなど他のシステムにも適用可能である。 In addition, the Example of this invention is not limited to a store system. The present invention can also be applied to other systems such as a warehouse system and a broadcasting system.
図2は本実施例の詳細な構成を示す。クライアントPC1nの構成は下記通りである。 FIG. 2 shows the detailed configuration of this embodiment. The configuration of the client PC 1n is as follows.
1)クライアントAP12
これは、店舗システム10の業務処理を行うアプリケーションプログラム(AP)の一部である。これは、APサーバ2m側のAPであるサーバAP22と共同して業務処理を実行する。
1) Client AP12
This is a part of an application program (AP) that performs business processing of the
2)接続先判定部品CA
この部品は、接続するAPサーバ2mの識別子をCL接続先情報保持部品CBから取得する。この部品は、CL接続先情報保持部品CBからすべてのAPサーバ2mへの接続が出来ない旨の応答を受け取った場合は、APサーバ2mへの接続を止めてクライアントPC1n単独でのローカルな処理を行うように決定する。
2) Connection destination determination component CA
This component acquires the identifier of the
3)CL接続先情報保持部品CB
この部品は、CL接続先リスト14に格納されている各APサーバ2mの情報を管理する。
3) CL connection destination information holding component CB
This component manages information of each
4)接続先切り替え部品CC
この部品は、APサーバ2mとの間の通信結果報告を通信部品CEから受け取ってチェックし、接続エラーやタイムアウトの発生を検出する。この部品は、接続エラー時には再試行を行う。また、この部品は、通信結果報告に従って、CL接続先情報保持部品CB経由でCL接続先リスト14の情報を更新する。
4) Connection destination switching component CC
This component receives a communication result report with the
さらにこの部品は、接続先生死検知部品CDから特定のAPサーバ2mに接続されるDBサーバ3pがすべて障害という情報を受け取った場合、そのAPサーバ2mに関するCL接続先リスト14の情報をCL接続先情報保持部品CB経由で更新する。この部品は、接続先生死検知部品CDから障害中であったAPサーバ2mの復帰が通知された場合にも、そのAPサーバ2mに関するCL接続先リスト14の情報をCL接続先情報保持部品CB経由で更新する。
In addition, when all the
5)接続先生死検知部品CD
この部品は、設定により定められたルールに基づき、CL接続先リスト14に登録されているAPサーバ2mへのポーリングを通信部品CE経由で行う。ポーリングは、APサーバ2mが備えるAPステータス返却部品AFに対して行い、クライアントPC1nとAPサーバ2m間の接続確認およびレスポンスタイム確認を行う。ポーリングは、APサーバ2mの持つDBサーバ3pの状態も確認する。本部品は、ポーリングによりAPサーバ2mの復帰を確認したら接続先切り替え部品CCへ通知する。APサーバ2mの復帰は、APサーバ2mへの通信が成功して当該APサーバ2mに接続されているDBサーバ3pのステータスが正常であることにより検出される。
5) Connection teacher death detection component CD
This component polls the
6)通信部品CE
本部品はAPサーバ2mと通信をしてその状態情報(第1情報)をデータ受信や通信時間監視により取得する。ここでAPサーバ2mから取得される状態情報は、APサーバ2mから受信して得られる情報と、APサーバ2mへの通信がタイムオーバーすることで間接的に得られる情報の両者を含む。CL接続先リスト14のAPステータス18mは、ここで取得した状態情報基づいて設定される。
6) Communication parts CE
This part communicates with the
7)CL接続先リスト14
本データは、クライアントPC1nごとに負荷分散と障害時切替先平滑化の為に設けられた、当該クライアントPC1nから接続可能なAPサーバ2mの一覧表である。本データは、クライアントPC1nの記憶域に格納されている。クライアントPC1nは、業務処理の通信開始時に、このCL接続先リスト14に基づいて接続するAPサーバ2mを選択して接続する。図3によれば、CL接続先リスト14は、接続先の候補となるAPサーバ2mの識別子AP_ID16m、当該APサーバ2mのAP通信アドレス17mおよび当該APサーバ2mの運転状態を示すAPステータス18mを包含する。ここで、APステータス18mは、正常状態(Active)、高負荷状態(Busy)もしくは障害状態(Dead)のいずれかの値をとる。APステータス18mは、第1サーバの状態情報とも呼ばれる。
7) CL
This data is a list of
8)ローカルDB15
これは、クライアントPC1n単独でローカルな処理を行うときに使用するデータベースである。
8) Local DB15
This is a database used when local processing is performed by the client PC 1n alone.
なお、接続先判定部品CA、CL接続先情報保持部品CB、接続先切り替え部品CC、接続先生死検知部品CDおよび、通信部品CEは、クライアントミドルウェア13を構成する。クライアントミドルウェア13は、上記各部品の機能を包含していれば良く、機能分割は上記部品通りの分割に限られない。なお、クライアントミドルウェア13は端末プログラムとも呼ばれる。また、ローカルDB15が無い場合もある。図9は、こうした条件を加味したクライアントPC1nの構成を示す。
The connection destination determination component CA, the CL connection destination information holding component CB, the connection destination switching component CC, the connection teacher death detection component CD, and the communication component CE constitute the
図2によれば、APサーバ2mの構成は下記通りである。
According to FIG. 2, the configuration of the
1)サーバAP22
これは、店舗システム10の業務処理を行うアプリケーションプログラム(AP)の一部である。これは、クライアントPC1n側のAPであるクライアントAP12と共同して業務処理を実行する。
1) Server AP22
This is a part of an application program (AP) that performs business processing of the
2)コネクション部品AA
本部品は、DBサーバ3pへの接続方法をサーバAP22へ提供する。この部品は、ステータス取得部品ABへ振分キーを渡して、振分キーに基づいて選択されたDBサーバ3pとの接続を確立する。
2) Connection parts AA
This component provides the
3)ステータス取得部品AB
本部品は、振分キーに基づく接続先優先順位を決定し、接続するDBサーバ3pの識別子(DB_ID26p)をAP接続先情報保持部品ACから取得し、コネクション部品AAに返却する。
3) Status acquisition part AB
This component determines the connection destination priority based on the distribution key, acquires the identifier (
4)AP接続先情報保持部品AC
本部品は、AP接続先リスト24に格納されている各DBサーバ3pの情報を管理する。
4) AP connection destination information holding component AC
This component manages information of each
5)ポーリング部品AE
本部品は、AP接続先リスト24に登録されているDBサーバ3pを対象にポーリングを行う。このポーリングはDBサーバ3pと通信をしてその状態情報(第2情報)を受信や通信時間監視により取得する。ここでDBサーバ3pから取得される状態情報は、DBサーバ3pから受信して得られる情報と、DBサーバ3pへの通信がタイムオーバーすることで間接的に得られる情報の両者を含む。AP接続先リスト24のDBステータス28pは、ここで取得した状態情報に基づいて設定される。
5) Polling parts AE
This component polls the
ポーリングで行われる通信はノンブロッキングモードで行う。ポーリングの通信が、DBMS32に対する通信を遅延させないためである。さらに、DBMS32との通信や他のAPサーバ2mによるポーリングに於いてストールが発生した場合でも、本部品が不要な待ち合わせを行わない為でもある。
Communication performed by polling is performed in a non-blocking mode. This is because polling communication does not delay communication with the
6)APステータス返却部品AF
本部品は、クライアントPC1nのポーリングを受けて、AP接続先情報保持部品AC経由でAP接続先リスト24よりDBステータス28pを取得して、クライアントPC1nに送信する。
6) AP status return part AF
This component receives polling of the client PC 1n, acquires the
7)AP接続先リスト24
これは、APサーバ2mごとに負荷分散と障害時切替先平滑化の為に設けられた、当該APサーバ2mから接続可能なDBサーバ3pの一覧表である。本データは、APサーバ2mの記憶域に格納されている。APサーバ2mは、業務処理の通信開始時に、このAP接続先リスト24に基づいて接続するDBサーバ3pを選択して接続する。図4によれば、AP接続先リスト24は、接続先の候補となるDBサーバ3pの識別子DB_ID26p、当該DBサーバ3pのDB通信アドレス27pおよび当該DBサーバ3pの運転状態を示すDBステータス28pを包含する。ここで、DBステータス28pは、正常状態(Active)、高負荷状態(Busy)もしくは障害状態(Dead)のいずれかの値をとる。DBステータス28pは、第2サーバの状態情報とも呼ばれる。
7) AP
This is a list of
なお、コネクション部品AA、ステータス取得部品AB、AP接続先情報保持部品AC、ポーリング部品AEおよび、APステータス返却部品AFは、APサーバミドルウェア23を構成する。APサーバミドルウェア23は、上記各部品の機能を包含していれば良く、機能分割は上記部品通りの分割に限られない。なお、APサーバミドルウェア23はサーバプログラムとも呼ばれる。
The connection component AA, the status acquisition component AB, the AP connection destination information holding component AC, the polling component AE, and the AP status return component AF constitute the
図2によれば、DBサーバ3pの構成は以下の通りである。
According to FIG. 2, the configuration of the
1)DBMS32
これは、サーバAP22の要求を受けてデータベースの参照更新などの管理を行う。
1) DBMS32
In response to a request from the
2)DBステータス監視部品DA
本部品はDBMS32の状態を監視し、動作不能(Dead)、過負荷によるレスポンスタイム遅延(Busy)の発生や障害からの復旧(Alive)時にその状態をステータス管理部品DDに通知する。監視は所定のSQL(Structured Query Language)文を発行してその戻り値およびレスポンスタイムを確認することで行う。本実行例は、『SELECT 1 FROM DUAL』文を使用している。
2) DB status monitoring component DA
This component monitors the state of the
3)ステータス管理部品DD
本部品は、DBステータス監視部品DAが通知してきたDBMS32の状態情報(データベースの状態情報)を保持・管理する。
3) Status management component DD
This component holds and manages the status information (database status information) of the
4)通信待ち受け部品DC
本部品は、APサーバ2mからの通信をノンブロッキングモードで受け付ける。本部品は、APサーバ2mから通信があった際にステータス管理部品DDからデータベースの状態情報を取得しAPサーバ2mへ返却する。
4) Communication standby part DC
This component accepts communication from the
なお、DBステータス監視部品DA、ステータス管理部品DDおよび、通信待ち受け部品DCは、DBサーバミドルウェア33の一部を構成する。DBサーバミドルウェア33は、上記各部品の機能を包含していれば良く、機能分割は上記部品通りの分割に限られない。なお、DBサーバミドルウェア33はいわゆるOSの一部として実装されてもよい。
The DB status monitoring part DA, the status management part DD, and the communication standby part DC constitute part of the
次に、本実施例の動作について図面を参照して説明する。
ここでは、当初はすべてのAPサーバ2mおよびDBサーバ3pは正常で、CL接続リスト14内のAPステータス18mおよびAP接続リスト24内のDBステータス28pはAliveであるとする。下記文中の (3-1) のような表記は、「図3に示したステップ3-1」を示す。
Next, the operation of the present embodiment will be described with reference to the drawings.
Here, it is assumed that all the
図2、図5および図6は、クライアントPC1nに於けるAPサーバ2mの振分・切り替え機能を示す。
2, 5 and 6 show the distribution / switching function of the
1.正常時の処理
クライアントAP12は、APサーバ2mとの通信開始に当たり、接続先判定部品CAを呼び出す(5-1)。接続先判定部品CAはCL接続先情報保持部品CBを呼び出す(5-1)。CL接続先情報保持部品CBは、CL接続先リスト14に格納されているAPサーバ2mのAP通信アドレス17mからひとつを所定の優先順位に従って選択して取得する(5-2)。
1. Normal Processing When the
取得が成功する(5-3で取得可となる)のは当該APサーバ2mのAPステータス18mがAliveまたはBusyとなっている場合である。AliveのAPサーバ2mがある時には、BusyのAPサーバ2mのAP通信アドレス17mは選択されない。通信部品CEが、取得されたAP通信アドレス17mで指定されるAPサーバ2mと通信する(5-4)。
Acquisition is successful (acquisition is possible at 5-3) when the
接続先切り替え部品CCはこの通信結果を受け取って通信が正常である(5-6,5-8がともに正常となる)ことを確認する。その後、クライアントAP12は当該APサーバ2mと通信接続され、当該APサーバ2m上のサーバAP22と連携して業務処理を実行する(5-10)。業務処理でエラーが発生しなければ(5-12で正常となる)クライアントAP12は処理を終了する。
The connection destination switching component CC receives this communication result and confirms that the communication is normal (both 5-6 and 5-8 are normal). Thereafter, the
なお、APサーバ2mへは正常に通信できても、APサーバ2mがDBサーバ3pとの通信に失敗することがある。これは、DBサーバ3pがすべて障害の場合に発生する。この場合、クライアントAP12はサーバAP22からその旨の通知を受けることになる(5-12でエラーとなる)。この通知を受けてCL接続先情報保持部品CBは、CL接続先リスト14のすべてのAPステータス18mをDeadに更新する(5-13)。そして、クライアントAP12は接続先生死検知部品CDを起動してポーリングを行い(5-13)、障害の復旧を待ち合わせることになる。
Even if the communication with the
2.現在の接続先APサーバ2mが過負荷な場合の処理
接続先切り替え部品CCが、通信部品CEの通信(5-4)でレスポンスタイムが所定の許容時間1を超えた(5-6でタイムオーバーとなる)ことを検出する。これを受けて、CL接続先情報保持部品CBは、CL接続先リスト14内のAPステータス18mをBusyに更新する(5-7)。
2. Processing when the current connection
その後、クライアントAP12は通信が終了するのを待ち合わせて、正常終了(5-8で正常)時には、そのまま業務処理を実行する(5-10)。この正常終了時には、クライアントAP12は接続先生死検知部品CDを起動してポーリングを行い、その後、再度接続先判定部品CAを起動して、別のAPサーバ2mのAP通信アドレス17mを取得する(5-2)ようにしてもよい。
Thereafter, the
3.現在の接続先APサーバ2mが障害の場合の処理
接続先切り替え部品CCが、通信部品CEの通信(5-4)で接続エラーが発生した(5-8でエラーとなる)ことを検出する。この接続エラーは、通信が所定の許容時間2(許容時間1より長い)を超えたことで検出される。これを受けて、CL接続先情報保持部品CBは、CL接続先リスト14内のAPステータス18mをDeadに更新する(5-9)。クライアントAP12は接続先生死検知部品CDを起動してポーリングを開始し(5-9)、その後、再度接続先判定部品CAを起動して、所定の優先順位の下位にある別のAPサーバ2mのAP通信アドレス17mを取得する(5-2)。
3. Processing when current connection
4.すべてのAPサーバ2mが障害の場合の処理
CL接続先リスト14に登録されているAPサーバ2mのAPステータス18mがすべてDeadであるとき、接続先判定部品CAはAP通信アドレス17mを取得(5-2)に失敗する。この(5-3で取得不可となる)場合、クライアントAP12は通信部品CEを用いた通信はおこなわず、単独にローカル処理できる範囲の業務処理を行う(5-6、5-11)。このとき、クライアントAP12は、必要に応じてローカルDB15を使用する。
4). Processing when all
When the AP statuses 18m of the
5.APサーバ2mの復旧時の処理
APサーバ2mの復旧は図6に示すクライアントPC1nのポーリングにより監視する。このポーリングは、接続先生死検知部品CDがCL接続先リスト14に登録されているすべてのAPサーバ2mを対象に行う。
5. Processing when
Recovery of the
同部品は、ポーリングを開始するとCL接続先リスト14からAP通信アドレス17mを取得し、通信部品CEを用いてAPサーバ2m上のAPステータス返却部品AFと通信する(6-2)。この通信が正常(6-3で正常)な場合、接続先生死検知部品CDはAPステータス返却部品AFからAP接続先リスト24内のすべてのDBステータス28pを受信する。
When the polling starts, the component acquires the
接続先生死検知部品CDはDBステータス28pのチェックを行う(6-4)。同部品は、正常(AliveまたはBusy)なDBサーバ3pが存在する(6-5で有となる)と、CL接続先情報保持部品CBを経由して、CL接続先リスト14のAPサーバ2mのAPステータス18mを更新する(6-7)。
The connection teacher death detection component CD checks the
この処理は次の通りである。接続先生死検知部品CDは、あるAPサーバ2mからAliveを示すDBステータス28pを受信すれば当該APサーバ2mのAPステータス18mはAliveとする。AliveなDBステータス28pは受信しないがBusyを示すものを受信した場合に同部品は、当該APサーバ2mのAPステータス18mをBusyに設定する。なお、あるAPサーバ2mから受信したすべてのDBステータス28pがDeadであれば、当該APサーバ2mのAPステータス18mはDeadが設定される。
This process is as follows. If the connection teacher death detection component CD receives the
ポーリングしたすべてのAPサーバ2mについて、通信異常(6-3で異常)または全DBステータス28pが異常(Dead)である(6-5で無となる)場合は、一定時間後に再度ポーリングを行う(6-6)。
For all
なお、以上の行程(処理)は、接続行程(5−1、5−2、5−3、5−4)、取得行程(5−6、5−8、6−2、6−3、6−4、6−5)および記憶行程(5−7、5−9、5−13、6−7)に大別される。これらの行程が、クライアントミドルウェア13により実行される。図9は、この様子を示す。
In addition, the above process (process) is a connection process (5-1, 5-2, 5-3, 5-4), an acquisition process (5-6, 5-8, 6-2, 6-3, 6). -4, 6-5) and memory steps (5-7, 5-9, 5-13, 6-7). These processes are executed by the
ポーリングは、システムの初期設定時およびその後の一定時間ごとにも実施される。 Polling is performed at the time of initial setting of the system and at regular intervals thereafter.
図2、図7および図8は、APサーバ2mに於けるDBサーバ3pの振替・切り替え機能を示す。
2, 7 and 8 show the transfer / switching function of the
1.正常動作
サーバAP22は、DBサーバ3pとの通信開始に当たり、コネクション部品AAを呼び出す(7-1)。コネクション部品AAは、ステータス取得部品ABを呼び出して特定の振分キー(たとえば店舗コード)に対応して、接続すべき優先順にDBサーバ3pの識別子(DB_ID26p)のリストを取得する(7-2)。コネクション部品AAは、当該リストから優先度の最も高いDBサーバ3pのDB_ID26pを選択する。そして、同部品は、当該DBサーバ3pのDB通信アドレス27pをAP接続先保持部品AC経由でAP接続先リスト24から取得する(7-3)。取得が成功する(7-4で取得可となる)のはDBステータス28pがAliveまたはBusyとなっているDBサーバ3pがある場合である。AliveのDBサーバ3pがある時には、BusyのDBサーバ3pのDB通信アドレス27pは選択されない。
1. Normal operation The
コネクション部品AAは選択されたDBサーバ3pと通信を行う。通信が正常(7-6で正常)であれば、サーバAP22は当該DBサーバ3pと通信接続され、当該DBサーバ3p上のデータベースにアクセスを行って業務処理を実行する(7-8)。業務処理でエラーが発生しなければ(7-9で正常となる)サーバAP22は処理を終了する。
The connection component AA communicates with the selected
コネクション部品AAは選択されたDBサーバ3pとの通信が異常(7-6でエラー)であれば、前述のリストにおいて順位の低いDBサーバ3pのDB通信アドレス27pを取得して接続しようとする(7-7)。
If the communication with the selected
2.現在の接続先DBサーバ3pが障害時の処理
サーバAP22がデータベース(DBサーバ3p)にアクセス中に障害となった(7-9でエラー)ときはサーバAP22にアクセスエラーが返却される(7-10)。この場合は、データベース内のデータが不完全な状態になっている可能性もあるため、このエラーは接続エラーとは別の形でサーバAP22に報告される。このエラーはサーバAP22からクライアントPC1nにも通知される(5-12)。
2. Processing when the current connection
また、DBサーバ3pでは、DBステータス監視部品DAが障害(Dead状態)やレスポンス遅延(Busy状態)等の異常を検出して、ステータス管理部品DDが保持するデータベースの状態情報を更新する。この情報は、図6のポーリングを通じてAP接続先リスト24のDBステータス28pに反映される。
In the
3.すべてのDBサーバ3pが障害の場合の処理
ステータス取得部品ABは、すべてのDBサーバ3pが障害であることを検出した(7-4で取得不可となる)場合は、サーバAP22にDB接続エラーを通知する(7-5)。このエラーはサーバAP22からクライアントPC1nにも通知される(5-12)。クライアントPC1nでは、CL接続リストのAPステータス18mをDeadへと更新する(5-13)。
3. Processing when all
4.DBサーバ3p復旧時の処理
DBステータス監視部品DAは、DBMS32の状態を監視してその状態が正常であると判断すると、ステータス管理部品DDでその状態を保持する。このデータベースの状態情報は図6のAPサーバ2mのポーリングにより、AP接続先リスト24のDBステータス28pに反映される。
4). Processing when
When the DB status monitoring component DA monitors the status of the
APサーバ2mにおいては、定期的にAP接続先リスト24に基づいてすべてのDBサーバ3pの状態を定期的にポーリングしている。このポーリングにおいては、先ずポーリング部品AEがDBサーバ3p上で待ち受けている通信待ち受け部品DCと通信を行う(8-1)。
The
この通信が正常(8-2で正常)な場合、ポーリング部品AEは、データベースの状態情報を受信して、その状態情報をチェックする(8-3)。データベースの状態情報は、DBサーバ3pにおいて、DBステータス監視部品DAがDBMS32の状態を監視することで生成している。データベースの状態情報は、ステータス管理部品DDで保持され、通信待ち受け部品DCにより、ポーリング部品AEに通知される。
If this communication is normal (normal in 8-2), the polling component AE receives the status information of the database and checks the status information (8-3). The database status information is generated by the DB status monitoring component DA monitoring the status of the
ポーリング部品AEは、データベースの状態情報の内容に基づきAP接続先情報保持部品ACを経由してAP接続先リスト24のDBステータス28pを更新する。ポーリング部品AEは、データベースの状態情報が正常(8-4で正常)ならばAliveを設定し(8-5)、異常(8-4で異常)ならば、BusyまたはDeadを設定する(8-6)。なお、同部品は、DBサーバ3pとの通信でエラーが発生した(8-2でエラーとなる)場合はDeadを設定する(8-6)。
The polling component AE updates the
本実施例の効果は、負荷分散のためのハードウェアのコストを削減できることにある。さらに、第2の効果は、負荷分散に関わるシングルポイント・オブ・フェイリアを除去できることにある。 The effect of the present embodiment is that the cost of hardware for load distribution can be reduced. Furthermore, the second effect is that a single point of failure related to load distribution can be removed.
その理由は、クライアントミドルウェア13がCL接続先リスト14を参照してAPサーバ2mの振替・切り替え機能を実現できるために、負荷分散装置を置く必要がないためである。
The reason is that the
第3の効果は、DBサーバ3p障害時の切り替えに遅延が発生しないことである。その理由は、APサーバ2mが行うDBサーバ3pのポーリングに於いて、APサーバミドルウェア23およびDBサーバミドルウェア33においてノンブロッキング通信によりにて情報をやり取りするからである。
The third effect is that there is no delay in switching when the
第4の効果は、クライアントAP12が、DBサーバ3pの全障害が発生したこと、および復旧したことを、DBサーバ3pと通信することなく検出して対応できることである。その理由は、DBサーバ3pの状態情報がAPサーバ2mを経由して、クライアントPC1nにまで到達する方式をとっているからである。
The fourth effect is that the
クライアントミドルウェア13、APサーバミドルウェア23およびDBサーバミドルウェア33は、いずれも専用ハードウェアとして実現してもよい。または、プログラムがメモリに格納され、プロセッサーがプログラムを実行することにより、これらの機能を実現してもよい。
The
本発明の第2の実施例は以下の通りである。実施例1の店舗システム10は、すべてのAPサーバ2mが障害の場合に限り、クライアントAP12が単独でローカルな処理を行う(図5における5-3、5-5、5-11)。第2の実施例は、基本的にクライアントAP12が単独でローカルな処理を行い、ローカルな処理で問題が発生したときにAPサーバ2mに接続するようにする。これにより、ローカル処理が主体のアプリケーションに本発明を適用できるようになる。
The second embodiment of the present invention is as follows. In the
本発明の第3の実施例は以下の通りである。実施例1の店舗システム10は、接続先APサーバ2mが障害の場合、ポーリングを起動している(図5における5-9)。第3の実施例では、これを全APサーバ2mが障害の場合にだけポーリングを起動する。APサーバ2mの復旧検知遅れが許容される場合に、ポーリングの発生頻度を下げることができる。
The third embodiment of the present invention is as follows. The
本発明の第4の実施例は以下の通りである。実施例1の店舗システム10は、接続先APサーバ2mが障害の場合ポーリングを起動する(図5における5-9)。その後、実施例1の店舗システム10は、再度接続先判定部品CAを起動して、所定の優先順位の下位にある別のAPサーバ2mのAP通信アドレス17mを取得(5-2)し、当該別のAPサーバ2mと接続する(5-4)ことになる。第4の実施例の店舗システム10は、その接続後、ポーリングで当該別のAPサーバ2mより所定の優先順位で上位のAPサーバ2mが正常であることが検出されたときに、当該上位のAPサーバ2mに接続し直す。これは、接続先生死検知部品CDが自動的に行ってもよい。または同部品はクライアントAP12に通知するだけとし、クライアントAP12が適切なタイミングで接続し直してもよい。これによりAPサーバ2mに処理能力の差異がある場合に、適切な負荷分散をはかることができる。
The fourth embodiment of the present invention is as follows. The
本発明の第5の実施例は以下の通りである。実施例1の店舗システム10は、すべてのAPサーバ2mが障害の場合に、クライアントAP12が単独でローカルな処理を行う(図5における5-3、5-5、5-11)。第5の実施例の店舗システム10は、その後のポーリングで正常なAPサーバ2mがあることが検出されたときに、ローカル処理をやめて当該APサーバ2mに接続する。これは、接続先生死検知部品CDが自動的に行ってもよい。または同部品はクライアントAP12に通知するだけとし、クライアントAP12が適切なタイミングで接続してもよい。これにより、APサーバ2mの復旧に迅速に対応することができる。
The fifth embodiment of the present invention is as follows. In the
本発明の第6の実施例は以下の通りである。上述の実施例では、APサーバ2mとDBサーバ3pは別のサーバである。しかし、第6の実施例では、APサーバ2mとDBサーバ3pを併せて一台のサーバコンピュータとして実装してもよい。本実施例では、同一のサーバ内のDBMS32の障害や性能劣化をDBサーバ3pの障害や性能劣化として監視する。本実施例によれば、安価に本発明を利用したシステムを実現できる。
The sixth embodiment of the present invention is as follows. In the above-described embodiment, the
10 店舗システム
1n クライアントPC
12 クライアントAP
13 クライアントミドルウェア
14 CL接続先リスト
16m AP_ID
17m AP通信アドレス
18m APステータス
15 ローカルDB
CA 接続先判定部品
CB CL接続先情報保持部品
CC 接続先切り替え部品
CD 接続先生死検知部品
CE 通信部品
2m APサーバ
22 サーバAP
23 APサーバミドルウェア
24 AP接続先リスト
26p DB_ID
27p DB通信アドレス
28p DBステータス
AA コネクション部品
AB ステータス取得部品
AC AP接続先情報保持部品
AE ポーリング部品
AF APステータス返却部品
3p DBサーバ
32 DBMS
33 DBサーバミドルウェア
DA DBステータス監視部品
DD ステータス管理部品
DC 通信待ち受け部品
10 Store system 1n Client PC
12 Client AP
13
17m
CA connection destination determination component CB CL connection destination information holding component CC connection destination switching component CD connection teacher death detection component
23
27p
33 DB server middleware DA DB status monitoring component DD status management component DC communication standby component
Claims (14)
端末APと、
接続された複数の第1サーバの各々から取得した第1情報に基づいて前記複数の第1サーバの各々の状態情報を前記接続先リストに記憶し、前記複数の第1サーバの状態情報に基づいて前記複数の第1サーバからひとつを選択して当該選択した第1サーバと前記端末APとの間の通信接続を行う端末プログラムと、を備え、
前記複数の第1サーバの各々が、各々に接続されている全ての第2サーバから取得した第2情報に基づいて生成した前記第2サーバの状態情報を含む前記第1情報を受信することで取得し、
前記第1情報に含まれる前記第2サーバの状態情報に基づいて前記接続先リストに記憶されている前記第1サーバの状態情報を更新する、端末装置。 A destination list stored in storage, and
A terminal AP;
Based on the first information acquired from each of the plurality of connected first servers, the state information of each of the plurality of first servers is stored in the connection destination list, and based on the state information of the plurality of first servers. A terminal program that selects one of the plurality of first servers and performs communication connection between the selected first server and the terminal AP ,
Each of the plurality of first servers receives the first information including the state information of the second server generated based on the second information acquired from all the second servers connected to each of the first servers. Acquired,
A terminal device that updates the state information of the first server stored in the connection destination list based on the state information of the second server included in the first information .
前記コンピュータに接続された複数の第1サーバの各々から第1情報を取得し、
前記第1情報に基づいて前記複数の第1サーバの各々の状態情報を記憶域に格納された接続先リストに記憶し、
前記複数の第1サーバの状態情報に基づいて前記複数の第1サーバからひとつを選択して当該選択した第1サーバと前記コンピュータに搭載された端末APとの間の通信接続を行い、
前記複数の第1サーバの各々が各々に接続されている全ての第2サーバから取得した第2情報に基づいて生成した前記第2サーバの状態情報を含む前記第1情報を受信することで取得し、
前記第1情報に含まれる前記第2サーバの状態情報に基づいて前記接続先リストに記憶されている前記第1サーバの状態情報を更新する、端末制御方法。 Computer
It acquires first information from each of a plurality of first server connected to said computer,
The status information of each of the plurality of first servers is stored in the stored connection destination list to the storage based on the first information,
There line communications connection between the plurality of terminals AP mounted on the first server and the computer that the selected by selecting one from the plurality of first server based on a first server state information,
Acquired by receiving the first information including the state information of the second server generated based on the second information acquired from all the second servers connected to each of the plurality of first servers. And
A terminal control method for updating state information of the first server stored in the connection destination list based on state information of the second server included in the first information .
前記コンピュータに接続された複数の第1サーバの各々から第1情報を取得する処理と、
前記第1情報に基づいて前記複数の第1サーバの各々の状態情報を記憶域に格納された接続先リストに記憶する処理と、
前記複数の第1サーバの状態情報に基づいて前記複数の第1サーバからひとつを選択して当該選択した第1サーバと前記コンピュータに搭載された端末APとの間の通信接続を行う処理と、
前記複数の第1サーバの各々が各々に接続されている全ての第2サーバから取得した第2情報に基づいて生成した前記第2サーバの状態情報を含む前記第1情報を受信することで取得する処理と、
前記第1情報に含まれる前記第2サーバの状態情報に基づいて前記接続先リストに記憶されている前記第1サーバの状態情報を更新する処理と、を実行させる端末プログラム。 On the computer,
A processing you get the first information from each of a plurality of first server connected to said computer,
A processing you store status information of each of the plurality of first server to the destination list stored in the storage based on the first information,
And row intends process communication connection between the terminal AP, which is mounted on the first server and the computer that the selected by selecting one from the plurality of first server based on said plurality of first server state information ,
Acquired by receiving the first information including the state information of the second server generated based on the second information acquired from all the second servers connected to each of the plurality of first servers. Processing to
The terminal program which performs the process which updates the status information of the said 1st server memorize | stored in the said connection destination list based on the status information of the said 2nd server contained in the said 1st information .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007174043A JP4811364B2 (en) | 2007-07-02 | 2007-07-02 | Terminal device, system, terminal control method, and terminal program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007174043A JP4811364B2 (en) | 2007-07-02 | 2007-07-02 | Terminal device, system, terminal control method, and terminal program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2009015424A JP2009015424A (en) | 2009-01-22 |
| JP4811364B2 true JP4811364B2 (en) | 2011-11-09 |
Family
ID=40356284
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2007174043A Expired - Fee Related JP4811364B2 (en) | 2007-07-02 | 2007-07-02 | Terminal device, system, terminal control method, and terminal program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4811364B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2021070315A1 (en) * | 2019-10-10 | 2021-04-15 | 東芝三菱電機産業システム株式会社 | Scada web hmi system |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2576802B2 (en) * | 1994-09-28 | 1997-01-29 | 日本電気株式会社 | Remote program address management method |
| JP2000076198A (en) * | 1998-08-28 | 2000-03-14 | Nec Corp | On-line processing fault information notifying method and system therefor |
-
2007
- 2007-07-02 JP JP2007174043A patent/JP4811364B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2009015424A (en) | 2009-01-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR100812374B1 (en) | System and method for managing protocol network failures in a cluster system | |
| CN103560922A (en) | Disaster recovery method and system | |
| WO2016184175A1 (en) | Database processing method and apparatus | |
| JP5366177B2 (en) | Slot interface access device, method and program thereof, and redundant configuration and alternative method of main device | |
| CN114840495B (en) | A method, storage medium and device for preventing brain split in database cluster | |
| US8285905B2 (en) | Redundancy configuration and replacement method in a system including a master main unit and slave main units | |
| US20150256622A1 (en) | Connection management device, communication system, connection management method, and computer program product | |
| JP7064132B2 (en) | Fault monitoring system and fault monitoring method | |
| JP2005301436A (en) | Cluster system and failure recovery method in cluster system | |
| CN106470429A (en) | A kind of method for processing business being suitable to wireless dilatation and device | |
| CN115426250B (en) | Dual-machine hot standby switching method and device for target range command | |
| JP4811364B2 (en) | Terminal device, system, terminal control method, and terminal program | |
| CN111586110B (en) | Optimization processing method for raft in point-to-point fault | |
| US7222174B2 (en) | Monitoring control network system | |
| JP2001022709A (en) | Computer-readable storage medium storing a cluster system and a program | |
| CN113515375A (en) | Calling method and device for multiple CICS (common information carrier) nodes | |
| CN117560268B (en) | Cluster management method and related device | |
| JP5691248B2 (en) | Task takeover program, processing device, and computer system | |
| CN112787868A (en) | Information synchronization method and device | |
| JPH10116257A (en) | Decentralized media processing server, and communication network using the same | |
| CN100456771C (en) | Communication device and interaction method among modules therein | |
| CN111064608A (en) | Master-slave switching method and device of message system, electronic equipment and storage medium | |
| JP2016152461A (en) | Cloud system, router, management server, and program | |
| WO2024166421A1 (en) | Management system, adapter device, management method, and program | |
| CN118509477A (en) | Distributed cluster operation method, device, equipment, medium and program product |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20090512 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20110302 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110315 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110511 |
|
| RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20110705 |
|
| 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: 20110726 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20110808 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 4811364 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140902 Year of fee payment: 3 |
|
| LAPS | Cancellation because of no payment of annual fees |