JP4835313B2 - Software module linkage system - Google Patents
Software module linkage system Download PDFInfo
- Publication number
- JP4835313B2 JP4835313B2 JP2006213072A JP2006213072A JP4835313B2 JP 4835313 B2 JP4835313 B2 JP 4835313B2 JP 2006213072 A JP2006213072 A JP 2006213072A JP 2006213072 A JP2006213072 A JP 2006213072A JP 4835313 B2 JP4835313 B2 JP 4835313B2
- Authority
- JP
- Japan
- Prior art keywords
- software module
- shared memory
- client
- service
- 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
- Stored Programmes (AREA)
Description
本発明は、異なる規格のソフトウエアモジュールを連携させるソフトウエアモジュール連携システムに関する。 The present invention relates to a software module linkage system to link software modules of different standards.
分散処理システムの構築のためのプラットフォームとして、アプリケーションサーバと呼ばれるミドルウェアの利用が多くなっている。アプリケーションサーバ上で動作するソフトウエアモジュールは、Java(登録商標)等の所定の言語により開発されている。しかし、実際のシステムでは、様々な言語で開発したコンポーネントを利用することが必要であるため、1つの言語のみでシステムを構築するのは困難である。そこで、異なる言語、規格で開発されたソフトウエアモジュールを連携させるための技術が提案されている。 As a platform for constructing a distributed processing system, middleware called an application server is increasingly used. Software modules that operate on the application server are developed in a predetermined language such as Java (registered trademark). However, since it is necessary to use components developed in various languages in an actual system, it is difficult to construct a system with only one language. Therefore, techniques for linking software modules developed in different languages and standards have been proposed.
具体的には、アプリケーションサーバとCORBAサーバとの間における連携を容易に行う連携用アダプタが開示されている(特許文献1参照。)。特許文献1では、J2EE準拠アプリケーションサーバとCORBAサーバとの間に、連携用アダプタが介在している。J2EE準拠アプリケーションサーバは、連携用アダプタにアクセスすることにより、CORBAサーバへの連携に必要とする処理、設定及びデータの型変換を行うことができる。すなわち、J2EE準拠アプリケーションサーバとCORBAサーバ間のように、アーキテクチャの異なるコンポーネント間においては、連携用アダプタを作成することにより、容易に連携することができる。
Specifically, a coordination adapter that facilitates coordination between an application server and a CORBA server is disclosed (see Patent Document 1). In
また、コンポーネント間の連携で複雑なインタフェースを隠蔽するコンポーネントをアダプタとして作成して利用することが開示されている(特許文献2参照。)。また、通信に用いるアプリケーションモジュールの通信部分の定型処理を生成し、開発効率を向上させると共に、トランザクション形式や画面プログラム情報の保守やデバッグ作業において作業が容易に行える技術が開示されている(特許文献3参照。)。特許文献3では、画面設計を行うことによって、トランザクション処理に必要な通信用コードを自動的に生成している。
しかし、CORBAやWSDL(Web Service)のような多機種間の連携フレームワークにおいて、ツールによって自動的に生成されるソースコードは、データのバインディングのみである。そのデータをハンドルするために共通の処理があっても、それぞれのクライアントは似た処理を個々にする必要があり、煩雑であるばかりでなく、誤った処理によって予期せぬ動作を引き起こす可能性がある。 However, in a multi-model linkage framework such as CORBA or WSDL (Web Service), the source code automatically generated by the tool is only data binding. Even if there is a common process to handle that data, each client needs to do a similar process individually, which is not only cumbersome but can also cause unexpected behavior due to incorrect processing. is there.
また、Java(登録商標) RMIのような単一言語間の連携フレームワークでは、サーバは、データをハンドルするコード自身をクライアントに送ることができるが、送信のオーバーヘッドが避けられないという問題がある。また、他の言語や環境のソフトウエアモジュールと連携することができない問題もある。 Further, in a collaboration framework between single languages such as Java (registered trademark) RMI, the server can send the code itself for handling data to the client, but there is a problem that transmission overhead is inevitable. . There is also a problem that it cannot be linked with software modules in other languages and environments.
本発明は、上述した課題を解決するために提案されたものであり、使用言語や環境が異なる場合でも煩雑な処理を行うことなくソフトウエアモジュールを連携することができるソフトウエアモジュール連携システムを提供することを目的とする。 The present invention has been proposed to solve the problems described above, the software module linkage system that can be used languages and environments to work together software module without performing a complicated process even if different The purpose is to provide.
本発明のソフトウエアモジュール連携システムは、所定の処理を行う第1のソフトウエアモジュールと、前記第1のソフトウエアモジュールにアクセスするためのアクセスポイント情報を定義するアクセスポイント情報定義部、前記アクセスポイント情報に対応するサービスの実体を示すメソッドを定義するメソッド定義部、及び関数の実体を示す仮想コードを定義する仮想コード定義部を少なくとも含むインタフェース定義と、前記第1のソフトウエアモジュールと異なる規格の第2のソフトウエアモジュールと、を備え、前記第1のソフトウエアモジュールは、前記インタフェース定義に記述されたサービス名及びデータ形式に基づいて、前記第2のソフトウエアモジュールと連携するためのサービス・スタブを生成し、前記第2のソフトウエアモジュールは、前記第1のソフトウエアモジュールが発行した前記インタフェース定義に基づいて、前記第1のソフトウエアモジュールと連携するためのクライアント・スタブ及びハンドラを生成し、前記第1及び第2のソフトウエアモジュールは、それぞれ生成した前記サービス・スタブと前記クライント・スタブとを用いて互いに通信し、前記ハンドラで前記インタフェース定義に含まれる前記仮想コードに定義されたアルゴリズムに基づく実行コードを用いた処理を行うことで連携処理を実現することを特徴とする。 The software module linkage system according to the present invention includes a first software module that performs predetermined processing, an access point information defining unit that defines access point information for accessing the first software module, and the access point method definition part for defining a method that shows the entity of service corresponding to the information, and at least including interface defines the virtual code definition unit for defining a virtual code indicating the entity of the function, the first software module and different standards comprising a second software module, wherein the first software module, based on the description service name and the data format in the interface definition, service for cooperating with said second software module · generate stubs, the second soft Wear module, the first software module has issued based on the interface definition to generate a client stub and handlers to work with the first software module, the first and second soft The hardware module communicates with each other using the generated service stub and client stub, and performs processing using an execution code based on an algorithm defined in the virtual code included in the interface definition by the handler. It is characterized by realizing a cooperation process by performing .
したがって、上記発明は、使用言語や環境が異なる場合でも、インタフェース定義部に基づいて第1及び第2のソフトウエアモジュールと連携するためのコードをそれぞれ生成することにより、煩雑な処理を行うことなく第1及び第2のソフトウエアモジュールを連携することができる。
請求項2に記載のソフトウエアモジュール連携システムは、請求項1に記載の発明において、前記アクセスポイント情報定義部が、ネットワークアドレスの表現方法、該ネットワークアドレス、ポート番号、インタフェース利用上の注意点を含み、前記メソッド定義部は、前記第1のソフトウエアモジュールと前記第2のソフトウエアモジュールとの間の通信路での入力情報及び出力情報を含み、前記仮想コード定義部が、前記関数の実体として、関数の名称、関数の定義、何れの場所から何れの要素の値を何れの形式で仮想コード内に移すかを示す情報、参照した変数を関数の利用者に対して開示するか否かを示すと共に開示しない場合に関数の戻り値として定義されない属性、関数の種別、異常時の処理、及び実行する関数の仮想コードを含むものである。
請求項3に記載のソフトウエアモジュール連携システムは、請求項1または請求項2に記載の発明において、前記第1のソフトウエアモジュール及び前記インタフェース定義が記憶されたサーバと、前記第2のソフトウエアモジュールが記憶されたクライアントと、前記サーバと前記クライアントの間で使用される共有メモリと、を更に備え、前記サーバが、前記インタフェース定義を前記クライアントに発行すると共に、前記第1のソフトウエアモジュールにより前記インタフェース定義を利用して、前記クライアントからのサービスの要求に応じて前記共有メモリに画像のデータを書き込み、共有メモリ識別子を前記クライアントに送信し、前記クライアントが、前記サーバから発行されたインタフェース定義に基づいて、前記サーバから送られた共有メモリ識別子を利用して前記共有メモリを自プロセス内にアタッチし、アタッチした供給メモリのアドレスに基づいて、前記第2のソフトウエアモジュールにより該共有メモリにアクセスして該共有メモリから前記データを読み出すものである。
請求項4に記載のソフトウエアモジュール連携システムは、請求項3に記載の発明において、前記ハンドラが、前記共有メモリをハンドするためのコードであり、前記クライアントが、前記クライアント・スタブを利用して前記サーバに前記サービスの要求を送信し、前記サーバが、前記サービス・スタブを利用して前記クライアントから送信された要求を受け取り、受け取った要求に応じて、前記第1のソフトウエアモジュールにより、前記共有メモリに前記データを書き込み、該サービス・スタブを用いて前記共有メモリ識別子を前記クライアントに送信し、前記クライアントが、前記クライアント・スタブを用いて、前記サーバから送られた共有メモリ識別子を受け取り、前記ハンドラを用いて、該共有メモリ識別子に基づいて前記共有メモリを自プロセスにアタッチし、アタッチした共有メモリのアドレスに基づいて、前記第2のソフトウエアモジュールにより該共有メモリにアクセスして該共有メモリから前記データを読み出すものである。
請求項5に記載のソフトウエアモジュール連携システムは、請求項3または請求項4に記載の発明において、前記仮想コードが、マジックナンバーを含み、前記クライアントが、前記ハンドラを用いて前記共有メモリ識別子をローカルの識別子に変換し、前記共有メモリを自アドレスにアタッチし、該共有メモリのアドレスを参照して、前記マジックナンバーと比較を行い、該マジックナンバーが正しくなければ、前記共有メモリをデタッチして例外処理を行い、該マジックナンバーが正しければ、前記共有メモリのアドレスを前記第2のソフトウエアモジュールに供給するものである。
Therefore, even if the language used and the environment are different, the above invention generates code for cooperating with the first and second software modules based on the interface definition unit without performing complicated processing. The first and second software modules can be linked.
The software module linkage system according to
According to a third aspect of the present invention, there is provided the software module linkage system according to the first or second aspect, wherein the first software module and the interface definition are stored in the server and the second software. A client in which a module is stored; and a shared memory used between the server and the client. The server issues the interface definition to the client, and the first software module The interface definition is used to write image data to the shared memory in response to a service request from the client, send a shared memory identifier to the client, and the client issues an interface definition issued from the server. Based on whether the server Attach the shared memory in its own process using the sent shared memory identifier, and access the shared memory by the second software module based on the address of the attached supply memory. The data is read out.
The software module linkage system according to
According to a fifth aspect of the present invention, in the software module cooperation system according to the third or fourth aspect, the virtual code includes a magic number, and the client uses the handler to determine the shared memory identifier. Convert to a local identifier, attach the shared memory to its own address, refer to the address of the shared memory, compare with the magic number, and if the magic number is not correct, detach the shared memory If exception processing is performed and the magic number is correct, the address of the shared memory is supplied to the second software module.
本発明は、使用言語や環境が異なる場合でも煩雑な処理を行うことなくソフトウエアモジュールを連携することができる。 According to the present invention, software modules can be linked without performing complicated processing even when the language or environment is different.
以下、本発明の好ましい実施の形態について図面を参照しながら詳細に説明する。 Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings.
図1は、本発明の実施の形態に係る連携システムの構成を示す図である。 FIG. 1 is a diagram showing a configuration of a cooperation system according to an embodiment of the present invention.
連携システムは、所定のサービスを提供するサーバ10と、サーバ10に対してサービスを依頼するクライアント20と、サーバ10とクライアント20の間で使用される共有メモリ30と、を備えている。サーバ10は、クライアント20、共有メモリ30はネットワークを介して相互に接続されている。
The cooperation system includes a
サーバ10及びクライアント20は、例えばコンピュータで構成され、ネットワークを介してデータの入出力を行う入出力ポートと、データ、ソフトウエアコンポーネント等を記憶する記憶装置と、データの生成・配信、ソフトウエアコンポーネントの制御等に関する演算処理を行う演算回路と、を有している。これにより、サーバ10及びクライアント20は、機能的には次のような構成を有する。
The
サーバ10は、所定のサービスを行うサービス・コンポーネント11と、サービス・コンポーネント11にアクセスする情報であるインタフェース定義12と、を有している。クライアント20は、クライアント・コンポーネント21を有している。
The
図2は、インタフェース定義12を示す図である。インタフェース定義12は、XML文書によって構成されている。インタフェース定義12は、1つのアクセスポイント情報(ネットワーク上で一意に識別可能なアクセス先に関する情報)を定義するアクセスポイント情報定義部(2〜6行目)と、それに対応する1つ以上のメソッド(サービスの実体を示す情報)を定義するメソッド定義部(7〜19行目)と、仮想コードを定義する仮想コード定義部(20〜39行目)を含んでいる。なお、インタフェース定義12が示すサービス(サービス・コンポーネント11)は、画像の名前を受け取り、その名前で示される画像のデータを返すサービスである。この仮想コードは、共有メモリ30を自プロセスにアタッチする機種依存の仮想コードである。
FIG. 2 is a diagram showing the
アクセスポイント情報定義部は、<endPoint>...</endPoint>で定義された情報であり、ネットワークアドレスの表現方法とそのアドレス(<address type=“...”>...</adress>)、ポート番号(<port>...</port>)、インタフェース利用上の注意点(<restriction>...</restriction>)を有する。通信方法は “名前つきパイプ”であり(3行目)、ポート番号はデフォルトを用いる。インタフェース利用上の注意点(制約)は、ネットワーク上に送受されるデータのうち直接伝達が困難な情報が含まれているか否かを示している。図2では、「sharedMemory」(5行目)が挙げられている。これは、制約条件として共有メモリの使用が可能であることを示す。他には「fileDescriptor」や「localFile」などがある。 The access point information definition part is the information defined by <endPoint> ... </ endPoint>. The network address representation method and its address (<address type = “...”> ... </ adress >), Port number (<port> ... </ port>), and notes on using the interface (<restriction> ... </ restriction>). The communication method is “named pipe” (line 3), and the default port number is used. The precautions (constraints) in using the interface indicate whether or not information that is difficult to directly transmit is included in the data transmitted and received on the network. In FIG. 2, “sharedMemory” (line 5) is listed. This indicates that the shared memory can be used as a constraint condition. Others include "fileDescriptor" and "localFile".
メソッド定義部は、<method name=”…”>から</method>で定義された情報であり、上記のアクセスポイントに対して、一つ以上存在し、実際のサービスの実体に対応する。具体的には、個々のメソッド定義部は、サービスへの入力情報(<input>…</input>)と、サービスからの出力情報(<output>…</output>)、仮想コード及びその実行場所(<wrapper type=”…”>…</wrapper>)を含んでいる。 The method definition section is information defined by <method name = ”... >> to </ method>, and there is one or more for the above access point, and corresponds to the actual service entity. Specifically, each method definition part includes input information to the service (<input> ... </ input>), output information from the service (<output> ... </ output>), virtual code and its execution Contains the location (<wrapper type = ”…”>… </ wrapper>).
よって、メソッド定義部は、サービス・コンポーネント11のサービスの名称(GetImagePage)と、サービス・コンポーネント11とクライアント・コンポーネント21の間の通信路でのデータの形式(入力情報及び出力情報)を示している。クライアント・コンポーネント21からサービス・コンポーネント11への入力は、画像の名前であり、種別は文字列である(図2の9行目)。一方、出力は、画像の大きさ(整数)、幅(整数)、高さ(整数)、深さ(整数)、識別子(整数)、種別(整数)である(図2の12〜17行目)。ここまでは、CORBAやWSDLといった、既存のインタフェース定義とほぼ同様の内容である。
Therefore, the method definition unit indicates the service name (GetImagePage) of the
仮想コード定義部は、<wrapper type=”cliant”>から</wrapper>で定義された情報であり、関数の実体を定義する。 The virtual code definition part is information defined from <wrapper type = “cliant”> to </ wrapper>, and defines a function entity.
具体的には、仮想コード定義部は、関数の名称(<method name=”…”>)、関数の定義(<transform>)、サービスの情報や入出力情報と関数内の変数の対応(マッピング)(<source>…</source>)、関数の種別(コンパイル言語、スクリプト言語)と異常時の処理、実行する関数の仮想コード(<pseudo type=”…” exception=”…” />)を含んでいる。 Specifically, the virtual code definition part is a function name (<method name = ”…”>), function definition (<transform>), service information and input / output information, and correspondence between variables in the function ) (<Source>… </ source>), function type (compile language, script language), processing in case of abnormality, virtual code of the function to be executed (<pseudo type = ”…” exception = ”…” />) Is included.
なお、図2の20行目は、仮想コードはクライアントサイドで動作することを示している。21行目は、対象とするサービス(GetImagePage)を示している。 Note that the 20th line in FIG. 2 indicates that the virtual code operates on the client side. The 21st line shows a target service (GetImagePage).
「サービスの情報や入出力情報と関数内の変数の対応」は、どこの場所(category)から、どの要素(element)の値を、どんな形式(type)で仮想コード内に移すか(参照可能か)を示す。また、最後に示す属性(wrapped)で、参照した変数を、関数の利用者に対して開示するかどうかを示し、開示しない場合には、関数の戻り値として定義されることはない。すなわち、データの変換を行うための入力するデータとして、サービスのアドレス、サービスの出力情報のうち、画像の大きさ、識別子、種別を利用することを宣言している。このうち、アドレスと識別子は隠蔽されて、クライアントの関数から見えないようになっていることも示されている。 "Correspondence between service information and input / output information and variables in function" indicates from which location (category) what element (element) value is transferred to virtual code in what type (type) ). The last attribute (wrapped) indicates whether the referenced variable is disclosed to the user of the function. If it is not disclosed, it is not defined as the return value of the function. That is, it declares to use the size, identifier, and type of an image among the service address and service output information as input data for data conversion. Of these, the addresses and identifiers are also hidden and shown to be invisible to the client function.
なお、仮想コードの文法は、一般的な手続き言語であるC言語を簡易化した仕様を用い、Unix(登録商標)やWindows(登録商標)などが提供するシステムコールとは異なるシステムコールを持つ。そして、連携システムでは、次のようにしてスタブ、メモリハンドラが生成される。 Note that the virtual code grammar uses a simplified specification of C, which is a general procedural language, and has a system call different from the system call provided by Unix (registered trademark), Windows (registered trademark), or the like. In the cooperation system, stubs and memory handlers are generated as follows.
最初に、サービス・コンポーネント11は、上記のインタフェース定義12に基づいて、サービス側のスタブコードであるサービス・スタブ13を生成する。このとき、インタフェース定義12はサービス側のコードを含んでいないため、サービス・コンポーネント11は、インタフェース定義12に記述されたサービス名とデータの形式に基づいてサービス・スタブ13を生成する。そして、サービス・コンポーネント11は、この生成されたコードと実装したコードをリンクすることによって、実際のサービスを開始する。
First, the
つぎに、クライアント・コンポーネント21は、サービス・コンポーネント11のサービスを利用するため、サービス・コンポーネント11が発行したインタフェース定義12を用いて、クライアント側のスタブコードであるクライアント・スタブ22及び実行可能なメモリハンドラ23を生成する。
Next, in order to use the service of the
インタフェース定義12は、クライアント側のコードを含んでいるため、共有メモリ30をハンドするためのコードを含んでいる。ここでは、クライアント20は、NetBSD OS上で動作するC言語で作成されるものとし、そこで生成されるコードは、以下のようになる。
Since the
図3は、クライアント・スタブ22及びメモリハンドラ23のコードを示す図である。
FIG. 3 is a diagram illustrating codes of the
インタフェース定義12(図2)の23行目によると、グローバルな変数であるサービスのアドレスを利用することがわかる。図3の9行目は、サービスのアドレス利用の宣言を示している。そして、このクライアント・スタブ22は、サービス・コンポーネント11の提供するサービスGetImagePageの上位にくるインタフェースであり、そのインタフェース宣言から11行目の関数の型が決定される。
According to the 23rd line of the interface definition 12 (FIG. 2), it is understood that the address of the service which is a global variable is used. The ninth line in FIG. 3 shows a declaration of service address usage. The
この結果、図4に示すように、サーバ10は、サービス・コンポーネント11、インタフェース定義12、サービス・スタブ13を備えている。また、クライアント20は、クライアント・コンポーネント21、クライアント・スタブ22、メモリハンドラ23を備えている。
As a result, as shown in FIG. 4, the
以上のように構成された連携システムでは、次のようにしてソフトウエアモジュール間の連携が行われる。 In the cooperation system configured as described above, cooperation between software modules is performed as follows.
サービス・コンポーネント11は、共有メモリ30を自身のコードにより、共有メモリ30を自プロセス内にアタッチして(ステップS1)、サービスを開始する。
The
クライアント20において、クライアント・コンポーネント21は、サービス・コンポーネント11にサービスを要求するために、クライアント・スタブ22にアクセスする(ステップS2)。クライアント・スタブ22は、図3の19行目に基づいてクライアント・コンポーネント21を呼び出すべく、クライアント・コンポーネント21の要求をサーバ10に転送する(ステップS3)。
In the
サーバ10では、サービス・スタブ13は、メモリハンドラ23から送られた要求をサービス・コンポーネント11に転送する(ステップS4)。サービス・コンポーネント11は、データを共有メモリ30にデータを書き込んで、共有メモリ識別子を付けて、サービス・スタブ13に応答する(ステップS5)。サービス・スタブ13は、その応答をクライアント20に転送する(ステップS6)。
In the
クライアント20では、クライアント・スタブ22は、サービス・スタブ13から送られた共有メモリ識別子をメモリハンドラ23に転送する(ステップS7)。
In the
メモリハンドラ23は、クライアント・スタブ22から受け取った共有メモリ識別子を、インタフェース定義12(図2)の26行目から36行目までの仮想コードから定義されたアルゴリズムに基づくコードを用いて、次のように処理を行う。
The
メモリハンドラ23は、共有メモリ識別子を利用して、共有メモリ30を自プロセス内にアタッチする(ステップS8)。さらに、メモリハンドラ23は、アタッチした共有メモリ30のアドレスを付けて、クライアント・コンポーネント21に応答する(ステップS9)。
The
具体的には、メモリハンドラ23は、最初に共有メモリ識別子をローカルの識別子に変換し(図4の22行目)、フラグをクリアして(23行目)、共有メモリ30を自アドレスにアタッチ(24行目)する。そして、メモリハンドラ23は、共有メモリ30上の後端のアドレスを参照して、マジックナンバーと比較を行い、ページデータであることを確認(25行目)する。このとき、マジックナンバーが正しくなければ、メモリハンドラ23は、アタッチした共有メモリ30をデタッチして、例外処理に移行(26、27行目)する。正常であれば、メモリハンドラ23は、共有メモリ30の大きさからマジックナンバー分の大きさを引いて(29行目)、アタッチした共有メモリ30のアドレスをクライアント・コンポーネント21に供給する(30行目)。
Specifically, the
クライアント・コンポーネント21は、受け取ったメモリアドレスに基づいて共有メモリ30にアクセスすることによって、クライアント・コンポーネント21が共有メモリ30に書き込んだデータを読み出すことができる。
The
ここで、従来は、上記のクライアント側のコードは、すべてのクライアントで設計し、実装しなければならない。この実施の形態であれば、共有メモリ30を自プロセスにアタッチするための方法や、マジックナンバーについての知識がなければ、利用することはできない。共有メモリ30の利用方法であれば、一般書籍などによって知識を得ることでコードを作成することが可能となるかもしれないが、マジックナンバーのような、ある意味ローカルルールのようなものは、文章や図などで記述された仕様書を元にして、すべてのクライアントが独自に実装しなければならず、大変効率が悪い。特に、仕様が変更された場合には、それを周知徹底し、全クライアントが実装したコードを変更する必要が生じてしまう。
Here, conventionally, the above client-side code must be designed and implemented by all clients. In this embodiment, it is not possible to use without knowing the method for attaching the shared
これに対して、本発明の実施の形態に係る連携システムは、サービス・コンポーネント11にアクセスするためのインタフェース定義12を用意し、インタフェース定義12に基づいてサービス・スタブ13、クライアント・スタブ22及びメモリハンドラ23を生成する。そして、連携システムは、サービス・スタブ13、クライアント・スタブ22、メモリハンドラ23を介して、サービス・コンポーネント11とクライアント・コンポーネント21の間でデータの送受信を行う。
On the other hand, the cooperation system according to the embodiment of the present invention prepares an
これにより、連携システムは、サービス・コンポーネント11とクライアント・コンポーネント21との規格、環境が異なる場合であっても、インタフェース定義12に基づいてスタブ13、23やメモリハンドラ23を生成するので、連携させるための重複処理を省くことができる。また、上記連携システムで生成されたコードは、スタブのコードと同様に、それぞれのコンポーネントのアーキテクチャに合致した実行コードとなるため、転送の必要もなく、処理の効率がよい。
Thereby, even if the standard and environment of the
なお、本発明は、上述した実施の形態に限定されるものではなく、特許請求の範囲に記載された範囲内で設計上の変更をされたものにも適用可能であるのは勿論である。 Note that the present invention is not limited to the above-described embodiment, and it is needless to say that the present invention can also be applied to a design modified within the scope of the claims.
例えば、上述した実施の形態では、サーバ10とクライアント20がメモリを共有しているという前提でコードを生成したが、本発明はこれに限定されるものではない。すなわち、メモリを共有しない場合には、メモリの利用形態を元に、メモリ内容を転送などのコードを生成することもまったく問題がない。
For example, in the above-described embodiment, the code is generated on the assumption that the
さらに、上述した実施の形態では、静的にコードを生成して、クライアントに結合するケースを説明したが、これを実行時に動的に結合すれば、仕様変更にも柔軟に対応が可能である。例えば上記実施形態では、マジックナンバーが「0xa5a5」であったが、動的リンクであればサービス・コンポーネント11とクライアント・コンポーネント21間のインタフェースに齟齬が生じる恐れがないので、マジックナンバーを「0xfefe」に変更することも可能である。
Furthermore, in the above-described embodiment, the case where the code is statically generated and combined with the client has been described. However, if this is dynamically combined at the time of execution, it is possible to flexibly cope with specification changes. . For example, in the above embodiment, the magic number is “0xa5a5”. However, if there is a dynamic link, the interface between the
10 サーバ
11 サービス・コンポーネント
12 インタフェース定義
13 サービス・スタブ
20 クライアント
21 クライアント・コンポーネント
22 クライアント・スタブ
23 メモリハンドラ
10
Claims (5)
前記第1のソフトウエアモジュールにアクセスするためのアクセスポイント情報を定義するアクセスポイント情報定義部、前記アクセスポイント情報に対応するサービスの実体を示すメソッドを定義するメソッド定義部、及び関数の実体を示す仮想コードを定義する仮想コード定義部を少なくとも含むインタフェース定義と、
前記第1のソフトウエアモジュールと異なる規格の第2のソフトウエアモジュールと、を備え、
前記第1のソフトウエアモジュールは、前記インタフェース定義に記述されたサービス名及びデータ形式に基づいて、前記第2のソフトウエアモジュールと連携するためのサービス・スタブを生成し、
前記第2のソフトウエアモジュールは、前記第1のソフトウエアモジュールが発行した前記インタフェース定義に基づいて、前記第1のソフトウエアモジュールと連携するためのクライアント・スタブ及びハンドラを生成し、
前記第1及び第2のソフトウエアモジュールは、それぞれ生成した前記サービス・スタブと前記クライント・スタブとを用いて互いに通信し、前記ハンドラで前記インタフェース定義に含まれる前記仮想コードに定義されたアルゴリズムに基づく実行コードを用いた処理を行うことで連携処理を実現すること
を特徴とするソフトウエアモジュール連携システム。 A first software module that performs predetermined processing;
An access point information defining unit for defining access point information for accessing the first software module, a method defining unit for defining a method indicating the service entity corresponding to the access point information, and a function entity an interface definition that contains the virtual code definition unit for defining a virtual code at least,
A second software module having a different standard from the first software module,
The first software module generates a service stub for cooperation with the second software module based on the service name and data format described in the interface definition,
The second software module generates a client stub and a handler for cooperating with the first software module based on the interface definition issued by the first software module.
The first and second software modules communicate with each other using the generated service stub and client stub , respectively , and the handler defines an algorithm defined in the virtual code included in the interface definition. A software module linkage system characterized by realizing linkage processing by performing processing using the execution code based on it.
前記メソッド定義部は、前記第1のソフトウエアモジュールと前記第2のソフトウエアモジュールとの間の通信路での入力情報及び出力情報を含み、 The method definition unit includes input information and output information on a communication path between the first software module and the second software module,
前記仮想コード定義部は、前記関数の実体として、関数の名称、関数の定義、何れの場所から何れの要素の値を何れの形式で仮想コード内に移すかを示す情報、参照した変数を関数の利用者に対して開示するか否かを示すと共に開示しない場合に関数の戻り値として定義されない属性、関数の種別、異常時の処理、及び実行する関数の仮想コードを含む請求項1に記載のソフトウエアモジュール連携システム。 The virtual code definition unit includes the function name, function definition, information indicating which element value is transferred from which location into which virtual code, and the referenced variable as the function entity. 2. An attribute that is not defined as a return value of a function when it is not disclosed, a function type, a process at the time of abnormality, and a virtual code of a function to be executed is included. Software module linkage system.
前記第2のソフトウエアモジュールが記憶されたクライアントと、 A client in which the second software module is stored;
前記サーバと前記クライアントの間で使用される共有メモリと、を更に備え、 A shared memory used between the server and the client,
前記サーバは、前記インタフェース定義を前記クライアントに発行すると共に、前記第1のソフトウエアモジュールにより前記インタフェース定義を利用して、前記クライアントからのサービスの要求に応じて前記共有メモリに画像のデータを書き込み、共有メモリ識別子を前記クライアントに送信し、 The server issues the interface definition to the client, and writes image data to the shared memory in response to a service request from the client by using the interface definition by the first software module. Send a shared memory identifier to the client;
前記クライアントは、前記サーバから発行されたインタフェース定義に基づいて、前記サーバから送られた共有メモリ識別子を利用して前記共有メモリを自プロセス内にアタッチし、アタッチした供給メモリのアドレスに基づいて、前記第2のソフトウエアモジュールにより該共有メモリにアクセスして該共有メモリから前記データを読み出す請求項1または請求項2に記載のソフトウエアモジュール連携システム。 Based on the interface definition issued from the server, the client attaches the shared memory in its own process using the shared memory identifier sent from the server, and based on the address of the attached supply memory, The software module linkage system according to claim 1 or 2, wherein the second software module accesses the shared memory and reads the data from the shared memory.
前記クライアントは、前記クライアント・スタブを利用して前記サーバに前記サービスの要求を送信し、 The client sends a request for the service to the server using the client stub,
前記サーバは、前記サービス・スタブを利用して前記クライアントから送信された要求を受け取り、受け取った要求に応じて、前記第1のソフトウエアモジュールにより、前記共有メモリに前記データを書き込み、該サービス・スタブを用いて前記共有メモリ識別子を前記クライアントに送信し、 The server receives a request transmitted from the client using the service stub, and writes the data to the shared memory by the first software module in response to the received request. Sending the shared memory identifier to the client using a stub;
前記クライアントは、前記クライアント・スタブを用いて、前記サーバから送られた共有メモリ識別子を受け取り、前記ハンドラを用いて、該共有メモリ識別子に基づいて前記共有メモリを自プロセスにアタッチし、アタッチした共有メモリのアドレスに基づいて、前記第2のソフトウエアモジュールにより該共有メモリにアクセスして該共有メモリから前記データを読み出す請求項3に記載のソフトウエアモジュール連携システム。 The client receives the shared memory identifier sent from the server using the client stub, attaches the shared memory to its own process based on the shared memory identifier using the handler, and attaches the shared memory 4. The software module linkage system according to claim 3, wherein the second software module accesses the shared memory and reads the data from the shared memory based on a memory address.
前記クライアントは、前記ハンドラを用いて前記共有メモリ識別子をローカルの識別子に変換し、前記共有メモリを自アドレスにアタッチし、該共有メモリのアドレスを参照して、前記マジックナンバーと比較を行い、該マジックナンバーが正しくなければ、前記共有メモリをデタッチして例外処理を行い、該マジックナンバーが正しければ、前記共有メモリのアドレスを前記第2のソフトウエアモジュールに供給する請求項3または請求項4に記載のソフトウエアモジュール連携システム。 The client uses the handler to convert the shared memory identifier to a local identifier, attach the shared memory to its own address, refer to the address of the shared memory, compare with the magic number, and 5. If the magic number is not correct, the shared memory is detached and exception processing is performed, and if the magic number is correct, the address of the shared memory is supplied to the second software module. The software module linkage system described.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2006213072A JP4835313B2 (en) | 2006-08-04 | 2006-08-04 | Software module linkage system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2006213072A JP4835313B2 (en) | 2006-08-04 | 2006-08-04 | Software module linkage system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2008040722A JP2008040722A (en) | 2008-02-21 |
| JP4835313B2 true JP4835313B2 (en) | 2011-12-14 |
Family
ID=39175656
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2006213072A Expired - Fee Related JP4835313B2 (en) | 2006-08-04 | 2006-08-04 | Software module linkage system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4835313B2 (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5370029B2 (en) * | 2009-09-10 | 2013-12-18 | 株式会社リコー | Integrated management apparatus, integrated management system, integrated management method, integrated management program, and recording medium recording the program |
| US9086932B2 (en) * | 2009-10-14 | 2015-07-21 | Sap Se | System landscape aware inter-application communication infrastructure |
| GB2567465B (en) * | 2017-10-12 | 2020-09-02 | Advanced Risc Mach Ltd | Message passing in a data processing system |
| KR102327083B1 (en) * | 2020-09-14 | 2021-11-15 | 한화시스템 주식회사 | System and method for sharing software component |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005078339A (en) * | 2003-08-29 | 2005-03-24 | Nri & Ncc Co Ltd | WSDL document generation apparatus and method |
| JP2005092547A (en) * | 2003-09-18 | 2005-04-07 | Hitachi Software Eng Co Ltd | Method for reconstructing single information processing system into web service system |
| JP2005266928A (en) * | 2004-03-16 | 2005-09-29 | Canon Inc | Information processing system, information processing apparatus, control method therefor, and computer-readable memory |
-
2006
- 2006-08-04 JP JP2006213072A patent/JP4835313B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2008040722A (en) | 2008-02-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN100559365C (en) | Method and apparatus for specifying asynchronous Web service and method and apparatus for specifying logic for receiving callback | |
| US7555744B2 (en) | Method and system for debugging a program from within a thread of execution of the program | |
| US6622175B1 (en) | System and method for communications in a distributed processing environment | |
| US8776024B2 (en) | Software application fine-tuning method, system, and corresponding computer program product | |
| US6931455B1 (en) | System and method for communications between a CORBA object request broker and a non-CORBA object request broker | |
| JP3597356B2 (en) | Communication cooperation information generation device, three-layer client / server system, and medium recording communication cooperation information generation program | |
| US20070174420A1 (en) | Caching of web service requests | |
| US20070198457A1 (en) | Accessing and manipulating data in a data flow graph | |
| US7644184B2 (en) | Universal adapter | |
| US20030009539A1 (en) | Distributed object middleware connection method | |
| Ezenwoye et al. | TRAP/BPEL-A Framework for Dynamic Adaptation of Composite Services. | |
| US10817284B2 (en) | Melding of mediation flow service component architecture (SCA) components | |
| EP0924617A2 (en) | Method and apparatus for executing code during method invocation | |
| US20130145381A1 (en) | Web api server program, web api publication method | |
| CN103092602A (en) | Software development kit and terminal apparatus | |
| CN109451014A (en) | A kind of WebService agency plant and its transparent proxy method | |
| US7003773B2 (en) | Dynamic interface aggregation on demand | |
| JPWO2011158478A1 (en) | Data processing system and data processing method | |
| US20120011490A1 (en) | Development system | |
| JP4835313B2 (en) | Software module linkage system | |
| JP2002041312A (en) | Operating system for structured information processing | |
| KR102407941B1 (en) | User interface generation method of electronic device calling function or procedure of external device based on remote procedure call(rpc), program and electronic device thereof | |
| CN114489687A (en) | A method and related device for deploying a business instance | |
| JP4574197B2 (en) | Data processing method, program, and apparatus | |
| CN115242631B (en) | Message processing method and device, electronic equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20090212 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100922 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20101005 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20101206 |
|
| 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: 20110830 |
|
| 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: 20110912 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20141007 Year of fee payment: 3 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 4835313 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| LAPS | Cancellation because of no payment of annual fees |