JP2008040722A - Software module cooperative system and method - Google Patents

Software module cooperative system and method Download PDF

Info

Publication number
JP2008040722A
JP2008040722A JP2006213072A JP2006213072A JP2008040722A JP 2008040722 A JP2008040722 A JP 2008040722A JP 2006213072 A JP2006213072 A JP 2006213072A JP 2006213072 A JP2006213072 A JP 2006213072A JP 2008040722 A JP2008040722 A JP 2008040722A
Authority
JP
Japan
Prior art keywords
software module
service
client
code
interface definition
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.)
Granted
Application number
JP2006213072A
Other languages
Japanese (ja)
Other versions
JP4835313B2 (en
Inventor
Tadao Michimura
唯夫 道村
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co 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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2006213072A priority Critical patent/JP4835313B2/en
Publication of JP2008040722A publication Critical patent/JP2008040722A/en
Application granted granted Critical
Publication of JP4835313B2 publication Critical patent/JP4835313B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To coordinate software modules without requiring complicated processing even when languages in use and environments are different. <P>SOLUTION: A service component 11 generates a service stab 13 from an interface definition 12 as information for accessing the service component 11. A client component 21 generates a client stab 22 and a memory handler 23 from the interface definition 12. The client component 21 writes data to a shared memory 30, and supplies a shared memory identifier through the service stab 13 and the client stab 22 to the memory handler 23. The memory handler 23 utilizes the shared memory identifier and attaches the shared memory 30 inside its own process. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、異なる規格のソフトウエアモジュールを連携させるソフトウエアモジュール連携システム及び方法に関する。   The present invention relates to a software module linkage system and method for linking 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 Patent Document 1, a coordination adapter is interposed between a J2EE-compliant application server and a CORBA server. The J2EE-compliant application server can perform processing, settings, and data type conversion required for cooperation with the CORBA server by accessing the cooperation adapter. That is, it is possible to easily link between components having different architectures such as between a J2EE-compliant application server and a CORBA server by creating a coordination adapter.

また、コンポーネント間の連携で複雑なインタフェースを隠蔽するコンポーネントをアダプタとして作成して利用することが開示されている(特許文献2参照。)。また、通信に用いるアプリケーションモジュールの通信部分の定型処理を生成し、開発効率を向上させると共に、トランザクション形式や画面プログラム情報の保守やデバッグ作業において作業が容易に行える技術が開示されている(特許文献3参照。)。特許文献3では、画面設計を行うことによって、トランザクション処理に必要な通信用コードを自動的に生成している。
特開2003−157242号公報 特開2003−202984号公報 特開平9−282152号公報
In addition, it is disclosed that a component that hides a complex interface through cooperation between components is created and used as an adapter (see Patent Document 2). In addition, a technique is disclosed in which routine processing of a communication part of an application module used for communication is generated to improve development efficiency, and work can be easily performed in maintenance and debugging of transaction format and screen program information (Patent Literature) 3). In Patent Document 3, a communication code necessary for transaction processing is automatically generated by designing a screen.
JP 2003-157242 A JP 2003-202984 A Japanese Patent Laid-Open No. 9-282152

しかし、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 in order to solve the above-described problems, and a software module linkage system and method capable of linking software modules without performing complicated processing even when the language used or the environment is different. The purpose is to provide.

本発明のソフトウエアモジュール連携システムは、所定の処理を行う第1のソフトウエアモジュールと、前記第1のソフトウエアモジュールにアクセスするための情報を定義したインタフェース定義部と、第1のソフトウエアモジュールと異なる規格の第2のソフトウエアモジュールと、を備え、前記第1のソフトウエアモジュールは、前記インタフェース定義に基づいて、前記第2のソフトウエアモジュールと連携するためのコードを生成し、前記第2のソフトウエアモジュールは、前記インタフェース定義に基づいて、前記第1のソフトウエアモジュールと連携するためのコードを生成し、前記第1及び第2のソフトウエアモジュールは、それぞれ生成したコードを用いて互いに連携処理を行うことを特徴とする。   A software module linkage system according to the present invention includes a first software module that performs predetermined processing, an interface definition unit that defines information for accessing the first software module, and a first software module A second software module of a different standard from the first software module, the first software module generates a code for cooperating with the second software module based on the interface definition, and The second software module generates a code for cooperating with the first software module based on the interface definition, and the first and second software modules respectively use the generated code. It is characterized by performing a cooperation process with each other.

また、本発明のソフトウエアモジュール連携方法は、所定の処理を行う第1のソフトウエアモジュールが、前記第1のソフトウエアモジュールにアクセスするための情報を定義したインタフェース定義に基づいて、当該第1のソフトウエアモジュールと異なる規格の第2のソフトウエアモジュールと連携するためのコードを生成し、前記第2のソフトウエアモジュールは、前記インタフェース定義に基づいて、前記第1のソフトウエアモジュールと連携するためのコードを生成し、前記第1及び第2のソフトウエアモジュールは、それぞれ生成したコードを用いて互いに連携処理を行うことを特徴とする。   The software module cooperation method according to the present invention is based on the interface definition in which the first software module that performs a predetermined process defines information for accessing the first software module. Code for cooperating with a second software module of a different standard from the software module of the second software module, and the second software module cooperates with the first software module based on the interface definition Code is generated, and the first and second software modules perform a cooperation process with each other using the generated code.

第1及び第2のソフトウエアモジュールは、それぞれ所定のサービス(データ処理)を行うものであれば、同一のハードウェアにあっても、ネットワークを介して異なるハードウェアにあってもよい。インタフェース定義部は第1のソフトウエアモジュールにアクセスするための情報を定義したものであり、これに基づいて第1及び第2のソフトウエアモジュールと連携するためのコードがそれぞれ生成される。そして、前記第1及び第2のソフトウエアモジュールは、それぞれ生成したコードを用いて互いに連携処理を行う。   The first and second software modules may be the same hardware or different hardware via a network as long as they perform predetermined services (data processing). The interface definition unit defines information for accessing the first software module, and based on this information, codes for linking with the first and second software modules are generated. Then, the first and second software modules perform cooperation processing with each other using the generated codes.

したがって、上記発明は、使用言語や環境が異なる場合でも、インタフェース定義部に基づいて第1及び第2のソフトウエアモジュールと連携するためのコードをそれぞれ生成することにより、煩雑な処理を行うことなく第1及び第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.

本発明は、使用言語や環境が異なる場合でも煩雑な処理を行うことなくソフトウエアモジュールを連携することができる。   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 server 10 that provides a predetermined service, a client 20 that requests the server 10 for a service, and a shared memory 30 that is used between the server 10 and the client 20. In the server 10, the client 20 and the shared memory 30 are connected to each other via a network.

サーバ10及びクライアント20は、例えばコンピュータで構成され、ネットワークを介してデータの入出力を行う入出力ポートと、データ、ソフトウエアコンポーネント等を記憶する記憶装置と、データの生成・配信、ソフトウエアコンポーネントの制御等に関する演算処理を行う演算回路と、を有している。これにより、サーバ10及びクライアント20は、機能的には次のような構成を有する。   The server 10 and the client 20 are constituted by, for example, computers, input / output ports for inputting / outputting data via a network, storage devices for storing data, software components, etc., data generation / distribution, software components And an arithmetic circuit for performing arithmetic processing related to the control and the like. As a result, the server 10 and the client 20 have the following configuration functionally.

サーバ10は、所定のサービスを行うサービス・コンポーネント11と、サービス・コンポーネント11にアクセスする情報であるインタフェース定義12と、を有している。クライアント20は、クライアント・コンポーネント21を有している。   The server 10 includes a service component 11 that performs a predetermined service and an interface definition 12 that is information for accessing the service component 11. The client 20 has a client component 21.

図2は、インタフェース定義12を示す図である。インタフェース定義12は、XML文書によって構成されている。インタフェース定義12は、1つのアクセスポイント情報(ネットワーク上で一意に識別可能なアクセス先に関する情報)を定義するアクセスポイント情報定義部(2〜6行目)と、それに対応する1つ以上のメソッド(サービスの実体を示す情報)を定義するメソッド定義部(7〜19行目)と、仮想コードを定義する仮想コード定義部(20〜39行目)を含んでいる。なお、インタフェース定義12が示すサービス(サービス・コンポーネント11)は、画像の名前を受け取り、その名前で示される画像のデータを返すサービスである。この仮想コードは、共有メモリ30を自プロセスにアタッチする機種依存の仮想コードである。   FIG. 2 is a diagram showing the interface definition 12. The interface definition 12 is configured by an XML document. The interface definition 12 includes one access point information (information regarding an access destination that can be uniquely identified on the network) (one of the second to sixth lines) and one or more methods ( It includes a method definition part (lines 7 to 19) for defining service information) and a virtual code definition part (lines 20 to 39) for defining virtual codes. The service (service component 11) indicated by the interface definition 12 is a service that receives an image name and returns image data indicated by the name. This virtual code is a model-dependent virtual code for attaching the shared memory 30 to its own process.

アクセスポイント情報定義部は、<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 service component 11 and the data format (input information and output information) on the communication path between the service component 11 and the client component 21. . The input from the client component 21 to the service component 11 is the name of the image, and the type is a character string (line 9 in FIG. 2). On the other hand, the output is the image size (integer), width (integer), height (integer), depth (integer), identifier (integer), type (integer) (lines 12 to 17 in FIG. 2). ). Up to this point, the contents are almost the same as those of existing interface definitions such as CORBA and WSDL.

仮想コード定義部は、<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 (mapping) ) (<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 service component 11 generates a service stub 13 which is a stub code on the service side, based on the interface definition 12 described above. At this time, since the interface definition 12 does not include the service-side code, the service component 11 generates the service stub 13 based on the service name and data format described in the interface definition 12. Then, the service component 11 starts the actual service by linking the generated code and the implemented code.

つぎに、クライアント・コンポーネント21は、サービス・コンポーネント11のサービスを利用するため、サービス・コンポーネント11が発行したインタフェース定義12を用いて、クライアント側のスタブコードであるクライアント・スタブ22及び実行可能なメモリハンドラ23を生成する。   Next, in order to use the service of the service component 11, the client component 21 uses the interface definition 12 issued by the service component 11, and the client stub 22 that is the client side stub code and the executable memory. A handler 23 is generated.

インタフェース定義12は、クライアント側のコードを含んでいるため、共有メモリ30をハンドするためのコードを含んでいる。ここでは、クライアント20は、NetBSD OS上で動作するC言語で作成されるものとし、そこで生成されるコードは、以下のようになる。   Since the interface definition 12 includes client-side code, it includes code for handling the shared memory 30. Here, the client 20 is assumed to be created in the C language that runs on the NetBSD OS, and the code generated there is as follows.

図3は、クライアント・スタブ22及びメモリハンドラ23のコードを示す図である。   FIG. 3 is a diagram illustrating codes of the client stub 22 and the memory handler 23.

インタフェース定義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 client stub 22 is an interface that is above the service GetImagePage provided by the service component 11, and the type of the function on the 11th line is determined from the interface declaration.

この結果、図4に示すように、サーバ10は、サービス・コンポーネント11、インタフェース定義12、サービス・スタブ13を備えている。また、クライアント20は、クライアント・コンポーネント21、クライアント・スタブ22、メモリハンドラ23を備えている。   As a result, as shown in FIG. 4, the server 10 includes a service component 11, an interface definition 12, and a service stub 13. Further, the client 20 includes a client component 21, a client stub 22, and a memory handler 23.

以上のように構成された連携システムでは、次のようにしてソフトウエアモジュール間の連携が行われる。   In the cooperation system configured as described above, cooperation between software modules is performed as follows.

サービス・コンポーネント11は、共有メモリ30を自身のコードにより、共有メモリ30を自プロセス内にアタッチして(ステップS1)、サービスを開始する。   The service component 11 attaches the shared memory 30 to its own process using its own code (step S1), and starts the service.

クライアント20において、クライアント・コンポーネント21は、サービス・コンポーネント11にサービスを要求するために、クライアント・スタブ22にアクセスする(ステップS2)。クライアント・スタブ22は、図3の19行目に基づいてクライアント・コンポーネント21を呼び出すべく、クライアント・コンポーネント21の要求をサーバ10に転送する(ステップS3)。   In the client 20, the client component 21 accesses the client stub 22 to request a service from the service component 11 (step S2). The client stub 22 transfers the request for the client component 21 to the server 10 to call the client component 21 based on the 19th line in FIG. 3 (step S3).

サーバ10では、サービス・スタブ13は、メモリハンドラ23から送られた要求をサービス・コンポーネント11に転送する(ステップS4)。サービス・コンポーネント11は、データを共有メモリ30にデータを書き込んで、共有メモリ識別子を付けて、サービス・スタブ13に応答する(ステップS5)。サービス・スタブ13は、その応答をクライアント20に転送する(ステップS6)。   In the server 10, the service stub 13 transfers the request sent from the memory handler 23 to the service component 11 (step S4). The service component 11 writes the data into the shared memory 30, attaches the shared memory identifier, and responds to the service stub 13 (step S5). The service stub 13 transfers the response to the client 20 (step S6).

クライアント20では、クライアント・スタブ22は、サービス・スタブ13から送られた共有メモリ識別子をメモリハンドラ23に転送する(ステップS7)。   In the client 20, the client stub 22 transfers the shared memory identifier sent from the service stub 13 to the memory handler 23 (step S7).

メモリハンドラ23は、クライアント・スタブ22から受け取った共有メモリ識別子を、インタフェース定義12(図2)の26行目から36行目までの仮想コードから定義されたアルゴリズムに基づくコードを用いて、次のように処理を行う。   The memory handler 23 uses the code based on the algorithm defined from the virtual code from the 26th line to the 36th line of the interface definition 12 (FIG. 2) as the shared memory identifier received from the client stub 22 as follows. Process as follows.

メモリハンドラ23は、共有メモリ識別子を利用して、共有メモリ30を自プロセス内にアタッチする(ステップS8)。さらに、メモリハンドラ23は、アタッチした共有メモリ30のアドレスを付けて、クライアント・コンポーネント21に応答する(ステップS9)。   The memory handler 23 attaches the shared memory 30 in its own process using the shared memory identifier (step S8). Furthermore, the memory handler 23 adds the address of the attached shared memory 30 and responds to the client component 21 (step S9).

具体的には、メモリハンドラ23は、最初に共有メモリ識別子をローカルの識別子に変換し(図4の22行目)、フラグをクリアして(23行目)、共有メモリ30を自アドレスにアタッチ(24行目)する。そして、メモリハンドラ23は、共有メモリ30上の後端のアドレスを参照して、マジックナンバーと比較を行い、ページデータであることを確認(25行目)する。このとき、マジックナンバーが正しくなければ、メモリハンドラ23は、アタッチした共有メモリ30をデタッチして、例外処理に移行(26、27行目)する。正常であれば、メモリハンドラ23は、共有メモリ30の大きさからマジックナンバー分の大きさを引いて(29行目)、アタッチした共有メモリ30のアドレスをクライアント・コンポーネント21に供給する(30行目)。   Specifically, the memory handler 23 first converts the shared memory identifier into a local identifier (line 22 in FIG. 4), clears the flag (line 23), and attaches the shared memory 30 to its own address. (Line 24) Then, the memory handler 23 refers to the address at the rear end on the shared memory 30, compares it with the magic number, and confirms that it is page data (line 25). At this time, if the magic number is not correct, the memory handler 23 detaches the attached shared memory 30 and shifts to exception processing (lines 26 and 27). If it is normal, the memory handler 23 subtracts the size corresponding to the magic number from the size of the shared memory 30 (line 29) and supplies the address of the attached shared memory 30 to the client component 21 (line 30). Eye).

クライアント・コンポーネント21は、受け取ったメモリアドレスに基づいて共有メモリ30にアクセスすることによって、クライアント・コンポーネント21が共有メモリ30に書き込んだデータを読み出すことができる。   The client component 21 can read the data written in the shared memory 30 by accessing the shared memory 30 based on the received memory address.

ここで、従来は、上記のクライアント側のコードは、すべてのクライアントで設計し、実装しなければならない。この実施の形態であれば、共有メモリ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 memory 30 to the own process and the magic number. If it is a method of using the shared memory 30, it may be possible to create a code by obtaining knowledge from a general book or the like. This is very inefficient because all clients must implement it independently based on the specifications described in the diagram and figures. In particular, if the specification is changed, it becomes necessary to make it known and change the code implemented by all clients.

これに対して、本発明の実施の形態に係る連携システムは、サービス・コンポーネント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 interface definition 12 for accessing the service component 11, and based on the interface definition 12, the service stub 13, the client stub 22, and the memory A handler 23 is generated. The cooperation system transmits and receives data between the service component 11 and the client component 21 via the service stub 13, the client stub 22, and the memory handler 23.

これにより、連携システムは、サービス・コンポーネント11とクライアント・コンポーネント21との規格、環境が異なる場合であっても、インタフェース定義12に基づいてスタブ13、23やメモリハンドラ23を生成するので、連携させるための重複処理を省くことができる。また、上記連携システムで生成されたコードは、スタブのコードと同様に、それぞれのコンポーネントのアーキテクチャに合致した実行コードとなるため、転送の必要もなく、処理の効率がよい。   Thereby, even if the standard and environment of the service component 11 and the client component 21 are different, the cooperation system generates the stubs 13 and 23 and the memory handler 23 based on the interface definition 12, so that the cooperation is performed. Therefore, it is possible to omit duplication processing. Further, since the code generated by the cooperation system is an execution code that matches the architecture of each component, like the stub code, there is no need for transfer and the processing efficiency is high.

なお、本発明は、上述した実施の形態に限定されるものではなく、特許請求の範囲に記載された範囲内で設計上の変更をされたものにも適用可能であるのは勿論である。   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 server 10 and the client 20 share the memory, but the present invention is not limited to this. In other words, when the memory is not shared, there is no problem in generating the code for transferring the memory contents based on the usage form of the memory.

さらに、上述した実施の形態では、静的にコードを生成して、クライアントに結合するケースを説明したが、これを実行時に動的に結合すれば、仕様変更にも柔軟に対応が可能である。例えば上記実施形態では、マジックナンバーが「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 service component 11 and the client component 21 is not likely to be flawed, so the magic number is “0xfefe”. It is also possible to change to.

本発明の実施の形態に係る連携システムの構成を示す図である。It is a figure which shows the structure of the cooperation system which concerns on embodiment of this invention. インタフェース定義を示す図である。It is a figure which shows an interface definition. クライアント・スタブ22及びメモリハンドラ23のコードを示す図である。It is a figure which shows the code | symbol of the client stub 22 and the memory handler 23. FIG. サービス・スタブ、クライアント・コンポーネント、クライアント・スタブが生成された状態の連携システムの構成を示す図である。It is a figure which shows the structure of the cooperation system of the state by which the service stub, the client component, and the client stub were produced | generated.

符号の説明Explanation of symbols

10 サーバ
11 サービス・コンポーネント
12 インタフェース定義
13 サービス・スタブ
20 クライアント
21 クライアント・コンポーネント
22 クライアント・スタブ
23 メモリハンドラ
10 Server 11 Service Component 12 Interface Definition 13 Service Stub 20 Client 21 Client Component 22 Client Stub 23 Memory Handler

Claims (2)

所定の処理を行う第1のソフトウエアモジュールと、
前記第1のソフトウエアモジュールにアクセスするための情報を定義したインタフェース定義部と、
第1のソフトウエアモジュールと異なる規格の第2のソフトウエアモジュールと、を備え、
前記第1のソフトウエアモジュールは、前記インタフェース定義に基づいて、前記第2のソフトウエアモジュールと連携するためのコードを生成し、
前記第2のソフトウエアモジュールは、前記インタフェース定義に基づいて、前記第1のソフトウエアモジュールと連携するためのコードを生成し、
前記第1及び第2のソフトウエアモジュールは、それぞれ生成したコードを用いて互いに連携処理を行うこと
を特徴とするソフトウエアモジュール連携システム。
A first software module that performs predetermined processing;
An interface definition section defining information for accessing the first software module;
A second software module having a different standard from the first software module,
The first software module generates code for cooperating with the second software module based on the interface definition,
The second software module generates code for cooperating with the first software module based on the interface definition,
The software module linkage system, wherein the first and second software modules perform linkage processing with each other using generated codes.
所定の処理を行う第1のソフトウエアモジュールが、前記第1のソフトウエアモジュールにアクセスするための情報を定義したインタフェース定義に基づいて、当該第1のソフトウエアモジュールと異なる規格の第2のソフトウエアモジュールと連携するためのコードを生成し、
前記第2のソフトウエアモジュールは、前記インタフェース定義に基づいて、前記第1のソフトウエアモジュールと連携するためのコードを生成し、
前記第1及び第2のソフトウエアモジュールは、それぞれ生成したコードを用いて互いに連携処理を行うこと
を特徴とするソフトウエアモジュール連携方法。
Based on the interface definition in which the first software module that performs predetermined processing defines information for accessing the first software module, the second software having a different standard from the first software module. Code for linking with the hardware module,
The second software module generates code for cooperating with the first software module based on the interface definition,
The software module cooperation method, wherein the first and second software modules perform cooperation processing with each other using generated codes.
JP2006213072A 2006-08-04 2006-08-04 Software module linkage system Expired - Fee Related JP4835313B2 (en)

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 true JP2008040722A (en) 2008-02-21
JP4835313B2 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)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011060033A (en) * 2009-09-10 2011-03-24 Ricoh Co Ltd Integration and management apparatus, integration and management system, integration and management method, integration and management program, and recording medium with the program recorded thereon
JP2011086291A (en) * 2009-10-14 2011-04-28 Sap Ag System landscape-compatible inter-application communication infrastructure
CN111201516A (en) * 2017-10-12 2020-05-26 Arm有限公司 Message passing in data processing system
KR102327083B1 (en) * 2020-09-14 2021-11-15 한화시스템 주식회사 System and method for sharing software component

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005078339A (en) * 2003-08-29 2005-03-24 Nri & Ncc Co Ltd Wsdl document preparation device 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 thrtrfor, and computer readable memory

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005078339A (en) * 2003-08-29 2005-03-24 Nri & Ncc Co Ltd Wsdl document preparation device 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 thrtrfor, and computer readable memory

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011060033A (en) * 2009-09-10 2011-03-24 Ricoh Co Ltd Integration and management apparatus, integration and management system, integration and management method, integration and management program, and recording medium with the program recorded thereon
JP2011086291A (en) * 2009-10-14 2011-04-28 Sap Ag System landscape-compatible inter-application communication infrastructure
US9086932B2 (en) 2009-10-14 2015-07-21 Sap Se System landscape aware inter-application communication infrastructure
CN111201516A (en) * 2017-10-12 2020-05-26 Arm有限公司 Message passing in data processing system
JP2020537235A (en) * 2017-10-12 2020-12-17 エイアールエム リミテッド Message passing in data processing system
JP7153718B2 (en) 2017-10-12 2022-10-14 アーム・リミテッド Message passing in data processing systems
KR102327083B1 (en) * 2020-09-14 2021-11-15 한화시스템 주식회사 System and method for sharing software component

Also Published As

Publication number Publication date
JP4835313B2 (en) 2011-12-14

Similar Documents

Publication Publication Date Title
US6951021B1 (en) System and method for server-side communication support in a distributed computing environment
JP3597356B2 (en) Communication cooperation information generation device, three-layer client / server system, and medium recording communication cooperation information generation program
US20030009539A1 (en) Distributed object middleware connection method
US8776024B2 (en) Software application fine-tuning method, system, and corresponding computer program product
CN103092602B (en) software development kit
WO2008110111A1 (en) Method and device to call dynamic library and dynamic library server and master program implementing device
US7934218B2 (en) Interprocess communication management using a socket layer
US20130145381A1 (en) Web api server program, web api publication method
CN109451014A (en) A kind of WebService agency plant and its transparent proxy method
JP4835313B2 (en) Software module linkage system
CN114489622A (en) Js application, electronic device, and storage medium
US7546309B1 (en) Methods and apparatus for creating middleware independent software
JP2014085732A (en) Method and device for generating conversion module linking between robot middleware of different types
US7792921B2 (en) Metadata endpoint for a generic service
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
US9361266B2 (en) System and method for distributed computing
KR20100071432A (en) Method port apparatus and composition method for robot software component
McGuire et al. The Austin Protocol Compiler
JP4929285B2 (en) Server-side service framework
JP6128259B2 (en) Information processing system and information processing method
JP2003076563A (en) Distributed object middleware connection method and recording medium with program recorded thereon and program
JP2001337935A (en) Application wrapping method in dispersed object environment, its communication management device, and recording medium
JP2011081789A (en) System and method for providing embedded service-oriented user interface integration bus
JP5927930B2 (en) Information processing apparatus and program
US8112763B2 (en) Computer-implemented method, apparatus, and computer program product for transmitting information between CORBA applications and servers utilizing HTTP

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