JP2007086838A - Communication mediation device for zero garbage collection - Google Patents

Communication mediation device for zero garbage collection Download PDF

Info

Publication number
JP2007086838A
JP2007086838A JP2005271297A JP2005271297A JP2007086838A JP 2007086838 A JP2007086838 A JP 2007086838A JP 2005271297 A JP2005271297 A JP 2005271297A JP 2005271297 A JP2005271297 A JP 2005271297A JP 2007086838 A JP2007086838 A JP 2007086838A
Authority
JP
Japan
Prior art keywords
request
concurrent
temporary
type
temporary object
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.)
Pending
Application number
JP2005271297A
Other languages
Japanese (ja)
Inventor
Satoshi Hirano
平野  聡
Runtao Qu
潤涛 曲
Takeshi Okawa
猛 大川
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.)
National Institute of Advanced Industrial Science and Technology AIST
Original Assignee
National Institute of Advanced Industrial Science and Technology AIST
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 National Institute of Advanced Industrial Science and Technology AIST filed Critical National Institute of Advanced Industrial Science and Technology AIST
Priority to JP2005271297A priority Critical patent/JP2007086838A/en
Priority to PCT/JP2006/318485 priority patent/WO2007034769A1/en
Publication of JP2007086838A publication Critical patent/JP2007086838A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0253Garbage collection, i.e. reclamation of unreferenced memory

Abstract

<P>PROBLEM TO BE SOLVED: To prevent communication from being interrupted by the occurrence of garbage collection and being degraded in the real-time properties of a device for mediating service requests among a plurality of computers on a network, the device being implemented by an object-oriented programming language having garbage collection. <P>SOLUTION: The request mediation device has a means for reusing temporary objects created temporarily or repeatedly for each request, and a means for restricting communication patterns, and uses these means to prevent the occurrence of garbage collection so as to improve its real-time properties. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

この発明は、ガベージコレクションを備えるプログラミング言語による実行環境、もしくは使用済みメモリ管理手段を備えるハードウェアで実行されるコンピュータ間の遠隔リクエストのために、リアルタイム性を向上させてリクエスト仲介を行うリクエスト仲介装置に関するものであり、更に詳細には、ワークメモリ不足時に動作が開始されるガベージコレクションの発生を抑制して、ネットワーク上の複数のコンピュータ間で動作する分散・並列リアルタイム・アプリケーションプログラムによるシステム構築に利用される通信ミドルウェア、プログラミング言語、オペレーティングシステム、通信仲介ハードウェアの処理におけるリアルタイム性を向上させる仲介装置に関するものである。   The present invention relates to a request mediating apparatus that performs request mediation by improving real-time property for remote requests between computers executed in an execution environment using a programming language equipped with garbage collection or hardware equipped with used memory management means More specifically, it is used to construct a system using distributed / parallel real-time application programs that operate between multiple computers on the network by suppressing the occurrence of garbage collection that starts when the work memory is insufficient. The present invention relates to an intermediary device that improves real-time performance in processing of communication middleware, programming language, operating system, and communication mediation hardware.

ネットワークもしくはバス上の複数のコンピュータ間で動作する分散/並列アプリケーション・プログラム(以下、アプリケーションと略称する)の処理においては、通信を行ってリモート(遠隔)のコンピュータ上のオブジェクトやサービスをリクエストする(リモートメソッドを呼び出す)。多くの並列アプリケーションにおけるリクエスト処理は分散アプリケーションと共通性があるため、以下では「分散」と総称する。この場合の分散アプリケーションにおける通信処理を人手で設計することは煩雑で相互運用性が限定されるため、リクエスト仲介の機能を提供するリクエスト仲介装置を利用することが一般的である。   In processing of a distributed / parallel application program (hereinafter abbreviated as an application) that operates between a plurality of computers on a network or a bus, communication is performed to request an object or service on a remote computer (remote) ( Call remote method). Since request processing in many parallel applications has commonality with distributed applications, they are collectively referred to as “distributed” below. In this case, manually designing communication processing in a distributed application is complicated and limited in interoperability. Therefore, it is common to use a request mediation apparatus that provides a request mediation function.

本発明が対象とするリクエスト仲介装置は、分散オブジェクト、並列オブジェクト、Webサービス、エージェントシステム、P2Pシステム、音声・映像配信装置等、分散処理及び並列処理に関する高度な通信機能を有する装置である。装置の形態としては、ミドルウェア、並列/分散オペレーティングシステム(以下、OSと略称する)、並列/分散言語、ライブラリが多く、ソフトウェアあるいはハードウェアによって実現される(図1)。通信ミドルウェアの例としては、WEBサービス、CORBA、RMI、HORB、P2Pシステムなどがある。本発明ではこれらを「リクエスト仲介装置」あるいは「仲介装置」と総称する。   The request mediating apparatus targeted by the present invention is an apparatus having advanced communication functions related to distributed processing and parallel processing, such as distributed objects, parallel objects, Web services, agent systems, P2P systems, and audio / video distribution apparatuses. As a form of the apparatus, there are many middleware, parallel / distributed operating system (hereinafter abbreviated as OS), parallel / distributed languages, and libraries, which are realized by software or hardware (FIG. 1). Examples of communication middleware include WEB services, CORBA, RMI, HORB, P2P systems, and the like. In the present invention, these are collectively referred to as “request mediation device” or “mediation device”.

本明細書において、リクエストという用語は、リモート手続き呼び出し(Remote Procedure Call)、リモートメソッド呼び出し(Remote Method Invocation)、リモートサービス呼び出し(Remote Service Invocation)などを意味する。リクエスト仲介装置は、リクエストをサービスするアプリケーションの処理そのものではなく、クライアント・コンピュータが発行したリクエストをサーバ・コンピュータに仲介し、その返答をまたクライアント・コンピュータに伝える役割を負っている。例えば、分散オブジェクトやWebサービスの場合は、アプリケーション中に記述される遠隔コンピュータ上のセンサーの計測値の読み出しのプログラムは、「value = ref.getSensor()」のような記述によるものとなる(図8参照)。この一行のプログラム片が仲介装置を呼び出し、ネットワークを介する比較的複雑な通信処理を自動的に行わせる。   In this specification, the term “request” means a remote procedure call, a remote method call, a remote service call, or the like. The request mediating apparatus plays a role of mediating the request issued by the client computer to the server computer and notifying the response to the client computer, not the processing of the application that services the request itself. For example, in the case of a distributed object or a Web service, a program for reading a measured value of a sensor on a remote computer described in an application is based on a description such as “value = ref.getSensor ()” (FIG. 8). This one-line program piece calls the mediation device and automatically performs relatively complicated communication processing via the network.

リクエスト仲介の通信処理を行わず、データをパケットにより送るだけのTCPやUDPレベルのネットワーク・ライブラリ、分散アプリケーション自体の構成法は含まない。なお、本発明においてコンピュータとは、パソコン、サーバだけではなく、組込み機器内の小さなマイコン、同一システム内の複数の通信するコンポーネント等を広範に意味するものとする。   It does not include TCP or UDP level network libraries that only send data in packets without performing request-mediated communication processing, and configuration methods for distributed applications themselves. In the present invention, a computer broadly means not only a personal computer and a server but also a small microcomputer in an embedded device, a plurality of communicating components in the same system, and the like.

近年、機械と機械の間をネットワークで結び高度なシステムを構築する様態の分散リアルタイム・アプリケーションの開発が進んでいる。例えば、ネットワークで同期をとりながら集団で動作する人型ロボット、家庭内にリアルタイムのビデオストリームをサービスする情報家電機器、道路と交信しながら自動運転する自動車などが典型的な例である。そのような分散リアルタイム・アプリケーションのための仲介装置は、リクエストの仲介処理の際に一定の応答時間や定期的な周期を持つ通信が確実に行われるといったリアルタイム性を保証しなければならない。また、リアルタイムといわないまでも、高速な応答が必要な分散アプリケーションも多い。   In recent years, development of a distributed real-time application in which a machine is connected by a network and an advanced system is constructed has been developed. For example, a humanoid robot that operates in a group while synchronizing with a network, an information home appliance that provides a real-time video stream in a home, and a car that automatically operates while communicating with a road are typical examples. Such an intermediary device for a distributed real-time application must guarantee real-time performance such that communication with a certain response time and a periodic cycle is reliably performed during the mediation processing of a request. Even if it is not called real-time, there are many distributed applications that require high-speed response.

しかし、Java(登録商標)言語などの現代的なプログラミング言語で開発された仲介装置は、以下に述べる理由で応答時間や周期性を保証することができないという問題があるため、リアルタイム性が必要な分散リアルタイム・アプリケーションではC言語やC++言語といった昔ながらのプログラミング言語が使用されることが多い。   However, an intermediary device developed in a modern programming language such as Java (registered trademark) has a problem that response time and periodicity cannot be guaranteed for the reasons described below, so real-time characteristics are required. In distributed real-time applications, traditional programming languages such as C and C ++ are often used.

C言語やC++言語のプログラミング言語を使用する場合、プログラマはメモリの割り当て、メモリ使用後のメモリ返却といった操作を行う処理についても、プログラム処理の中で明示的に記述する必要がある。プログラムの作成の中で、例えばメモリの使用後に返却する指示を記述することを忘れるとメモリリークが起き、メモリ不足となってアプリケーションが異常終了する場合がある。作成したプログラムを検証する場合に、そのプログラムの処理の中でのメモリリークは発見が難しく、開発効率やシステムの安全性を大きく損なう要因である。   When a programming language such as C or C ++ is used, the programmer must explicitly describe the processing for performing operations such as memory allocation and memory return after using the memory in the program processing. If you forget to write an instruction to return after using the memory during program creation, for example, a memory leak may occur, causing the application to terminate abnormally due to insufficient memory. When verifying a created program, memory leaks in the processing of the program are difficult to find and are a factor that greatly impairs development efficiency and system safety.

そのため、Java(登録商標)言語やC#言語といった現代的なプログラミング言語の実行環境では、ガベージコレクション(GC)と呼ばれるメモリ管理方式を採用している。   For this reason, in an execution environment of a modern programming language such as Java (registered trademark) language or C # language, a memory management method called garbage collection (GC) is adopted.

ガベージコレクション(以下、GCと略称する)では、「ガベージコレクタ」が定期的に全オブジェクトをチェックし、オブジェクトが「どの参照型変数からも参照されていない」場合にはオブジェクトを削除する。これにより、当該オブジェクトが使用していたメモリ(ヒープメモリ)が開放され、再び利用可能となる。このような現代的なプログラミング言語により作成されたプログラム処理では、オブジェクトを好きなときに生成するだけでよい。   In garbage collection (hereinafter abbreviated as GC), the “garbage collector” periodically checks all objects, and if the object is “not referenced by any reference type variable”, the object is deleted. As a result, the memory (heap memory) used by the object is released and can be used again. In a program process created by such a modern programming language, an object need only be generated at any time.

オブジェクトはヒープメモリ上に生成される。ヒープメモリは限られた量しかなく、ヒープメモリが不足すると、プログラム処理が異常終了する場合があるが、GCは使われなくなったオブジェクトが占有するメモリを、自動的に回収して、ヒープメモリに返却するので、メモリは再利用される。このようにして、プログラマをメモリ管理から解放することによって、Java(登録商標)言語を利用するプログラマの生産性は、C言語もしくはC++言語を用いた場合に対して大幅に向上した。   Objects are created on heap memory. There is only a limited amount of heap memory. If heap memory is insufficient, program processing may end abnormally. However, GC automatically collects the memory occupied by objects that are no longer used and stores it in the heap memory. Since it is returned, the memory is reused. Thus, by releasing the programmer from memory management, the productivity of the programmer using the Java (registered trademark) language is greatly improved as compared to the case of using the C language or the C ++ language.

しかし、このGCの処理は、言語ランライム(例えば、Java仮想マシン)の裁量で発生し、プログラムの実行を中断して行われる。このため、分散リアルタイム・アプリケーションの処理においては、予測できないGCが発生する場合があり、通信処理を実行している際に、予測不可能な通信の中断が発生する場合があり、これが重大な事故の原因となる場合がある。   However, this GC processing occurs at the discretion of a language runtime (for example, a Java virtual machine), and is executed by interrupting program execution. For this reason, unpredictable GC may occur in distributed real-time application processing, and unpredictable communication interruption may occur during communication processing, which is a serious accident. It may cause.

既存のオブジェクト指向プログラミング言語により実装された仲介装置製品であるCORBA、J2EE、Webサービス製品などのJavaによる仲介装置においては、リクエスト(リモートメソッド呼び出し)のたびにかなりの量の一時オブジェクトが生成されるため、GCが頻繁に発生する。ここで、一時オブジェクトとは、リクエスト仲介処理に伴って仲介装置内で生成される全ての種類のオブジェクトを指している。具体的には、リモートのサービスを提供するサーバ・オブジェクト、通信バッファのように大きなデータから、通信相手のホスト名やユーザ名、セッション識別子、リクエスト番号といった些細なデータまで、ヒープメモリ中に格納される全てのオブジェクトを含む。これらは文字列オブジェクト、構造体的なオブジェクト、配列オブジェクトなどを用いて実装されており、セッションのたび、あるいは個々のリクエストのたびに生成され、使用後にGCによって回収される。一時オブジェクトの生成の際にメモリが足りないと、GCが発生するので、通信が中断されることになる。一時的ではないオブジェクトとは、セッションやリクエストの寿命を越えて存続するオブジェクトで、仲介装置内では例えば起動中のサーバ・オブジェクトを記録する表の場合、仲介装置の開始と共に生成され、終了まで存続する。   In an intermediary device by Java, such as CORBA, J2EE, and Web service products, which are intermediary device products implemented in an existing object-oriented programming language, a considerable amount of temporary objects are generated for each request (remote method call). Therefore, GC frequently occurs. Here, the temporary object refers to all types of objects that are generated in the mediation apparatus in association with the request mediation processing. Specifically, server objects that provide remote services, large data such as communication buffers, and trivial data such as communication partner host names, user names, session identifiers, and request numbers are stored in the heap memory. Includes all objects that These are implemented using a character string object, a structural object, an array object, etc., and are generated for each session or for each request, and collected by the GC after use. If there is not enough memory when generating a temporary object, a GC occurs and communication is interrupted. A non-temporary object is an object that persists beyond the lifetime of a session or request. In a mediation device, for example, a table that records active server objects, it is created when the mediation device starts and persists until the end. To do.

例えば、次表は、幾つかのJava仲介装置において、1回のリクエスト(リモートメソッド呼び出し)の間に生成される一時オブジェクト数と使用される一時メモリ量を調査した結果である。

Figure 2007086838
For example, the following table shows the result of investigating the number of temporary objects generated during one request (remote method call) and the amount of temporary memory used in some Java mediating devices.
Figure 2007086838

更に、次表は、リクエスト2000回あたりのGCの発生数を調査した結果である。このように、多くのGCが発生していることが分かる。

Figure 2007086838
Further, the following table shows the results of examining the number of occurrences of GC per 2000 requests. Thus, it can be seen that many GCs are generated.
Figure 2007086838

このように、リクエストにおける一時オブジェクトの生成は、リクエスト中にGCを発生させ、通信中断を引き起こす場合があるので、GC付きの実行環境で実行されるプログラミング言語で開発されたリクエスト仲介装置がリアルタイム性の必要なアプリケーションで利用されなかった大きな要因である。ハードウェアによって仲介装置を実装する場合も、使用済みメモリを管理する手段、即ちハードウェアによるGCが必要であり、同様の問題を含んでいる。   Thus, since the generation of a temporary object in a request may cause a GC during the request and cause a communication interruption, a request mediating device developed in a programming language executed in an execution environment with a GC is real-time. This is a major factor that was not used in the necessary applications. Even when the mediation device is implemented by hardware, means for managing the used memory, that is, GC by hardware, is necessary, and includes similar problems.

これに対して、GCに起因するこの種の問題の解決を試みた幾つかの発明が提案されている。例えば、特許文献13においては、「recycle()メソッド」を実装することによりクラスを再利用可能にして、オブジェクトが再利用可能かどうかをGCのプロセスが決定できるようにすることが提案されている。これは、オブジェクトを再利用して、オブジェクトの生成を防ぐためのよい機構であるが、もし、たまたま、ガベージコレクタがリサイクル可能なオブジェクトを見つけられなかった場合、メモリ領域全体に跨るGCが発生してしまう。したがって、この特許文献13の発明は、オブジェクト生成のコストを削減するにはよいが、GCによる通信の中断を防ぐことはできない。   In contrast, several inventions have been proposed that attempt to solve this type of problem caused by GC. For example, Patent Document 13 proposes that by implementing a “recycle () method”, a class can be reused so that a GC process can determine whether an object can be reused. . This is a good mechanism for reusing objects to prevent object creation, but if the garbage collector does not find a recyclable object, a GC that spans the entire memory area occurs. End up. Therefore, the invention of Patent Document 13 is good for reducing the cost of object generation, but cannot prevent interruption of communication by GC.

特許文献10においては、メソッド呼び出しから固定・定数オブジェクトの生成を取り除く方法の発明が提案されている。この特許文献10の発明によれば、反復的なプロセスにおけるメモリの使いすぎの問題を部分的には解決できる。しかし、ほとんどのリクエスト仲介装置においては、リクエストは多様な型を扱う動的なプロセスであり、そのプロセスにおける大部分の一時オブジェクトは、固定されているわけでも、定数でもない。   Patent Document 10 proposes an invention of a method for removing generation of fixed / constant objects from method calls. According to the invention of Patent Document 10, the problem of excessive use of memory in an iterative process can be partially solved. However, in most request mediation devices, requests are dynamic processes that handle various types, and most temporary objects in the process are neither fixed nor constant.

具体例で説明すると、ビデオ等のストリーミング配信システムは、アプリケーションに対してQoS(Quality of Service:品質の確保された通信)を提供している。QoS仲介装置やOSのドライバは、CPU時間やネットワーク上でのバンド幅を優先的に割り当てることにより通信品質を保証する。メモリの割り当てに関しては、OSが各ストリームの通信バッファ用のメモリ量をQoSレベルに応じて割り当てる。この技術の適用範囲は通信データ用のバッファに限定されたものであり、リクエストの間に生成される多くの小さい一時オブジェクトを扱うことは行われていない。   More specifically, a streaming distribution system such as video provides QoS (Quality of Service) with respect to an application. The QoS mediating apparatus and the OS driver guarantee communication quality by preferentially allocating CPU time and bandwidth on the network. Regarding the memory allocation, the OS allocates the memory amount for the communication buffer of each stream according to the QoS level. The scope of application of this technique is limited to a buffer for communication data, and many small temporary objects generated during a request are not handled.

また、幾つかの組織からリアルタイムJavaの規格が提唱されている。リアルタイムJavaは、多くの複雑な戦略によってこの問題に対抗している。例えば、イモータルメモリ(恒久メモリ)、スコープドメモリ(範囲化メモリ)やリアルタイムスレッドなどがあげられる。GCは、リアルタイムJavaのプラットフォームでも起こるため、オブジェクトを生成・廃棄する限りは、リクエスト仲介処理においてはGCによる通信中断の問題に突き当たる。また、普及の遅れているリアルタイムJavaではない通常のJava製品を使いたい場合も多い。   In addition, real-time Java standards have been proposed by several organizations. Real-time Java counters this problem with a number of complex strategies. For example, an immortal memory (permanent memory), a scoped memory (ranged memory), a real-time thread, and the like can be given. Since GC also occurs in a real-time Java platform, as long as an object is created and discarded, it encounters a problem of communication interruption by GC in request mediation processing. In addition, there are many cases where it is desired to use a normal Java product that is not a real-time Java that is not widely used.

リアルタイムGCと並行GCの手法は、本発明が取り組んでいる課題を解決する別のよい手段である。リアルタイムGCは、シングルCPU上でGCの時間を細分化することにより割り込み応答性能を改善する。並行GCは、マルチCPUシステム上でひとつのCPUをGC処理に割り当てることにより、他CPUがGCにより実行を中断することがないようにする。   Real-time GC and parallel GC techniques are another good way to solve the problem that the present invention is addressing. Real-time GC improves interrupt response performance by subdividing GC time on a single CPU. In the parallel GC, one CPU is assigned to the GC processing on the multi-CPU system so that the execution of other CPUs is not interrupted by the GC.

非特許文献1においては、組込みJavaアプリケーションにおいてGCによりリアルタイム性が欠如する問題に対処するため、オブジェクト・プーリングを中心とする設計ガイドライン、GCレスAWT(Abstract Windowing Toolkit)描画ライブラリ、GCレスUDP(User Datagram Protocol)パケット・サーバを開発している。そこでは、オブジェクトはプーリングし再利用する、データの受け渡しにオブジェクトでは値型を使用する、Stringなどの不変オブジェクトではなく配列などの可変オブジェクトを使用する、といったGC発生を予防する基本的な手法が提案されている。   In Non-Patent Document 1, in order to deal with the problem of lack of real-time performance due to GC in embedded Java applications, design guidelines centering on object pooling, GC-less AWT (Abstract Winding TOOLkit) drawing library, GC-less UDP (User) Datagram Protocol) packet server is being developed. There are basic techniques to prevent the occurrence of GC, such as pooling and reusing objects, using value types in objects for passing data, and using variable objects such as arrays instead of immutable objects such as String. Proposed.

この提案は本発明の先行技術となるものであるが、基本的な描画ライブラリやUDPパケットの受信といった基本的なレベルに留まっており、分散オブジェクトやWebサービスといった高度な通信処理に関する課題解決の方法には言及していない。サービスへのリクエストを仲介するリクエスト仲介装置は複雑であるため、単にオブジェクトをプーリングするのみでは課題は解決されない。   Although this proposal is a prior art of the present invention, it remains at a basic level such as reception of a basic drawing library and UDP packet, and a method for solving problems related to advanced communication processing such as distributed objects and Web services. Is not mentioned. Since a request mediating apparatus that mediates a request for a service is complicated, the problem cannot be solved by simply pooling an object.

この明細書において参照として挙げられている特許文献1〜16のその他の発明は、コンピュータシステムにおけるメモリ管理手段もしくはリアルタイム処理に関係するものである。しかし、それらは、ここで説明するGC問題を解決することを意図したものではない。先行技術の動向を鑑みて、われわれはこの問題に対して、改善された方法を供給する価値は十分あると考える。
特開昭63−93055号公報 特開2001−188704号公報 特開2001−202284号公報 米国特許第6678697号明細書 米国特許第5950231号明細書 米国特許第6272674号明細書 米国特許第6055492号明細書 米国特許第6754796号明細書 米国特許第6751790号明細書 米国特許第6701520号明細書 米国特許第6430564号明細書 米国特許第6748555号明細書 米国特許第6138127号明細書 米国特許第6611898号明細書 米国特許第6529948号明細書 米国特許第6381735号明細書 組込みJava実用コンソーシアム, Embedded Technology 2004講演報告組込みJava リアルタイム性の確保と適用ガイドライン〜GUI/ネットワークのGCレスライブラリの実装〜講演資料 http://www.ejpc.org/et2004/et2004.htmlhttp://www.ejpc.org/et2004/et2004p2.pdf Real-timePlatform SIG, Realtime CORBA, white paper, Object Management Group, Dec. 1996,Editor: Judy McGoogan, Lucent Technologies. Ray Clark, E.Douglas Jensen, Doug Wells, Andy Wellings, The distributed Real-timeSpecification for Java: A Status Report, Embedded Systems Conference, March2002. JSR 50: Distributed Real-Time Specification
Other inventions of Patent Documents 1 to 16 cited as references in this specification relate to memory management means or real-time processing in a computer system. However, they are not intended to solve the GC problem described here. In view of the trends in the prior art, we think it is well worth supplying an improved method for this problem.
JP-A-63-93055 JP 2001-188704 A JP 2001-202284 A US Pat. No. 6,678,697 US Pat. No. 5,950,231 US Pat. No. 6,272,674 US Pat. No. 6,055,492 US Pat. No. 6,754,796 US Pat. No. 6,751,790 US Pat. No. 6,701,520 US Pat. No. 6,430,564 US Pat. No. 6,748,555 US Pat. No. 6,138,127 US Pat. No. 6,611,898 US Pat. No. 6,629,948 US Pat. No. 6,381,735 Embedded Java Practical Consortium, Embedded Technology 2004 Lecture Report Embedded Java Real-time Performance Assurance and Application Guidelines-GUI / Network GC-less Library Implementation-Lecture Materials http://www.ejpc.org/et2004/et2004.htmlhttp:// www.ejpc.org/et2004/et2004p2.pdf Real-timePlatform SIG, Realtime CORBA, white paper, Object Management Group, Dec. 1996, Editor: Judy McGoogan, Lucent Technologies. Ray Clark, E. Douglas Jensen, Doug Wells, Andy Wellings, The distributed Real-time Specification for Java: A Status Report, Embedded Systems Conference, March 2002. JSR 50: Distributed Real-Time Specification

ところで、GCを備えるオブジェクト指向のプログラミング言語を用いて開発された分散オブジェクトやWebサービス等の仲介装置では、反復的なリクエスト仲介処理中に生成される多くの一時オブジェクトのためにGCが発生する。GCが発生するとプログラムの処理が中断され、その間、通信も中断する。   By the way, in a mediation apparatus such as a distributed object or a web service developed using an object-oriented programming language equipped with GC, GC is generated for many temporary objects generated during repetitive request mediation processing. When GC occurs, the processing of the program is interrupted, and communication is also interrupted during that time.

オブジェクトの生成を行わなければGCは発生しない。GCが発生しなければ通信の中断も起きない。しかし、一般的には通信の内容は多様であり、内容次第でメモリの使用量は大きく異なる。また、応用によってはアプリケーションが改良されるたびにリクエストの種類や転送されるデータの種類が増えてゆく。単なるTCPのパケットライブラリのような低レベルのものではGCの抑制は容易であるが、分散オブジェクトやWebサービスのような通信内容に意味がある仲介装置では様々なオブジェクトが生成されるため困難である。   If no object is generated, GC does not occur. If no GC occurs, communication is not interrupted. However, in general, the content of communication varies, and the amount of memory used varies greatly depending on the content. Also, depending on the application, the type of request and the type of data to be transferred increase as the application is improved. Although it is easy to suppress GC with a low-level one such as a simple TCP packet library, it is difficult because various objects are generated in a mediation device that makes sense for communication contents such as distributed objects and Web services. .

本発明は、このような問題を解決するためになされたものであり、本発明の第1の課題は、一定時間内の応答通信や周期的な通信が必要な分散リアルタイム・アプリケーションのためのリクエスト仲介装置において、設計時に想定した範囲内のあらゆる通信パターンに対しリクエスト仲介処理中に通信中断が発生しないことを保証できるリクエスト仲介装置を提供することある。このようなリクエスト仲介装置のシステム構成をハードゼロGCシステムと称する。   The present invention has been made in order to solve such problems, and a first object of the present invention is to provide a request for a distributed real-time application that requires response communication within a predetermined time and periodic communication. There is a need to provide a request mediation device that can guarantee that communication interruption does not occur during request mediation processing for any communication pattern within the range assumed at the time of design in the mediation device. Such a system configuration of the request mediating apparatus is referred to as a hard zero GC system.

本発明の第2の課題は、設計時に想定した範囲を逸脱する通信パターンを有するアプリケーション、あるいは、設計時に明確な範囲を想定することができないアプリケーションに対しても、通信中断を減少させるリクエスト仲介装置を提供することにある。このようなリクエスト仲介装置によると、リクエスト仲介装置における処理の特性だけではなく、アプリケーションにおける処理の特性によって通信の中断が発生しない、あるいは、アプリケーションの特性にもよるが、通信の中断がいくらか起きても良いアプリケーションに対するリクエスト仲介の処理を行うことができるリクエスト仲介装置がこれに該当する。このようなリクエスト仲介装置のシステム構成をソフトゼロGCシステムと称する。   A second problem of the present invention is a request mediating apparatus that reduces communication interruption even for an application having a communication pattern that deviates from a range assumed at the time of design, or an application that cannot assume a clear range at the time of design. Is to provide. According to such a request mediation apparatus, communication interruption does not occur due to processing characteristics in the application as well as processing characteristics in the request mediation apparatus, or some communication interruption occurs depending on application characteristics. This is a request mediating apparatus that can perform request mediation processing for a good application. Such a system configuration of the request mediating apparatus is referred to as a soft zero GC system.

本発明の第3の課題は、1のリクエスト仲介装置において、通信中断を抑制するモードと、通信中断の抑制機能を使用しないモードでの動作可能とした仲介装置を提供することである。これは、ひとつのアプリケーション内でも常時リアルタイム性が求められるとは限らないためである。ひとつの分散アプリケーションがリアルタイム性の必要な通信と必要ない通信を混在して使用する場合、計算資源や開発コストが倍増するが、その計算資源や開発コストの増加を軽減することできる仲介装置が提供される。   A third problem of the present invention is to provide a mediation device that can operate in a mode that suppresses communication interruption and a mode that does not use a communication interruption suppression function in one request mediation device. This is because real-time performance is not always required even within one application. When a single distributed application uses both real-time communications and communications that do not require real-time communication, computing resources and development costs are doubled, but an intermediary device that can reduce the increase in computational resources and development costs is provided. Is done.

したがって、上記のような課題を解決する本発明の目的は、ガベージコレクションを備えるオブジェクト指向プログラミング言語の実行環境で実行されるコンピュータ間の遠隔リクエスト仲介のために、ガベージコレクションの発生を抑制し、またはガベージコレクションを発生しないようにして、リアルタイム性を向上させてリクエスト仲介を行うゼロガベージコレクション通信のための仲介装置を提供することにある。   Therefore, an object of the present invention to solve the above-described problems is to suppress the occurrence of garbage collection for mediating remote requests between computers executed in an execution environment of an object-oriented programming language having garbage collection, or An object of the present invention is to provide an intermediary device for zero garbage collection communication which performs request mediation by improving real-time performance without generating garbage collection.

上記の目的を達成するため、本発明は、第1の態様として、本発明によるゼロガベージコレクション通信のための仲介装置は、ガベージコレクション機能を備えるオブジェクト指向プログラミング言語によって実装されるコンピュータ間の遠隔リクエストの仲介処理をガベージコレクションを抑制して行う仲介装置であって、前記仲介処理のために一時的に使われた一時オブジェクトのうち使用済みの一時オブジェクトを保持する一時オブジェクト格納手段と、前記使用済みの一時オブジェクトを再利用のために初期化する一時オブジェクト管理手段と、リクエストの種類の制限値を設定するリクエスト種類制限値設定手段と、前記リクエストの種類の制限値によりリクエストの種類を制限するリクエスト種類制限手段と、転送データ数の制限値を設定する転送データ数制限値設定手段と、前記転送データ数の制限値によりリクエストによって転送されるデータ及びオブジェクトの種類及び個数を制限する転送データ数制限手段と、同時並行使用数の制限値を設定する同時並行使用数制限値設定手段と、前記同時並行使用数の制限値によりリクエストの同時並行使用数を制限する同時並行使用数制限手段と、を具備することを特徴とするものである。   In order to achieve the above object, the present invention provides, as a first aspect, an intermediary device for zero garbage collection communication according to the present invention comprising: a remote request between computers implemented by an object-oriented programming language having a garbage collection function; An intermediary device that suppresses garbage collection, a temporary object storage unit that holds a used temporary object among temporary objects temporarily used for the mediation processing, and the used A temporary object management means for initializing a temporary object for reuse, a request type limit value setting means for setting a request type limit value, and a request for limiting the request type by the request type limit value Type restriction means and transfer data count control Transfer data number limit value setting means for setting a value, transfer data number limit means for limiting the type and number of data and objects transferred by a request according to the limit value of the transfer data number, and limit value for the number of simultaneous and parallel use And a concurrent and concurrent use number limit setting means for limiting the concurrent and concurrent use number of requests by the limit value of the concurrent and concurrent use number. .

このような態様の仲介装置においては、アプリケーションに特有な通信パターンの局所性を利用すると共に、人為的に通信パターンを制限することにより第1の課題を解決するものとしている。   In the intermediary apparatus of this aspect, the first problem is solved by using the locality of the communication pattern specific to the application and artificially limiting the communication pattern.

アプリケーションでは、分野によっては、あるコンピュータがもう一方のコンピュータに通信セッションを開設し通信を始めると、同じようなリクエストを繰り返す傾向を示す場合がある。特に、機械と機械との間の通信、例えば、ロボット内部や自動車内部のコンポーネント間の通信などの組込み機器間の通信は、センサーのデータの取得といった少ない種類のリクエストの単調な繰り返しが多い。   In some applications, depending on the field, when one computer establishes a communication session with another computer and starts communication, it may tend to repeat similar requests. In particular, communication between embedded devices such as communication between machines, for example, communication between components inside a robot or an automobile, often involves monotonous repetition of a small number of requests such as acquisition of sensor data.

このような通信には、所定のパターンがあるという特性を利用すると、メモリ使用の最適化が可能となる。つまり、同様のリクエストが繰り返されるのであれば、毎回のリクエストのたびに必要な一時オブジェクトを生成するのではなく、通信前あるいは最初の一回目に生成した一時オブジェクトを使用後に破棄せずに次回以後も使い回すことにより、GCの発生を抑制することができる。以後これを「ゼロGC」と呼ぶ。   For such communication, use of the characteristic that there is a predetermined pattern makes it possible to optimize memory use. In other words, if the same request is repeated, instead of generating the necessary temporary object for each request, the temporary object generated before communication or the first time is not discarded after use, but after the next time. Also, the occurrence of GC can be suppressed by reusing it. Hereinafter, this is referred to as “zero GC”.

アプリケーションによって通信パターンは大きく異なる。転送されるオブジェクトの数が多すぎる状態の通信、予想より多いクライアント・コンピュータから同時に通信が起きるといった予想外の通信が発生すると、一時オブジェクトの生成数が増えすぎてヒープメモリが枯渇する。したがって、アプリケーション毎に想定される通信パターンの範囲を決めることにより、一時オブジェクトが多く生成されないようにする。   Communication patterns vary greatly depending on the application. If communication occurs when there are too many objects to be transferred, or unexpected communication such as simultaneous communication from more client computers than expected, the number of temporary objects generated increases and the heap memory is exhausted. Accordingly, by determining the range of communication patterns assumed for each application, a large number of temporary objects are prevented from being generated.

例えば、制限する通信パターンの範囲としては、通信を受け付けることができるか(同時セッション数が多すぎないか)、どの種類のリクエストの通信を行うか、通信で転送されるデータの種類と数、を制限すれば十分である。これにより、本発明を適用可能なアプリケーションの分野も同時に制限を受けるが、多くのアプリケーションでは、その中の通信処理に規則性があるため、これで十分な場合も多い。   For example, the range of communication patterns to be restricted includes whether communication can be accepted (the number of simultaneous sessions is not too many), what type of request communication is performed, the type and number of data transferred by communication, It is sufficient to limit As a result, the field of applications to which the present invention can be applied is also limited. However, in many applications, communication processing therein is regular, and this is often sufficient.

このように、一時オブジェクトの生成数を抑制して、ヒープメモリが枯渇することがないようにすることにより、GCの発生を抑制し、さらにはGCを発生させないようにする方法は、1)想定内のあらゆるリクエストのパターンに対して、永久にゼロGC状態を保つことが可能な解決手段(ハードゼロGCシステム)とするか、あるいは、アプリケーションによってはハードな解決手段では制限が強すぎて使用できない場合もあるため、2)より制限の緩い方法(ソフトゼロGCシステム)とするかのどちらかである。   In this way, by suppressing the number of temporary objects generated so that the heap memory is not exhausted, the method of suppressing the occurrence of GC and further preventing the occurrence of GC is 1) Assumption It is a solution (hard zero GC system) that can keep the zero GC state forever for all the request patterns in the above, or depending on the application, the hard solution is too restrictive to use In some cases, it is either 2) a less restrictive method (soft zero GC system).

そこで、本発明による仲介装置(「ゼロGC通信仲介装置」)は、第1の態様として、GC機構を有するオブジェクト指向プログラミング言語で実装される通信の仲介を行うシステムにおいては、システムに備えられた処理要素(各処理手段)により、次のような処理を行う。   Therefore, the mediation device (“zero GC communication mediation device”) according to the present invention is provided as a first aspect in a system that mediates communication implemented in an object-oriented programming language having a GC mechanism. The following processing is performed by processing elements (each processing means).

一時オブジェクトの生成が必要な場合は、オブジェクト管理手段によって一時オブジェクト格納手段を検索し、同じ型で使用済みの一時オブジェクトが格納されていれば、それを取り出して再利用し、使用後は一時オブジェクト格納手段に再度格納する。また、当該一時オブジェクトと同じ型のオブジェクトが、一時オブジェクト格納手段内に存在しない場合は、一時オブジェクト管理手段は新しいオブジェクトを生成し、使用に供する。新規に生成された一時オブジェクトは、使用後に一時オブジェクト格納手段内に格納される。ハードゼロGCシステムとする場合には、メモリ使用量はシステムに与えられたヒープメモリ割当量を超えることができない。   When it is necessary to create a temporary object, the temporary object storage means is searched by the object management means, and if a temporary object that has been used with the same type is stored, it is taken out and reused. Store again in the storage means. When an object of the same type as the temporary object does not exist in the temporary object storage means, the temporary object management means generates a new object and uses it. The newly generated temporary object is stored in the temporary object storage means after use. In the case of a hard zero GC system, the memory usage cannot exceed the heap memory allocation given to the system.

そこで、想定外の通信パターンによる一時オブジェクトの生成数の増えすぎを防ぐため、リクエスト種類制限手段により、リクエストの種類を制限し、データ転送数制限手段により、引数あるいは返値として転送されるデータ及びオブジェクトの種類と数を制限し、更に、同時並行使用数制限手段により、同時に発生するセッションの数を制限する。これらの制限手段による制限は、後述するように、実行時に行う形態と、開発時に行う形態がある。実行時に制限されたリクエストは、処理が延期されるか、クライアントに例外あるいはエラーとして通知される。これらの制限値の設定は、リクエストの種類の制限値は、リクエスト種類制限値設定手段により、転送データ数の制限値は、転送データ数制限値設定手段により、リクエストの同時並行使用数の制限値は、同時並行使用数制限値設定手段により、それぞれ設定する。   Therefore, in order to prevent an excessive increase in the number of temporary objects generated due to an unexpected communication pattern, the request type is restricted by the request type restriction means, and the data transferred as an argument or a return value by the data transfer number restriction means and The number and type of objects are limited, and the number of simultaneous sessions is limited by means of limiting the number of concurrent and concurrent use. As described later, the restriction by these restriction means includes a form performed at the time of execution and a form performed at the time of development. Requests restricted at runtime are postponed or notified to clients as exceptions or errors. These limit values are set using the request type limit value setting means for the request type limit value, and the transfer data number limit value setting means for the transfer data number limit value setting means. Are respectively set by the simultaneous parallel use number limit value setting means.

これにより、本発明による仲介装置においては、一時オブジェクトの生成の機会は管理され、想定された通信パターンの範囲内であれば、リクエストの仲介処理をいくら行ってもGCに起因する通信の中断が発生しない。また、想定外の通信パターンは排除される。このため、ハードゼロGC状態となり、リアルタイム性の高い通信が可能となる。   As a result, in the mediation apparatus according to the present invention, the generation opportunity of the temporary object is managed, and if the request mediation process is performed, the communication interruption due to the GC is interrupted as long as the mediation process of the request is performed. Does not occur. Unexpected communication patterns are excluded. For this reason, it becomes a hard zero GC state, and communication with high real-time property is attained.

また、本発明は、第2の態様として、本発明によるゼロガベージコレクション通信のための仲介装置は、この仲介装置において、更に、前記リクエスト種類制限手段により、リクエストの種類が制限され、前記転送データ数制限手段により、リクエストによって転送されるデータ及びオブジェクトの種類及び個数が制限され、または、前記同時並行使用数制限手段により、リクエストの同時並行使用数が制限される。リクエストを開始できない場合において、リクエスト処理の開始をタイムウインドウ時間の範囲内で延期するリクエスト延期手段を備えるように構成される。   According to a second aspect of the present invention, there is provided an intermediary device for zero garbage collection communication according to the present invention, wherein the request type is restricted by the request type restriction means, and the transfer data The number restriction means restricts the type and number of data and objects transferred by the request, or the concurrent and parallel use number restriction means restricts the number of simultaneous and concurrent requests. In the case where the request cannot be started, it is configured to include request postponing means for postponing the start of request processing within a time window time range.

これによると、リクエスト延期手段を備え、前述したような制限手段により、リクエストを受付できない場合において、リクエスト処理の開始を次の時間の範囲内で延期できるように構成される。リクエスト延期手段によってリクエストを延期することにより、リアルタイム性を確保しつつ受付拒否でサービスが利用できない機会を減少させることができる。リアルタイム性の度合いはアプリケーションによって異なるため、延期可能な時間範囲(タイムウインドウ)を調節可能とすることによって、多様なリアルタイム性に対応することができるようになる。   According to this, the request postponing means is provided, and the request processing start can be postponed within the next time range when the request cannot be accepted by the limiting means as described above. By deferring the request by the request deferral means, it is possible to reduce the chance that the service cannot be used due to the rejection of the reception while ensuring the real time property. Since the degree of real-time property varies depending on the application, it becomes possible to cope with various real-time properties by making it possible to adjust the time range (time window) that can be postponed.

また、本発明は、第3の態様として、本発明によるゼロガベージコレクション通信のための仲介装置は、この仲介装置において、更に、前記一時オブジェクト管理手段を使用するスタブコードを生成するスタブ生成手段を具備する構成とされても良い。   According to a third aspect of the present invention, there is provided a mediating apparatus for zero garbage collection communication according to the present invention, wherein the mediating apparatus further comprises a stub generating means for generating a stub code using the temporary object managing means. It may be configured to have.

このようなスタブコード生成手段を備えることにより、スタブコード(プロキシ、スケルトン、サロゲートとも呼ばれる)を使用して遠隔サービスを実現する仲介装置においては、一時オブジェクト管理手段を用いて、GCが発生することがないコードを生成することで、GCが発生することを抑制する。   By providing such a stub code generation means, in an intermediary device that implements a remote service using a stub code (also called a proxy, skeleton, or surrogate), GC occurs using a temporary object management means. By generating a code that does not have, there is no occurrence of GC.

また、本発明は、第4の態様として、本発明によるゼロガベージコレクション通信のための仲介装置は、この仲介装置において、更に、一時オブジェクトを必要とするリクエスト仲介処理が開始される前に、一時オブジェクトが生成されて、前記一時オブジェクト格納手段内に事前配置されるように構成される。   According to a fourth aspect of the present invention, there is provided an intermediary device for zero garbage collection communication according to the present invention, in which the intermediary device is further configured to temporarily execute a request mediation process that requires a temporary object. An object is generated and configured to be pre-positioned in the temporary object storage means.

これにより、仲介装置においては、一時オブジェクト管理手段が、一時オブジェクト格納手段に一時オブジェクトを事前配置することにより、ランタイムのオブジェクトの配置コストを削減することができるようになる。一時オブジェクト格納手段に一時オブジェクトを事前配置する方法をとることによって、事前、あるいは最初のリクエストの間に、全ての一時オブジェクトが生成・格納されてしまい、それ以降のリクエストにおいて一時オブジェクトの生成はなくなるため、リクエスト仲介処理中のGCは発生しない。   As a result, in the mediation apparatus, the temporary object management means preliminarily arranges the temporary object in the temporary object storage means, so that the runtime object arrangement cost can be reduced. All temporary objects are generated and stored in advance or during the first request by using the method of pre-arranging the temporary objects in the temporary object storage means, and no temporary objects are generated in subsequent requests. Therefore, the GC during the request mediation process does not occur.

また、本発明は、第5の態様として、本発明によるゼロガベージコレクション通信のための仲介装置は、この仲介装置において、同時並行使用数制限手段が、クライアントの数もしくは同時に使用されるセッションの数に基づいて同時並行使用数制限値を決定し、一時オブジェクト格納手段に事前配置する一時オブジェクトの最大数を決定するように構成される。   According to a fifth aspect of the present invention, there is provided an intermediary device for zero garbage collection communication according to the present invention, wherein in the intermediary device, the concurrent concurrent use number limiting means is the number of clients or the number of sessions used simultaneously. The concurrent concurrent use number limit value is determined based on the above, and the maximum number of temporary objects to be pre-arranged in the temporary object storage means is determined.

これにより、仲介装置において、ゼロGC動作するために必要とされる一時オブジェクトの数を、通信相手の数、すなわち、同時に使用するユーザの数や同時に通信する相手の数によって決定することができ、複数のユーザや複数の通信相手のある環境に対応可能となる。ヒープメモリの量としては、1セッションで使用されるメモリ量と同時セッション数との積が最低限必要となる。   Thereby, in the mediation device, the number of temporary objects required for the zero GC operation can be determined by the number of communication partners, that is, the number of users to be used simultaneously and the number of other parties to be simultaneously communicated, It is possible to cope with an environment having a plurality of users and a plurality of communication partners. As the amount of heap memory, the product of the amount of memory used in one session and the number of simultaneous sessions is required at a minimum.

また、本発明は、第6の態様として、本発明によるゼロガベージコレクション通信のための仲介装置は、この仲介装置において、リクエスト種類制限手段により制限するリクエストの種類の制限値と、転送データ数制限手段により制限するリクエストによって転送されるデータ及びオブジェクトの種類及び個数の制限値と、同時並行使用数制限手段により制限するリクエストの同時並行使用数の制限値と、前記一時オブジェクト格納手段に事前配置する一時オブジェクトの種類及び個数との制限値のパラメータは、ソースコード、インターフェース定義、サービス定義、プログラムメタ情報、コマンド行のオプション指定、設定画面、設定ファイル、コンパイルされたプログラムの中の少なくとも一つを解析することによって得るように構成される。   According to a sixth aspect of the present invention, there is provided an intermediary device for zero garbage collection communication according to the present invention, wherein in the intermediary device, a request type limit value limited by a request type limiter and a transfer data number limit The limit value of the type and number of data and objects transferred by the request limited by the means, the limit value of the simultaneous and parallel use number of the request limited by the simultaneous and parallel use number limiting means, and the temporary object storage means are arranged in advance. The limit parameter for the type and number of temporary objects must be at least one of source code, interface definition, service definition, program meta information, command line option specification, setting screen, setting file, and compiled program. Configure to get by parsing It is.

このような構成により、使用される一時オブジェクトについての情報により、それぞれの制限手段における各制限値を決定することができ、更に、一時オブジェクト格納手段にどの型のオブジェクトをどれだけの数だけ事前配置するかを決定することができる。使用される一時オブジェクトについての情報は、ソースコード、インターフェース定義、サービス定義、プログラムメタ情報、コマンド行のオプション指定、設定画面、設定ファイルもしくはコンパイルされたプログラムを開発時あるいは実行初期に解析することにより得られる。リクエストが送られるサーバ・オブジェクト、リクエストが受け渡しするパラメータで使用する一時オブジェクト、仲介装置内で使用する一時オブジェクトの型と数に関する情報が得られる。   With such a configuration, it is possible to determine each limit value in each limiting means based on information about the temporary object to be used, and to pre-position how many types of objects in the temporary object storage means You can decide what to do. Information about temporary objects used is obtained by analyzing source code, interface definition, service definition, program meta information, command line option specification, setting screen, setting file or compiled program at the time of development or early execution. can get. Information about the server object to which the request is sent, the temporary object used in the parameters passed by the request, and the type and number of the temporary objects used in the mediation apparatus are obtained.

また、本発明は、第7の態様として、本発明によるゼロガベージコレクション通信のための仲介装置は、この仲介装置において、一時オブジェクト管理手段は、ある一時オブジェクトが不変オブジェクトであった場合に、その一時オブジェクトを可変オブジェクトに置き換えるように構成される。このような構成により、本発明による仲介装置は、不変オブジェクトの代わりとなる可変オブジェクトを提供して、当該可変オブジェクトを再利用できるようにする。   According to a seventh aspect of the present invention, there is provided a mediating apparatus for zero garbage collection communication according to the present invention, wherein in the mediating apparatus, the temporary object management means is configured such that when a temporary object is an immutable object, Configured to replace temporary objects with variable objects. With such a configuration, the intermediary device according to the present invention provides a variable object in place of an immutable object so that the variable object can be reused.

オブジェクト指向プログラミング言語ではオブジェクトの可変性について2種類の分類がある。ひとつは一度設定したフィールドの内容を変更可能な可変(mutable)オブジェクト、もう一つは一度設定したフィールドの内容を変更不可能な不変(immutable)オブジェクトである。Javaの不変オブジェクトの例としてはStringオブジェクトやIntegerオブジェクトがある。Stringオブジェクトの可変版としてStringBufferオブジェクトが提供されている。不変オブジェクトは状態が変更できない為、再利用不可能である。このため、仲介装置を設計する際にゼロGCにするならば、不変オブジェクトを使用しないことが有効である。   There are two types of object variability in object-oriented programming languages. One is a variable object that can change the contents of the field once set, and the other is an immutable object that cannot change the contents of the field once set. Examples of Java invariant objects include a String object and an Integer object. A StringBuffer object is provided as a variable version of the String object. An immutable object cannot be reused because its state cannot be changed. For this reason, it is effective not to use an immutable object if zero GC is used when designing the mediating apparatus.

ところが、アプリケーションがリクエストの引数あるいは返値に不変オブジェクトを指定したため、仲介装置が不変オブジェクトを生成しなければならないことがある。その生成を防ぐため、本発明による仲介装置においては、不変オブジェクトの代わりとなる可変オブジェクトを提供するため、一時オブジェクト管理手段が、ある一時オブジェクトが不変オブジェクトであった場合に、その一時オブジェクトを可変オブジェクトに置き換えるようにして、当該可変オブジェクトを再利用する。   However, since the application specifies an immutable object in the request argument or return value, the mediation device may need to generate an immutable object. In order to prevent the generation, in the mediation apparatus according to the present invention, in order to provide a variable object in place of the immutable object, the temporary object management means can change the temporary object when the temporary object is an immutable object. The variable object is reused by replacing it with an object.

また、本発明は、第8の態様として、本発明によるゼロガベージコレクション通信のための仲介装置は、更に、ガベージコレクション抑制処理を行うモードと、ガベージコレクション抑制処理を行なわないモードを切り替える動作モード切替手段が備えられ、動作モード切替手段が、それぞれの動作モードに応じて一時オブジェクト管理手段の使用・不使用と、リクエスト種類制限値設定手段に設定する制限値と、転送データ数制限値設定手段に設定する制限値と、同時並行使用数制限値設定手段に設定する制限値の各設定値を設定するように構成される。   In addition, as an eighth aspect of the present invention, the intermediary device for zero garbage collection communication according to the present invention further switches an operation mode switching between a mode in which garbage collection suppression processing is performed and a mode in which garbage collection suppression processing is not performed. Means for operating mode switching means for use / non-use of temporary object management means, limit value set in request type limit value setting means, and transfer data number limit value setting means in accordance with each operation mode. It is configured to set each set value of the limit value to be set and the limit value to be set in the simultaneous and parallel use number limit value setting means.

このような構成により、本発明による仲介装置は、動作モード切替手段によって、ガベージコレクション抑制処理を行うモードと、ガベージコレクション抑制処理を行なわないモードを切り替えることができる。アプリケーションによっては、同一アプリケーション内でゼロGC処理を行わない通信を行う必要がある場合があり、ひとつのアプリケーションがゼロGC通信仲介装置と通常の仲介装置の両方を備えることは無駄が多い。そのために、ゼロGC通信仲介装置はゼロGC通信を行うモードと、ゼロGC処理を行わないモードを切り替えて、アプリケーションに適切な動作モードを選択できるようにする。   With such a configuration, the intermediary device according to the present invention can switch between the mode in which the garbage collection suppression process is performed and the mode in which the garbage collection suppression process is not performed, by the operation mode switching unit. Depending on the application, it may be necessary to perform communication without performing zero GC processing within the same application, and it is wasteful that one application includes both the zero GC communication mediating apparatus and the normal mediating apparatus. For this purpose, the zero GC communication mediating apparatus switches between a mode in which zero GC communication is performed and a mode in which zero GC processing is not performed, so that an operation mode suitable for an application can be selected.

ところで、本発明による仲介装置においては、リクエストの種類を限定するなどいくつかの制限手段を設けて、例えば、通信の仲介処理においてGCが発生しないことを保証するが、アプリケーションによっては、全ての制限手段により制限を課すとシステムが実現できないようになる場合がある。このため、必要に応じて、3つの制限手段の全てではなく、1つまたは2つの制限手段を利用するだけとして、より広い範囲の応用をカバーできるようにする。   By the way, in the mediating apparatus according to the present invention, some limiting means such as limiting the type of request is provided, and for example, it is ensured that no GC occurs in the mediation processing of communication. If restrictions are imposed by means, the system may not be realized. For this reason, a wider range of applications can be covered by using only one or two restricting means instead of all three restricting means as required.

したがって、本発明は、第9の態様として、本発明によるゼロガベージコレクション通信のための仲介装置が、ガベージコレクション機能を備えるオブジェクト指向プログラミング言語によって実装されるコンピュータ間の遠隔リクエストの仲介処理をガベージコレクションを抑制して行う仲介装置であって、前記仲介処理のために使われたオブジェクトのうち使用済みの一時オブジェクトを保持する一時オブジェクト格納手段と、前記使用済みの一時オブジェクトを再利用のために初期化する一時オブジェクト管理手段と、前記仲介処理で受け付けるリクエストを制限するリクエスト制限手段とを備え、前記リクエスト制限手段は、リクエストの種類を制限するリクエスト種類制限手段、リクエストによって転送されるデータ及びオブジェクトの種類及び個数を制限する転送データ数制限手段、またはリクエストの同時並行使用数を制限する同時並行使用数制限手段のいずれかであるように構成する。このような構成により、より広い範囲のアプリケーションをカバーするができる。   Accordingly, as a ninth aspect of the present invention, the mediation apparatus for zero garbage collection communication according to the present invention is configured to perform the mediation processing of remote requests between computers implemented by an object-oriented programming language having a garbage collection function. A temporary object storage means for holding a used temporary object among the objects used for the brokering process, and an initial for reuse of the used temporary object. A temporary object managing means for converting the request, and a request restricting means for restricting a request accepted in the mediation process. The request restricting means includes a request type restricting means for restricting a request type, a data and an object transferred by the request. Transfer data speed limiting means for limiting the of Type and number, or be configured to be either concurrent use number limiting means for limiting the concurrent use number of requests. With such a configuration, a wider range of applications can be covered.

また、本発明は、第10の態様として、本発明によるゼロガベージコレクション通信のための仲介装置が、ガベージコレクション機能を備えるオブジェクト指向プログラミング言語によって実装されるコンピュータ間の遠隔リクエストの仲介処理をガベージコレクションを抑制して行う仲介装置であって、前記仲介処理のために使われたオブジェクトのうち使用済みの一時オブジェクトを保持する一時オブジェクト格納手段と、前記使用済みの一時オブジェクトを再利用のために初期化する一時オブジェクト管理手段と、前記仲介処理で受け付けるリクエストを制限するリクエスト制限手段とを備え、前記リクエスト制限手段は、リクエストの種類を制限するリクエスト種類制限手段、リクエストによって転送されるデータ及びオブジェクトの種類及び個数を制限する転送データ数制限手段、またはリクエストの同時並行使用数を制限する同時並行使用数制限手段のいずれか2つであるように構成する。このような構成により、より広い範囲のアプリケーションをカバーするができる。   According to the tenth aspect of the present invention, as a tenth aspect, the intermediary device for zero garbage collection communication according to the present invention performs the intermediary processing of remote requests between computers implemented by an object-oriented programming language having a garbage collection function. A temporary object storage means for holding a used temporary object among the objects used for the brokering process, and an initial for reuse of the used temporary object. A temporary object management means for converting the request, and a request restriction means for restricting a request accepted in the mediation process, wherein the request restriction means includes a request type restriction means for restricting a request type, data and an object transferred by the request Transfer data speed limiting means limits the type and number, or be configured to be two or concurrent use number limiting means for limiting the concurrent use number of requests. With such a configuration, a wider range of applications can be covered.

本発明は、第11の態様として、本発明によるゼロガベージコレクション通信のための仲介装置が、当該仲介装置におけるメモリ使用量を適切に管理できるように、メモリ割り当て方法が提供される。このための本発明によるメモリ割り当て方法は、ガベージコレクション機能を備えるオブジェクト指向プログラミング言語によって実装されるコンピュータ間の遠隔リクエストの仲介処理をガベージコレクションを抑制して行う仲介装置におけるメモリの割り当て方法であって、前記仲介装置が備えるべき最大のヒープメモリ量は、仲介装置自身が初期状態で必要とするメモリ量に加えて、1のリクエストにおいて引数及び返値として転送されるデータの最大メモリ量をリクエスト種類制限値に含まれるリクエストの種類毎に足し合わせたメモリの量にセッション毎に仲介装置自身が必要とするメモリの量を加えた量に、同時並行使用数の制限値をかけ算して得られるメモリ量を割り当てる。   As an eleventh aspect of the present invention, there is provided a memory allocation method so that the mediation device for zero garbage collection communication according to the present invention can appropriately manage the memory usage in the mediation device. A memory allocation method according to the present invention for this purpose is a memory allocation method in an intermediary device that performs intermediary processing of remote requests between computers implemented by an object-oriented programming language having a garbage collection function while suppressing garbage collection. The maximum heap memory amount that the intermediary device should have is the maximum memory amount of data transferred as an argument and return value in one request in addition to the memory amount that the intermediary device itself needs in the initial state. Memory obtained by multiplying the amount of memory added for each type of request included in the limit value by the amount of memory required by the mediation device itself for each session, and the limit value for the number of concurrent concurrent use Assign an amount.

これにより、本発明による仲介装置に備えるべき最大のヒープメモリ量は計算式により求めることができ、仲介装置におけるメモリ使用量を適切に管理できるようになる。本発明による仲介装置は、実装にソフトウェアを用いるだけではなく、ハードウェアにより実装されてもよい。   As a result, the maximum heap memory amount to be provided in the mediation device according to the present invention can be obtained by the calculation formula, and the memory usage in the mediation device can be appropriately managed. The mediation apparatus according to the present invention may be implemented not only by software but also by hardware.

本発明の仲介装置によれば、メモリ不足時に動作が開始されるガベージコレクションの発生を抑制して、ネットワーク上の複数のコンピュータ間で動作する分散リアルタイム・アプリケーション構築に利用される通信ミドルウェア、プログラミング言語、オペレーティングシステムの処理におけるリアルタイム性を向上させることができる。   According to the mediating apparatus of the present invention, communication middleware and programming language used for building a distributed real-time application that operates between a plurality of computers on a network by suppressing the occurrence of garbage collection that starts when a memory shortage occurs. The real-time property in the processing of the operating system can be improved.

以下に、本発明の具体的な実施の形態を図を用いて説明する。理解を容易なものとするため説明には、Java(登録商標)プログラミング言語を用いる。しかし、本発明による仲介装置は、C#言語等GCを備える他のオブジェクト指向プログラミング言語にも適用可能である。   Hereinafter, specific embodiments of the present invention will be described with reference to the drawings. In order to facilitate understanding, Java (registered trademark) programming language is used for the description. However, the mediation apparatus according to the present invention can be applied to other object-oriented programming languages including GC such as C # language.

本発明は、主に、通信の中断を避けなければならない分散リアルタイム・アプリケーション、通信の中断が望ましくない非リアルタイムの分散アプリケーション、処理速度や応答速度の向上のためにGCを避けたい分散アプリケーションにおいて使用されるミドルウェア、通信ライブラリ、言語、もしくはOSに適用される。   The present invention is mainly used in distributed real-time applications where communication interruption must be avoided, non-real-time distributed applications where communication interruption is not desirable, and distributed applications where it is desirable to avoid GC to improve processing speed and response speed. Applied to middleware, communication library, language, or OS.

図1は、本発明によるゼロガベージコレクション通信のための仲介装置の位置付けを説明する図である。分散アプリケーション中の仲介装置の位置づけを示している。図1に示すように、クライアント・コンピュータ110とサーバ・コンピュータ120とが通信媒体130により結合され、この2つのコンピュータの間でデータ通信が行われる。通信は2台あるいはそれ以上の数のコンピュータの間で、あるいは、1台のコンピュータの中の複数の通信要素の間で行われる。通信の情報そのものは通信媒体130を介して伝達される。通信媒体130としては、例えば、複数台のコンピュータの間の通信にはネットワークが利用され、1台のコンピュータの中の複数の通信要素の間の通信にはデータバスなどが利用される。   FIG. 1 is a diagram illustrating the positioning of an intermediary device for zero garbage collection communication according to the present invention. It shows the position of the intermediary device in the distributed application. As shown in FIG. 1, a client computer 110 and a server computer 120 are connected by a communication medium 130, and data communication is performed between the two computers. Communication is performed between two or more computers, or between a plurality of communication elements in one computer. Communication information itself is transmitted via the communication medium 130. As the communication medium 130, for example, a network is used for communication between a plurality of computers, and a data bus is used for communication between a plurality of communication elements in one computer.

ここでは説明のために、2台のコンピュータを便宜的にリクエストを発行する側のクライアント・コンピュータ110とリクエストを受け付けサービスする側のサーバ・コンピュータ120に分ける。アプリケーションは、クライアント側で動作するアプリケーション(クライアント・プログラム)111とサーバ側で動作するアプリケーション(サーバ・プログラム)121から構成される。アプリケーションの中で行う通信処理は、クライアント側仲介装置112とサーバ側仲介装置122によって仲介される。例えば、CORBAにおいては、クライアント側仲介装置112は、クライアント側スタブおよびクライアント側通信ランタイム、サーバ側仲介装置122は、サーバ側スタブおよびサーバ側ランタイムから構成され、アプリケーション(クライアント・プログラム)111には、サーバ側スタブを呼び出すアプリケーションが、アプリケーション(サーバ・プログラム)121にはサービスを実行するサーバ・オブジェクトが含まれる。Webサービスでもビデオサーバでも同様の構成をとる。   Here, for the sake of explanation, the two computers are divided into a client computer 110 that issues a request and a server computer 120 that receives and services a request for convenience. The application includes an application (client program) 111 operating on the client side and an application (server program) 121 operating on the server side. Communication processing performed in the application is mediated by the client-side mediating device 112 and the server-side mediating device 122. For example, in CORBA, the client-side mediating device 112 is composed of a client-side stub and a client-side communication runtime, the server-side mediating device 122 is composed of a server-side stub and a server-side runtime, and the application (client program) 111 includes An application that calls a server-side stub, and an application (server program) 121 includes a server object that executes a service. A Web service and a video server have the same configuration.

図2は、本発明によるゼロガベージコレクション通信のための仲介装置のシステム構成を説明する図である。ゼロGC通信仲介装置を搭載するひとつのコンピュータ上での構成例を示している。図2において、200はサーバ側またはクライアント側の1つのコンピュータを示しており、220はゼロGC通信仲介装置230によって使用される言語ランタイムである。   FIG. 2 is a diagram for explaining the system configuration of an intermediary device for zero garbage collection communication according to the present invention. The example of a structure on one computer carrying the zero GC communication mediation apparatus is shown. In FIG. 2, reference numeral 200 denotes one computer on the server side or client side, and 220 is a language runtime used by the zero GC communication mediating apparatus 230.

言語ランタイム220の例としては、「Java仮想マシン」、「.NET CLR」、「GNU Monoランタイム」などが挙げられる。中間コード実行方式、コンパイル時ネイティブコード変換方式、実行時ネイティブコード変換方式を問わない。言語ランタイム220は、ガベージコレクタ222を含んでおり、ソフトウェアまたはハードウェアで実装される。ソフトウェアで実装される場合はOSにより実行され、またはハードウェア上でのメモリ管理システムの中で実行される。アプリケーション250の実行において、その間、言語ランタイム220は、新しいオブジェクトをヒープメモリ212上に生成する。ガーベッジコレクタ222は、言語ランタイム220の裁量においてメモリの回収作業(ゴミ回収)を行う。   Examples of the language runtime 220 include “Java virtual machine”, “.NET CLR”, “GNU Mono runtime”, and the like. The intermediate code execution method, the compile-time native code conversion method, and the runtime native code conversion method may be used. The language runtime 220 includes a garbage collector 222 and is implemented in software or hardware. When implemented in software, it is executed by the OS or in a memory management system on hardware. During the execution of application 250, during that time, language runtime 220 creates a new object on heap memory 212. The garbage collector 222 performs a memory collection operation (trash collection) at the discretion of the language runtime 220.

ゼロGC通信仲介装置230は、アプリケーション250の処理における通信中のGCの発生を抑制するため、少なくとも一つの一時オブジェクト格納手段232と、少なくとも一つの一時オブジェクト管理手段234を備える。これらは、複数個の一時オブジェクト格納手段232と、複数個の一時オブジェクト管理手段234が備えられる構成であっても良い。   The zero GC communication mediating apparatus 230 includes at least one temporary object storage unit 232 and at least one temporary object management unit 234 in order to suppress the occurrence of GC during communication in the processing of the application 250. These may be configured to include a plurality of temporary object storage means 232 and a plurality of temporary object management means 234.

一時オブジェクト格納手段232は、一時オブジェクトが毎回生成されることを避けるため、ゼロGC通信仲介装置230の実行において必要とされる一時オブジェクトを保持する。一時オブジェクト格納手段232の実装としては、オブジェクトが保持できればよいので、特に制限はなく、コレクションクラス、コンテナクラス、ハッシュテーブル、シングルトンオブジェクト・パターン、キャッシュ、配列、プール、インラインキャッシュ、オブジェクト中のフィールドでの保持といった手段が利用できる。   The temporary object storage unit 232 holds a temporary object that is required in the execution of the zero GC communication mediating apparatus 230 in order to avoid generation of a temporary object every time. The temporary object storage means 232 is implemented as long as the object can be held, and is not particularly limited. The collection class, the container class, the hash table, the singleton object pattern, the cache, the array, the pool, the inline cache, and the field in the object are used. Means such as holding can be used.

一時オブジェクト管理手段234は、一時オブジェクト格納手段232で格納される一時オブジェクトの管理を行う。一時オブジェクトの管理処理においては、仲介処理において一時オブジェクトが必要になった際に、一時オブジェクト格納手段232を検索して利用可能な一時オブジェクトを見つけ出す作業、それを再初期化して再利用に供する作業、新規の一時オブジェクトを生成する作業、使用後に不要となった一時オブジェクトを一時オブジェクト格納手段232に戻す作業を行う。   The temporary object management unit 234 manages the temporary object stored in the temporary object storage unit 232. In the temporary object management process, when a temporary object is required in the mediation process, the temporary object storage means 232 is searched to find a usable temporary object, and the work is reinitialized to be reused. The work of generating a new temporary object and the work of returning the temporary object which becomes unnecessary after use to the temporary object storage means 232 are performed.

一時オブジェクト管理手段234の実装方法としては、この作業を専用に行うオブジェクトやコンポーネントを設ける方法、仲介装置内にインラインで直接処理を記述する方法、一時オブジェクト格納手段232と一体化させる方法(例えば、キャッシュは検索機能や格納機能を備える)が利用できる。なお、使用中の一時オブジェクトは必ずしも一時オブジェクト管理手段234から外される必要はなく、他の使用者と競合が起きなければ一時オブジェクト管理手段234に格納されたままになっていてもよい。   As a method of mounting the temporary object management means 234, a method of providing an object or a component dedicated to this work, a method of describing processing directly inline in the mediating apparatus, a method of integrating with the temporary object storage means 232 (for example, The cache has a search function and a storage function). Note that the temporary object in use does not necessarily need to be removed from the temporary object management unit 234 and may be stored in the temporary object management unit 234 as long as there is no conflict with other users.

一時オブジェクト管理手段234と一時オブジェクト格納手段232の数と対応付けは実装の都合により任意の組み合わせが可能である。これら一時オブジェクト格納手段232と一時オブジェクト管理手段234は、仲介装置だけではなく、仲介装置を使用するアプリケーションに対しても一時オブジェクト再利用の機能を提供し、アプリケーション全体でGCを抑制するようにできる。   The number and association of the temporary object management means 234 and the temporary object storage means 232 can be arbitrarily combined depending on the mounting convenience. These temporary object storage means 232 and temporary object management means 234 can provide a temporary object reuse function not only for an intermediary apparatus but also for an application that uses the intermediary apparatus, and can suppress GC throughout the application. .

ゼロGC通信仲介装置230は、図2に示すようなシステム構成では、ミドルウェアとしての実施形態を取り、言語ランタイム220とアプリケーション250の中間層で動作する。本発明の実施の形態はミドルウェアとしての実施とは限らないため、別の場合には、言語機能の一部として言語ランタイム220内に組み込まれたり、OS機能の一部に組み込まれたりして実施される。   In the system configuration as shown in FIG. 2, the zero GC communication mediating apparatus 230 takes an embodiment as middleware, and operates in an intermediate layer between the language runtime 220 and the application 250. Since the embodiment of the present invention is not necessarily implemented as middleware, in another case, it is incorporated into the language runtime 220 as a part of the language function, or incorporated into a part of the OS function. Is done.

Webサービスの場合はXMLのパースを行い、パース結果を表すオブジェクトツリーを構築する。ツリー内の各要素オブジェクトも一時オブジェクト管理手段を用いて再利用する。   In the case of a Web service, XML parsing is performed and an object tree representing the parsing result is constructed. Each element object in the tree is also reused using the temporary object management means.

ゼロGC通信仲介装置230には、リクエスト種類制限手段236、転送データ数制限手段237、同時並行使用数制限手段238が設けられる。これらのリクエスト種類制限手段236、転送データ数制限手段237、同時並行使用数制限手段238は、それぞれに、リクエストの種類、リクエストによって転送されるデータ及びオブジェクトの種類と数、同時並行セッションの使用数が、想定した範囲内に入っているように制限する制限手段である。設定した各制限値と実際の使用数との比較によって仲介するリクエストを制限する。リクエストの種類の制限値は、リクエスト種類制限値設定手段240により、転送データ数の制限値は、転送データ数制限値設定手段241により、リクエストの同時並行使用数の制限値は、同時並行使用数制限値設定手段242により、それぞれ設定される。制限値の設定は設定ファイル、設定ウィンドウ、あるいは、後述するように、ソースコードの解析等により行われる。   The zero GC communication mediating apparatus 230 is provided with a request type limiting unit 236, a transfer data number limiting unit 237, and a simultaneous and parallel use number limiting unit 238. These request type restriction means 236, transfer data number restriction means 237, and concurrent and parallel use number restriction means 238 respectively include the request type, the type and number of data and objects transferred by the request, and the number of concurrent parallel sessions used. Is a restricting means for restricting to be within an assumed range. Limit the intermediary requests by comparing each set limit value with the actual number of uses. The request type limit value is set by the request type limit value setting means 240, the limit value of the transfer data number is set by the transfer data number limit value setting means 241, and the limit value of the simultaneous and parallel use number of requests is calculated by the simultaneous and parallel use number. Each is set by the limit value setting means 242. The limit value is set by a setting file, a setting window, or analysis of source code as will be described later.

図3は、より好ましい実施の例として、一時オブジェクト格納手段と一時オブジェクト管理手段がガベージコレクション手段と言語ランタイムと協調する様子を説明する図である。ガベージコレクション手段であるガベージコレクタ322が一時オブジェクト格納手段332と一時オブジェクト管理手段334とを提供するか、あるいはガベージコレクタ322が一時オブジェクト格納手段332および一時オブジェクト管理手段334と協調して動作する。これにより、より効率の良いGCの抑制が可能となる。   FIG. 3 is a diagram for explaining how the temporary object storage means and the temporary object management means cooperate with the garbage collection means and the language runtime as a more preferred embodiment. The garbage collector 322, which is a garbage collection means, provides the temporary object storage means 332 and the temporary object management means 334, or the garbage collector 322 operates in cooperation with the temporary object storage means 332 and the temporary object management means 334. Thereby, suppression of GC more efficiently becomes possible.

図3に示されるように、一時オブジェクトの生成の際に、言語ランタイム320が一時オブジェクト管理手段334と協働し、新規の一時オブジェクト生成時に一時オブジェクト格納手段332に格納されたオブジェクトを利用するように動作する。一時オブジェクト生成の際に、言語ランタイム320は新規の一時オブジェクトを生成するのではなく、一時オブジェクト格納手段332を検索し、同じ型のオブジェクトが既に格納されている場合はそれを再利用する。ガベージコレクタ322はヒープメモリ312が逼迫し、GCを行っても、なおヒープメモリが欠乏する場合には、一時オブジェクト格納手段332中の一時オブジェクトのいくつかを選択的に回収することができる。その実装には弱参照(ウィークリファレンス)を用いることができる。   As shown in FIG. 3, the language runtime 320 cooperates with the temporary object management unit 334 when generating a temporary object, and uses the object stored in the temporary object storage unit 332 when generating a new temporary object. To work. When generating a temporary object, the language runtime 320 does not generate a new temporary object, but searches the temporary object storage means 332 and reuses an object of the same type if it is already stored. The garbage collector 322 can selectively recover some of the temporary objects in the temporary object storage means 332 when the heap memory 312 is tight and the heap memory is still insufficient even when GC is performed. A weak reference can be used for the implementation.

次に、図4、図8、図9を用いて、リクエストを発行する側のクライアント・コンピュータ110を例に取り、リクエスト仲介処理の手順について説明する。サーバ側のサーバ・コンピュータ120についても同様である。図4には、サービスへの接続要求を仲介する処理を説明するフローチャートを示しており、図8には、アプリケーション(クライアント・プログラム)の一例を示しており、図9には、サービス要求の仲介処理における一時オブジェクトを管理する処理を示すフローチャートを示している。   Next, the procedure of the request mediation process will be described with reference to FIGS. 4, 8, and 9, taking the client computer 110 on the request issuing side as an example. The same applies to the server computer 120 on the server side. FIG. 4 shows a flowchart for explaining a process for mediating a connection request to a service, FIG. 8 shows an example of an application (client program), and FIG. 9 shows a service request mediation. 3 is a flowchart illustrating processing for managing a temporary object in processing.

クライアント・コンピュータ110において、アプリケーション(クライアント・プログラム)111が、図8に示すプログラムの処理の中で、リクエスト(ステップ901)を発行するとする。ステップ901の処理は、遠隔サービスへの接続であり、この処理の返値としてリファレンスを得る。この処理で、一連の遠隔セッションのためのセッション情報が作成される。次のステップ902およびステップ903の処理により、遠隔サービスをリクエストする。引数を渡すと遠隔サービスが何らかの計算を行い、返値を返す。そして、ステップ904の処理により、セッションを閉じる。   Assume that in the client computer 110, the application (client program) 111 issues a request (step 901) in the processing of the program shown in FIG. The process of step 901 is a connection to a remote service, and a reference is obtained as a return value of this process. In this process, session information for a series of remote sessions is created. The remote service is requested by the processing of the next step 902 and step 903. If an argument is passed, the remote service performs some computation and returns a return value. Then, the session is closed by the processing in step 904.

遠隔サービスへの接続処理(ステップ901)では、図4に示すようなサービスへの接続要求処理400が開始される。サービスへの接続要求処理400が開始されると、この中で、まず、同時並行使用数制限手段238によって同時並行使用数(セッション数)が制限値を越えていないかが確認され(ステップ401)、越えていない場合は同時セッション数を増加させた後(ステップ402)、正常時の処理として、オブジェクトを生成して、オブジェクトの処理として、セッション情報の作成、ユーザ情報の作成、ユーザ認証用暗号データの作成、リファレンス識別子の作成、通信データバッファの作成、通信用コネクションの作成などの一連の作業を行う(数が多いのでいくつかは略す)。この場合に、同型のセッション情報のオブジェクトはあるか否かを判定し(ステップ410)、オブジェクトがある場合は、オブジェクト内部状態の再初期化を行い(ステップ411)、当該オブジェクトを再利用し、また、オブジェクトがない場合には、同型のオブジェクトを生成し、初期化して利用する(ステップ412)。同様の処理を各オブジェクトについて行い(ステップ420〜ステップ422、ステップ430〜ステップ432)、その後、遠隔サービスへの接続を行って(ステップ480)、処理の結果として、呼び出し側へレファレンスを返す処理を行う(ステップ495)。   In the remote service connection process (step 901), a service connection request process 400 as shown in FIG. 4 is started. When the service connection request processing 400 is started, first, the concurrent concurrent usage number limiting means 238 checks whether the concurrent concurrent usage number (number of sessions) exceeds the limit value (step 401). If not, after increasing the number of simultaneous sessions (step 402), an object is generated as normal processing, and session information creation, user information creation, and user authentication encryption data are processed as object processing. , Creation of a reference identifier, creation of a communication data buffer, creation of a connection for communication, etc. (some of them are omitted because there are many). In this case, it is determined whether or not there is an object of the same type of session information (step 410). If there is an object, the internal state of the object is reinitialized (step 411), the object is reused, If there is no object, an object of the same type is generated, initialized and used (step 412). A similar process is performed for each object (step 420 to step 422, step 430 to step 432), and then connection to a remote service is performed (step 480), and a process of returning a reference to the caller as a result of the process. Perform (step 495).

すなわち、このオブジェクトの処理では、図4に示すように、それらのデータや情報をオブジェクトとして作成する際には、一時オブジェクト管理手段に「同型のセッション情報オブジェクトはあるか?」を問い合せ(ステップ410)、一時オブジェクト管理手段は一時オブジェクト格納手段を検索し、あればそれを返す。接続処理は当該セッション情報オブジェクトを再初期化して使用する(ステップ411)。ここで再初期化は、リクエストの内容に合うようにオブジェクトの初期状態を再び作る操作である。一時オブジェクトに再初期化用メソッドを持たせて、それを呼び出すか、リフレクションを用いて状態の設定を行う。同型の一時オブジェクトが一時オブジェクト格納手段になければ、新規にオブジェクトを生成する(ステップ412)。このような処理を、必要な全ての一時オブジェクトに対して繰り返し行う。セッション終了時の処理(図8のステップ904)には、前に使用した一時オブジェクトを一時オブジェクト格納手段に格納する。また、ステップ401の判定処理において、同時セッション数が制限値を越える場合は、仲介装置112は、クライアント・プログラム111に失敗を返す(ステップ490)。   That is, in the processing of this object, as shown in FIG. 4, when creating such data and information as an object, the temporary object management means is inquired of “Is there a session information object of the same type?” (Step 410). ), The temporary object management means searches the temporary object storage means, and returns it if there is. In the connection process, the session information object is reinitialized and used (step 411). Here, the re-initialization is an operation for re-creating the initial state of the object so as to match the content of the request. Give the temporary object a reinitialization method and call it, or set the state using reflection. If there is no temporary object of the same type in the temporary object storage means, a new object is generated (step 412). Such processing is repeated for all necessary temporary objects. In the process at the end of the session (step 904 in FIG. 8), the previously used temporary object is stored in the temporary object storage means. If the number of simultaneous sessions exceeds the limit value in the determination process of step 401, the mediation apparatus 112 returns a failure to the client program 111 (step 490).

ここでの図4のフローチャートによる処理および図8に示すプログラム例は、説明のためにあるひとつの実施例について述べたものであり、本発明を異なる一時オブジェクトの構成を有する仲介装置に適用する場合には、図4の処理では、異なるフローチャートとなる。しかし、通信パターンを限定しつつ一時オブジェクトを再利用することで、GCを抑制するという本発明の本質は変わることがない。   The processing according to the flowchart of FIG. 4 and the example of the program shown in FIG. 8 describe one embodiment for explanation, and the present invention is applied to an intermediary device having a different temporary object configuration. FIG. 4 shows a different flowchart. However, the essence of the present invention of suppressing GC by changing the temporary object while limiting the communication pattern does not change.

図9は、リクエスト発行の処理(ステップ902、ステップ903)の仲介を行う処理を示すフローチャートである。図8のプログラム例のステップ902の処理により、図9のリクエスト仲介処理1000が呼び出される。この仲介処理1000が開始されると、リクエスト種類制限手段236によって呼び出されたリクエストの種別は想定されたもの(制限数を超えないもの)であるか、想定されていないものかを確認する(ステップ1001)。これは、CORBAのように動的にリクエストの種類を拡張可能な仲介装置においては、リクエストの種類が想定外に膨らんで一時オブジェクトの種類が増えすぎないようにするために必要な処理である。なお、予めリクエストのスタブを生成しておくような静的CORBA要求、RMIやHORBのようなシステムでは、コンパイル時にこの制限が行われるため、実行時には不要である(規定されたメソッドの種類をアクセスするスタブしか生成されない)。   FIG. 9 is a flowchart showing a process for mediating the request issuance process (steps 902 and 903). The request mediation process 1000 of FIG. 9 is called by the process of step 902 in the example program of FIG. When the mediation process 1000 is started, it is confirmed whether the type of request called by the request type restriction unit 236 is assumed (not exceeding the limit number) or not assumed (step) 1001). In an intermediary device that can dynamically expand the types of requests, such as CORBA, this is a process necessary to prevent the types of requests from expanding unexpectedly and increasing the types of temporary objects. In addition, static CORBA requests that generate a stub for a request in advance, and systems such as RMI and HORB are not required at the time of execution because they are restricted at the time of compilation (access the specified method type). Only stubs to generate).

次に、同様に転送データ数制限手段237によってリクエストの引数の型や数についても、想定内に収まっているか(制限数を超えないか)を確認する(ステップ1002)。例えば、オブジェクトの配列を引数としてリクエストを行う場合、配列の要素数が想定以上に多いと一時オブジェクトの数が増えすぎてしまうため、それは避けなければならない。引数のオブジェクトの型はポリモーフィズムで多様であり得る。その場合も、あらゆる型を受け入れると一時オブジェクトの数が増えすぎてしまうため、型の種類の数を制限する必要がある。映像配信システムのようにオブジェクトの転送を行わないシステムでは、一部を省略可能である。それらの確認が終了した後、送信用のデータバッファを確保する処理(ステップ1020〜ステップ1022)、受信用データバッファの確保する処理(ステップ1030〜ステップ1032)などを行う。これらの処理についてもオブジェクトを生成し、またはオブジェクトの再利用により処理が実行される。   Next, similarly, the transfer data number limiting means 237 confirms whether the argument type and number of requests are within the assumption (whether the limit number is exceeded) (step 1002). For example, when a request is made using an array of objects as an argument, the number of temporary objects will increase too much if the number of elements in the array is larger than expected, so this must be avoided. The types of argument objects can vary in polymorphism. Again, accepting any type would increase the number of temporary objects, so you need to limit the number of types. In a system that does not transfer objects, such as a video distribution system, a part can be omitted. After the confirmation, processing for securing a data buffer for transmission (step 1020 to step 1022), processing for securing a data buffer for reception (step 1030 to step 1032), and the like are performed. These processes are also executed by generating an object or reusing the object.

これらも一時オブジェクト管理手段と一時オブジェクト格納手段を用いて行うが、実際に必要な一時オブジェクトの種別はシステムによって異なる。このようなオブジェクトによる処理を行い、ステップ1080において遠隔のコンピュータにリクエストを伝達し、その結果を受け取る。返値に対しても一時オブジェクトが発生する場合は、同様に再利用を行い、呼び出したクライアント・プログラムに結果を返す(ステップ1095)。セッション終了時には、先に使用した一時オブジェクトは一時オブジェクト格納手段に格納されなければならない。   These are also performed using temporary object management means and temporary object storage means, but the type of temporary object actually required differs depending on the system. Processing by such an object is performed, and in step 1080, the request is transmitted to the remote computer and the result is received. If a temporary object is generated for the return value, it is reused in the same manner, and the result is returned to the called client program (step 1095). At the end of the session, the previously used temporary object must be stored in the temporary object storage means.

図8のプログラムが初めて実行される際には、図4もしくは図9の処理が実行される中で、一時オブジェクト格納手段中に一時オブジェクトが格納されていない場合は、一時オブジェクトの新規生成が頻繁に発生するが、図8のプログラムが2回目以降に実行される際には、一時オブジェクト格納手段に十分な一時オブジェクトが格納されており、新規生成ではなく再利用の経路が選択されることが多くなる。このように処理が継続されて、分散アプリケーションの処理が進行するにしたがって、一時オブジェクトを新規生成する機会は減り、一時オブジェクトの生成が発生しない安定状態に達する。これがゼロGC状態である。   When the program of FIG. 8 is executed for the first time, while the processing of FIG. 4 or FIG. 9 is executed, if a temporary object is not stored in the temporary object storage means, a new temporary object is frequently generated. However, when the program of FIG. 8 is executed for the second time or later, sufficient temporary objects are stored in the temporary object storage means, and a reuse path is selected instead of new generation. Become more. As the processing continues in this way and the processing of the distributed application progresses, the opportunity to newly generate a temporary object decreases, and a stable state in which generation of a temporary object does not occur is reached. This is the zero GC state.

このようにしてゼロGC状態になると、これで、仲介装置がリクエストを仲介している処理中にGCが発生することはなくなる。ゼロGC通信仲介装置を使用するアプリケーション(クライアント・プログラム)111およびアプリケーション(サーバ・プログラム)121自身の処理においてもオブジェクト生成には気を配り、また、必要に応じて明示的なGC操作を行うことが望ましい。また、メモリ使用量の記録をとって、一定メモリ使用量を超えた場合には報告をし、次回の制限値の設定に役立てることが望ましい。システムが備えるべきヒープメモリ量については後述する。   When the state becomes the zero GC state in this way, no GC is generated during the process in which the mediation device mediates the request. In the processing of the application (client program) 111 and the application (server program) 121 using the zero GC communication mediating apparatus, attention should be paid to object generation, and explicit GC operation should be performed as necessary. Is desirable. It is also desirable to record the memory usage and report if the memory usage exceeds a certain amount, which will be useful for setting the next limit value. The amount of heap memory that the system should have will be described later.

このような構成による仲介装置においては、システムが動作を始めてしばらくの間はメモリ使用量は増加するが、通信が予想されたパターンに達した後ではGCは発生しなくなり、ゼロGC状態となる。したがって、GCに起因する通信遅延は発生しなくなる。このため、従来の技術では不可能であったようなシステム開発が可能になる。例えば、開発効率が高く安全性の高いGCを備えるオブジェクト指向プログラミング言語でリアルタイム性の必要な通信処理を行うアプリケーションを実装することが可能となる。リアルタイムGCや並列GCによる課題解決手法と比較して、本発明による解決手法は普及しているリアルタイムGC・並列GCを備えない言語ランタイム上で実施可能となる利点がある。   In the intermediary device having such a configuration, the memory usage increases for a while after the system starts to operate, but after the communication reaches the expected pattern, no GC is generated and the state becomes a zero GC state. Therefore, no communication delay due to GC occurs. This makes it possible to develop a system that was impossible with conventional technology. For example, it is possible to mount an application that performs communication processing that requires real-time property in an object-oriented programming language that includes a GC with high development efficiency and high safety. Compared with the problem solving method using real-time GC or parallel GC, the solution method according to the present invention has an advantage that it can be implemented on a language runtime that does not have a prevailing real-time GC / parallel GC.

また、非特許文献1のGCレス動作用オブジェクトプーリングライブラリでは、オブジェクトが増えてプールの大きさが不足する場合には、プールをGC可能時間内に拡大する手法をとるが、分散アプリケーションなどのオブジェクト指向プログラミング言語により実装される仲介装置においては、GC可能時間は仲介装置にとって不明の事であるため、その手法では想定内のあらゆる通信パターンに対しゼロGCを保証するという課題に対処することはできない。本発明による仲介装置では、通信には規則性があるという特性を利用して一時オブジェクト生成の機会に制限を課すことにより、このような課題を解決することができるようにしている。   Further, in the object pooling library for GC-less operation of Non-Patent Document 1, when the number of objects increases and the size of the pool is insufficient, a method of expanding the pool within the GC possible time is taken. In an intermediary device implemented in an oriented programming language, the GC possible time is unknown to the intermediary device, so that method cannot cope with the problem of guaranteeing zero GC for any communication pattern that is assumed. . In the mediation apparatus according to the present invention, such a problem can be solved by imposing a limit on the opportunity of generating a temporary object by utilizing the characteristic that communication is regular.

次に、本発明による仲介装置の別の実施例について説明する。前述したように、それぞれの制限手段によって、リクエストを受付できない場合、リクエスト処理の開始を次の時間の範囲内で延期できるように、リクエスト延期手段によってリクエストを延期する構成とする。これにより、リアルタイム性を確保しつつ受付拒否でサービスが利用できない機会を減少させることができるものとなる。リアルタイム性の度合いはアプリケーションによって異なるため、延期可能な時間範囲(タイムウインドウ)を調節可能とすることによって、多様なリアルタイム性に対応することができるようになる。   Next, another embodiment of the mediation apparatus according to the present invention will be described. As described above, when the request cannot be accepted by each restriction unit, the request is suspended by the request deferment unit so that the start of request processing can be deferred within the next time range. As a result, it is possible to reduce the chance that the service cannot be used due to refusal of reception while securing the real-time property. Since the degree of real-time property varies depending on the application, it becomes possible to cope with various real-time properties by making it possible to adjust the time range (time window) that can be postponed.

図14は、リクエストが制限値を越えた場合に行う延期処理を含む仲介処理を説明するフローチャートである。図14を参照して、サービスへの接続要求処理を例にとってリクエスト延期手段による動作を説明する。リクエストの仲介処理の中で、サービスへの接続要求処理1600が開始されると、ある制限手段により制限値を越えていないかが確認される(ステップ1601)。この処理では、同時セッション数を確認している。同時セッション数が制限数を超える場合には、一定時間(タイムウインドウ内で)待って(ステップ1602)、タイムウインドウ内において制限値が満たされたかを判断する(ステップ1603)。満たされなかった場合、即ち、タイムアウトした場合には、失敗を返す(ステップ1606)。タイムウインドウ時間の内に他のセッションが終了することにより、制限値が満たされた場合には後続の処理を行う(ステップ1604、ステップ1605、ステップ1607)。   FIG. 14 is a flowchart for explaining an intermediary process including a postponement process performed when a request exceeds a limit value. With reference to FIG. 14, the operation by the request postponing means will be described taking the connection request processing to the service as an example. In the request mediation process, when the service connection request process 1600 is started, it is confirmed by a certain restricting means whether or not the limit value is exceeded (step 1601). In this process, the number of simultaneous sessions is confirmed. If the number of simultaneous sessions exceeds the limit number, it waits for a certain time (within the time window) (step 1602), and determines whether the limit value is satisfied within the time window (step 1603). If not satisfied, that is, if timed out, a failure is returned (step 1606). If the limit value is satisfied by the termination of another session within the time window time, subsequent processing is performed (steps 1604, 1605, 1607).

このように、リクエスト延期処理を含む仲介処理は、サービスへの接続要求処理においても各リクエストの仲介処理においても使用が可能である。この場合、リクエスト仲介処理の前段階で延期を行う形態と、それぞれ一時オブジェクト毎に待ち行列を設けて延期を行う形態により、リクエスト延期処理を行うことができる。タイムウインドウ値の設定はアプリケーションまたは仲介装置が必要とするリアルタイム性に応じて事前に行う。   As described above, the mediation processing including the request deferral processing can be used both in the service connection request processing and in the mediation processing of each request. In this case, the request deferral process can be performed by a form in which the postponement is performed before the request mediation process and a form in which a queue is provided for each temporary object. The time window value is set in advance according to the real-time property required by the application or the mediation device.

このようにして、リクエスト仲介処理を行う際に、制限手段によってリクエストを受付できない場合においては、リクエスト処理の開始をアプリケーションが必要とするリアルタイム性を満たす時間の範囲内で延期することにより、アプリケーション毎に必要なリアルタイム性を確保しつつ受付拒否でサービスが利用できない機会を減少させることができる。   In this way, when request intermediation processing is performed, if the request cannot be received by the restriction means, the start of request processing is postponed within the time range that satisfies the real-time property required by the application. It is possible to reduce the chance that the service cannot be used due to the rejection of the reception while ensuring the real-time property necessary for the service.

次に、図13は、本発明によるゼロガベージコレクション通信のための仲介装置の別の実施例を説明する図であり、分散アプリケーション中の仲介装置の位置づけを示している。この実施例の仲介装置は、一時オブジェクト管理手段を使用するスタブコード(プロキシ、スケルトン、サロゲートとも呼ばれる)を生成するスタブ生成手段を具備する構成である。図13において、スタブコード生成手段は、クライアント側で実行されサーバ・オブジェクトのAPIをマーシャリングする役割のクライアント側スタブコード1512と、サーバ側で実行され通信内容をアンマーシャリングしサーバ・オブジェクトを呼び出す役割のサーバ側スタブコード1522を生成する。   Next, FIG. 13 is a diagram for explaining another embodiment of an intermediary device for zero garbage collection communication according to the present invention, and shows the position of the intermediary device in a distributed application. The mediating apparatus of this embodiment is configured to include stub generation means for generating stub code (also called proxy, skeleton, surrogate) that uses temporary object management means. In FIG. 13, the stub code generation means is a client-side stub code 1512 that is executed on the client side and marshalls the API of the server object, and a server-side stub code 1512 that is executed on the server side to unmarshall communication contents and call the server object Server side stub code 1522 is generated.

スタブコード生成に際して、スタブコード内で一時オブジェクトを生成する従来の方式ではなく、一時オブジェクト管理手段を用いて一時オブジェクトを再利用し、GCが発生することがないコードを生成することにより、通信の中断を防止する。生成されたそれぞれのスタブコード(1512、1522)は、それぞれクライアント側仲介装置1513及びサーバ側仲介装置1523を呼び出して通信を行う。スタブコードはクライアントとサーバの両方に存在する場合も一方のみの場合もあるし、開発時に生成する形態と実行時に動的に生成する形態がある。   When generating a stub code, instead of the conventional method of generating a temporary object in the stub code, the temporary object is reused by using the temporary object management means, and a code that does not generate GC is generated. Prevent interruption. Each of the generated stub codes (1512, 1522) calls the client-side mediating device 1513 and the server-side mediating device 1523 to perform communication. The stub code may exist in both the client and the server or only one of them, and there are a form that is generated during development and a form that is dynamically generated during execution.

図5および図6のフローチャートを参照して、本発明による仲介装置の別の実施例について説明する。アプリケーションの処理が開始されて、続いて、仲介装置の初期化が開始されると(ステップ501)、予め想定される範囲内の数の一時オブジェクトを事前に生成して一時オブジェクト管理手段に格納する(ステップ502)。その際に、もし、割り当てられたヒープメモリの量が不足することが判明した場合(ステップ503)には、アプリケーションに異常を報告し(ステップ505)、早い段階において対策を施すことができるようにする。十分な量のヒープメモリ量がある場合には、正常に仲介装置の初期化が終了する(ステップ504)。続いて、図6に示すサービスへの接続要求処理(ステップ510)を開始する。   With reference to the flowcharts of FIGS. 5 and 6, another embodiment of the mediation apparatus according to the present invention will be described. When the processing of the application is started and then the initialization of the mediation apparatus is started (step 501), a number of temporary objects within a range assumed in advance are generated and stored in the temporary object management means. (Step 502). At that time, if it is found that the amount of allocated heap memory is insufficient (step 503), an abnormality is reported to the application (step 505) so that measures can be taken at an early stage. To do. If there is a sufficient amount of heap memory, initialization of the mediation device is normally completed (step 504). Subsequently, a service connection request process (step 510) shown in FIG. 6 is started.

図5に示すような処理を行った後に、図6に示すサービスへの接続要求やサービスへの仲介処理を行う段階では、前述したように、同時セッション数が制限数を超えない場合に、同時セッション数を増加し、処理を実行する(ステップ511〜ステップ516)。通常では、図4および図9により説明したように一時オブジェクトは必要に応じて新規生成されるが、この場合において、必要な一時オブジェクトは既に一時オブジェクト格納手段に存在しているため、図6に示すサービスへの接続要求処理510が開始されても、ここでのセッション情報オブジェクトを取得し再利用すること(ステップ513),ユーザ情報オブジェクトを取得し再利用すること(ステップ514),データバッファオブジェクトを取得し再利用すること(ステップ515)等の処理は、一時オブジェクト格納手段に格納されているオブジェクトが再利用されて処理が進められ、新規な一時オブジェクトは生成することなく、処理が行われる。これにより、GCが発生することが抑制され、更には、GCが発生しないことが保証される。   After performing the processing as shown in FIG. 5, at the stage of performing the connection request to the service and the mediation processing to the service shown in FIG. 6, as described above, if the number of simultaneous sessions does not exceed the limit number, The number of sessions is increased and processing is executed (steps 511 to 516). Normally, as described with reference to FIGS. 4 and 9, a temporary object is newly created as necessary. In this case, since the necessary temporary object already exists in the temporary object storage means, FIG. Even when the connection request processing 510 to the indicated service is started, the session information object here is acquired and reused (step 513), the user information object is acquired and reused (step 514), and the data buffer object Is acquired and reused (step 515), etc., the object stored in the temporary object storage means is reused and the process proceeds, and the process is performed without generating a new temporary object. . Thereby, generation | occurrence | production of GC is suppressed and it is further ensured that GC does not generate | occur | produce.

このように、システムを起動した時に一時オブジェクトを生成して、事前に一時オブジェクト格納手段に格納しておくことで、実行時はそれらを生成する必要がなくなり、実行時の速度が改善する効果があるものとなる。   In this way, by generating temporary objects when the system is started and storing them in the temporary object storage means in advance, there is no need to generate them at runtime, which has the effect of improving the speed at runtime. There will be something.

従来技術の非特許文献1のGCレス動作用オブジェクトプーリングライブラリでは、事前にオブジェクト生成を行いオブジェクト・プールに格納する手段を持たないため、実行時にヒープメモリが欠乏する事態が発生する場合がある。ヒープメモリを拡張することはできるが、OSのメモリが足りなくなるとシステムはエラーとならざるを得ない。これに対して、本発明による仲介装置によれば、万一システムに割り当てられたメモリ量が少なすぎるといったミスがあった場合も、実行の初期に発見される効果がある。   Since the object pooling library for GC-less operation of Non-Patent Document 1 of the prior art does not have means for generating objects in advance and storing them in the object pool, there may occur a situation where heap memory is insufficient during execution. Although heap memory can be expanded, if the OS memory runs out, the system must be in error. On the other hand, according to the mediation apparatus according to the present invention, there is an effect that even if there is a mistake that the amount of memory allocated to the system is too small, it is discovered at the initial stage of execution.

次に、本発明による仲介装置における制限手段の制限値を設定する処理について説明する。図7は、一時オブジェクトについての情報を得て制限値を決定する処理を説明するフローチャートである。図7に示す処理は、リクエスト仲介処理のサービスを開始する場合に前処理として実行される。この処理の実行により、リクエストの種類の制限値、リクエストによって転送されるデータ及びオブジェクトの種類と数の制限値、リクエストの同時並行使用数の制限値、及び、事前配置すべき一時オブジェクトの種類と数などの制限値のパラメータを得る。   Next, a process for setting the limit value of the limiter in the mediation apparatus according to the present invention will be described. FIG. 7 is a flowchart for explaining processing for obtaining information about a temporary object and determining a limit value. The process shown in FIG. 7 is executed as a preprocess when a request mediation process service is started. By executing this process, the limit value of the request type, the limit value of the type and number of data and objects transferred by the request, the limit value of the number of concurrent concurrent requests, and the type of temporary object to be pre-arranged Get limit value parameters such as number.

開発時において、または、運用開始時において、サービスへの接続要求処理400(図4)およびリクエスト仲介処理1000(図9)の開始前の前処理として、図7に示す処理800を行う。この処理800では、まず、アプリケーションのソースコード・インタフェース定義・サービス定義・プログラムメタ情報・コマンド行のオプション指定、設定画面、設定ファイル・コンパイルされたプログラムのうち一つ以上を解析する(ステップ801)。解析の結果、得られた情報から、リモートでサービスすべきリクエストの種類Rを抽出し(ステップ802)、リクエストによって転送されるデータ及びオブジェクトの種類と数Pを抽出し(ステップ803)、使用ユーザ数や同時セッション数Sを抽出する(ステップ804)。これらにより得られた制限値のパラメータがそれぞれの制限手段に設定される制限値となる(ステップ805)。これらに仲介装置が、各セッションのために内部で使用する一時オブジェクトT1・T2を加味すると、必要となる一時オブジェクトの種類と数が判明する。更に、事前配置(図5のステップ502)すべき一時オブジェクトの最大の範囲と最大メモリ量Mmaxが決定される(ステップ806)。これらの符号の意味は後述する。   At the time of development or at the start of operation, the process 800 shown in FIG. 7 is performed as a pre-process before starting the service connection request process 400 (FIG. 4) and the request mediation process 1000 (FIG. 9). In this process 800, first, one or more of application source code, interface definition, service definition, program meta information, command line option specification, setting screen, setting file, and compiled program are analyzed (step 801). . As a result of the analysis, the type R of the request to be serviced remotely is extracted from the obtained information (step 802), the type and number P of the data and objects transferred by the request are extracted (step 803), and the user is used The number and the number S of simultaneous sessions are extracted (step 804). The parameter of the limit value obtained by these becomes the limit value set in each limiting means (step 805). If the intermediary device takes into account the temporary objects T1 and T2 used internally for each session, the type and number of necessary temporary objects can be determined. Further, the maximum range of the temporary object to be pre-placed (step 502 in FIG. 5) and the maximum memory amount Mmax are determined (step 806). The meaning of these codes will be described later.

このようにして、アプリケーションがどの種類の一時オブジェクトを、どれくらいの数だけ使用するか、そして、何台のクライアントやいくつの通信相手に対して同時にサービスを提供すればよいかを知ることにより、十分なメモリを割り当てることができる。このため、メモリ使用量がシステムに与えられたメモリ割当量を超えてしまい、GCが発生する状態になることを防ぐことができる。   In this way, it is sufficient to know how many types of temporary objects an application uses, how many and how many clients and how many peers it should serve at the same time. Memory can be allocated. For this reason, it is possible to prevent the memory usage amount from exceeding the memory allocation amount given to the system and the occurrence of GC.

さて、アプリケーションが不変オブジェクトを生成した場合、前述したように、不変オブジェクトは状態が変更できないため、このオブジェクトは再利用不可能である。したがって、仲介装置を設計する際にゼロGCシステムとするには、不変オブジェクトを使用しない処理とすることが有効である。   Now, when an application generates an immutable object, as described above, the immutable object cannot change its state, and therefore this object cannot be reused. Therefore, in order to obtain a zero GC system when designing the mediating apparatus, it is effective to use a process that does not use an immutable object.

ところが、アプリケーションによっては、アプリケーションがリクエストの引数あるいは返値に不変オブジェクトを指定したため、仲介装置が不変オブジェクトを生成しなければならないことがある。例えば、図10に示すプログラム例においては、リモートなメソッド1201は、引数として「ImmutableData」(1203)クラスのオブジェクトを取る。   However, depending on the application, since the application specifies an immutable object in the argument or return value of the request, the mediation device may have to generate the immutable object. For example, in the program example shown in FIG. 10, the remote method 1201 takes an object of “ImmutableData” (1203) class as an argument.

このアプリケーションのプログラムの実行において、サーバ側仲介装置122(図1)は、アプリケーション(サーバ・プログラム)121内にあるサーバ・メソッドの実体を呼び出す際に、当該オブジェクトのコピーを引数として渡して処理させなければならない。そのオブジェクトのコピーの作成が新規の一時オブジェクトの生成になる。そのオブジェクトの新規生成を防ぐため、サーバ側仲介装置122は、メソッド1202の実行により、ImmutableData(1203)のサブクラスである可変オブジェクトMutableData(1204)を合成して渡すことにより、この可変オブジェクトは再利用することができる。   When executing the application program, the server-side mediating device 122 (FIG. 1) passes a copy of the object as an argument and processes the server method entity in the application (server program) 121. There must be. Making a copy of the object creates a new temporary object. In order to prevent the new creation of the object, the server-side mediating apparatus 122 reuses the variable object by synthesizing and passing the variable object MutableData (1204), which is a subclass of ImmutableData (1203), by executing the method 1202. can do.

オブジェクト1203が不変オブジェクトであることは、finalフィールドの存在により検出される。オブジェクト1204は、オブジェクト1203のfinalフィールドからfinalを除去したバージョンであり、開発時あるいは実行時に合成される。これは、メソッド1202にあるように、返値が不変オブジェクトである場合も同様である。finalクラスであるString型のように互換性のあるサブクラスが合成できない場合は、アプリケーション開発者はStringBuffer型のような可変オブジェクトを使用するよう要請される場合がある。   That the object 1203 is an immutable object is detected by the presence of the final field. An object 1204 is a version obtained by removing final from the final field of the object 1203, and is synthesized at the time of development or execution. The same applies to the case where the return value is an immutable object as in the method 1202. If a compatible subclass cannot be synthesized, such as the String class, which is the final class, the application developer may be required to use a variable object such as the StringBuffer type.

また、基本型(例えばint)がオブジェクトではない言語では、基本型はヒープメモリを使用しない。一方で、多くのオブジェクト指向プログラミング言語において、設計の柔軟性のために、基本型をオブジェクトとして扱うことを可能とするラッパーオブジェクト(例えばjava.lang.Integer)を提供している。いくつかの言語では、ラッパーオブジェクトは不変オブジェクトである。リクエスト中でラッパーオブジェクトを転送する必要がある際は、ヒープメモリの使用を避けるために、基本型のラッパーオブジェクトを基本型に置き換える操作を行う。アプリケーション開発者は、リクエストにおいてラッパーオブジェクトではなく、基本型を使用するよう要請される場合がある。   In a language whose basic type (for example, int) is not an object, the basic type does not use heap memory. On the other hand, many object-oriented programming languages provide a wrapper object (for example, Java.lang.Integrer) that makes it possible to handle a basic type as an object for design flexibility. In some languages, wrapper objects are immutable objects. When it is necessary to transfer the wrapper object in the request, in order to avoid the use of heap memory, the operation of replacing the basic type wrapper object with the basic type is performed. Application developers may be required to use basic types rather than wrapper objects in requests.

不変オブジェクトの可変オブジェクトへの置換は、オブジェクトの再使用を可能にし、GCの発生を抑制することに寄与する。   Replacing an immutable object with a variable object enables reuse of the object and contributes to suppressing the occurrence of GC.

また、本発明を利用していない既存の仲介装置のソースコードを読み込んで、一時オブジェクトの検出、一時オブジェクトを再利用するコードへの変換、不変オブジェクトの可変オブジェクトへの変換等、本発明の適用を行う変換システムは有用である。   In addition, the application of the present invention can be applied by reading the source code of an existing intermediary device that does not use the present invention, detecting a temporary object, converting it into a code that reuses a temporary object, converting an immutable object into a variable object, etc A conversion system that performs is useful.

さて、アプリケーションによっては、本発明による仲介装置のように、複数の制限手段によりいくつかの種類のリクエストが制限されて、ゼロGC処理を行う通信と、ゼロGC処理を行わない通信を混在させて使用したいことがある。ゼロGC処理を行うかどうかは、セッション毎、リクエスト毎、通信相手毎、通信内容の重要性により、あるいは仲介装置全体で切り替えることができるように、本発明の仲介装置が構成されてもよい。このような構成により、本発明の仲介装置は、多様なアプリケーション開発の要求に対応できるものとなる。   Now, depending on the application, some types of requests are restricted by a plurality of restricting means as in the intermediary device according to the present invention, and communication that performs zero GC processing and communication that does not perform zero GC processing are mixed. I want to use it. The intermediary device of the present invention may be configured so that whether to perform the zero GC process can be switched for each session, for each request, for each communication partner, the importance of communication contents, or for the entire intermediary device. With such a configuration, the mediation apparatus of the present invention can meet various application development requirements.

図12は、リクエスト仲介処理においてゼロGC処理を行うモードと行わないモードの切り替え処理を説明するフローチャートである。リクエスト仲介処理において、このように動作モードの切り換えを行い、それぞれの動作モードでの仲介処理を行うことができる。この場合には、アプリケーションは、仲介装置が当該リクエスト仲介処理に際してゼロGC処理が必要か否かを示す状態変数を設定しておく。リクエスト仲介処理が始まると、その状態変数を用いてゼロGC処理が必要であるか否かを判定し(ステップ1401)、必要である場合は、前述したようなゼロGC処理付きのモードでリクエスト仲介処理を行う(ステップ1402)。必要でない場合には、ゼロGC処理を行わないモードでのリクエスト仲介処理を行う(ステップ1403)。この、ゼロGC処理を行わないモードでのリクエスト仲介処理は、従来手法によるリクエスト仲介処理である。   FIG. 12 is a flowchart for explaining a switching process between a mode in which zero GC processing is performed and a mode in which zero GC processing is not performed in request mediation processing. In the request mediation process, the operation mode can be switched in this way, and the mediation process in each operation mode can be performed. In this case, the application sets a state variable indicating whether or not the zero GC process is necessary for the request brokering process. When request mediation processing starts, it is determined whether or not zero GC processing is necessary using the state variable (step 1401). If so, request mediation is performed in the mode with zero GC processing as described above. Processing is performed (step 1402). If not necessary, request mediation processing is performed in a mode in which zero GC processing is not performed (step 1403). The request mediation process in the mode in which the zero GC process is not performed is a request mediation process by a conventional method.

このような動作モードの切り換えを可能にする実装は、仲介装置全体でモードの切り替えを行うことが最も簡易な実装であるが、セッション毎に動作モードを切り換えられるようにしてもよい。セッション毎に異なるモードが混在する処理を行う場合は、ゼロGC処理を行わないモードがヒープメモリを消費するため、ヒープメモリをそれぞれのモードに割り当てて、リアルタイムGCや並行GCを使用してヒープメモリの飽和を防ぐことが望ましい。   The implementation that enables switching of the operation mode is the simplest implementation in which the mode switching is performed in the entire intermediary device, but the operation mode may be switched for each session. When performing processing in which different modes are mixed for each session, the mode in which zero GC processing is not performed consumes heap memory. Therefore, heap memory is allocated to each mode, and heap memory is used by using real-time GC or parallel GC. It is desirable to prevent saturation.

本発明による仲介装置においては、ゼロGC通信仲介装置がゼロGC処理を行うモードとゼロGC処理を行わないモードとを切り替えて混在させるモード切替手段を備えることにより、同一アプリケーション内で、ゼロGC処理によりリアルタイム性の高い通信と、(制限手段によって)サービスが拒否さることがない通信とを切り替えて使用することが可能となる。このような構成にすると、ひとつのアプリケーションにおいて、ゼロGC通信仲介装置と通常の仲介装置の両方を備える必要がなくなるため、計算資源や開発コストが軽減される効果がある。   In the mediating apparatus according to the present invention, the zero GC communication mediating apparatus includes a mode switching means that switches between a mode in which the zero GC processing is performed and a mode in which the zero GC processing is not performed, thereby mixing the zero GC processing within the same application. Thus, it is possible to switch between communication with high real-time characteristics and communication with which the service is not rejected (by the limiting means). With such a configuration, it is not necessary to provide both a zero GC communication mediation device and a normal mediation device in a single application, which has the effect of reducing computational resources and development costs.

このように、リクエスト仲介処理において、GCを発生させない方法は、あらゆるリクエストのパターンに対しても永久にゼロGC状態を保つことが可能な方法(ハードゼロGCシステム)であるか、あるいは、アプリケーションによっては、制限手段によりリクエストが制限されるハードな解決手段では制限が強すぎて使用できない場合もあるため、より制限の緩い方法(ソフトゼロGCシステム)とするような構成であってもよい。   As described above, in the request mediation process, the method that does not generate the GC is a method (hard zero GC system) that can maintain the zero GC state forever for any request pattern, or depending on the application. However, a hard solution that restricts requests by the restricting means may be too restrictive and cannot be used. Therefore, a configuration with a less restrictive method (soft zero GC system) may be used.

図11に示すリクエスト仲介処理においては、いくつかの制限手段を外し、引数の型と数のみによって制限する(ステップ1301)ようにしている。このように、リクエストの種類、転送されるオブジェクトの種類、同時セッション数に科せられた制限を緩めることにより、それらの数を制限することができないシステムにおいても、本発明による仲介装置を適用することが可能となる。   In the request mediation process shown in FIG. 11, some limiting means are removed, and the request is limited only by the type and number of arguments (step 1301). As described above, the mediation apparatus according to the present invention can be applied even in a system in which the number of requests cannot be limited by loosening the restrictions imposed on the types of requests, the types of objects to be transferred, and the number of simultaneous sessions. Is possible.

アプリケーションによっては仲介装置がメモリを段々消費しても、アプリケーション自身が適当なタイミングで明示的にGCを行うことにより、リクエスト処理中においてゼロGCを保つことができる場合がある。また、OSにメモリの追加を要求してもよい。そのようなアプリケーションでは、予め想定されている数より多い数のセッションを同時にサービスしたり、動的にメソッドの種類を増やしたり、あるいは、リクエストで転送されるオブジェクトの種類や数を限定しない、という柔軟性を持たせることが可能となる。 Depending on the application, even if the intermediary device consumes memory step by step, the application itself may explicitly perform GC at an appropriate timing, so that zero GC may be maintained during request processing. Further, the OS may be requested to add a memory. In such an application, it is said that it does not service more sessions than expected in advance, dynamically increases the number of methods, or does not limit the types and number of objects transferred in the request. It becomes possible to give flexibility.

さて、ここで、ハードゼロGCを実現するために仲介装置に割り当てるべきヒープメモリの量の算出方法について述べる。そのヒープメモリ量とは、即ち、GCが発生しないことを保証するために仲介装置が必要とするメモリ量である。リクエストの種類の集合をR、あるリクエストにおいて引数あるいは返値及び転送されるデータ及びオブジェクトの種類と数の最大値が占めるメモリの量をP、セッション毎に仲介装置自身が必要とするメモリの量をT1、仲介装置自身が初期状態で必要とするメモリの量をT2、同時並行セッション数の最大制限値をSとすると、仲介装置が最低限備えるべきヒープメモリ量Mmaxは図15の式で表される。   Now, a method for calculating the amount of heap memory to be allocated to the mediating device in order to realize the hard zero GC will be described. That heap memory amount is the amount of memory required by the mediation device to ensure that no GC occurs. R is the set of request types, P is the amount of memory occupied by the maximum value of the type and number of arguments and return values and transferred data and objects in a request, and the amount of memory required by the mediation device per session Is T1, the amount of memory required by the mediation device itself in the initial state is T2, and the maximum limit value of the number of concurrent concurrent sessions is S, the heap memory amount Mmax that the mediation device should have at least is expressed by the equation of FIG. Is done.

ヒープメモリの最大量算出式により算出した量のヒープメモリを割り当てておき、第1の態様の仲介装置のような制限手段により制限を課すことにより、ヒープメモリの使用量が割当量を超えないことが保証される。逆に、図15の式を利用すると、割り当てられたヒープメモリ量から許される最大セッション数等を求めることも可能である。   The amount of heap memory used does not exceed the allocated amount by allocating the amount of heap memory calculated by the formula for calculating the maximum amount of heap memory and imposing a limit by the limiting means such as the mediation device of the first aspect. Is guaranteed. Conversely, by using the formula of FIG. 15, it is possible to obtain the maximum number of sessions allowed from the allocated heap memory amount.

しかし、ヒープメモリの最大量を使用するのは全てのクライアントが全てのリクエストを同時に発行した極大負荷状態のみである。多くのシステムでは極大負荷状態に至ることは少ないため、ヒープメモリの最大量を備える必要はない場合もある。ハードゼロGCをより強く保証するため最大ヒープメモリ量に近いメモリを備えることと、ハードゼロGCの破れを許容してヒープメモリ量を削減することはトレードオフ関係にある。システムに適合するトレードオフ関係を把握し、仕様上十分なハードゼロGC保証度に合わせた適切なヒープメモリ量を与えることもひとつの好ましい実施例である。   However, the maximum amount of heap memory is used only under extreme load conditions where all clients issue all requests simultaneously. Many systems are unlikely to reach extreme load conditions, so it may not be necessary to provide the maximum amount of heap memory. There is a trade-off relationship between providing a memory close to the maximum heap memory amount in order to guarantee the hard zero GC more strongly and allowing the hard zero GC to be broken and reducing the heap memory amount. It is also one preferred embodiment to grasp the trade-off relationship suitable for the system and to provide an appropriate amount of heap memory in accordance with the hard zero GC guarantee level sufficient in terms of specifications.

本発明による仲介装置は、またハードウェアを用いて実装することも可能である。ハードウェアで仲介装置を実装する場合、動的に生成・消滅するオブジェクト(ハードウェアとしてはメモリ上の小領域)の効率的な管理をハードウェアでいかに実現するかが重要なポイントとなる。ハードウェア実装のためのコンポーネントおよびアーキテクチャは、図2に示されるシステム構成と同様である。ただし、オブジェクト指向言語を使用するか否かは問わない。昨今のハードウェア・ソフトウェア協調設計ツールの進歩により、一時オブジェクト格納手段や一時オブジェクト管理手段等の本発明の一部あるいは全部をハードウェア記述言語で記述し、ハードウェアに変換することは困難ではない。   The mediation device according to the invention can also be implemented using hardware. When implementing an intermediary device with hardware, an important point is how to efficiently manage objects that are dynamically created and disappeared (as hardware, a small area on a memory) with hardware. Components and architecture for hardware implementation are similar to the system configuration shown in FIG. However, it does not matter whether or not an object-oriented language is used. Due to recent advances in hardware / software co-design tools, it is not difficult to describe part or all of the present invention, such as temporary object storage means and temporary object management means, in a hardware description language and convert it to hardware. .

本発明を適用してメモリ管理を行うことにより、メモリの空き領域を大規模に回収するためのハードウェアを削減することが可能となる。また、メモリ管理のための通信の中断を抑制することが可能となる。   By performing the memory management by applying the present invention, it is possible to reduce the hardware for collecting the free area of the memory on a large scale. It is also possible to suppress communication interruption for memory management.

以上に説明したように、本発明による仲介装置は、GCを備えるプログラミング言語で実装されたリクエスト仲介装置、またはメモリ管理を備えるハードウェアで実装されたリクエスト仲介装置におけるリアルタイム性を大幅に向上させるため、ネットワーク上で通信を行う産業用機器、ロボット、通信デバイス、宇宙機器、自動車等で広く利用可能である。   As described above, the intermediary device according to the present invention greatly improves the real-time property in a request mediation device implemented in a programming language equipped with GC or a request mediation device implemented in hardware equipped with memory management. It can be widely used in industrial equipment, robots, communication devices, space equipment, automobiles, and the like that communicate on a network.

本発明によるゼロガベージコレクション通信のための仲介装置の位置付けを説明する図である。It is a figure explaining the positioning of the mediation apparatus for the zero garbage collection communication by this invention. 本発明によるゼロガベージコレクション通信のための仲介装置のシステム構成を説明する図である。It is a figure explaining the system configuration | structure of the mediation apparatus for the zero garbage collection communication by this invention. 一時オブジェクト格納手段と一時オブジェクト管理手段がガベージコレクション手段と言語ランタイムと協調する様子を表す図である。It is a figure showing a mode that a temporary object storage means and a temporary object management means cooperate with a garbage collection means and a language runtime. サービスへの接続要求を仲介する処理を説明するフローチャートである。It is a flowchart explaining the process which mediates the connection request to a service. 事前配置を伴うシステムにおいて一時オブジェクトの事前配置と再利用を行うステップを説明する第1のフローチャートである。It is a 1st flowchart explaining the step which performs prior arrangement and reuse of a temporary object in a system with prior arrangement. 事前配置を伴うシステムにおいて一時オブジェクトの事前配置と再利用を行うステップを説明する第2のフローチャートである。It is a 2nd flowchart explaining the step which performs prior arrangement and reuse of a temporary object in a system with prior arrangement. 一時オブジェクトについての情報を得て制限値を決定する処理を説明するフローチャートである。It is a flowchart explaining the process which acquires the information about a temporary object and determines a limit value. アプリケーション(クライアント・プログラム)の一例を示す図である。It is a figure which shows an example of an application (client program). サービス要求の仲介処理における一時オブジェクトを管理する処理を示すフローチャートである。It is a flowchart which shows the process which manages the temporary object in the mediation process of a service request. 不変オブジェクトの使用例を説明する図である。It is a figure explaining the usage example of an immutable object. 制限を緩和したリクエスト仲介処理のステップを説明するフローチャートである。It is a flowchart explaining the step of the request mediation process which eased restrictions. リクエスト仲介処理においてゼロGC処理を行うモードと行わないモードの切り替え処理を説明するフローチャートである。It is a flowchart explaining the switching process of the mode which performs zero GC process in the request mediation process, and the mode which is not performed. スタブコードとスタブコード生成手段の位置付けを表した図である。It is a figure showing the positioning of a stub code and a stub code generation means. リクエストが制限値を越えた場合に行う延期処理を含む仲介処理を説明するフローチャートである。It is a flowchart explaining the mediation process including the postponement process performed when a request exceeds a limit value. 使用する最大ヒープメモリ量を算出する式を示す図である。It is a figure which shows the type | formula which calculates the maximum heap memory amount to be used.

符号の説明Explanation of symbols

110 クライアント・コンピュータ
111 アプリケーション(クライアント・プログラム)
112 クライアント側仲介装置
120 サーバ・コンピュータ
121 アプリケーション(サーバ・プログラム)
122 サーバ側仲介装置
130 通信媒体
200 コンピュータ
212 ヒープメモリ
220 言語ランタイム
222 ガベージコレクタ
230 ゼロGC通信仲介装置
232 一時オブジェクト格納手段
234 一時オブジェクト管理手段
235 リクエスト延期手段
236 リクエスト種類制限手段
237 転送データ数制限手段
238 同時並行使用数制限手段
239 動作モード切替手段
240 リクエスト種類制限値設定手段
241 転送データ数制限値設定手段
242 同時並行使用数制限値設定手段
250 アプリケーション
312 ヒープメモリ
320 言語ランタイム
322 ガベージコレクタ
330 ゼロGC通信仲介装置
332 一時オブジェクト格納手段
334 一時オブジェクト管理手段
340 アプリケーション
1510 クライアント・コンピュータ
1511 アプリケーション(クライアント・プログラム)
1512 クライアント側スタブコード
1513 クライアント側仲介装置
1520 サーバ・コンピュータ
1521 アプリケーション(サーバ・プログラム)
1522 サーバ側スタブコード
1523 サーバ側仲介装置
1530 通信媒体

110 Client computer 111 Application (client program)
112 Client-side Mediation Device 120 Server Computer 121 Application (Server Program)
122 server side mediating device 130 communication medium 200 computer 212 heap memory 220 language runtime 222 garbage collector 230 zero GC communication mediating device 232 temporary object storage means 234 temporary object management means 235 request deferment means 236 request type restriction means 237 transfer data number restriction means 237 238 Concurrent use limit unit 239 Operation mode switching unit 240 Request type limit value setting unit 241 Transfer data number limit value setting unit 242 Concurrent use number limit value setting unit 250 Application 312 Heap memory 320 Language runtime 322 Garbage collector 330 Zero GC Communication mediation device 332 Temporary object storage means 334 Temporary object management means 340 Application 1510 Client compilation Over data 1511 application (client program)
1512 Client-side stub code 1513 Client-side mediating device 1520 Server computer 1521 Application (server program)
1522 Server-side stub code 1523 Server-side mediating device 1530 Communication medium

Claims (14)

ガベージコレクション機能を備えるオブジェクト指向プログラミング言語によって実装されるコンピュータ間の遠隔リクエストの仲介処理をガベージコレクションを抑制して行う仲介装置であって、
前記仲介処理のために一時的に使われた一時オブジェクトのうち使用済みの一時オブジェクトを保持する一時オブジェクト格納手段と、
前記使用済みの一時オブジェクトを再利用のために初期化する一時オブジェクト管理手段と、
リクエストの種類の制限値を設定するリクエスト種類制限値設定手段と、
前記リクエストの種類の制限値によりリクエストの種類を制限するリクエスト種類制限手段と、
転送データ数の制限値を設定する転送データ数制限値設定手段と、
前記転送データ数の制限値によりリクエストによって転送されるデータ及びオブジェクトの種類及び個数を制限する転送データ数制限手段と、
同時並行使用数の制限値を設定する同時並行使用数制限値設定手段と、
前記同時並行使用数の制限値によりリクエストの同時並行使用数を制限する同時並行使用数制限手段と、
を具備することを特徴とする仲介装置。
An intermediary device that performs intermediary processing of remote requests between computers implemented by an object-oriented programming language having a garbage collection function while suppressing garbage collection,
A temporary object storage means for holding a used temporary object among temporary objects temporarily used for the mediation process;
Temporary object management means for initializing the used temporary object for reuse;
A request type limit value setting means for setting a request type limit value;
Request type limiting means for limiting the type of request by the limit value of the type of request;
Transfer data number limit value setting means for setting the transfer data number limit value;
Transfer data number limiting means for limiting the type and number of data and objects transferred by a request according to the limit value of the transfer data number;
Concurrent concurrent usage limit setting means for setting the concurrent concurrent usage limit, and
Concurrent concurrent usage limit means for limiting the concurrent concurrent usage number of requests by the concurrent concurrent usage limit value;
An intermediary device comprising:
請求項1に記載の仲介装置において、更に、
前記リクエスト種類制限手段によりリクエストの種類が制限され、
前記転送データ数制限手段によりリクエストによって転送されるデータ及びオブジェクトの種類及び個数が制限され、または
前記同時並行使用数制限手段によりリクエストの同時並行使用数が制限されて、
リクエストを開始できない場合において、リクエスト処理の開始をタイムウインドウ時間の範囲内で延期するリクエスト延期手段を備える
ことを特徴とする仲介装置。
The mediation device according to claim 1, further comprising:
The request type limiting means limits the type of request,
The type and number of data and objects transferred by the request are limited by the transfer data number limiting means, or the simultaneous and parallel use number of requests is limited by the simultaneous parallel use number limiting means,
An intermediary apparatus comprising: a request postponing unit that postpones the start of request processing within a time window when a request cannot be started.
請求項1に記載の仲介装置において、更に、
前記一時オブジェクト管理手段を使用するスタブコードを生成するスタブ生成手段を具備する
ことを特徴とする仲介装置。
The mediation device according to claim 1, further comprising:
An intermediary apparatus comprising stub generation means for generating a stub code that uses the temporary object management means.
請求項1に記載の仲介装置において、更に、
一時オブジェクトを必要とするリクエスト仲介処理が開始される前に、一時オブジェクトが生成されて、前記一時オブジェクト格納手段内に事前配置される、
ことを特徴とする仲介装置。
The mediation device according to claim 1, further comprising:
Before a request mediation process that requires a temporary object is started, a temporary object is generated and pre-positioned in the temporary object storage means.
An intermediary device characterized by that.
請求項1に記載の仲介装置において、
前記同時並行使用数制限手段は、クライアントの数もしくは同時に使用されるセッションの数に基づいて、同時並行使用数制限値を決定し、前記一時オブジェクト格納手段に事前配置する一時オブジェクトの最大数を決定する、
ことを特徴とする仲介装置。
The intermediary device according to claim 1,
The concurrent and concurrent usage limit means determines a concurrent and concurrent usage limit value based on the number of clients or the number of sessions used simultaneously, and determines the maximum number of temporary objects to be pre-arranged in the temporary object storage means To
An intermediary device characterized by that.
請求項1に記載の仲介装置において、
前記リクエスト種類制限手段により制限するリクエストの種類の制限値と、転送データ数制限手段により制限するリクエストによって転送されるデータ及びオブジェクトの種類及び個数の制限値と、同時並行使用数制限手段により制限するリクエストの同時並行使用数の制限値と、前記一時オブジェクト格納手段に事前配置する一時オブジェクトの種類及び個数は、ソースコード、インターフェース定義、サービス定義、プログラムメタ情報、コマンド行のオプション指定、設定画面、設定ファイル、コンパイルされたプログラムの中の少なくとも一つを解析することによって得ることを特徴とする仲介装置。
The intermediary device according to claim 1,
The request type restriction means restricts the request type restriction value, the transfer data number restriction means restricts the type and number of data and objects transferred by the request restriction, and the concurrent and parallel use number restriction means restricts it. The limit value of the number of concurrent requests used and the type and number of temporary objects to be pre-arranged in the temporary object storage means include source code, interface definition, service definition, program meta information, command line option specification, setting screen, An intermediary device obtained by analyzing at least one of a setting file and a compiled program.
請求項1に記載の仲介装置において、
前記一時オブジェクト管理手段は、ある一時オブジェクトが不変オブジェクトであった場合に、その一時オブジェクトを可変オブジェクトに置き換える
ことを特徴とする仲介装置。
The intermediary device according to claim 1,
The intermediary apparatus characterized in that the temporary object management means replaces a temporary object with a variable object when the temporary object is an immutable object.
請求項1に記載の仲介装置において、更に、
ガベージコレクション抑制処理を行うモードと、ガベージコレクション抑制処理を行なわないモードを切り替える動作モード切替手段を備え、
前記動作モード切替手段が、それぞれの動作モードに応じて一時オブジェクト管理手段の使用・不使用と、リクエスト種類制限値設定手段に設定する制限値と、転送データ数制限値設定手段に設定する制限値と、同時並行使用数制限値設定手段に設定する制限値の各設定値を設定する
ことを特徴とする仲介装置。
The mediation device according to claim 1, further comprising:
An operation mode switching means for switching between a mode for performing garbage collection suppression processing and a mode for not performing garbage collection suppression processing;
The operation mode switching means uses or does not use the temporary object management means according to each operation mode, a limit value set in the request type limit value setting means, and a limit value set in the transfer data number limit value setting means And an intermediary device that sets each set value of the limit value to be set in the simultaneous parallel use number limit value setting means.
ガベージコレクション機能を備えるオブジェクト指向プログラミング言語によって実装されるコンピュータ間の遠隔リクエストの仲介処理をガベージコレクションを抑制して行う仲介装置であって、
前記仲介処理のために一時的に使われた一時オブジェクトのうち使用済みの一時オブジェクトを保持する一時オブジェクト格納手段と、
前記使用済みの一時オブジェクトを再利用のために初期化する一時オブジェクト管理手段と、
前記仲介処理で受け付けるリクエストを制限するリクエスト制限手段と
を備え、
前記リクエスト制限手段は、
リクエストの種類を制限するリクエスト種類制限手段、
リクエストによって転送されるデータ及びオブジェクトの種類及び個数を制限する転送データ数制限手段、または
リクエストの同時並行使用数を制限する同時並行使用数制限手段、
のいずれかであることを特徴とする仲介装置。
An intermediary device that performs intermediary processing of remote requests between computers implemented by an object-oriented programming language having a garbage collection function while suppressing garbage collection,
A temporary object storage means for holding a used temporary object among temporary objects temporarily used for the mediation process;
Temporary object management means for initializing the used temporary object for reuse;
Request limiting means for limiting requests accepted in the mediation process,
The request limiting means includes
Request type restriction means to limit the type of request,
Transfer data number limiting means to limit the type and number of data and objects transferred by the request, or concurrent parallel usage limit means to limit the number of concurrent and concurrent requests,
An intermediary device characterized by being any one of the above.
ガベージコレクション機能を備えるオブジェクト指向プログラミング言語によって実装されるコンピュータ間の遠隔リクエストの仲介処理をガベージコレクションを抑制して行う仲介装置であって、
前記仲介処理のために一時的に使われた一時オブジェクトのうち使用済みの一時オブジェクトを保持する一時オブジェクト格納手段と、
前記使用済みの一時オブジェクトを再利用のために初期化する一時オブジェクト管理手段と、
前記仲介処理で受け付けるリクエストを制限するリクエスト制限手段と
を備え、
前記リクエスト制限手段は、
リクエストの種類を制限するリクエスト種類制限手段、
リクエストによって転送されるデータ及びオブジェクトの種類及び個数を制限する転送データ数制限手段、または
リクエストの同時並行使用数を制限する同時並行使用数制限手段、
のいずれか2つであることを特徴とする仲介装置。
An intermediary device that performs intermediary processing of remote requests between computers implemented by an object-oriented programming language having a garbage collection function while suppressing garbage collection,
A temporary object storage means for holding a used temporary object among temporary objects temporarily used for the mediation process;
Temporary object management means for initializing the used temporary object for reuse;
Request limiting means for limiting requests accepted in the mediation process,
The request limiting means includes
Request type restriction means to limit the type of request,
Transfer data number limiting means for limiting the type and number of data and objects transferred by the request, or concurrent parallel usage limit means for limiting the number of concurrent and concurrent requests,
Any one of the two.
ガベージコレクション機能を備えるオブジェクト指向プログラミング言語によって実装されるコンピュータ間の遠隔リクエストの仲介処理をガベージコレクションを抑制して行う仲介装置におけるメモリの割り当て方法であって、
前記仲介装置が備えるべき最大のヒープメモリ量は、
仲介装置自身が初期状態で必要とするメモリ量に加えて、1のリクエストにおいて引数及び返値として転送されるデータの最大メモリ量をリクエスト種類制限値に含まれるリクエストの種類毎に足し合わせたメモリの量にセッション毎に仲介装置自身が必要とするメモリの量を加えた量に、同時並行使用数の制限値をかけ算して得られるメモリ量を割り当てる、
ことを特徴とする仲介装置におけるメモリの割り当て方法。
A method of allocating memory in an intermediary device that performs intermediary processing of remote requests between computers implemented by an object-oriented programming language having a garbage collection function while suppressing garbage collection,
The maximum amount of heap memory that the mediation device should have is:
In addition to the amount of memory required by the mediation device itself in the initial state, the maximum amount of data transferred as an argument and return value in one request is added to each request type included in the request type limit value The amount of memory obtained by multiplying the amount of memory plus the amount of memory required by the intermediary device itself for each session by the limit value of the number of concurrent concurrent uses is allocated.
A memory allocation method in an intermediary device.
コンピュータ間の遠隔リクエストの仲介処理をガベージコレクションを抑制して行う仲介装置であって、
前記仲介処理のために一時的に使われた一時オブジェクトのうち使用済みの一時オブジェクトを保持する一時オブジェクト格納手段と、
前記使用済みの一時オブジェクトを再利用のために初期化する一時オブジェクト管理手段と、
リクエストの種類の制限値を設定するリクエスト種類制限値設定手段と、
前記リクエストの種類の制限値によりリクエストの種類を制限するリクエスト種類制限手段と、
転送データ数の制限値を設定する転送データ数制限値設定手段と、
前記転送データ数の制限値によりリクエストによって転送されるデータ及びオブジェクトの種類及び個数を制限する転送データ数制限手段と、
同時並行使用数の制限値を設定する同時並行使用数制限値設定手段と、
前記同時並行使用数の制限値によりリクエストの同時並行使用数を制限する同時並行使用数制限手段と、
を具備することを特徴とする仲介装置。
An intermediary device that performs mediation processing of remote requests between computers while suppressing garbage collection,
A temporary object storage means for holding a used temporary object among temporary objects temporarily used for the mediation process;
Temporary object management means for initializing the used temporary object for reuse;
A request type limit value setting means for setting a request type limit value;
Request type limiting means for limiting the type of request by the limit value of the type of request;
Transfer data number limit value setting means for setting the transfer data number limit value;
Transfer data number limiting means for limiting the type and number of data and objects transferred by a request according to the limit value of the transfer data number;
Concurrent concurrent usage limit setting means for setting the concurrent concurrent usage limit, and
Concurrent concurrent usage limit means for limiting the concurrent concurrent usage number of requests by the concurrent concurrent usage limit value;
An intermediary device comprising:
コンピュータ間の遠隔リクエストの仲介処理をガベージコレクションを抑制して行う仲介装置であって、
前記仲介処理のために一時的に使われた一時オブジェクトのうち使用済みの一時オブジェクトを保持する一時オブジェクト格納手段と、
前記使用済みの一時オブジェクトを再利用のために初期化する一時オブジェクト管理手段と、
前記仲介処理で受け付けるリクエストを制限するリクエスト制限手段と
を備え、
前記リクエスト制限手段は、
リクエストの種類を制限するリクエスト種類制限手段、
リクエストによって転送されるデータ及びオブジェクトの種類及び個数を制限する転送データ数制限手段、または
リクエストの同時並行使用数を制限する同時並行使用数制限手段、
のいずれかであることを特徴とする仲介装置。
An intermediary device that performs mediation processing of remote requests between computers while suppressing garbage collection,
A temporary object storage means for holding a used temporary object among temporary objects temporarily used for the mediation process;
Temporary object management means for initializing the used temporary object for reuse;
Request limiting means for limiting requests accepted in the mediation process,
The request limiting means includes
Request type restriction means to limit the type of request,
Transfer data number limiting means to limit the type and number of data and objects transferred by the request, or concurrent parallel usage limit means to limit the number of concurrent and concurrent requests,
An intermediary device characterized by being any one of the above.
コンピュータ間の遠隔リクエストの仲介処理をガベージコレクションを抑制して行う仲介装置であって、
前記仲介処理のために一時的に使われた一時オブジェクトのうち使用済みの一時オブジェクトを保持する一時オブジェクト格納手段と、
前記使用済みの一時オブジェクトを再利用のために初期化する一時オブジェクト管理手段と、
前記仲介処理で受け付けるリクエストを制限するリクエスト制限手段と
を備え、
前記リクエスト制限手段は、
リクエストの種類を制限するリクエスト種類制限手段、
リクエストによって転送されるデータ及びオブジェクトの種類及び個数を制限する転送データ数制限手段、または
リクエストの同時並行使用数を制限する同時並行使用数制限手段、
のいずれか2つであることを特徴とする仲介装置。

An intermediary device that performs mediation processing of remote requests between computers while suppressing garbage collection,
A temporary object storage means for holding a used temporary object among temporary objects temporarily used for the mediation process;
Temporary object management means for initializing the used temporary object for reuse;
Request limiting means for limiting requests accepted in the mediation process,
The request limiting means includes
Request type restriction means to limit the type of request,
Transfer data number limiting means to limit the type and number of data and objects transferred by the request, or concurrent parallel usage limit means to limit the number of concurrent and concurrent requests,
Any one of the two.

JP2005271297A 2005-09-20 2005-09-20 Communication mediation device for zero garbage collection Pending JP2007086838A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2005271297A JP2007086838A (en) 2005-09-20 2005-09-20 Communication mediation device for zero garbage collection
PCT/JP2006/318485 WO2007034769A1 (en) 2005-09-20 2006-09-19 Zero garbage collection communication mediation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005271297A JP2007086838A (en) 2005-09-20 2005-09-20 Communication mediation device for zero garbage collection

Publications (1)

Publication Number Publication Date
JP2007086838A true JP2007086838A (en) 2007-04-05

Family

ID=37888813

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005271297A Pending JP2007086838A (en) 2005-09-20 2005-09-20 Communication mediation device for zero garbage collection

Country Status (2)

Country Link
JP (1) JP2007086838A (en)
WO (1) WO2007034769A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009037547A (en) * 2007-08-03 2009-02-19 Hitachi Ltd Memory management method and computer using the method
JP2010067176A (en) * 2008-09-12 2010-03-25 Nec Corp Information processor
US20100122260A1 (en) * 2008-11-07 2010-05-13 International Business Machines Corporation Preventing Delay in Execution Time of Instruction Executed by Exclusively Using External Resource
JP2012234567A (en) * 2012-08-08 2012-11-29 Hitachi Ltd Memory management method, computer and program
JP2014067186A (en) * 2012-09-25 2014-04-17 Nec Corp Control system, control method, and control program

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11287995B2 (en) 2020-05-18 2022-03-29 Oracle International Corporation Heap, garbage collection, and empty-sensitive object pools
WO2023098984A1 (en) * 2021-12-01 2023-06-08 Huawei Technologies Co., Ltd. Control unit for controlling a data storage system and method of recovering data from an object storage

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001092709A (en) * 1999-09-14 2001-04-06 Internatl Business Mach Corp <Ibm> Client server system, object pool, method for pooling object, storage medium and program transmitting device
JP2002141936A (en) * 2000-10-30 2002-05-17 Fujitsu Ltd Network access control method and network system using it and equipment configuring it
WO2003049403A2 (en) * 2001-12-05 2003-06-12 Websense, Inc. Filtering techniques for managing access to internet sites or other software applications
JP2004078651A (en) * 2002-08-20 2004-03-11 Nippon Telegr & Teleph Corp <Ntt> Object pooling system and method, and program

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6393055A (en) * 1986-10-07 1988-04-23 Fujitsu Ltd Real time type garbage collection back-up device
US6611858B1 (en) * 1999-11-05 2003-08-26 Lucent Technologies Inc. Garbage collection method for time-constrained distributed applications
JP4116877B2 (en) * 2002-12-26 2008-07-09 富士通株式会社 Heap size automatic optimization processing method, heap size automatic optimization device and program thereof
JP3688286B2 (en) * 2003-06-09 2005-08-24 三菱電機株式会社 Information storage control device, information storage control method, and information storage control program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001092709A (en) * 1999-09-14 2001-04-06 Internatl Business Mach Corp <Ibm> Client server system, object pool, method for pooling object, storage medium and program transmitting device
JP2002141936A (en) * 2000-10-30 2002-05-17 Fujitsu Ltd Network access control method and network system using it and equipment configuring it
WO2003049403A2 (en) * 2001-12-05 2003-06-12 Websense, Inc. Filtering techniques for managing access to internet sites or other software applications
JP2004078651A (en) * 2002-08-20 2004-03-11 Nippon Telegr & Teleph Corp <Ntt> Object pooling system and method, and program

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009037547A (en) * 2007-08-03 2009-02-19 Hitachi Ltd Memory management method and computer using the method
US8397044B2 (en) 2007-08-03 2013-03-12 Hitachi, Ltd. Memory management method and computer using the method
US8589653B2 (en) 2007-08-03 2013-11-19 Hitachi, Ltd. Memory management method and computer using the method
JP2010067176A (en) * 2008-09-12 2010-03-25 Nec Corp Information processor
US20100122260A1 (en) * 2008-11-07 2010-05-13 International Business Machines Corporation Preventing Delay in Execution Time of Instruction Executed by Exclusively Using External Resource
US8201178B2 (en) 2008-11-07 2012-06-12 International Business Machines Corporation Preventing delay in execution time of instruction executed by exclusively using external resource
JP2012234567A (en) * 2012-08-08 2012-11-29 Hitachi Ltd Memory management method, computer and program
JP2014067186A (en) * 2012-09-25 2014-04-17 Nec Corp Control system, control method, and control program

Also Published As

Publication number Publication date
WO2007034769A1 (en) 2007-03-29

Similar Documents

Publication Publication Date Title
JP3730563B2 (en) Session management apparatus, session management method, program, and recording medium
JP2007086838A (en) Communication mediation device for zero garbage collection
WO2001022215A1 (en) Mechanism for implementing multiple thread pools in a computer system to optimize system performance
Elmroth et al. An interoperable, standards-based Grid resource broker and job submission service
US8701095B2 (en) Add/remove memory pressure per object
US20040148605A1 (en) Distributed processing system and method using virtual machine
Tournier et al. Qinna, a component-based QoS architecture
US8713524B2 (en) Memory management configuration
JP2008003907A (en) Method for controlling information processing distribution and computer therefor
WO2006111208A1 (en) Process and system for real-time relocation of objects during garbage collection
White et al. The GC interface in the EVM
Bromberg et al. Automatic generation of network protocol gateways
US20100169271A1 (en) File sharing method, computer system, and job scheduler
WO2023165484A1 (en) Distributed task processing method, distributed system, and first device
JP2012104038A (en) Method of processing object in computer, program and system
US20050204360A1 (en) Interprocess buffer management
Basanta‐Val et al. Non‐functional information transmission patterns for distributed real‐time Java
Basanta-Val et al. A simple distributed garbage collector for distributed real-time Java
Campos et al. The chance for Ada to support distribution and real-time in embedded systems
da Silva e Silva et al. Developing adaptive distributed applications: a framework overview and experimental results
KR20140009422A (en) Conservative garbage collecting with concurrent marking and concurrent sweeping for memory management
US20130227241A1 (en) Electronic apparatus
Maia et al. OiL: An object request broker in the Lua language
Govindaraju et al. XCAT-C++: Design and performance of a distributed CCA framework
Krishna et al. Optimizing the ORB core to enhance Real-time CORBA predictability and performance

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070314

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100216

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100615