Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4184576B2 - Network computer system - Google Patents
[go: Go Back, main page]

JP4184576B2 - Network computer system - Google Patents

Network computer system Download PDF

Info

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
Application number
JP2000198680A
Other languages
Japanese (ja)
Other versions
JP2002014832A (en
Inventor
景介 森永
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2000198680A priority Critical patent/JP4184576B2/en
Publication of JP2002014832A publication Critical patent/JP2002014832A/en
Application granted granted Critical
Publication of JP4184576B2 publication Critical patent/JP4184576B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

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 network computers 20 and 30 and a network 40 connecting them. The network computers 20 and 30 include, for example, a server 20 and a client 30 and perform communication between computers by remote procedure call (RPC). There may be a plurality of servers 20 and clients 30 each. In addition to the server 20 and the client 30, the network computer system includes, for example, a development host computer 10.
[0017]
The host computer 10 includes a stub (STUB) generator 12, a compiler and a linker 17 for developing the server 20 and the client 30. The stub generator 12, the compiler and the linker 17 are realized by a program that exists on a main memory (not shown) constituting the host computer 10 and is executed on a CPU (not shown) constituting the host computer 10. . The host computer 10 includes an interface definition script (IDL) 11, an application (source or object) program (server application) 18 that operates on the server 20, and an application (source or object) program (client application) that operates on the client 30. ) 19 is provided on an auxiliary storage (not shown) such as a magnetic disk device.
[0018]
The host computer 10 may be connected to the server 20 or the like via the network 40 as indicated by a dotted line in FIG. In this case, a stub program 15 and the like, which will be described later, are distributed to the server 20 and the like via the network 40. Further, since the stub generator 12, the compiler and the linker 17 need to generate the stub program 15 (22, 23) based on the upgraded IDL (modified IDL) 11 ′, each of the server 20 and the client 30 is provided. Is also provided (not shown). In this case, the correction IDL 11 ′ is provided to the server 20 and the client 30 by a flexible disk or the like.
[0019]
The stub generator 12 generates a stub program (or stub code) 15. The stub program 15 supports this when the application program executes communication by RPC. That is, the RPC communication means 15 (22, 32) executes communication by RPC instead of the application program (21, 31). For this generation, the stub generator 12 includes first generation means 13 and second generation means 14. The first generation unit 13 generates interface identification information 16 from the interface definition information (IDL) 11 for communication in RPC. The second generation unit 14 generates an RPC communication unit 15 that performs RPC communication based on the definition information 11, and adds identification information 16 to the RPC communication unit 15.
[0020]
In this example, the definition information 11 includes an interface definition script (IDL) 11. IDL11 defines an interface for communication in RPC. The identification information 16 includes a hash value (hash code) 16 generated from the definition information 11. Therefore, in this example, hash value 16 as identification information 16 is generated from IDL 11 by hashing, and stub program 15 is generated based on IDL 11. The hash value 16 is added (embedded) to the stub program 15. For this purpose, the stub generator 12 has a hash function. As the hash function, for example, the well-known RSA-MD5: RFC1321 is used, and for example, a 16-byte message digest is used. As the stub program 15, a stub program (client stub) 32 on the client 30 and a stub program (server stub) 22 on the server 20 and a stub program (server stub) 22 are formed.
[0021]
Here, an example of the IDL 11 is shown in FIG. In FIG. 2, IDL 11 describes various information of the interface of RPC. The IDL 11 is a text file as shown in FIG. The entire IDL 11 in FIG. 2 is used for hashing. As shown in FIG. 3, the hash value 16 generated as a result of hashing is a 16-byte hexadecimal number.
[0022]
An example of the server stub 22 is shown in FIG. The server stub 22 actually holds two hash values 16 (161, 162). For example, the hash value 161 is for comparison with the hash value 16 embedded in the transmission packet 50 received from the client 30. The server stub 22 analyzes the received identification information 16 and returns error information to the client 30 that is the transmission source of the received identification information 16 if it does not match the identification information 161 that the server stub 22 has. The hash value 162 is for embedding the hash value 162 when the server 20 transmits the transmission packet 50 to the client 30. The server stub 22 also holds two error values 221 and 222. The error values 221 and 222 are error messages returned to the client 30 when the comparison result between the hash value 161 and the hash value 16 embedded in the transmission packet 50 received from the client 30 does not match. The error values 221 and 222 are selectively used according to the type of error. The client stub 32 has a similar configuration.
[0023]
The compiler and linker 17 links the client stub 15 (32) to the compiled version of the client application (source) 19 to obtain a load module (client RM) 33 of the client application execution format. To install. Further, the compiler and linker 17 obtains a server application executable load module (server RM) 23 by linking a server stub 15 (22) to a compiled version of the server application (source) 18. 20 to install. The client RM 33 is also referred to as a client application, and the server RM 23 is also referred to as a server application.
[0024]
The server 20, which is a network computer, includes a plurality of (execution format) server applications 23. Each of the plurality of server applications 23 is provided according to each of the services (procedures to be called) provided by the server 20. Each of the plurality of server applications 23 includes a stub program (server stub) 22. The client 20, which is a network computer, includes a plurality of (execution format) client applications 33. Each of the plurality of client applications 33 is provided according to each process (application) executed by the client 30. Each of the plurality of client applications 33 includes a stub program (client stub) 32.
[0025]
The server 20 and the client 30 that are network computers include stub programs 22 and 32 (15) that are RPC communication means in the form of load modules, respectively. The stub programs 22 and 32 include interface identification information 16 generated from the RPC communication interface definition information 11, and perform RPC communication based on the definition information 11. Specifically, in the client 30, the RPC communication unit 32 transmits at least the identification information 16. In the server 20, the RPC communication means 22 analyzes at least the received identification information 16.
[0026]
The server 20 and the client 30 perform inter-computer communication via the network 40 according to RPC. In this communication, the identification information 16 is added to the head of the transmission data (or to the head transmission packet). Therefore, in this example, as described above, the hash value 16 that is the identification information 16 generated from the IDL 11 that is the definition information 11 is stored in the leading transmission packet.
[0027]
The client stub 32 transmits at least the hash value 16 as the identification information 16. Therefore, the stub program 15 generated as the client stub 32 has a function of transmitting the hash value 16. The server stub 22 analyzes at least the hash value 16 as the received identification information 16. Therefore, the stub program 15 generated as the server stub 22 has a function of analyzing the hash value 16. In practice, the client stub 32 may also analyze the received identification information 16 and the server stub 22 may transmit the identification information 16, so both may be the same.
[0028]
The server 20 and the client 30 include transmission processing units 24 and 34, respectively, for performing communication between computers. In addition, the client 30 includes a display device 35 that displays a processing result in the client application 31 and an input device 36 for inputting an instruction for processing in the client application 31.
[0029]
FIG. 4 shows a generation processing flow of the stub programs 22 and 32.
[0030]
The developer creates IDL 11 (step S1), and then activates the stub generator 12 (step S2).
[0031]
The stub generator 12 reads the IDL 11 (step S3), and hashes the IDL 11 to calculate the hash value 16 therefrom (step S4). Thereafter, the stub generator 12 generates a client stub 32 (step S5). A hash value 16 is embedded in the client stub 32 as the identification information 16. Further, the stub generator 12 generates a server stub 22 (step S6). The same hash value 16 is embedded in the server stub 22 as the identification information 16.
[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 client stub 32 is linked to the compiled client application 19 (31) by the compiler and linker 17 to obtain the load module (client RM) 33 of the client application 19, and this is installed in the client 30.
[0033]
Further, the developer builds (built in) the server application 23 in the server 20 (step S8). That is, the server stub 22 is linked to the compiled server application 18 (21) by the compiler and linker 17 to obtain the load module (server RM) 23 of the server application 18, and this is installed in the server 20.
[0034]
FIG. 5 shows a communication processing flow by RPC in the client 30.
[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 client stub 32 performs transmission data creation processing (step S12). In this creation process, the client stub 32 embeds the hash value 16 held by the client stub 32 at the beginning of the data (step S13), generates a transmission packet 50 by assembling parameters (step S14), and transmits this transmission to the transmission processing unit. Ask 34.
[0037]
Upon receiving this request, the transmission processing unit 34 of the client 30 performs communication processing. That is, the transmission processing unit 34 transmits the transmission packet 50 to the server 20 (step S15). This transmission process corresponds to step S21 in FIG. When there is a response from the server 20, the transmission processing unit 34 receives the processing result (step S16). This reception process corresponds to step S29 in FIG. Thereafter, the processing in the client 30 returns to the client application 31 via the client stub 32 (step S17).
[0038]
FIG. 6 shows a communication processing flow by RPC in the server 20.
[0039]
The transmission processing unit 24 of the server 20 receives the transmission packet 50 from the client 30 (step S21), searches for and selects the server stub 22 to be activated (step S22), and activates the server stub 22 (step S21). S23). Step S21 corresponds to step S15 in FIG.
[0040]
The activated server stub 22 analyzes the received transmission data. That is, the server stub 22 checks whether or not the received hash value 16 is equal to the hash value 16 embedded in itself (step S24).
[0041]
If equal, the server stub 22 analyzes the subsequent parameters of the transmission packet 50 (step S25), starts the server application 21 (step S26), and waits for a response. The activated server application 21 performs a predetermined process using the analyzed subsequent parameter, and returns the processing result to the server stub 22 (step S27). The server stub 22 sets the processing result from the server application 21 as a return value (return value) (step S28), and requests the transmission processing unit 24 for a reply.
[0042]
The transmission processing unit 24 returns the result to the client 30 according to the request from the server stub 22 (step S29). This process corresponds to step S16 in FIG.
[0043]
On the other hand, if the hash value 16 received in step S24 is not equal to the hash value 16 embedded in itself, the server stub 22 sets an error value (step S30) and requests the transmission processing unit 24 to send a reply. . Thereafter, step S29 is executed.
[0044]
7 and 8 are explanatory diagrams of interface version detection processing using the hash value 16.
[0045]
In FIG. 7, an interface definition script (IDL) 11 is prepared by a developer when developing application programs 23 and 33 that employ RPC. IDL11 describes the interface of RPC.
[0046]
The stub generator 12 generates a stub program 15 based on the IDL 11. The stub generator 12 generates identification information (hash value) 16 from the IDL 11 by hashing. The stub generator 12 adds the generated identification information 16 to the stub program 15 (server stub 22 and client stub 32).
[0047]
The identification information 16 only needs to be able to uniquely identify the IDL 11 (version). Accordingly, the identification information 16 is IDL 11 version information. For example, the identification information 16 includes a hash value 16 (hash value) generated from the IDL 11. That is, the identification information 16 is generated by hashing the IDL 11 itself. It is virtually impossible for the hash values 16 to collide with each other. Therefore, the hash value 16 can uniquely identify the IDL 11 (version). Since the IDL11 version information is generated by hashing the IDL11 itself, the developer does not need to describe and manage the IDL11 version number in the IDL11. Therefore, the IDL11 version information is not artificially mistaken.
[0048]
The stub program 15 is incorporated into the application program by compiling and linking executed by the compiler and linker 17. That is, the server stub 22 and the client stub 32 are linked to the compiled server application 21 and client application 31, respectively. Thereby, the load module (server RM) 23 of the server application 21 and the load module (client RM) 33 of the client application 31 are obtained.
[0049]
When the application programs 23 and 33 adopting RPC are operated, the application programs 23 and 33 on the server 20 and the client 30 perform communication by RPC by the stub programs 22 and 32 (15). For example, the client stub 32 generates a transmission packet 50 to be transmitted, and adds a hash value 16 that is identification information 16 added to the client stub 32 to the head thereof. The server stub 22 that has received this takes out the hash value 16 from the transmission packet 50 and compares it with the hash value 16 added to itself. If they match, IDL11 (version) is matched. Therefore, it is guaranteed that the subsequent communication is correct.
[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 stub generator 12 generates a stub program 15 'based on the modified IDL 11', and generates a new hash value (new hash value) 16 'from the modified IDL 11'. If there is a version upgrade of IDL11, even if it is not a change in the format of the transmission packet but a simple bug correction, the correction is always reflected in the hash value 16. That is, the hash values 16 and 16 'are always different before and after the version upgrade. Therefore, also from this point, the hash value 16 can uniquely identify the IDL 11 (version).
[0051]
Normally, the stub generator 12 generates again the client stub 32 ′ and the server stub 22 ′ in which the new hash value 16 ′ is embedded in both the client 30 and the server 20. The stub generator 12 compares the hash values 16 and 16 ′ after generating the new hash value 16 ′, and if there is no difference between the two, it is determined that the interface change is not related to the RPC communication. Thus, the new client stub 32 ′ and the server stub 22 ′ are not generated. As a result, unnecessary updates are not performed.
[0052]
However, even though the stub program 15 ′ based on the modified IDL 11 ′ is created, the server 20 does not compile (and link) it. Assume that the client 30 is compiled (and linked) as described above. In this case, at the time of operation, for example, the client stub 32 ′ transmits the transmission packet 50 with the new hash value 16 added to the head to the server stub 22. The server stub 22 that has received this compares the new hash value 16 ′ extracted from the transmission packet 50 with the (old) hash value 16 added to itself. Accordingly, since the two do not match, the server stub 22 notifies the client stub 32 'of an error that the IDL 11 (version) does not match.
[0053]
Therefore, when the leading transmission packet 50 is analyzed, it can be detected that the IDLs 11 do not match. Thus, it is possible to prevent the application programs 23 and 33 from being executed using an inappropriate return value of RPC. Further, since there is no need to analyze subsequent packets, processing is not wasted. In contrast, the same applies to the case where the client 30 does not compile a new client stub 32 '. The same applies when the user accidentally activates the old server stub 22 or the client stub 32. Further, for example, the same applies to the case where the server 20 changes the server stub 22 (accordingly, the IDL 11).
[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 IDL 11 and a stub generator 12 according to each application program (subroutine) in the server 20. In addition, in order to introduce the inspection of the interface with the hash value 16 into the existing RPC system, it is necessary to change the existing program so as to perform the processing.
[0056]
Therefore, as shown in FIG. 9, the RPC system shown in FIG. 1 is adopted as an RPC system. That is, the RPC server system 200 and the RPC client system 300 correspond to the server 20 and the client 30 in FIG. 1, respectively. All communication between the server 20 and the client 30 in FIG. 9 depends on one RPC server system 200 and RPC client system 300. Communication between the RPC server system 200 and the RPC client system 300 as the base and the actual application programs 21A and 31A (accordingly, communication between the application programs) is unified by a single universal interface 60. connect. Between the general-purpose interface 60 and the actual application programs 21A and 31A, marshalling programs (or codes) 22A and 32A exist, respectively. The marshalling programs 22A and 32A perform various processes executed by the stub program in the normal RPC system (stub programs 22 and 32 in FIG. 1).
[0057]
That is, as can be seen from FIG. 9, the server 20 and the client 30 in FIG. 9 constitute a hierarchical communication means. The marshalling programs 22 </ b> A and 32 </ b> A, which are lower RPC communication means, include interface identification information 16. The identification information 16 is generated from a definition part that defines an RPC communication interface in the application program 21A on the server 20 that performs communication by RPC. The marshalling programs 22A and 32A use the identification information 16 to perform communication in RPC based on the definition part. The RPC server system 200 and the RPC client system 300 (server stub 222 and client stub 332), which are upper RPC communication means, perform RPC communication based on the definition information of the RPC communication interface.
[0058]
The interface identification information 16 is generated from the definition part of the application program 21A by the stub generator 12A as the first generation means. The marshalling programs 22A and 32A as the lower RPC communication means are generated based on the definition part by the stub generator 12A as the second generation means. Based on the definition information 11, the server stub 222 and the client stub 332, which are the upper RPC communication means, are based on the definition information (IDL) 11 of the communication interface in RPC by the stub generator 12 that is the third generation means. Generated.
[0059]
That is, as shown in FIG. 10, the server stub 222 in the RPC server system 200 is generated by the stub generator 12 based on the IDL 11. At this time, the generation of the hash value (16) from the IDL 11 is not performed. Therefore, the server stub 222 in this example does not have the identification information 16 (this is different from the example of FIG. 1). The server stub 222 and the server application 221 constitute an RPC server system 200 (the load module 223). The same applies to the client stub 332 in the RPC client system 300. The client stub 332 and the client application 331 constitute an RPC client system 300 (load module 333 thereof). In FIG. 10, the compiler, linker (17), and transmission processing units (24, 34) are not shown.
[0060]
On the other hand, the marshalling program (server marshalling) 22A on the server 20 is generated by the stub generator 12A based on the interface definition part on the source code 21A 'of the server application 21A. At this time, the hash value 16 from the interface definition unit is generated. Accordingly, the server marshalling 22A has the identification information 16 including the hash value 16. Similarly, the marshalling program (client marshalling) 32A on the client 30 is generated by the stub generator 12A based on the interface definition part on the source code 21A ′ of the server application 21A, and the hash value 16 from the interface definition part is embedded. . Accordingly, the client marshalling 32A also has the identification information 16 consisting of the hash value 16.
[0061]
FIG. 11 is a diagram illustrating an example of an interface definition unit on the source code 21A ′ of the server application 21A. The interface definition section on the source code 21A 'includes a parameter section shown in FIG. 11A and a linkage section shown in FIG. These are definition information regarding communication between the server marshalling 22A and the server application 21A.
[0062]
FIG. 12 is a process flow of generating a marshalling program.
[0063]
The developer creates the source code 21A 'of the server application 21A (step S31), and then activates the stub generator 12A (step S32). It is assumed that the RPC server system 200 and the RPC client system 300 have already been generated by processing similar to the example of FIG.
[0064]
The stub generator 12A reads the source code 21A 'of the server application 21A (step S33), and calculates the hash value 16 from the interface definition section on the source code 21A' (step S34).
[0065]
The stub generator 12 generates client marshalling 32A (step S35). A hash value 16 is embedded as identification information 16 in the client marshalling 32A.
[0066]
The stub generator 12A generates server marshalling 22A (step S36). Also in this server marshalling 22A, the same hash value 16 is embedded as the identification information 16.
[0067]
The client application 33A is built (built in) in the client 30 (step S37). That is, the client marshalling 32A is linked to the compiled client application (31A) by the compiler and linker (17) to obtain the client application load module (client RM) 33A, which is installed in the client 30.
[0068]
The server application 23A is built (built in) in the server 20 (step S38). That is, the server marshalling 22A is linked to the server application 21A ′ compiled by the compiler and linker (17) 21A to obtain the load module (server RM) 23A of the server application 21A ′, which is installed in the server 20. .
[0069]
FIG. 13 is a communication processing flow by RPC in the client 30.
[0070]
The client application 31A (of the client RM 33A) requests the client marshalling 32A (of the client RM 33A) to call the server 20 (step S41).
[0071]
The client marshalling 32A performs transmission data creation processing (step S42). In this process, the client marshalling 32A embeds the hash value 16 at the head of the activation parameter 51 (step S43), generates the activation parameter 51 by assembling the parameter (step S44), sends this to the general-purpose interface 60, and sends it to the server 20 Is requested (step S45).
[0072]
The requested general-purpose interface 60 activates the server 20 (the server application 21A) via the RPC client system 300 and the RPC server system 200. This process corresponds to step S51 in FIG. The processing between the RPC client system 300 and the RPC server system 200 is similar to the example of FIG. If there is a response from the server 20, the general-purpose interface 60 receives the processing result (step S46). This reception process corresponds to step S58 in FIG. Thereafter, the processing in the client 30 returns to the client application 31A via the client marshalling 32A (step S47).
[0073]
FIG. 14 is a communication processing flow by RPC in the server 20.
[0074]
The general-purpose interface 60 of the server 20 receives an activation request from the client 30 via the RPC server system 200 (step S51). This process corresponds to step S45 in FIG. The general-purpose interface 60 searches and selects the server marshalling 22A to be activated (step S52), and activates the server marshalling 22A (step S53).
[0075]
The activated server marshalling 22A analyzes the received activation parameter 51. That is, the server marshalling 22A checks whether or not the received hash value 16 is equal to the hash value 16 embedded in itself (step S54).
[0076]
If equal, the server marshalling 22A analyzes the subsequent parameter of the activation parameter 51 (step S55), activates the server application 21A (step S56), and waits for a response. The activated server application 21A performs a predetermined process using the analyzed subsequent parameter, and returns the processing result to the server marshalling 22A. The server marshalling 22A sets the processing result from the server application 21A as a return value (return value) (step S57), and requests a return from the general-purpose interface 60.
[0077]
The general-purpose interface 60 returns the result to the client 30 via the RPC server system 200 according to the request from the server marshalling 22A (step S58). This process corresponds to step S46 in FIG.
[0078]
On the other hand, if the hash value 16 received in step S54 is not equal to the hash value 16 embedded in itself, the server marshalling 22A sets an error value (step S59) and requests the general-purpose interface 60 to send a reply. Thereafter, step S58 is executed.
[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 identification information 16 is generated by hashing the IDL 11 in the above embodiment, the present invention can also be applied to a program that does not have the IDL 11 such as JAVAMI (Remote Method Invocation). In JAVAMI, an interface definition and a stub program are generated from an application (source or object) program 18 of the server 20. Therefore, it does not have IDL11. Therefore, as shown in FIG. 15, as the definition information 11, a definition portion 181 that defines an RPC communication interface included in the application program 18 on the server 20 that performs communication by RPC is used. The hash value 16 is generated from the definition part 181. The stub program 15 (22, 32) is generated based on the definition part 181. This is similar to the embodiment of FIG. 10 described above.
[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 IDL 11, the identification information 16 may be generated by hashing the ODL, which is an interface definition script that defines the communication interface in the ORB, as the definition information 11. That is, the present invention can be widely applied to all RPC deformation techniques. Therefore, in this specification, RPC includes RPC application or utilization technology (technology based on RPC) such as ORB.
[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 supplementary note 1, wherein the identification information includes a hash value generated from the definition information.
[0084]
(Supplementary note 3) The network computer system according to supplementary note 1, wherein the identification information is added to a head of the data in the communication.
[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 supplementary note 10, wherein the definition information includes an interface definition script that defines a communication interface in the remote procedure call.
[0093]
(Supplementary note 12) The network according to supplementary note 10, wherein the definition information includes a definition part that defines an interface of communication in the remote procedure call included in an application program on a server that performs communication by remote procedure call. Computer system.
[0094]
(Supplementary note 13) The network computer system according to supplementary note 10, wherein the identification information includes a hash value generated from the definition information.
[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(リモートプロシジャコール)による通信を行うネットワークコンピュータシステムであって、
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による通信を行う際に、送信元は伝送パケットに前記識別情報を付加して送信し、送信先は受信した前記伝送パケットから前記付加された識別情報を取り出し前記自己に埋め込まれた識別情報と比較することで、通信インタフェースの不一致を検出する下位RPC通信手段と、
前記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における通信のインタフェースを定義する定義部分を備えるプログラムソースコードの前記定義部分のハッシュ値である前記インタフェースの識別情報を生成する第1の生成手段と、
前記定義部分に基づいて前記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.
JP2000198680A 2000-06-30 2000-06-30 Network computer system Expired - Fee Related JP4184576B2 (en)

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)

* Cited by examiner, † Cited by third party
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

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