JP4184576B2 - Network computer system - Google Patents
Network computer system Download PDFInfo
- Publication number
- JP4184576B2 JP4184576B2 JP2000198680A JP2000198680A JP4184576B2 JP 4184576 B2 JP4184576 B2 JP 4184576B2 JP 2000198680 A JP2000198680 A JP 2000198680A JP 2000198680 A JP2000198680 A JP 2000198680A JP 4184576 B2 JP4184576 B2 JP 4184576B2
- Authority
- JP
- Japan
- Prior art keywords
- rpc
- server
- communication
- client
- stub
- 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
- Devices For Executing Special Programs (AREA)
- Computer And Data Communications (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、ネットワークコンピュータシステムに関し、特に、プログラム間のインタフェースの信頼性を向上したリモートプロシジャコールを利用したネットワークコンピュータシステムに関する。
【0002】
【従来の技術】
分散処理環境を構成するネットワークコンピュータシステムでは、サーバやクライアントの上で動作する複数のプログラムが処理を相互に分散するために、リモートプロシジャコール(RPC)を採用する場合がある。RPCにおいては、例えば、サーバ上のあるアプリケーションプログラムが、そのプロシジャの一部をクライアント上の他のアプリケーションプログラムに実行させて、その結果を通常のプロシジャコールと同様に帰り値として受け取る。
【0003】
RPCにおいては、開発時において、そのインタフェースをインタフェース定義スクリプト(IDL)に記述しておく。そして、IDLに基づいて、アプリケーションプログラムがRPCにより通信を実行する時にこれを支援する(代わりにRPCにより通信を実行する)プログラム(スタブ(STUB)プログラム)を、自動生成する。スタブプログラムは、コンパイルにより、サーバ及びクライアントの各々の上のアプリケーションプログラムに組み込まれる。運用時において、サーバ及びクライアント上のアプリケーションプログラムは、各々のスタブプログラムによりRPCにより通信を実行する。
【0004】
【発明が解決しようとする課題】
種々の理由により、RPCのインタフェースが変更され、これに伴って、IDLがバージョンアップ(改版)される場合がある。本来であれば、これは、サーバ及びクライアントの双方において、同様にインタフェースに反映されているはずである。
【0005】
しかし、IDLがバージョンアップされた場合、運用時において、インタフェースの不一致による実行不可が出力されることがある。例えば、サーバ上のアプリケーションプログラムに組み込まれたスタブプログラムが、クライアントから受信した伝送パケットを分析しインタフェースが合致するか否かを検証した結果、インタフェースが不一致となり、実行不可が出力されることがある。このような事態は、多くの場合サーバ(の管理者)が新しいスタブプログラムをコンパイルしていないこと等により生じる。この場合、処理が途中で止まってしまうことになる。また、当該検証を終了するまでは、インタフェースの不一致を検出することができない。
【0006】
また、IDLがバージョンアップされた場合、運用時において、本来IDLが不一致であるにもかかわらず、RPCの不適切な帰り値を用いてアプリケーションプログラムを実行してしまうことがある。即ち、実際はIDLが変更されているが、データパケットとして見た場合にはインタフェースが変更とならない場合がある。これは、例えば、バージョンアップが、送信パケットのフォーマット等に関するものではなく、些細なバグ(スペルミス等)の訂正等である場合である。この場合、例えばクライアントから受信した送信パケットのフォーマット等が一致してしまうと、サーバ上のスタブプログラムを介してこれを受け取ったアプリケーションプログラムが、帰り値をクライアント上の当該アプリケーションプログラムに返してしまう。しかし、この場合、本来バージョンが不一致であるので、サーバのアプリケーションプログラムは誤った処理を実行した可能性がある。従って、また、クライアントのアプリケーションプログラムも、誤った処理に基づく誤った帰り値を用いて誤った処理を実行する可能性がある。
【0007】
なお、以上のような誤動作等を防止するためには、IDLのバージョン(版数)を管理することが望ましい。しかし、IDLの版数を管理しようとすると、開発者が当該バージョン情報をIDL内に記述する必要がある。これは開発者にとっては煩わしいので記述を省略する場合があり、また、人手により管理することになるので開発者が記述を忘れたり内容を誤ったりする場合がある。従って、管理されていない場合や、管理されてはいても適切でない場合がある。なお、IDLのバージョン管理は義務付けられてはいない。
【0008】
本発明は、リモートプロシジャコールのインタフェースの信頼性を向上したネットワークコンピュータシステムを提供することを目的とする。
【0009】
また、本発明は、リモートプロシジャコールのインタフェースの変更の管理を行うことなく、確実にインタフェースの不一致を検出するネットワークコンピュータシステムを提供することを目的とする。
【0011】
【課題を解決するための手段】
本発明のネットワークコンピュータシステムは、ネットワーク接続されたクライアントとサーバがRPC(リモートプロシジャコール)による通信を行う場合において、RPCにおける通信のインタフェースの定義情報から生成されたインタフェースの識別情報を含み、識別情報を用いて定義情報に基づいてRPCにおける通信を行うRPC通信手段を備える。具体的には、本発明のネットワークコンピュータシステムは、RPCにおける通信のインタフェースの定義情報から、当該定義情報のハッシュ値である前記インタフェースの識別情報を生成する第1の生成手段と、前記定義情報に基づいて、RPCにより通信を実行する前記クライアント上のプログラムとなるクライアントスタブと、RPCにより通信を実行する前記サーバ上のプログラムとなるサーバスタブとを生成し、前記クライアントスタブと前記サーバスタブに前記識別情報をそれぞれ埋め込む第2の生成手段と、前記定義情報に基づいたRPCによる通信の伝送パケットの送信元となる、前記クライアントスタブをインストールされた前記クライアント又は前記サーバスタブをインストールされた前記サーバが、前記伝送パケットに前記識別情報を付加して送信する手段と、前記定義情報に基づいたRPCによる通信の前記伝送パケットの送信先となる、前記クライアントスタブをインストールされた前記クライアント又は前記サーバスタブをインストールされた前記サーバが、受信した前記伝送パケットから前記付加された識別情報を取り出し前記自己に埋め込まれた識別情報と比較することで、通信インタフェースの不一致を検出する手段とを備える。
【0012】
本発明のネットワークコンピュータシステムによれば、インタフェースの識別情報が当該RPCのインタフェースの定義情報それ自体からそのハッシュ値を求めることにより生成される。従って、当該定義情報をRPCのインタフェースについて一意に定めることができる。そして、識別情報を埋め込まれたクライアントスタブとサーバスタブをインストールされたクライアント又はサーバが、受信した伝送パケットから取り出した識別情報と埋め込まれた識別情報とを比較する。これにより、インタフェースが変更(IDLがバージョンアップ)された場合、運用時において、インタフェースの不一致を確実に検出することができる。特に、インタフェースが不一致であるにもかかわらず、RPCの不適切な帰り値を用いてアプリケーションプログラムを実行してしまうことを防止することができる。また、インタフェースのバージョンの管理や記述等についての開発者の負担をなくすことができ、前記バージョンの管理等についての人為的な誤り等によるインタフェースの不一致等の発生を防止することができる。
【0013】
また、本発明のネットワークコンピュータシステムは、RPCにより通信を実行するサーバ上のアプリケーションプログラムのソースコードであって、前記RPCにおける通信のインタフェースを定義する定義部分を備えるプログラムソースコードの前記定義部分から生成した前記定義部分のハッシュ値である前記インタフェースの識別情報を埋め込まれており、前記定義部分に基づいて前記RPCによる通信を行う際に、送信元は伝送パケットに前記識別情報を付加して送信し、送信先は受信した前記伝送パケットから前記付加された識別情報を取り出し前記自己に埋め込まれた識別情報と比較することで、通信インタフェースの不一致を検出する下位RPC通信手段と、前記RPCにおける通信のインタフェースの定義情報に基づいて前記RPCによる通信を行う上位RPC通信手段とを備える。
また、本発明のネットワークコンピュータシステムは、RPCにより通信を実行するサーバ上のアプリケーションプログラムのソースコードであって、前記RPCにおける通信のインタフェースを定義する定義部分を備えるプログラムソースコードの前記定義部分のハッシュ値である前記インタフェースの識別情報を生成する第1の生成手段と、前記定義部分に基づいて前記RPCによる通信を行う下位RPC通信手段を生成し、前記下位RPC通信手段に前記識別情報を埋め込む第2の生成手段と、前記RPCにおける通信のインタフェースの定義情報に基づいて前記RPCによる通信を行う上位RPC通信手段を生成する第3の生成手段とを備える。
【0014】
本発明のネットワークコンピュータシステムによれば、インタフェースの識別情報が当該RPCのインタフェースの定義情報それ自体からそのハッシュ値を求めることにより生成され、これがリモートプロシジャコールにおける通信を行う下位RPC通信手段に埋め込まれる。そして、下位RPC通信手段が、受信した伝送パケットから取り出した識別情報と埋め込まれた識別情報とを比較する。従って、インタフェースのバージョンの管理や記述等についての開発者の負担なしで、事実上当該管理等を行うことができ、当該管理等についての人為的な誤り等によるインタフェースの不一致等の発生を防止することができる。
【0015】
【発明の実施の形態】
図1は、ネットワークコンピュータシステム構成図であり、本発明のネットワークコンピュータシステムの構成を示す。
【0016】
ネットワークコンピュータシステムは、複数のネットワークコンピュータ20、30とこれらの間を接続するネットワーク40からなる。ネットワークコンピュータ20、30は、例えばサーバ20及びクライアント30からなり、リモートプロシジャコール(RPC)によりコンピュータ間通信を行う。サーバ20及びクライアント30は各々複数であってもよい。ネットワークコンピュータシステムは、サーバ20及びクライアント30以外に、例えば開発用のホストコンピュータ10を備える。
【0017】
ホストコンピュータ10は、サーバ20及びクライアント30の開発のために、スタブ(STUB)ジェネレータ12、コンパイラ及びリンカ17を備える。スタブジェネレータ12、コンパイラ及びリンカ17は、ホストコンピュータ10を構成する主メモリ(図示せず)上に存在しホストコンピュータ10を構成するCPU(図示せず)上で実行される当該プログラムにより実現される。また、ホストコンピュータ10は、インタフェース定義スクリプト(IDL)11、サーバ20上で動作するアプリケーション(ソース又はオブジェクト)プログラム(サーバアプリ)18、クライアント30上で動作するアプリケーション(ソース又はオブジェクト)プログラム(クライアントアプリ)19を、磁気ディスク装置等の補助記憶(図示せず)上に備える。
【0018】
ホストコンピュータ10は、図1に点線で示すように、ネットワーク40を介して、サーバ20等と接続してもよい。この場合、後述するスタブプログラム15等は、ネットワーク40を介して、サーバ20等に配信される。また、スタブジェネレータ12、コンパイラ及びリンカ17は、バージョンアップされたIDL(修正IDL)11’に基づいてスタブプログラム15(22、23)を生成する必要があるため、サーバ20及びクライアント30の各々にも設けられる(図示せず)。この場合、修正IDL11’は、フレキシブルディスク等により、サーバ20及びクライアント30に提供される。
【0019】
スタブジェネレータ12はスタブプログラム(又はスタブコード)15を生成する。スタブプログラム15は、アプリケーションプログラムがRPCにより通信を実行する時に、これを支援する。即ち、アプリケーションプログラム(21、31)の代わりにRPCにより通信を実行するRPC通信手段15(22、32)である。この生成のために、スタブジェネレータ12は第1の生成手段13と第2の生成手段14とを備える。第1の生成手段13は、RPCにおける通信のインタフェースの定義情報(IDL)11からインタフェースの識別情報16を生成する。第2の生成手段14は、定義情報11に基づいてRPCにおける通信を行うRPC通信手段15を生成し、RPC通信手段15に識別情報16を付加する。
【0020】
この例において、定義情報11は、インタフェース定義スクリプト(IDL)11からなる。IDL11はRPCにおける通信のインタフェースを定義する。また、識別情報16は、定義情報11から生成されたハッシュ値(ハッシュコード)16からなる。従って、この例では、IDL11からハッシングにより識別情報16としてのハッシュ値16が生成され、IDL11に基づいてスタブプログラム15が生成される。そして、ハッシュ値16はスタブプログラム15に付加される(埋め込まれる)。このために、スタブジェネレータ12はハッシュ関数を備える。ハッシュ関数としては、例えば周知のRSA−MD5:RFC1321を用い、例えば16バイトのメッセージダイジェストとされる。スタブプログラム15としては、クライアント30上のスタブプログラム(クライアントスタブ)32と(なるもの)、及び、サーバ20上のスタブプログラム(サーバスタブ)22と(なるもの)が生成される。
【0021】
ここで、IDL11の一例を図2に示す。図2において、IDL11は、RPCのインタフェースの種々の情報を記述する。IDL11は、図2に示すようなテキストファイルである。図2のIDL11の全体がハッシングに用いられる。ハッシングの結果生成されるハッシュ値16は、図3に示すように、16バイトの16進数である。
【0022】
サーバスタブ22の一例を図3に示す。サーバスタブ22は、実際には、2個のハッシュ値16(161、162)を保持する。例えば、ハッシュ値161は、クライアント30から受信した伝送パケット50に埋め込まれたハッシュ値16と比較するためのものである。サーバスタブ22は、受信した識別情報16を解析し、これが自己の持つ識別情報161と不一致である場合、受信した識別情報16の送信元であるクライアント30にエラー情報を返信する。ハッシュ値162は、当該サーバ20がクライアント30に対して伝送パケット50を送信する際に、これに埋め込むためのものである。サーバスタブ22は、2個のエラー値221及び222をも保持する。エラー値221及び222は、ハッシュ値161とクライアント30から受信した伝送パケット50に埋め込まれたハッシュ値16との比較結果が不一致である場合に、クライアント30に対して返信されるエラーメッセージである。エラー値221及び222は、エラーの種類に応じて、使い分けられる。なお、クライアントスタブ32も同様の構成を有する。
【0023】
コンパイラ及びリンカ17は、クライアントアプリ(のソース)19をコンパイルしたものにクライアントスタブ15(32)をリンクして、クライアントアプリの実行形式のロードモジュール(クライアントRM)33を得て、これをクライアント30にインストールする。また、コンパイラ及びリンカ17は、サーバアプリ(のソース)18をコンパイルしたものにサーバスタブ15(22)をリンクしてサーバアプリの実行形式のロードモジュール(サーバRM)23を得て、これをサーバ20にインストールする。なお、クライアントRM33もクライアントアプリといい、サーバRM23もサーバアプリということとする。
【0024】
ネットワークコンピュータであるサーバ20は、複数の(実行形式の)サーバアプリ23を備える。複数のサーバアプリ23の各々は、サーバ20が提供するサービス(呼び出されるプロシジャ)の各々に応じて設けられる。複数のサーバアプリ23の各々がスタブプログラム(サーバスタブ)22を備える。ネットワークコンピュータであるクライアント20は、複数の(実行形式の)クライアントアプリ33を備える。複数のクライアントアプリ33の各々は、クライアント30が実行する処理(アプリケーション)の各々に応じて設けられる。複数のクライアントアプリ33の各々がスタブプログラム(クライアントスタブ)32を備える。
【0025】
ネットワークコンピュータであるサーバ20及びクライアント30は、ロードモジュールの形で、各々、RPC通信手段であるスタブプログラム22及び32(15)を備える。スタブプログラム22及び32は、RPCにおける通信のインタフェースの定義情報11から生成されたインタフェースの識別情報16を含み、定義情報11に基づいてRPCにおける通信を行う。具体的には、クライアント30では、RPC通信手段32が、少なくとも識別情報16を送信する。サーバ20では、RPC通信手段22が、少なくとも受信した識別情報16を解析する。
【0026】
サーバ20及びクライアント30は、ネットワーク40を介して、RPCに従って、コンピュータ間通信を行う。この通信において、識別情報16が当該伝送データの先頭に(又は先頭の伝送パケットに)付加される。従って、この例では、前述のように、定義情報11であるIDL11から生成された識別情報16であるハッシュ値16が、先頭の伝送パケットに格納される。
【0027】
クライアントスタブ32は、少なくとも識別情報16としてのハッシュ値16を送信する。従って、クライアントスタブ32として生成されたスタブプログラム15は、ハッシュ値16を送信する機能を備える。サーバスタブ22は、少なくとも受信した識別情報16としてのハッシュ値16を解析する。従って、サーバスタブ22として生成されたスタブプログラム15は、ハッシュ値16を解析する機能を備える。なお、実際は、クライアントスタブ32も受信した識別情報16を解析し、サーバスタブ22も識別情報16を送信する場合があるので、両者は同一であってよい。
【0028】
サーバ20及びクライアント30は、コンピュータ間通信を行うために、各々、伝送処理部24及び34を備える。また、クライアント30は、クライアントアプリ31における処理結果等を表示する表示装置35、クライアントアプリ31における処理のための指示入力等のための入力装置36を備える。
【0029】
図4は、スタブプログラム22、32の生成処理フローを示す。
【0030】
開発者が、IDL11を作成し(ステップS1)、この後、スタブジェネレータ12を起動する(ステップS2)。
【0031】
スタブジェネレータ12が、IDL11を読み込み(ステップS3)、IDL11をハッシングすることにより、これからハッシュ値16を算出する(ステップS4)。この後、スタブジェネレータ12が、クライアントスタブ32を生成する(ステップS5)。このクライアントスタブ32には、識別情報16としてハッシュ値16が埋め込まれる。また、スタブジェネレータ12が、サーバスタブ22を生成する(ステップS6)。このサーバスタブ22にも、識別情報16として同一のハッシュ値16が埋め込まれる。
【0032】
開発者が、クライアント30に、クライアントアプリ(APLとも記す、以下同じ)33をビルド(内蔵)する(ステップS7)。即ち、コンパイラ及びリンカ17により、クライアントアプリ19をコンパイルしたもの(31)にクライアントスタブ32をリンクしてクライアントアプリ19のロードモジュール(クライアントRM)33を得て、これをクライアント30にインストールする。
【0033】
また、開発者が、サーバ20に、サーバアプリ23をビルド(内蔵)する(ステップS8)。即ち、コンパイラ及びリンカ17により、サーバアプリ18をコンパイルしたもの(21)にサーバスタブ22をリンクしてサーバアプリ18のロードモジュール(サーバRM)23を得て、これをサーバ20にインストールする。
【0034】
図5は、クライアント30におけるRPCによる通信処理フローを示す。
【0035】
(クライアントRM33の)クライアントアプリ31が、サーバ20の呼び出しを(クライアントRM33の)クライアントスタブ32に依頼する(ステップS11)。
【0036】
クライアントスタブ32が、伝送データの作成処理を行う(ステップS12)。この作成処理において、クライアントスタブ32が、自己の保持するハッシュ値16をデータの先頭に埋め込み(ステップS13)、パラメータを組み立てることにより伝送パケット50を生成し(ステップS14)、この送信を伝送処理部34に依頼する。
【0037】
この依頼を受けたクライアント30の伝送処理部34が、通信処理を行う。即ち、伝送処理部34がサーバ20に伝送パケット50を送信する(ステップS15)。この送信処理は図6のステップS21に対応する。伝送処理部34は、サーバ20からの応答があると、当該処理結果を受信する(ステップS16)。この受信処理は図6のステップS29に対応する。この後、クライアント30における処理は、クライアントスタブ32を介して、クライアントアプリ31に復帰する(ステップS17)。
【0038】
図6は、サーバ20におけるRPCによる通信処理フローを示す。
【0039】
サーバ20の伝送処理部24が、クライアント30からの伝送パケット50を受信し(ステップS21)、起動対象のサーバスタブ22を検索して選択し(ステップS22)、当該サーバスタブ22を起動する(ステップS23)。ステップS21は図5のステップS15に対応する。
【0040】
起動されたサーバスタブ22は受信した伝送データを解析する。即ち、サーバスタブ22が、受信したハッシュ値16と自己に埋め込まれているハッシュ値16とが等しいか否かを調べる(ステップS24)。
【0041】
等しい場合、サーバスタブ22は、伝送パケット50の後続のパラメータを解析して(ステップS25)、サーバアプリ21を起動し(ステップS26)、応答を待つ。起動されたサーバアプリ21は、解析された後続のパラメータを用いて所定の処理を行い、その処理結果をサーバスタブ22に返す(ステップS27)。サーバスタブ22は、サーバアプリ21からの処理結果を帰り値(復帰値)として設定し(ステップS28)、伝送処理部24に返信を依頼する。
【0042】
伝送処理部24は、サーバスタブ22からの依頼に従って、結果をクライアント30に返信する(ステップS29)。この処理は図5のステップS16に対応する。
【0043】
一方、ステップS24において受信したハッシュ値16と自己に埋め込まれているハッシュ値16とが等しくない場合、サーバスタブ22は、エラー値を設定し(ステップS30)、伝送処理部24に返信を依頼する。この後、ステップS29が実行される。
【0044】
図7及び図8は、ハッシュ値16を用いたインタフェースのバージョンの検出処理説明図である。
【0045】
図7において、RPCを採用するアプリケーションプログラム23、33の開発時、開発者により、インタフェース定義スクリプト(IDL)11が用意される。IDL11はRPCのインタフェースを記述する。
【0046】
スタブジェネレータ12が、IDL11に基づいて、スタブプログラム15を生成する。また、スタブジェネレータ12は、IDL11からハッシングにより識別情報(ハッシュ値)16を生成する。スタブジェネレータ12は、生成した識別情報16をスタブプログラム15(サーバスタブ22及びクライアントスタブ32)に付加する。
【0047】
識別情報16はIDL11(のバージョン)を一意に特定できるものであればよい。従って、識別情報16はIDL11のバージョン情報である。例えば、識別情報16はIDL11から生成したハッシュ値16(ハッシュ値)からなる。即ち、IDL11それ自体をハッシングすることにより、識別情報16を生成する。ハッシュ値16が相互に衝突することは、確率的に見て事実上あり得ない。従って、このハッシュ値16はIDL11(のバージョン)を一意に特定できる。IDL11のバージョン情報をIDL11自体のハッシングにより生成しているので、開発者がIDL11の版数をIDL11に記述し管理する必要がなく、従って、IDL11のバージョン情報を人為的に誤ることもない。
【0048】
スタブプログラム15は、コンパイラ及びリンカ17の実行するコンパイル及びリンクにより、アプリケーションプログラムに組み込まれる。即ち、サーバスタブ22及びクライアントスタブ32が、各々、コンパイルされたサーバアプリ21及びクライアントアプリ31にリンクされる。これにより、サーバアプリ21のロードモジュール(サーバRM)23及びクライアントアプリ31のロードモジュール(クライアントRM)33が得られる。
【0049】
RPCを採用するアプリケーションプログラム23、33の運用時において、サーバ20及びクライアント30上のアプリケーションプログラム23、33は、各々のスタブプログラム22、32(15)によりRPCにより通信を実行する。例えば、クライアントスタブ32は、送信する伝送パケット50を生成して、その先頭に自己に付加された識別情報16であるハッシュ値16を付加する。これを受信したサーバスタブ22は、当該伝送パケット50からハッシュ値16を取り出して、これと自己に付加されたハッシュ値16とを比較する。両者が一致すれば、IDL11(のバージョン)が一致していることになる。従って、以後の通信が正しいことが保証される。
【0050】
図8において、図7の開発の後、RPCのインタフェースの変更により、開発者により、バージョンアップ(改版)されたIDL(修正IDL)11’が作成される。そこで、前述と同様に、スタブジェネレータ12が、修正IDL11’に基づいてスタブプログラム15’を生成し、修正IDL11’から新たなハッシュ値(新ハッシュ値)16’を生成する。IDL11のバージョンアップがあれば、それが送信パケットのフォーマットの変更ではなく単なるバグの修正であっても、当該修正が必ずハッシュ値16に反映される。即ち、バージョンアップの前後において、ハッシュ値16と16’とは必ず異なるものとなる。従って、この点からも、ハッシュ値16はIDL11(のバージョン)を一意に特定できる。
【0051】
通常は、スタブジェネレータ12により、クライアント30及びサーバ20の双方において、新ハッシュ値16’を埋め込んだクライアントスタブ32’及びサーバスタブ22’として再度生成される。なお、スタブジェネレータ12は、新ハッシュ値16’を生成した後、ハッシュ値16と16’とを比較し、両者に相違がない場合、インタフェースの変更がRPC通信にかかわりのないものであると判断して、新しいクライアントスタブ32’及びサーバスタブ22’の生成を行わない。これにより、不必要な更新は行われることがない。
【0052】
しかし、修正IDL11’に基づくスタブプログラム15’が作成されたにもかかわらず、サーバ20が、これをコンパイル(及びリンク)しなかったとする。クライアント30は、前述と同様に、コンパイル(及びリンク)したとする。この場合、運用時において、例えばクライアントスタブ32’は、その先頭に新ハッシュ値16を付加した伝送パケット50をサーバスタブ22へ送信する。これを受信したサーバスタブ22が、当該伝送パケット50から取り出した新ハッシュ値16’と、これと自己に付加された(旧)ハッシュ値16とを比較する。従って、両者は一致しないので、IDL11(のバージョン)が不一致であるとして、サーバスタブ22からクライアントスタブ32’にエラーが通知される。
【0053】
従って、先頭の伝送パケット50を解析した時点で、IDL11が不一致であることを検出することができる。これにより、RPCの不適切な帰り値を用いてアプリケーションプログラム23、33を実行してしまうことを防止することができる。また、以後のパケットを解析する必要がないので、処理に無駄が生じることがない。なお、以上とは逆に、クライアント30において新しいクライアントスタブ32’のコンパイルが行われていない場合でも同様である。また、利用者が誤って、古いサーバスタブ22又はクライアントスタブ32を起動してしまった場合でも同様である。更に、例えば、サーバ20において、サーバスタブ22(従って、IDL11)を勝手に変更したような場合でも同様である。
【0054】
図9及び図10は、ネットワークコンピュータシステム構成図であり、図1のネットワークコンピュータシステム(RPCシステム)を利用した汎用的なRPCシステムの構成を示す。
【0055】
図1のRPCシステムにおいては、サーバ20におけるアプリケーションプログラム(サブルーチン)の各々に応じて、IDL11及びスタブジェネレータ12を用意する必要がある。また、既存のRPCシステムにハッシュ値16によるインタフェースの検査を導入するためには、既存のプログラムを当該処理を行うように変更する必要がある。
【0056】
そこで、図9に示すように、図1のRPCシステムを基盤としてのRPCシステムとして採用する。即ち、RPCサーバシステム200及びRPCクライアントシステム300は、各々、図1のサーバ20及びクライアント30に相当する。図9のサーバ20とクライアント30との間の通信は、全て1個のRPCサーバシステム200及びRPCクライアントシステム300に依存する。基盤としてのRPCサーバシステム200及びRPCクライアントシステム300と実際のアプリケーションプログラム21A及び31Aとの間の通信(従って、アプリケーションプログラム間の通信)を、1個の汎用(ユニバーサル)インタフェース60で、統一的に通信する。汎用インタフェース60と実際のアプリケーションプログラム21A及び31Aとの間には、各々、マーシャリングプログラム(又はコード)22A及び32Aが存在する。マーシャリングプログラム22A及び32Aは、通常のRPCシステムにおけるスタブプログラム(図1のスタブプログラム22及び32)が実行する種々の処理を行う。
【0057】
即ち、図9から判るように、図9のサーバ20とクライアント30は階層的な通信手段を構成する。下位RPC通信手段であるマーシャリングプログラム22A及び32Aは、インタフェースの識別情報16を含む。識別情報16は、RPCにより通信を実行するサーバ20上のアプリケーションプログラム21AにおけるRPCにおける通信のインタフェースを定義する定義部分から生成される。マーシャリングプログラム22A及び32Aは、識別情報16を用いて、定義部分に基づいて、RPCにおける通信を行う。上位RPC通信手段であるRPCサーバシステム200及びRPCクライアントシステム300(サーバスタブ222及びクライアントスタブ332)は、RPCにおける通信のインタフェースの定義情報に基づいて、RPCにおける通信を行う。
【0058】
インタフェースの識別情報16は、第1の生成手段であるスタブジェネレータ12Aにより、アプリケーションプログラム21Aの前記定義部分から生成される。下位RPC通信手段であるマーシャリングプログラム22A及び32Aは、第2の生成手段であるスタブジェネレータ12Aにより、前記定義部分に基づいて生成される。上位RPC通信手段であるサーバスタブ222及びクライアントスタブ332は、RPCにおける通信のインタフェースの定義情報(IDL)11に基づいて、第3の生成手段であるスタブジェネレータ12により、前記定義情報11に基づいて生成される。
【0059】
即ち、図10に示すように、RPCサーバシステム200におけるサーバスタブ222は、そのIDL11に基づいて、スタブジェネレータ12により生成される。この時、IDL11からのハッシュ値(16)の生成は行われない。従って、この例におけるサーバスタブ222は、識別情報16を持たない(この点で、図1の例とは異なる)。サーバスタブ222とサーバアプリ221とで、RPCサーバシステム200(のロードモジュール223)を構成する。RPCクライアントシステム300におけるクライアントスタブ332についても同様である。クライアントスタブ332とクライアントアプリ331とで、RPCクライアントシステム300(のロードモジュール333)を構成する。なお、図10において、コンパイラ及びリンカ(17)、伝送処理部(24、34)は、図示を省略している。
【0060】
一方、サーバ20上のマーシャリングプログラム(サーバマーシャリング)22Aは、サーバアプリ21Aのソースコード21A’上のインタフェース定義部に基づいて、スタブジェネレータ12Aにより生成される。この時、インタフェース定義部からのハッシュ値16が生成される。従って、サーバマーシャリング22Aは、ハッシュ値16からなる識別情報16を持つ。クライアント30上のマーシャリングプログラム(クライアントマーシャリング)32Aも、同様に、サーバアプリ21Aのソースコード21A’上のインタフェース定義部に基づいてスタブジェネレータ12Aにより生成され、インタフェース定義部からのハッシュ値16が埋め込まれる。従って、クライアントマーシャリング32Aも、ハッシュ値16からなる識別情報16を持つ。
【0061】
図11は、サーバアプリ21Aのソースコード21A’上のインタフェース定義部の一例を示す図である。ソースコード21A’上のインタフェース定義部は、図11(A)に示すパラメータ部と、図11(B)に示すリンケージ部とからなる。これらが、サーバマーシャリング22Aとサーバアプリ21Aとの間の通信に関する定義情報である。
【0062】
図12は、マーシャリングプログラムの生成処理フローである。
【0063】
開発者が、サーバアプリ21Aのソースコード21A’を作成し(ステップS31)、この後、スタブジェネレータ12Aを起動する(ステップS32)。なお、RPCサーバシステム200及びRPCクライアントシステム300は、図1の例と類似の処理により、既に生成されているものとする。
【0064】
スタブジェネレータ12Aが、サーバアプリ21Aのソースコード21A’を読み込み(ステップS33)、ソースコード21A’上のインタフェース定義部からハッシュ値16を算出する(ステップS34)。
【0065】
スタブジェネレータ12が、クライアントマーシャリング32Aを生成する(ステップS35)。このクライアントマーシャリング32Aには、識別情報16としてハッシュ値16が埋め込まれる。
【0066】
スタブジェネレータ12Aが、サーバマーシャリング22Aを生成する(ステップS36)。このサーバマーシャリング22Aにも、識別情報16として同一のハッシュ値16が埋め込まれる。
【0067】
クライアント30に、クライアントアプリ33Aをビルド(内蔵)する(ステップS37)。即ち、コンパイラ及びリンカ(17)により、クライアントアプリをコンパイルしたもの(31A)にクライアントマーシャリング32Aをリンクしてクライアントアプリのロードモジュール(クライアントRM)33Aを得て、これをクライアント30にインストールする。
【0068】
サーバ20に、サーバアプリ23Aをビルド(内蔵)する(ステップS38)。即ち、コンパイラ及びリンカ(17)により、サーバアプリ21A’をコンパイルしたもの21Aにサーバマーシャリング22Aをリンクしてサーバアプリ21A’のロードモジュール(サーバRM)23Aを得て、これをサーバ20にインストールする。
【0069】
図13は、クライアント30におけるRPCによる通信処理フローである。
【0070】
(クライアントRM33Aの)クライアントアプリ31Aが、サーバ20の呼び出しを(クライアントRM33Aの)クライアントマーシャリング32Aに依頼する(ステップS41)。
【0071】
クライアントマーシャリング32Aが、伝送データの作成処理を行う(ステップS42)。この処理において、クライアントマーシャリング32Aが、起動パラメータ51の先頭にハッシュ値16を埋め込み(ステップS43)、パラメータを組み立てることにより起動パラメータ51を生成し(ステップS44)、これを汎用インタフェース60に送りサーバ20の起動を依頼する(ステップS45)。
【0072】
依頼された汎用インタフェース60は、RPCクライアントシステム300及びRPCサーバシステム200を介して、サーバ20(のサーバアプリ21A)を起動する。この処理は図14のステップS51に対応する。RPCクライアントシステム300及びRPCサーバシステム200の間の処理は、図1の例に類似である。汎用インタフェース60は、サーバ20からの応答があると、当該処理結果を受信する(ステップS46)。この受信処理は図14のステップS58に対応する。この後、クライアント30における処理は、クライアントマーシャリング32Aを介して、クライアントアプリ31Aに復帰する(ステップS47)。
【0073】
図14は、サーバ20におけるRPCによる通信処理フローである。
【0074】
サーバ20の汎用インタフェース60は、RPCサーバシステム200を介して、クライアント30からの起動要求を受信する(ステップS51)。この処理は、図13のステップS45に対応する。汎用インタフェース60は、起動対象のサーバマーシャリング22Aを検索して選択し(ステップS52)、当該サーバマーシャリング22Aを起動する(ステップS53)。
【0075】
起動されたサーバマーシャリング22Aは受信した起動パラメータ51を解析する。即ち、サーバマーシャリング22Aが、受信したハッシュ値16と自己に埋め込まれているハッシュ値16とが等しい否かを調べる(ステップS54)。
【0076】
等しい場合、サーバマーシャリング22Aは、当該起動パラメータ51の後続のパラメータを解析して(ステップS55)、サーバアプリ21Aを起動し(ステップS56)、応答を待つ。起動されたサーバアプリ21Aは、解析された後続のパラメータを用いて所定の処理を行い、その処理結果をサーバマーシャリング22Aに返す。サーバマーシャリング22Aは、サーバアプリ21Aからの処理結果を帰り値(復帰値)として設定し(ステップS57)、汎用インタフェース60に返信を依頼する。
【0077】
汎用インタフェース60は、サーバマーシャリング22Aからの依頼に従って、RPCサーバシステム200を介して、結果をクライアント30に返信する(ステップS58)。この処理は図13のステップS46に対応する。
【0078】
一方、ステップS54において受信したハッシュ値16と自己に埋め込まれているハッシュ値16とが等しくない場合、サーバマーシャリング22Aは、エラー値を設定し(ステップS59)、汎用インタフェース60に返信を依頼する。この後、ステップS58が実行される。
【0079】
以上、本発明をその実施の態様に従って説明したが、本発明は、その主旨の範囲において、種々の変形が可能である。
【0080】
例えば、以上の実施態様においては識別情報16をIDL11のハッシングにより生成したが、本発明は、JAVARMI(リモートメソッドインボケーション)のようにIDL11を持たないプログラムにも適用できる。JAVARMIにおいては、サーバ20のアプリケーション(ソース又はオブジェクト)プログラム18からインタフェース定義及びスタブプログラムが生成される。従って、IDL11を持たない。そこで、図15に示すように、定義情報11として、RPCにより通信を実行するサーバ20上のアプリケーションプログラム18が有するRPCにおける通信のインタフェースを定義する定義部分181を用いる。ハッシュ値16は定義部分181から生成される。スタブプログラム15(22、32)は定義部分181に基づいて生成される。これは、前述の図10の実施態様に類似である。
【0081】
また、以上の実施態様は、(狭義の)RPCによりコンピュータ間通信を行う場合について説明したが、本発明は、RPCを発展させた技術であるオブジェクトリクエストブローカー(ORB)にも適用可能である。この場合、IDL11に代えて、ORBにおける通信のインタフェースを定義するインタフェース定義スクリプトであるODLを定義情報11として用いて、これをハッシングすることにより識別情報16を生成すればよい。即ち、本発明は、RPCの変形技術の全般に広く適用することができる。従って、この明細書において、RPCとは、ORBのようなRPCの応用又は利用技術(RPCを基礎とする技術)をも含むものである。
【0082】
(付記1) リモートプロシジャコールにおける通信のインタフェースの定義情報から生成された前記インタフェースの識別情報を含み、前記識別情報を用いて前記定義情報に基づいて前記リモートプロシジャコールにおける通信を行うRPC通信手段を備えることを特徴とするネットワークコンピュータシステム。(1)
【0083】
(付記2) 前記識別情報が、前記定義情報から生成されたハッシュ値からなることを特徴とする付記1に記載のネットワークコンピュータシステム。
【0084】
(付記3) 前記識別情報が、前記通信において当該データの先頭に付加されることを特徴とする付記1に記載のネットワークコンピュータシステム。
【0085】
(付記4) リモートプロシジャコールにおける通信のインタフェースの定義情報から生成された前記インタフェースの識別情報を含み、前記識別情報を用いて前記定義情報に基づいて前記リモートプロシジャコールにおける通信を行うRPC通信手段を備え、前記RPC通信手段が、少なくとも前記識別情報を送信することを特徴とするクライアント。
【0086】
(付記5) 前記定義情報が、リモートプロシジャコールにより通信を実行するサーバ上のアプリケーションプログラムが有する前記リモートプロシジャコールにおける通信のインタフェースを定義する定義部分からなることを特徴とする付記4に記載のクライアント。
【0087】
(付記6) リモートプロシジャコールにおける通信のインタフェースの定義情報から生成された前記インタフェースの識別情報を含み、前記識別情報を用いて前記定義情報に基づいて前記リモートプロシジャコールにおける通信を行うRPC通信手段を備え、前記RPC通信手段が、少なくとも受信した前記識別情報を解析することを特徴とするサーバ。(2)
【0088】
(付記7) 前記受信した識別情報を解析し、これが自己の持つ識別情報と不一致である場合、前記受信した識別情報の送信元であるクライアントにエラー情報を返信することを特徴とする付記6に記載のサーバ。
【0089】
(付記8) ネットワークコンピュータシステムを実現するプログラムを格納するコンピュータ読取可能なプログラム記録媒体であって、リモートプロシジャコールにおける通信のインタフェースの定義情報から生成された前記インタフェースの識別情報を含み、前記定義情報に基づいて前記リモートプロシジャコールにおける通信処理において、少なくとも前記識別情報を送信する処理を、前記ネットワークコンピュータシステムに実行させるプログラムを格納することを特徴とするプログラム記録媒体。
【0090】
(付記9) ネットワークコンピュータシステムを実現するプログラムを格納するコンピュータ読取可能なプログラム記録媒体であって、リモートプロシジャコールにおける通信のインタフェースの定義情報から生成された前記インタフェースの識別情報を含み、前記定義情報に基づいて前記リモートプロシジャコールにおける通信処理において、少なくとも受信した前記識別情報を解析する処理を、前記ネットワークコンピュータシステムに実行させるプログラムを格納することを特徴とするプログラム記録媒体。
【0091】
(付記10) リモートプロシジャコールにおける通信のインタフェースの定義情報から前記インタフェースの識別情報を生成する第1の生成手段と、前記識別情報を用いて前記定義情報に基づいて前記リモートプロシジャコールにおける通信を行うRPC通信手段を生成し、前記RPC通信手段に前記識別情報を付加する第2の生成手段とを備えることを特徴とするネットワークコンピュータシステム。(3)
【0092】
(付記11) 前記定義情報が、前記リモートプロシジャコールにおける通信のインタフェースを定義するインタフェース定義スクリプトからなることを特徴とする付記10に記載のネットワークコンピュータシステム。
【0093】
(付記12) 前記定義情報が、リモートプロシジャコールにより通信を実行するサーバ上のアプリケーションプログラムが有する前記リモートプロシジャコールにおける通信のインタフェースを定義する定義部分からなることを特徴とする付記10に記載のネットワークコンピュータシステム。
【0094】
(付記13) 前記識別情報が、前記定義情報から生成されたハッシュ値からなることを特徴とする付記10に記載のネットワークコンピュータシステム。
【0095】
(付記14) ネットワークコンピュータシステムを実現するプログラムを格納するコンピュータ読取可能なプログラム記録媒体であって、リモートプロシジャコールにおける通信のインタフェースの定義情報から前記インタフェースの識別情報を生成する第1の生成処理と、前記定義情報に基づいて前記リモートプロシジャコールにおける通信を行うRPC通信手段を生成し、前記RPC通信手段に前記識別情報を付加する第2の生成処理とを、前記ネットワークコンピュータシステムに実行させるプログラムを格納することを特徴とするプログラム記録媒体。
【0096】
(付記15) リモートプロシジャコールにより通信を実行するサーバ上のアプリケーションプログラムであって前記リモートプロシジャコールにおける通信のインタフェースを定義する定義部分を備えるプログラムの前記定義部分から生成された前記インタフェースの識別情報を含み、前記識別情報を用いて前記定義部分に基づいて前記リモートプロシジャコールにおける通信を行う下位RPC通信手段と、前記リモートプロシジャコールにおける通信のインタフェースの定義情報に基づいて前記リモートプロシジャコールにおける通信を行う上位RPC通信手段とを備えることを特徴とするネットワークコンピュータシステム。(4)
【0097】
(付記16) リモートプロシジャコールにより通信を実行するサーバ上のアプリケーションプログラムであって前記リモートプロシジャコールにおける通信のインタフェースを定義する定義部分を備えるプログラムの前記定義部分から、前記インタフェースの識別情報を生成する第1の生成手段と、前記定義部分に基づいて前記リモートプロシジャコールにおける通信を行う下位RPC通信手段を生成し、前記下位RPC通信手段に前記識別情報を付加する第2の生成手段と、前記リモートプロシジャコールにおける通信のインタフェースの定義情報に基づいて前記リモートプロシジャコールにおける通信を行う上位RPC通信手段を生成する第3の生成手段とを備えることを特徴とするネットワークコンピュータシステム。(5)
【0098】
【発明の効果】
以上説明したように、本発明によれば、ネットワークコンピュータシステムにおいて、RPCのインタフェースの識別情報を当該インタフェースの定義情報それ自体からそのハッシュ値を求めることにより生成することにより、定義情報を当該インタフェースについて一意に定めることができる。そして、識別情報を埋め込まれたスタブをインストールされたクライアント又はサーバが、受信した伝送パケットから取り出した識別情報と埋め込まれた識別情報とを比較する。これにより、インタフェースが変更された場合でも、インタフェースの不一致を確実に検出することができ、特に、インタフェースが不一致であるにもかかわらず、RPCの不適切な帰り値を用いてアプリケーションプログラムを実行してしまうことを防止することができ、また、インタフェースのバージョンの管理や記述等についての開発者の負担をなくすことができ、バージョン管理等についての人為的な誤り等によるインタフェースの不一致等の発生を防止することができる。
【0099】
また、本発明によれば、ネットワークコンピュータシステムにおいて、RPCのインタフェースの識別情報を当該インタフェースの定義情報それ自体からそのハッシュ値を求めることにより生成してRPCにおける通信を行う下位RPC通信手段に埋め込む。そして、下位RPC通信手段が、受信した伝送パケットから取り出した識別情報と埋め込まれた識別情報とを比較する。これにより、インタフェースのバージョンの管理や記述等についての開発者の負担なしで、事実上当該管理等を行うことができるので、当該管理等についての人為的な誤り等によるインタフェースの不一致等の発生を防止することができる。
【図面の簡単な説明】
【図1】ネットワークコンピュータシステム構成図である。
【図2】IDLの一例を示す図である。
【図3】サーバスタブの一例を示す図である。
【図4】スタブプログラムの生成処理フローである。
【図5】クライアントにおけるRPCによる通信処理フローである。
【図6】サーバにおけるRPCによる通信処理フローである。
【図7】インタフェースのバージョンの検出処理説明図である。
【図8】インタフェースのバージョンの検出処理説明図である。
【図9】ネットワークコンピュータシステム構成図である。
【図10】ネットワークコンピュータシステム構成図である。
【図11】インタフェース定義部の一例を示す図である。
【図12】マーシャリングプログラムの生成処理フローである。
【図13】クライアントにおけるRPCによる通信処理フローである。
【図14】サーバにおけるRPCによる通信処理フローである。
【図15】インタフェースのバージョンの検出処理説明図である。
【符号の説明】
11 定義情報又はインタフェース定義スクリプト(IDL)
12 スタブジェネレータ
15 スタブプログラム
16 識別情報(ハッシュ値)
20 サーバ
21 サーバアプリ(アプリケーションプログラム)
22 サーバスタブ(スタブプログラム)
30 クライアント
31 クライアントアプリ(アプリケーションプログラム)
32 クライアントスタブ(スタブプログラム)
40 ネットワーク[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a network computer system.ToIn particular, a network computer system using a remote procedure call that improves the reliability of the interface between programs.ToRelated.
[0002]
[Prior art]
In a network computer system constituting a distributed processing environment, a remote procedure call (RPC) may be employed in order for a plurality of programs operating on a server or client to distribute processing to each other. In RPC, for example, an application program on the server causes a part of the procedure to be executed by another application program on the client, and the result is received as a return value in the same manner as a normal procedure call.
[0003]
In RPC, the interface is described in an interface definition script (IDL) at the time of development. Based on the IDL, a program (stub (STUB) program) that supports this when the application program executes communication by RPC (instead of executing communication by RPC) (STUB program) is automatically generated. The stub program is incorporated into an application program on each of the server and the client by compiling. During operation, the application program on the server and client executes communication by RPC using each stub program.
[0004]
[Problems to be solved by the invention]
For various reasons, the RPC interface is changed, and IDL may be upgraded (revised) accordingly. Originally, this should be reflected in the interface as well on both the server and client.
[0005]
However, when the IDL is upgraded, it may be output that execution is not possible due to an interface mismatch during operation. For example, a stub program embedded in an application program on a server analyzes a transmission packet received from a client and verifies whether or not the interface matches. As a result, the interface does not match and an execution impossible message may be output. . Such a situation often occurs because the server (administrator) has not compiled a new stub program. In this case, the process stops midway. Further, the interface mismatch cannot be detected until the verification is completed.
[0006]
In addition, when the IDL is upgraded, the application program may be executed using an inappropriate return value of the RPC even when the IDL originally does not match during operation. That is, the IDL is actually changed, but the interface may not be changed when viewed as a data packet. This is the case, for example, when the version upgrade is not related to the format or the like of the transmission packet but is a correction of a minor bug (such as a spelling error). In this case, for example, if the format of the transmission packet received from the client matches, the application program that has received this via the stub program on the server returns a return value to the application program on the client. However, in this case, since the versions originally do not match, the server application program may have executed an incorrect process. Therefore, the client application program may also execute an erroneous process using an incorrect return value based on the incorrect process.
[0007]
In order to prevent such malfunctions as described above, it is desirable to manage the IDL version (version number). However, in order to manage the IDL version number, the developer needs to describe the version information in the IDL. Since this is troublesome for the developer, the description may be omitted, and since it is managed manually, the developer may forget the description or mistake the content. Therefore, there is a case where it is not managed or a case where it is managed but not appropriate. Note that IDL version management is not obligatory.
[0008]
An object of the present invention is to provide a network computer system in which the reliability of a remote procedure call interface is improved.
[0009]
It is another object of the present invention to provide a network computer system that reliably detects an interface mismatch without managing the change of the interface of a remote procedure call.
[0011]
[Means for Solving the Problems]
The network computer system of the present invention comprises:When a network-connected client and server communicate by RPC (Remote Procedure Call), RPCAnd RPC communication means for performing communication in RPC based on the definition information using the identification information.Specifically, the network computer system of the present invention includes, from the definition information of the communication interface in RPC, a first generation unit that generates identification information of the interface that is a hash value of the definition information, and the definition information And generating a client stub that is a program on the client that performs communication by RPC and a server stub that is a program on the server that performs communication by RPC, and identifying the client stub and the server stub with the identification A second generation means for embedding information, and a client installed with the client stub or the server installed with the server stub, which is a transmission source of a transmission packet of communication by RPC based on the definition information, The transmission packet Means for adding and transmitting the identification information; and the client installed with the client stub or the server installed with the server stub, which is the transmission destination of the transmission packet for communication by RPC based on the definition information Comprises means for detecting a mismatch of communication interfaces by taking out the added identification information from the received transmission packet and comparing it with the identification information embedded in the transmission packet.
[0012]
According to the network computer system of the present invention, the interface identification information is obtained from the RPC interface definition information itself.By finding its hash valueGenerated. Therefore, the definition information can be uniquely determined for the RPC interface.Then, the client stub embedded with the identification information and the client or server installed with the server stub compare the identification information extracted from the received transmission packet with the embedded identification information.As a result, when the interface is changed (IDL is upgraded), it is possible to reliably detect an interface mismatch during operation. In particular, it is possible to prevent the application program from being executed using an inappropriate return value of the RPC even though the interfaces do not match. Further, it is possible to eliminate the burden of the developer on the management and description of the interface version, and it is possible to prevent the occurrence of an interface mismatch due to an artificial error in the management of the version.
[0013]
Further, the network computer system of the present invention is generated from the definition part of the program source code including the definition part defining the communication interface in the RPC, which is the source code of the application program on the server that performs communication by RPC. The identification information of the interface that is the hash value of the definition part is embedded, and when performing communication by the RPC based on the definition part, the transmission source adds the identification information to the transmission packet and transmits it. The transmission destination extracts the added identification information from the received transmission packet and compares it with the identification information embedded in itself, thereby detecting a lower-order RPC communication means for detecting a communication interface mismatch, and communication in the RPC. Based on interface definition information And a upper RPC communication means for performing communication by RPC.
The network computer system of the present invention isA source code of an application program on a server that performs communication by RPC, the RPCCommunication interfaceThe hash value of the definition part of the program source code comprising the definition part for definingFirst generating means for generating interface identification information;According to the RPC based on the definition partCommunicateSubordinateGenerate RPC communication means,SaidSubordinateRPC communication meansAboveIdentification informationEmbedSecond generation means;, Third generation means for generating upper RPC communication means for performing communication by the RPC based on definition information of the communication interface in the RPCWith.
[0014]
According to the network computer system of the present invention, the interface identification information is obtained from the RPC interface definition information itself.By finding its hash valueGenerated and this communicates in remote procedure callsSubordinateRPC communication meansEmbedded. Then, the lower RPC communication means compares the identification information extracted from the received transmission packet with the embedded identification information.Therefore, the management of the interface version, description, etc. can be performed without any burden on the developer, and it is possible to prevent the occurrence of interface mismatch due to human error in the management, etc. be able to.
[0015]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a network computer system configuration diagram showing the configuration of the network computer system of the present invention.
[0016]
The network computer system includes a plurality of
[0017]
The
[0018]
The
[0019]
The
[0020]
In this example, the
[0021]
Here, an example of the
[0022]
An example of the
[0023]
The compiler and
[0024]
The
[0025]
The
[0026]
The
[0027]
The
[0028]
The
[0029]
FIG. 4 shows a generation processing flow of the
[0030]
The developer creates IDL 11 (step S1), and then activates the stub generator 12 (step S2).
[0031]
The
[0032]
The developer builds (embeds) a client application (also referred to as APL, hereinafter the same) 33 in the client 30 (step S7). In other words, the
[0033]
Further, the developer builds (built in) the
[0034]
FIG. 5 shows a communication processing flow by RPC in the
[0035]
The client application 31 (of the client RM 33) requests the client stub 32 (of the client RM 33) to call the server 20 (step S11).
[0036]
The
[0037]
Upon receiving this request, the
[0038]
FIG. 6 shows a communication processing flow by RPC in the
[0039]
The
[0040]
The activated
[0041]
If equal, the
[0042]
The
[0043]
On the other hand, if the
[0044]
7 and 8 are explanatory diagrams of interface version detection processing using the
[0045]
In FIG. 7, an interface definition script (IDL) 11 is prepared by a developer when developing
[0046]
The
[0047]
The
[0048]
The
[0049]
When the
[0050]
In FIG. 8, after the development of FIG. 7, IDL (modified IDL) 11 ′ that has been upgraded (revised) by the developer is created by changing the RPC interface. Therefore, as described above, the
[0051]
Normally, the
[0052]
However, even though the
[0053]
Therefore, when the leading
[0054]
9 and 10 are configuration diagrams of a network computer system, showing a configuration of a general-purpose RPC system using the network computer system (RPC system) of FIG.
[0055]
In the RPC system of FIG. 1, it is necessary to prepare an
[0056]
Therefore, as shown in FIG. 9, the RPC system shown in FIG. 1 is adopted as an RPC system. That is, the
[0057]
That is, as can be seen from FIG. 9, the
[0058]
The
[0059]
That is, as shown in FIG. 10, the
[0060]
On the other hand, the marshalling program (server marshalling) 22A on the
[0061]
FIG. 11 is a diagram illustrating an example of an interface definition unit on the
[0062]
FIG. 12 is a process flow of generating a marshalling program.
[0063]
The developer creates the
[0064]
The
[0065]
The
[0066]
The
[0067]
The
[0068]
The
[0069]
FIG. 13 is a communication processing flow by RPC in the
[0070]
The
[0071]
The client marshalling 32A performs transmission data creation processing (step S42). In this process, the client marshalling 32A embeds the
[0072]
The requested general-
[0073]
FIG. 14 is a communication processing flow by RPC in the
[0074]
The general-
[0075]
The activated server marshalling 22A analyzes the received
[0076]
If equal, the server marshalling 22A analyzes the subsequent parameter of the activation parameter 51 (step S55), activates the
[0077]
The general-
[0078]
On the other hand, if the
[0079]
As mentioned above, although this invention was demonstrated according to the embodiment, this invention can be variously deformed in the range of the main point.
[0080]
For example, although the
[0081]
Moreover, although the above embodiment demonstrated the case where communication between computers was performed by RPC (in a narrow sense), this invention is applicable also to the object request broker (ORB) which is the technique which developed RPC. In this case, instead of the
[0082]
(Supplementary note 1) RPC communication means including communication interface definition information generated from communication interface definition information in a remote procedure call, and performing communication in the remote procedure call based on the definition information using the identification information A network computer system comprising: (1)
[0083]
(Supplementary note 2) The network computer system according to
[0084]
(Supplementary note 3) The network computer system according to
[0085]
(Supplementary Note 4) RPC communication means including communication interface definition information generated from communication interface definition information in a remote procedure call and performing communication in the remote procedure call based on the definition information using the identification information And the RPC communication means transmits at least the identification information.
[0086]
(Supplementary Note 5) The client according to Supplementary Note 4, wherein the definition information includes a definition part that defines a communication interface in the remote procedure call included in an application program on a server that performs communication by remote procedure call. .
[0087]
(Supplementary note 6) RPC communication means including identification information of the interface generated from communication interface definition information in a remote procedure call and performing communication in the remote procedure call based on the definition information using the identification information And the RPC communication means analyzes at least the received identification information. (2)
[0088]
(Supplementary note 7) The supplementary note 6 is characterized in that the received identification information is analyzed, and if it does not match the identification information held by itself, error information is returned to the client that is the transmission source of the received identification information. The listed server.
[0089]
(Supplementary Note 8) A computer-readable program recording medium for storing a program for realizing a network computer system, including identification information of the interface generated from communication interface definition information in a remote procedure call, the definition information A program recording medium for storing a program for causing the network computer system to execute at least the process of transmitting the identification information in the communication process in the remote procedure call based on the program.
[0090]
(Supplementary Note 9) A computer-readable program recording medium for storing a program for realizing a network computer system, including identification information of the interface generated from communication interface definition information in a remote procedure call, the definition information A program recording medium storing a program for causing the network computer system to execute at least a process of analyzing the received identification information in a communication process in the remote procedure call based on the program.
[0091]
(Additional remark 10) The 1st production | generation means which produces | generates the identification information of the said interface from the definition information of the interface of communication in a remote procedure call, and communicates in the said remote procedure call based on the said definition information using the said identification information A network computer system comprising: RPC communication means; and second generation means for adding the identification information to the RPC communication means. (3)
[0092]
(Supplementary note 11) The network computer system according to
[0093]
(Supplementary note 12) The network according to
[0094]
(Supplementary note 13) The network computer system according to
[0095]
(Supplementary Note 14) A computer-readable program recording medium for storing a program for realizing a network computer system, the first generation processing for generating identification information of the interface from communication interface definition information in a remote procedure call A program for generating RPC communication means for performing communication in the remote procedure call based on the definition information and causing the network computer system to execute a second generation process for adding the identification information to the RPC communication means. A program recording medium for storing the program.
[0096]
(Supplementary Note 15) Identification information of the interface generated from the definition part of an application program on a server that executes communication by a remote procedure call, the definition part defining a communication interface in the remote procedure call And lower RPC communication means for performing communication in the remote procedure call based on the definition part using the identification information, and performing communication in the remote procedure call based on definition information of a communication interface in the remote procedure call A network computer system comprising higher-order RPC communication means. (4)
[0097]
(Supplementary Note 16) The interface identification information is generated from the definition part of the application program on the server that executes communication by remote procedure call, the definition part defining a communication interface in the remote procedure call. A first generation means, a lower generation RPC communication means for performing communication in the remote procedure call based on the definition part, a second generation means for adding the identification information to the lower RPC communication means, the remote A network computer system comprising: third generation means for generating higher-order RPC communication means for performing communication in the remote procedure call based on definition information of a communication interface in the procedure call. (5)
[0098]
【The invention's effect】
As described above, according to the present invention, in the network computer system, RPC interface identification information is obtained from the interface definition information itself.By finding its hash valueBy generating, definition information can be uniquely determined for the interface.. Then, the client or server installed with the stub in which the identification information is embedded compares the identification information extracted from the received transmission packet with the embedded identification information. ThisEven when the interface is changed, it is possible to reliably detect the interface mismatch, and in particular, the application program is executed using an inappropriate return value of the RPC even though the interface is mismatched. In addition, it is possible to eliminate the burden of the developer on interface version management and description, etc., and to prevent the occurrence of interface mismatches due to human error in version management etc. Can do.
[0099]
Further, according to the present invention, in the network computer system, the RPC interface identification information is obtained from the interface definition information itself.By finding its hash valueGenerate and communicate in RPCSubordinateRPC communication meansEmbed. Then, the lower RPC communication means compares the identification information extracted from the received transmission packet with the embedded identification information. thisThis makes it possible to effectively manage the interface version without any burden on the developer, such as management and description of the interface, thus preventing the occurrence of interface mismatches due to human error in the management. can do.
[Brief description of the drawings]
FIG. 1 is a configuration diagram of a network computer system.
FIG. 2 is a diagram illustrating an example of IDL.
FIG. 3 is a diagram illustrating an example of a server stub.
FIG. 4 is a process flow of generating a stub program.
FIG. 5 is a communication processing flow by RPC in a client.
FIG. 6 is a communication processing flow by RPC in a server.
FIG. 7 is an explanatory diagram of interface version detection processing;
FIG. 8 is an explanatory diagram of interface version detection processing;
FIG. 9 is a configuration diagram of a network computer system.
FIG. 10 is a configuration diagram of a network computer system.
FIG. 11 is a diagram illustrating an example of an interface definition unit.
FIG. 12 is a generation process flow of a marshalling program.
FIG. 13 is a communication processing flow by RPC in a client.
FIG. 14 is a communication processing flow by RPC in a server.
FIG. 15 is an explanatory diagram of interface version detection processing;
[Explanation of symbols]
11 Definition information or interface definition script (IDL)
12 Stub generator
15 Stub program
16 Identification information (hash value)
20 servers
21 Server application (application program)
22 Server bathtub (stub program)
30 clients
31 Client application (application program)
32 Client stub (stub program)
40 network
Claims (3)
RPCにおける通信のインタフェースの定義情報から、当該定義情報のハッシュ値である前記インタフェースの識別情報を生成する第1の生成手段と、
前記定義情報に基づいて、RPCにより通信を実行する前記クライアント上のプログラムとなるクライアントスタブと、RPCにより通信を実行する前記サーバ上のプログラムとなるサーバスタブとを生成し、前記クライアントスタブと前記サーバスタブに前記識別情報をそれぞれ埋め込む第2の生成手段と、
前記定義情報に基づいたRPCによる通信の伝送パケットの送信元となる、前記クライアントスタブをインストールされた前記クライアント又は前記サーバスタブをインストールされた前記サーバが、前記伝送パケットに前記識別情報を付加して送信する手段と、
前記定義情報に基づいたRPCによる通信の前記伝送パケットの送信先となる、前記クライアントスタブをインストールされた前記クライアント又は前記サーバスタブをインストールされた前記サーバが、受信した前記伝送パケットから前記付加された識別情報を取り出し前記自己に埋め込まれた識別情報と比較することで、通信インタフェースの不一致を検出する手段とを備える
ことを特徴とするネットワークコンピュータシステム。 A network computer system in which a client and a server connected to a network perform communication by RPC ( Remote Procedure Call ),
First generation means for generating identification information of the interface, which is a hash value of the definition information, from the definition information of the communication interface in the RPC ;
On the basis of the definition information, and generates the client stubs that the program on the client to perform communication by RPC, and said server stub as a program on the server that executes communication by RPC, the said client stub server Second generation means for embedding the identification information in each stub;
The client installed with the client stub or the server installed with the server stub, which is the transmission packet transmission source of communication by RPC based on the definition information, adds the identification information to the transmission packet. Means for transmitting;
The client in which the client stub is installed or the server in which the server stub is installed, which is the transmission destination of the transmission packet for communication by RPC based on the definition information, is added from the received transmission packet. A network computer system comprising: means for detecting a mismatch of communication interfaces by taking out identification information and comparing it with identification information embedded in the self .
前記RPCにおける通信のインタフェースの定義情報に基づいて前記RPCによる通信を行う上位RPC通信手段とを備える
ことを特徴とするネットワークコンピュータシステム。A source code of an application program on the server that executes communication by RPC, a hash value of said defined portion generated from the definition part of the program source code including a definition part for defining a communication interface in the RPC said Interface identification information is embedded, and when performing communication by the RPC based on the definition part , the transmission source adds the identification information to the transmission packet and transmits the transmission packet, and the transmission destination is from the received transmission packet. Subordinate RPC communication means for detecting a mismatch of communication interfaces by taking out the added identification information and comparing it with identification information embedded in the self ;
Network computer system, characterized in that it comprises an upper RPC communication means for communicating with said RPC based on the definition information of the communication interface in the RPC.
前記定義部分に基づいて前記RPCによる通信を行う下位RPC通信手段を生成し、前記下位RPC通信手段に前記識別情報を埋め込む第2の生成手段と、
前記RPCにおける通信のインタフェースの定義情報に基づいて前記RPCによる通信を行う上位RPC通信手段を生成する第3の生成手段とを備える
ことを特徴とするネットワークコンピュータシステム。A source code of an application program on the server that executes communication by RPC, generates identification information of said interface is a hash value of said defined portion of the program source code including a definition part for defining a communication interface in the RPC First generating means to:
A second generation unit that generates a lower RPC communication unit that performs communication by the RPC based on the definition part, and embeds the identification information in the lower RPC communication unit;
Network computer system, characterized in that it comprises a third generation means for generating a higher RPC communication means for communicating with said RPC based on the definition information of the communication interface in the RPC.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000198680A JP4184576B2 (en) | 2000-06-30 | 2000-06-30 | Network computer system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2000198680A JP4184576B2 (en) | 2000-06-30 | 2000-06-30 | Network computer system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2002014832A JP2002014832A (en) | 2002-01-18 |
| JP4184576B2 true JP4184576B2 (en) | 2008-11-19 |
Family
ID=18696812
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2000198680A Expired - Fee Related JP4184576B2 (en) | 2000-06-30 | 2000-06-30 | Network computer system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4184576B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007249785A (en) * | 2006-03-17 | 2007-09-27 | Fujitsu Ltd | Compile program, virtual database remote access program manufacturing method, and virtual database remote access method |
| WO2012158453A1 (en) * | 2011-05-16 | 2012-11-22 | Panasonic Corporation | Duplication judgment device and duplication management system |
-
2000
- 2000-06-30 JP JP2000198680A patent/JP4184576B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2002014832A (en) | 2002-01-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7171672B2 (en) | Distributed application proxy generator | |
| KR101098745B1 (en) | System and method for managing and communicating software updates | |
| US10042624B2 (en) | Delivering a customized service to a mobile device by parsing metadata to create a device signature | |
| Henning et al. | Distributed programming with ice | |
| US6954930B2 (en) | Remote validation of installation input data | |
| KR101219855B1 (en) | Dynamic service surrogates | |
| US7574692B2 (en) | Method for building component-software for execution in a standards-compliant programming environment | |
| US6871223B2 (en) | System and method for agent reporting in to server | |
| US20080140760A1 (en) | Service-oriented architecture system and methods supporting dynamic service provider versioning | |
| US20080140857A1 (en) | Service-oriented architecture and methods for direct invocation of services utilizing a service requestor invocation framework | |
| US20050223285A1 (en) | Remote software support agent system | |
| US20190050213A1 (en) | System and method for generating a domain-specific programming language program from a cloud-based computing system | |
| JP2003058517A (en) | System for enabling transaction-based service utilizing non-transactional resource | |
| JP4931343B2 (en) | System, method, program, and apparatus for providing self-installing software components for performing network services | |
| US20040172462A1 (en) | Supporting interactions between different versions of software for accessing remote objects | |
| WO2017101727A1 (en) | Method and system for calling application programming interface | |
| CN109150977B (en) | Method for automatically generating global serial number based on transaction link | |
| US20080092136A1 (en) | System and method for using a preprocessor to determine dependencies between j2ee components | |
| TW200805161A (en) | Intelligent platform management interface firmware architecture and method of building the same | |
| US7143395B2 (en) | Verifying a program version | |
| US20130117425A1 (en) | Method and apparatus for updating a user terminal | |
| JP4184576B2 (en) | Network computer system | |
| US7171673B1 (en) | System and method for validating interfaces of dynamically linkable components and real-time process control system incorporating the same | |
| CN111273970B (en) | Calling method, device, system, medium and electronic equipment of intelligent contract | |
| CN101663666A (en) | Binary verification service |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060726 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20080416 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080507 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080707 |
|
| RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20080707 |
|
| RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20080707 |
|
| 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: 20080902 |
|
| 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: 20080904 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110912 Year of fee payment: 3 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120912 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120912 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130912 Year of fee payment: 5 |
|
| LAPS | Cancellation because of no payment of annual fees |