JP2004192038A - Information processing apparatus, information processing system, information processing program, and recording medium storing the program - Google Patents
Information processing apparatus, information processing system, information processing program, and recording medium storing the program Download PDFInfo
- Publication number
- JP2004192038A JP2004192038A JP2002355491A JP2002355491A JP2004192038A JP 2004192038 A JP2004192038 A JP 2004192038A JP 2002355491 A JP2002355491 A JP 2002355491A JP 2002355491 A JP2002355491 A JP 2002355491A JP 2004192038 A JP2004192038 A JP 2004192038A
- Authority
- JP
- Japan
- Prior art keywords
- program
- information
- information processing
- storage device
- position information
- 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
Links
Images
Landscapes
- Stored Programmes (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Description
【0001】
【発明の属する技術分野】
この発明は情報処理装置、情報処理システム、情報処理プログラム、および該プログラムを記録した記録媒体に関し、特に、他の情報処理装置に対して最適なプログラムを提供することのできる情報処理装置、情報処理システム、情報処理プログラム、および該プログラムを記録した記録媒体に関する。
【0002】
【従来の技術】
コンピュータ等のマシンにおいて動作するプログラムとして、様々なプログラムが存在する。その中のJava(R)プログラムは、特定のマシン固有の環境に依存しないJava(R)VM(Virtual Machine)と呼ばれる仮想マシン上で動作するマシンコードによって書かれたプログラムであり、Java(R)プログラムの実行環境を備えていればいかなるマシンでも実行することができる。よってJava(R)は様々な種類のマシンが接続するインターネット上で共通に使用できるオブジェクト指向言語として、インターネットユーザの拡大と共に広く使われるようになっている。
【0003】
Java(R)プログラムが様々なマシンで実行可能である理由として、Java(R)プログラムがインタプリタ型で動作することが挙げられる。インタプリタ型は、プログラムに書かれた命令を1行ずつ解析し実行する動作を順に繰返す方法である。そのため、インタプリタ型は、解析段階でバグ等の危険なコードを排除しエラーチェックができ安全に実行できる反面、1行ずつ処理を行なうため実行速度が遅い。
【0004】
そこで、Java(R)プログラムのような仮想マシンコードプログラムの実行を高速化する技術としてコンパイルがある。コンパイルは、プログラムを、仮想マシンコードを実行しようとするマシンが直接実行できるネイティブコードに一括して変換する技術である。コンパイルされたプログラムは、マシンにおいて直接実行されるため、インタプリタ型より高速に実行することが可能になる。
【0005】
コンパイルを行なうコンパイラにはいくつかの種類があり、その内JIT(Just−In−Time)コンパイラは、仮想マシンコードを実行するマシンが直接実行に応じてコードを出力するコンパイラである。このJITコンパイラは、実際に多くのJava(R)実行環境に実装されている。
【0006】
また、特許文献1においては、仮想マシンコードを実行する環境のマシンとは異なる代理コンパイル装置でJITコンパイラを実行するネットワークコンピュータシステムが提供されている。
【0007】
【特許文献1】
特開2000−215181号公報
【0008】
【発明が解決しようとする課題】
しかしながら、従来方法である実行環境と同一のマシン上でコンパイルを行なうJITコンパイラによる手法では、メモリ容量や演算能力といったマシンリソースを多く必要とするという問題がある。このため、携帯電話やPDA(Personal Digital Assistants)などの限られたマシンリソースの製品での採用は困難である。
【0009】
また、この問題を解決するために特許文献1においては代理コンパイル装置が提供されているが、代理コンパイル装置からクライアントへ転送するプログラムサイズが大きくなるという問題がある。
【0010】
家庭などで使用する据置き型のパーソナルコンピュータをクライアントと考えた場合には、インターネット上の代理コンパイル装置との通信速度は、近年のブロードバンド環境の拡大に伴ないメタル線を使用する場合で約十メガビット、光ファイバを使用する場合で百メガビットにも上り、かつ使用料金は接続時間や通信データ量に関係しない固定料金方式である。このため、上述のようなプログラムサイズの大きさはさほど問題にはならない。
【0011】
しかしながら、携帯電話や携帯情報端末をクライアントとして考えた場合には、通信環境は一般に携帯電話もしくはPHS(Personal Handyphone System)による無線方式であり、その通信速度は秒間数十キロビットから数百キロビットと遅く、また通信時間や通信データ量に応じて課金が発生する方式である。よってプログラムサイズが大きくなる問題は、通信時間が伸張したり通信量が増加し大きく費用が発生する問題に繋がる。
【0012】
また、クライアント装置によっては、使用可能な搭載メモリ量が多い、すなわち資源が潤沢な環境もある。このような場合は、プログラムサイズやプログラム実行時の使用メモリ量が多少大きくなっても高速に動作することを希望することもあり、そのような要求にも柔軟に対応しなければならないという問題もある。
【0013】
本発明はこれらの問題に鑑みてなされたものであって、クライアント装置に対して、低い通信量で最適なプログラムを提供することのできる情報処理装置、情報処理システム、情報処理プログラム、および該プログラムを記録した記録媒体を提供することを目的とする。
【0014】
【課題を解決するための手段】
上記目的を達成するために、本発明のある局面に従うと、情報処理装置は、他の装置からプログラムの位置情報を含む処理要求を受付ける受信手段と、受信した処理要求に含まれる位置情報に基づいて、プログラムと位置情報とが関連付けれられて格納されている第1の記憶装置から、位置情報に関連付けられたプログラムを取得する取得手段と、第1の記憶装置から取得したプログラムが仮想マシンコードで構成されるプログラムである場合に、プログラムを特定のクライアント装置に依存しない中間コードで構成されるプログラムに変換する変換手段と、変換したプログラムを他の装置に対する処理応答として送信する送信手段とを備える。
【0015】
また、上述の受信手段は、他の装置から、プログラムの位置情報と、他の装置の情報とを含む処理要求を受付け、変換手段は、第1の記憶装置から取得したプログラムを、受信した処理要求に含まれる他の装置の情報に基づいて、他の装置に適する構成のプログラムに変換することが望ましい。
【0016】
さらに、上述の変換手段は、第1の記憶装置から取得したプログラムが仮想マシンコードで構成されるプログラムと中間コードで構成されるプログラムとのいずれかである場合に、受信した処理要求に含まれる他の装置の情報に基づいて、第1の記憶装置から取得したプログラムを、他の装置に適する構成のプログラムとして、他の装置において動作可能なネイティブコードで構成されるプログラムに変換することが望ましい。
【0017】
また、情報処理装置は、変換前のプログラムの位置情報と、変換されたプログラムとを対応付けて第2の記憶装置に格納する格納手段をさらに備え、受信した処理要求に含まれる位置情報に対応する変換されたプログラムが、第2の記憶装置に格納されている場合に、取得手段は、第2の記憶装置から変換されたプログラムを取得し、送信手段は、取得した変換されたプログラムを送信することが望ましい。
【0018】
さらに、上述の格納手段は、受信した処理要求に含まれる変換前のプログラムの位置情報に対応する変換されたプログラムが、第2の記憶装置に格納されていない場合に、変換手段において変換されたプログラムを、変換前のプログラムの位置情報と対応付けて第2の記憶装置に格納することが望ましい。
【0019】
また、上述の受信手段は、他の装置から、プログラムの位置情報と、プログラムを格納する第1の記憶装置を特定する情報とを含む処理要求を受付け、取得手段は、受信した処理要求に含まれる第1の記憶装置を特定する情報に基づいて、特定された第1の記憶装置から位置情報に関連付けられたプログラムを取得することが望ましい。
【0020】
本発明の他の局面に従うと、情報処理装置は、他の装置に対して、プログラムの位置情報と、当該情報処理装置の情報とを含む処理要求を行なう情報処理装置であって、当該情報処理装置の情報は、当該情報処理装置のメモリ空き容量、プログラムの実行速度、当該情報処理装置の制御プログラムに関する情報などを含む情報であって、処理要求を作成する際に自動的に読出して処理要求に含ませることを特徴とする。
【0021】
本発明のさらに他の局面に従うと、情報処理装置は、他の装置に対してプログラムの位置情報を含む処理要求を行なう要求手段と、他の装置から、位置情報に対応するプログラムを取得する取得手段と、他の装置から取得したプログラムを、記憶装置に格納する格納手段とを備え、要求手段は、処理要求に含まれる位置情報に対応するプログラムが記憶装置に格納されていない場合には、他の装置に対して処理要求を行なう。
【0022】
本発明のさらに他の局面に従うと、情報処理システムは、複数の情報処理装置からなる情報処理システムであって、第1の情報処理装置は、第2の情報処理装置に対してプログラムの位置情報を含む処理要求を行ない、第2の情報処理装置は、受信した処理要求に含まれる位置情報に基づいて、プログラムと位置情報とが関連付けれられて格納されている第1の記憶装置から、位置情報に関連付けられたプログラムを取得し、第1の記憶装置から取得したプログラムが仮想マシンコードで構成されるプログラムである場合に、第2の情報処理装置は、プログラムを特定のクライアント装置に依存しない中間コードで構成されるプログラムに変換して第1の情報処理装置に対して送信する。
【0023】
また、第1の情報処理装置は、第2の情報処理装置に対して、プログラムの位置情報と、第1の情報処理装置の情報とを含む処理要求を行ない、第2の情報処理装置は、第1の記憶装置から取得したプログラムを、受信した処理要求に含まれる第1の情報処理装置の情報に基づいて、第1の情報処理装置に適する構成のプログラムに変換して第1の情報処理装置に対して送信することが望ましい。
【0024】
また、第2の情報処理装置は、変換前のプログラムの位置情報と前記変換されたプログラムとを対応付けて格納する第2の記憶装置に、受信した処理要求に含まれる位置情報に対応する変換されたプログラムが格納されている場合に、変換を行なわず、第2の記憶装置から変換されたプログラムを取得して第1の情報処理装置に対して送信することが望ましい。
【0025】
また、第1の情報処理装置は、第2の情報処理装置に対して、プログラムの位置情報と、プログラムを格納する第1の記憶装置を特定する情報とを含む処理要求を行ない、第2の情報処理装置は、受信した処理要求に含まれる第1の記憶装置を特定する情報に基づいて、特定された第1の記憶装置から位置情報に関連付けられたプログラムを取得することが望ましい。
【0026】
また、第1の情報処理装置は、第2の情報処理装置から取得したプログラムを記憶装置に格納し、処理要求に含まれる位置情報に対応するプログラムが記憶装置に格納されていない場合に、第2の情報処理に対して処理要求を行なうことが望ましい。
【0027】
本発明のさらに他の局面に従うと、情報処理プログラムは、情報処理装置における情報処理方法をコンピュータに実行させるプログラムであって、他の装置からプログラムの位置情報を含む処理要求を受付ける受信ステップと、受信した処理要求に含まれる位置情報に基づいて、プログラムと位置情報とが関連付けれられて格納されている第1の記憶装置から、位置情報に関連付けられたプログラムを取得する取得ステップと、第1の記憶装置から取得したプログラムが仮想マシンコードで構成されるプログラムである場合に、プログラムを特定のクライアント装置に依存しない中間コードで構成されるプログラムに変換する変換ステップと、変換したプログラムを他の装置に対する処理応答として送信する送信ステップとを実行させる。
【0028】
また、上述の受信ステップは、他の装置から、プログラムの位置情報と、他の装置の情報とを含む処理要求を受付け、変換ステップは、第1の記憶装置から取得したプログラムを、受信した処理要求に含まれる他の装置の情報に基づいて、他の装置に適する構成のプログラムに変換することが望ましい。
【0029】
さらに、上述の変換ステップは、第1の記憶装置から取得したプログラムが仮想マシンコードで構成されるプログラムと中間コードで構成されるプログラムとのいずれかである場合に、受信した処理要求に含まれる他の装置の情報に基づいて、第1の記憶装置から取得したプログラムを、他の装置に適する構成のプログラムとして、他の装置において動作可能なネイティブコードで構成されるプログラムに変換することが望ましい。
【0030】
また、情報処理プログラムは、変換前のプログラムの位置情報と、変換されたプログラムとを対応付けて第2の記憶装置に格納する格納ステップをさらに実行させ、受信した処理要求に含まれる位置情報に対応する変換されたプログラムが、第2の記憶装置に格納されている場合に、取得ステップは、第2の記憶装置から変換されたプログラムを取得し、送信ステップは、取得した変換されたプログラムを送信することが望ましい。
【0031】
さらに、上述の格納ステップにおいて、受信した処理要求に含まれる変換前のプログラムの位置情報に対応する変換されたプログラムが、第2の記憶装置に格納されていない場合に、変換ステップにおいて変換されたプログラムを、変換前のプログラムの位置情報と対応付けて第2の記憶装置に格納することが望ましい。
【0032】
また上述の受信ステップは、他の装置から、プログラムの位置情報と、プログラムを格納する第1の記憶装置を特定する情報とを含む処理要求を受付け、取得ステップは、受信した処理要求に含まれる第1の記憶装置を特定する情報に基づいて、特定された第1の記憶装置から位置情報に関連付けられたプログラムを取得することが望ましい。
【0033】
本発明のさらに他の局面に従うと、情報処理プログラムは、他の装置に対して、プログラムの位置情報と、情報処理装置の情報とを含む処理要求を行なう情報処理装置における情報処理方法をコンピュータに実行させるプログラムであって、情報処理装置の情報は、情報処理装置のメモリ空き容量、プログラムの実行速度、情報処理装置の制御プログラムに関する情報などを含む情報であって、処理要求を作成する際に自動的に読出して処理要求に含ませることを特徴とする。
【0034】
本発明のさらに他の局面に従うと、情報処理プログラムは、情報処理装置における情報処理方法をコンピュータに実行させるプログラムであって、他の装置に対してプログラムの位置情報を含む処理要求を行なう要求ステップと、他の装置から、位置情報に対応するプログラムを取得する取得ステップと、他の装置から取得したプログラムを記憶装置に格納する格納ステップとを実行させ、要求ステップは、処理要求に含まれる位置情報に対応するプログラムが記憶装置に格納されていない場合には、他の装置に対して処理要求を行なう。
【0035】
本発明のさらに他の局面に従うと、記録媒体は、コンピュータ読取可能な記録媒体であって、上述の情報処理プログラムを記録する。
【0036】
【発明の実施の形態】
以下に、図面を参照しつつ、本発明の実施の形態について説明する。以下の説明では、同一の部品および構成要素には同一の符号を付してある。それらの名称および機能も同じである。したがってそれらについての詳細な説明は繰返さない。
【0037】
[第1の実施の形態]
図1に、第1の実施の形態における情報処理システムの構成の具体例を示す。
【0038】
図1を参照して、本実施の形態における情報処理システムは、サーバ装置101とクライアント装置102とを含み、ネットワーク103を介して接続される。
【0039】
サーバ装置101は、クライアント装置102の処理要求に対して何らかの処理応答を返す装置であり、具体的にはWebサーバなどが該当する。処理要求にはプログラムやテキスト文書、画像といったデータの位置情報がURL等の表記によって含まれる。また、サーバ装置101は、一般的なコンピュータ等を用いて構成され、そのハードウェア構成について、図2にブロック図を示す。
【0040】
図2を参照して、本実施の形態におけるサーバ装置101は、CPU(Central Processing Unit)11によって制御され、I/F(インタフェース)15を介してクライアント装置102から受付けた処理要求に対して処理を行なう。CPU11で実行されるプログラムは、記憶部であるROM(Read Only Memory)12またはHDD(Hard Disk Drive)14に記憶される。そして、RAM(Random Access Memory)13は、CPU11でプログラムが実行される際の一時的な作業領域となる。なお、サーバ装置101は一般的なコンピュータを用いて構成することができ、図2に示されるハードウェア構成は一般的なコンピュータのハードウェア構成である。そのため、言うまでもなく、サーバ装置101のハードウェア構成は図2に示される構成に限定されない。
【0041】
クライアント装置102もまた、一般的なコンピュータ等を用いて構成される装置であって、図2に示されるハードウェア構成と同様な構成である。そのため、ここでの詳細な説明は行なわない。
【0042】
ネットワーク103は、サーバ装置101とクライアント装置102とを接続するネットワークであり、インターネットや企業内のイントラネットなどが該当するが、その他、無線によるネットワークであっても構わない。
【0043】
本情報処理システムにおいては、クライアント装置102は、サーバ装置101で管理するプログラムの位置を示すURLを含む処理要求を、サーバ装置101に対して送信する。サーバ装置101は、受信した処理要求からプログラムの位置情報を取得して、該当する位置のプログラムを特定する。プログラムが仮想マシンコードプログラムであれば、サーバ装置101は、中間コードプログラムに変換して処理応答とし、要求元のクライアント装置102に渡す。
【0044】
クライアント装置102は、サーバ装置101から受取った中間コードプログラムを、クライアント装置102が実行できるネイティブコードプログラムに変換し、実行に必要なライブラリや情報とリンクして実行する。
【0045】
図3に、本情報処理システムを構成するサーバ装置101の機能構成を表わす、機能ブロックの具体例を示す。
【0046】
図3を参照して、サーバ装置101は、サーバ装置101を制御するサーバコントローラ201と、有線または無線によって他の装置と通信を行なうためのモジュールであるネットワークインタフェース202とを含む。
【0047】
さらに、サーバ装置101は、仮想マシンコードプログラムを、特定のマシンに依存しない命令コードである中間コードのプログラムに変換する仮想マシン−中間コード変換器203と、サーバ装置101が取扱うデータを管理するデータ管理器204とを含む。
【0048】
データ管理器204は、仮想マシンコードプログラム205と仮想マシンコードプログラム以外のデータ206とを、プログラム位置情報と関連付けて管理する。データ管理器204が管理するデータは、サーバ装置101のHDD14あるいはRAM13に置かれてもよいし、サーバ装置101とは別の装置に置いても構わない。
【0049】
このような本実施の形態のサーバ装置101において、サーバコントローラ201は、ネットワークインタフェース202を介してクライアント装置102から仮想マシンコードプログラムの位置情報を含む処理要求を受信する。そして、サーバコントローラ201は、受信した処理要求に含まれるプログラム位置情報を取得し、当該位置情報と関連付けられた仮想マシンコードプログラムを、データ管理器204の管理するデータの中からデータ管理器204によって検索する。
【0050】
位置情報と関連付けられた仮想マシンコードプログラムがデータ管理器204の管理するデータの中にある場合は、データ管理器204は、当該仮想マシンコードプログラムを取出して、仮想マシン−中間コード変換器203によって中間コードに変換する。そして、変換した中間コードを、ネットワークインタフェース202を介して、処理要求の送信元であるクライアント装置102に処理応答として送信する。
【0051】
位置情報と関連付けられたデータが仮想マシンコードプログラムではない場合や、データとして存在しない場合は、別途処理される。
【0052】
図4に、上述のサーバコントローラ201の動作手順の具体例を表わすフローチャートを示す。図4に示されるサーバ装置101における応答処理は、CPU11が、ROM12またはHDD14に記憶されるプログラムを読出してRAM13上に展開し、図3に示される各部を機能させることによって実行される。
【0053】
図4を参照して、サーバコントローラ201は実行を開始すると、始めに、他の装置と接続したネットワークインタフェース202において、クライアント装置102からの処理要求を待つ(S101)。
【0054】
次に、クライアント装置102から仮想マシンコードプログラムの位置情報を含む処理要求を受けると、要求の位置情報を指定して、データ管理器204で検索する(S102)。そして、データ管理器204において、指定した位置情報と関連付けられているデータが仮想マシンコードプログラムであるか否かを判定する(S103)。
【0055】
指定した位置情報と関連付けられているデータが仮想マシンコードプログラムである場合は(S103でYES)、データ管理器204においてその仮想マシンコードプログラムを取得する(S104)。
【0056】
一方、指定した位置情報と関連付けられているデータが仮想マシンコードプログラムとは異なるデータであったり、指定の位置情報と関連付けられたデータが存在しない場合は(S103でNO)、別途処理する(S107)。
【0057】
そして、仮想マシン−中間コード変換器203において、取得した仮想マシンコードプログラムを中間コードプログラムに変換し(S105)、変換後の中間コードプログラムを、処理応答として要求元のクライアント装置102へ送信する(S106)。ステップS106におけるプログラムの変換方法は、一般的な変換方法でよく、本発明において限定されるものではない。
【0058】
以上でサーバ装置101における応答処理を終了し、要求元のクライアント装置102に対して中間コードプログラムが送信される。
【0059】
上述のように、本実施の形態におけるサーバ装置101は、サーバ装置101において仮想マシンコードプログラムを中間コードプログラムに変換し、変換した中間コードプログラムをクライアント装置102に対して渡すことを特徴とする。
【0060】
この中間コードプログラムは、特定のマシンに依存しない命令コードによって構成されているプログラムであるため、上述のステップS103において、コンパイルサーバであるサーバ装置101が仮想マシンコードプログラムから中間コードプログラムへの変換を行なう際に、クライアント装置102の実行環境を考慮して変換を行なう必要がない。このため、クライアント装置102からサーバ装置101に対して、当該クライアント装置102の実行環境等の情報を送る必要がないので、サーバ装置101に対する処理要求において情報量が削減し、通信量を低減させることができる。
【0061】
また、サーバ装置101では、クライアント装置102の実行環境を考慮して変換を行なう必要がないため、クライアント装置102ごとに異なるアーキテクチャに応じて複数のコンパイラや変換器を用意する必要がない。このため、サーバ装置101の機能の簡単化を図ることができ、しかも処理の軽減を図ることが可能となる。
【0062】
さらに、本実施の形態におけるサーバ装置101は、仮想マシンコードプログラムではなく変換した中間コードプログラムをクライアント装置102に対して渡すため、以下のような効果がある。
【0063】
ここで、仮想マシンコード、中間コード、およびネイティブコードの差異について説明する。
【0064】
ネイティブコードは、パーソナルコンピュータや携帯電話などの実在するコンピュータ上で直接実行可能な命令群である。また、仮想マシンコードおよび中間コードは、いずれも仮想的なコンピュータ上で実行可能な命令群であるが、両者はアーキテクチャが異なり、後者はネイティブコードが動作するコンピュータのアーキテクチャに近い特徴を持っている。
【0065】
例えば、仮想マシンコードとしてJava(R)プログラムのバイトコードを考えた場合、仮想マシンは、Java(R)VirtualMachine(R)である。また、実在するコンピュータでは、米インテル社製のPentium(R)があり、専用のネイティブコードが直接実行可能である。Java(R)VirtualMachine(R)のアーキテクチャはスタック型であるが、Pentium(R)のアーキテクチャはレジスタ型であり、また中間コードが動作するマシンのアーキテクチャもレジスタ型となる。
【0066】
また仮想マシンコードから中間コードへの変換を容易にするように、中間コードが動作するマシンは、実在するコンピュータの制約の多くを取除いた点を特徴とする。例えば、中間コードでは、レジスタの数を無限個に持つことができる。これにより、プログラム中での変数は、全てレジスタに割当てることが可能である。
【0067】
一方、実在のコンピュータでは、レジスタ数は有限であり、変数全てをレジスタに割当てることは不可能となる場合が多い。この場合は、外部のメモリに変数を割当てて利用する必要がある。
【0068】
一般的に、レジスタ型のコンピュータでの演算は、レジスタを使用しなければならないため、外部メモリの値を演算に用いるには、一旦レジスタへ転送する必要がある。場合によっては外部メモリから転送する前に、レジスタに格納している現在の値を別のメモリ領域に転送し退避する操作と、演算後に退避した値をレジスタに戻す操作とが必要となる。
【0069】
中間コードは、このようなレジスタを無限個とするため、上述のような操作は必要がない。そのため、命令数が少なくて済み、プログラムサイズは減少し、通信量が低減する。本実施の形態におけるサーバ装置101ではこのような中間コードで構成されるプログラムをクライアント装置102に対して送信するため、クライアント装置102に送信する情報量を大幅に削減することができる。
【0070】
[第2の実施の形態]
第2の実施の形態におけるサーバ装置101のハードウェア構成は、図2に示される具体例と同様であるため、ここでの説明を繰返さない。
【0071】
図5に、本実施の形態のサーバ装置101の機能構成を表わす、機能ブロックの具体例を示す。本実施の形態のサーバ装置101は、仮想マシンコードからネイティブコードへの変換を行なうことを特徴とする。
【0072】
具体的には、図5を参照して、本実施の形態におけるサーバ装置101は、第1の実施の形態におけるサーバ装置101と同様に、サーバ装置101を制御するサーバコントローラ210と、有線または無線によって他の装置と通信を行なうためのモジュールであるネットワークインタフェース202とを含む。
【0073】
さらに、サーバ装置101は、仮想マシンコードプログラムを、特定のマシンに依存しない命令コードである中間コードのプログラムに変換する仮想マシン−中間コード変換器203と、中間コードを特定のマシンに依存するネイティブコードに変換する中間コード−ネイティブコード変換器211と、サーバ装置101が取扱うデータを管理するデータ管理器204とを含む。
【0074】
データ管理器204は、仮想マシンコードプログラム205と仮想マシンコードプログラム以外のデータ206とを、プログラム位置情報と関連付けて管理する。データ管理器204が管理するデータは、サーバ装置101のHDD14あるいはRAM13に置かれてもよいし、サーバ装置101とは別の装置に置いても構わない。
【0075】
CPUやオペレーティングシステムなど装置環境の違いにより作成するネイティブコードが異なるため、本実施の形態のサーバ装置100では、当該サーバ装置100を使用する装置の環境に応じてコード変換器を用意する必要があり、複数のコード変換器を使い分けることになる。
【0076】
このような本実施の形態のサーバ装置100において、サーバコントローラ210は、ネットワークインタフェース202を介してクライアント装置102から仮想マシンコードプログラムの位置情報とクライアント装置情報とを含む処理要求を受信する。そして、サーバコントローラ210は、処理要求に含まれるプログラム位置情報を取得し、当該位置情報と関連付けられた仮想マシンコードプログラムを、データ管理器204の管理するデータの中からデータ管理器204によって検索する。
【0077】
位置情報と関連付けられた仮想マシンコードプログラムがデータ管理器204の管理するデータの中にある場合は、データ管理器204は、当該仮想マシンコードプログラムを取出して、仮想マシン−中間コード変換器203によって中間コードに変換する。さらに、変換した中間コードを、中間コード−ネイティブコード変換器211によって、処理要求に含まれたクライアント装置情報から特定したアーキテクチャに対応するネイティブコードに変換する。そして、変換したネイティブコードを、ネットワークインターフェース202を介して、処理要求の送信元であるクライアント装置102に処理応答として送信する。
【0078】
一方、位置情報と関連付けられたデータが仮想マシンコードプログラムではない場合や、データとして存在しない場合は、別途処理される。
【0079】
また、処理要求に含まれるクライアント装置情報からアーキテクチャが特定できない場合は、ネイティブコードではなく中間コードプログラムを送信することも可能である。
【0080】
図6に、上述のサーバコントローラ210の動作手順の具体例を表わすフローチャートを示す。図6に示されるサーバ装置101における応答処理もまた、CPU11が、ROM12またはHDD14に記憶されるプログラムを読出してRAM13上に展開し、図3に示される各部を機能させることによって実行される。
【0081】
図6を参照して、サーバコントローラ210は実行を開始すると、始めに、他の装置と接続したネットワークインタフェース202において、クライアント装置102からの処理要求を待つ(S201)。
【0082】
次に、クライアント装置102から仮想マシンコードプログラムの位置情報を含む処理要求を受けると、要求の位置情報を指定して、データ管理器204で検索する(S202)。そして、データ管理器204において、指定した位置情報と関連付けられているデータが仮想マシンコードプログラムであるか否かを判定する(S203)。
【0083】
指定した位置情報と関連付けられているデータが仮想マシンコードプログラムである場合は(S203でYES)、データ管理器204においてその仮想マシンコードプログラムを取得し(S204)、取得した仮想マシンコードプログラムを仮想マシン−中間コード変換器203において中間コードプログラムに変換する(S205)。
【0084】
一方、指定した位置情報と関連付けられているデータが仮想マシンコードプログラムとは異なるデータであったり、指定の位置情報と関連付けられたデータが存在しない場合は(S203でNO)、別途処理する(S210)。
【0085】
次に、サーバコントローラ210において、クライアント装置102からの処理要求でクライアント装置情報が指定されており、さらにクライアント装置102のアーキテクチャの特定が可能であるか否かを判定する(S206)。
【0086】
クライアント装置102からの処理要求よりクライアント装置102のアーキテクチャが特定できる場合には(S206でYES)、中間コード−ネイティブコード変換器211において、中間コードプログラムをそのアーキテクチャに対応したネイティブコードプログラムへ変換する(S207)。そして、変換したネイティブコードプログラムを、処理応答として要求元のクライアント装置102へ送信する(S208)。
【0087】
クライアント装置102からの処理要求よりクライアント装置のアーキテクチャが特定できない場合には(S206でNO)、中間コードプログラムを、処理応答として要求元のクライアント装置102へ送信する(S211)。
【0088】
以上でサーバ装置101における応答処理を終了し、要求元のクライアント装置102に対して、実行可能なネイティブコードプログラムあるいは中間コードプログラムが送信される。
【0089】
上述のように、本実施の形態におけるサーバ装置101は、サーバ装置101において仮想マシンコードプログラムを中間コードプログラムに変換し、さらにクライアント装置102のアーキテクチャに応じて中間コードプログラムをネイティブコードプログラムに変換し、変換したネイティブコードプログラムをクライアント装置102に対して渡すことを特徴とする。
【0090】
このようにすることで、クライアント装置102において中間コードプログラムを実行可能なネイティブコードプログラムに変換する処理を不要とし、クライアント装置102の構成を簡略化することができる。また、クライアント装置102におけるプログラムの起動を早め、実行までの時間を短くすることができる。
【0091】
[第3の実施の形態]
第3の実施の形態におけるサーバ装置101のハードウェア構成は、図2に示される具体例と同様であるため、ここでの説明を繰返さない。
【0092】
図7に、本実施の形態のサーバ装置101の機能構成を表わす、機能ブロックの具体例を示す。本実施の形態のサーバ装置101は、キャッシュ機能を備えることを特徴とする。
【0093】
具体的には、図7を参照して、本実施の形態におけるサーバ装置101は、第1,第2の実施の形態におけるサーバ装置101と同様に、サーバ装置101を制御するサーバコントローラ220と、有線または無線によって他の装置と通信を行なうためのモジュールであるネットワークインタフェース202とを含む。
【0094】
さらに、サーバ装置101は、仮想マシンコードプログラムを、特定のマシンに依存しない命令コードである中間コードのプログラムに変換する仮想マシン−中間コード変換器203と、中間コードを特定のマシンに依存するネイティブコードに変換する中間コード−ネイティブコード変換器211と、プログラム位置情報と関連付けて変換済プログラムを保存するキャッシュ装置222と、サーバ装置101が取扱うデータを管理するデータ管理器204とを含む。
【0095】
データ管理器204は、仮想マシンコードプログラム205と仮想マシンコードプログラム以外のデータ206とを、プログラム位置情報と関連付けて管理する。データ管理器204が管理するデータは、サーバ装置101のHDD14あるいはRAM13に置かれてもよいし、サーバ装置101とは別の装置に置いても構わない。
【0096】
このような本実施の形態のサーバ装置100において、サーバコントローラ220は、ネットワークインタフェース202を介してクライアント装置102から仮想マシンコードプログラムの位置情報とクライアント装置情報とを含む処理要求を受信する。そして、サーバコントローラ220は、処理要求に含まれるプログラム位置情報を取得し、当該位置情報と関連付けられた仮想マシンコードプログラムを、データ管理器204の管理するデータの中からデータ管理器204によって検索する。
【0097】
その際、データ管理器204は、キャッシュ装置222に同じプログラム位置情報と関連付けられた変換済プログラムの有無を確認する。キャッシュ装置222に変換済プログラムが存在する場合は、その変換済プログラムを取出して使用し、新たにプログラムを変換する処理を行なわない。また、キャッシュ装置222に変換済プログラムが存在しない場合には、位置情報で指定された仮想マシンコードプログラムをデータ管理器204の管理するデータの中から取出して、仮想マシン−中間コード変換器203によって中間コードに変換する。そして、変換した中間コードプログラムを、キャッシュ装置222にプログラム位置情報と関連付けて保存し、ネットワークインターフェース202を介して、処理要求の送信元であるクライアント装置102に処理応答として送信する。
【0098】
図8に、上述のサーバコントローラ220の動作手順の具体例を表わすフローチャートを示す。図8に示されるサーバ装置101における応答処理は、図6に示される第2の実施の形態のサーバ装置101における応答処理に対してキャッシュ機能に関連する処理が加わったものである。
【0099】
図8を参照して、サーバコントローラ220は、クライアント装置102から仮想マシンコードプログラムの位置情報を含む処理要求を受けると(S301)、先行してキャッシュ装置222を検索し、プログラム位置情報と関連付けられた変換済プログラムがキャッシュ装置222に保存されているか否かを確認する(S303)。
【0100】
プログラム位置情報と関連付けられた変換済プログラムがキャッシュ装置222に保存されている場合(S302でYES)、キャッシュ装置222から変換済プログラムを取得して処理応答としてクライアント装置102へ送信し(S309)、処理を終了する。
【0101】
一方、プログラム位置情報と関連付けられた変換済プログラムがキャッシュ装置222に保存されていない場合(S302でNO)、ステップS303〜S305,S310において図3のフローチャートに示す処理と同様の処理を実行しする。そして、仮想マシンコード−中間コード変換器203によってプログラム位置情報と関連付けられた仮想マシンコードプログラムを中間コードプログラムへと変換する(S306)。ここで、本サーバ装置101に中間コード−ネイティブコード変換器が搭載されており、かつクライアント装置102から受信した処理要求によってクライアント装置102のアーキテクチャが特定可能である場合は、さらに変換された中間コードをネイティブコードに変換することもできる。
【0102】
そして、変換後のプログラムをプログラム位置情報と関連付けてキャッシュ装置222に保存し(S307)、その後に、処理応答として要求元のクライアント装置102へ変換後のプログラムを送信する(S308)。
【0103】
以上でサーバ装置101における応答処理を終了し、要求元のクライアント装置102に対して、実行可能なネイティブコードプログラムあるいは中間コードプログラムが送信される。
【0104】
このように、本実施の形態におけるサーバ装置101がキャッシュ機能をさらに備えることで、キャッシュ装置222に保存された変換済プログラムと同じプログラム位置情報を含む処理要求がある際は、プログラム変換処理を行なわずに変換済プログラムを送信することが可能となる。そのため、サーバ装置101の処理を簡単化することができる。
【0105】
なお、図9に、キャシュ装置222が持つキャッシュテーブルの具体例を示す。図9においては、2つのプログラムをプログラム位置情報と関連付けて管理している。
【0106】
図9を参照して、キャッシュテーブルの1行目は、当該キャシュ装置222に、プログラム位置情報program/Game.classに関連付けてプログラムiasd8013.imcが保存されていることを示す。
【0107】
上述のステップS301において、サーバ装置101がクライアント装置102よりプログラム位置情報program/Game.classを含む処理要求を受取った場合、同じプログラム位置情報がキャッシュテーブルに存在するため、ステップS303以降の処理であるプログラムの変換は行なわずに、ステップS309においてキャッシュ装置222内のプログラムiasd8013.imcを使用する。
【0108】
また、上述のステップS301において、サーバ装置101がクライアント装置102よりプログラム位置情報program/Tool.classを含む処理要求を受取った場合は、このプログラム位置情報がキャッシュテーブルに存在しないため、上述のステップS303〜S306において、前述した第1の実施の形態のサーバ装置101と同様の処理を行ない、プログラム位置情報に基づいて仮想マシンコードプログラムを取得し、中間コードプログラムまたはネイティブコードプログラムに変換する。そして変換済のプログラムは、上述のステップS307において、プログラム位置情報program/Tool.classに関連付けてキャッシュ装置222に保存し、キャッシュテーブルを更新する。
【0109】
なお、本キャッシュテーブルには、キャッシュ装置222にプログラムが保存された日時やプログラムサイズ、プログラム位置情報の処理要求を送信したクライアント装置名やアドレスといった項目を自由に設定できることが好ましい。このようにすることで、これらを利用してキャッシュ装置222を制御することも可能である。
【0110】
[第4の実施の形態]
第4の実施の形態におけるサーバ装置101のハードウェア構成は、図2に示される具体例と同様であるため、ここでの説明を繰返さない。また、サーバ装置101の機能構成もまた、図3あるいは図7に示される具体例と同様であるため、ここでの説明を繰返さない。
【0111】
本実施の形態のサーバ装置101は、仮想マシン−中間コード変換器203において仮想マシンコードプログラムのコード変換を行なう際に、クライアント装置102から送信される処理要求に含まれる資源情報やユーザ設定に基いて最適化を行なうことを特徴とする。
【0112】
ここで、本実施の形態にサーバ装置101の仮想マシン−中間コード変換器203が行なう最適化について具体的に説明する。最適化には、コンパイラなどの開発ツールにおいて一般的に使用するループ展開やインライン展開などがある。
【0113】
図10〜図12は、仮想マシン−中間コード変換器203がコードの変換時に最適化を行なう場合の具体例を示す図である。図10は、変換元となる仮想マシンコードプログラムのソースコードの具体例を示す図であり、仮想マシンコードプログラムでは、図10に示されるソースコードの通りにバイナリコードが作成されているとする。
【0114】
図11は、図10に示すソースコードにおいて、for文のループ展開を行なって最適化した仮想マシンコードプログラムのソースコードの具体例を示す図であり、ループの中に記述されたdispInt関数呼出しがループ回数だけ記されfor文は取去られている。これにより、ループを続けるか否かを判定するコードおよびループの始めへとジャンプするコードといった、ループを繰返す回数分実行するコードが削除されるため、仮想マシンコードプログラムの実行速度が高速化する。
【0115】
また、図12は、図11に示すソースコードにおいて、dispInt手続きの呼出しをインライン展開して最適化した仮想マシンコードプログラムのソースコードの具体例を示す図であり、dispInt手続きに代わりdispInt手続きの内容であるSystem.out.println手続きが記述されている。これにより、手続きを呼出すために必要な引数をスタックに積込むコードや手続きへジャンプするコードは削除されるため、その分、仮想マシンコードプログラムの実行速度が高速化する。
【0116】
これらのことより、図11に示すソースコードである仮想マシンコードプログラムは、図10に示すソースコードである仮想マシンコードプログラムに比較して実行速度が速く、図12に示すソースコードである仮想マシンコードプログラムは、図11に示すソースコードである仮想マシンコードプログラムに比較して実行速度が速い。
【0117】
逆に、一般的に、変換時に最適化を行なうことは、最適化を行なわない通常の変換と比較して時間を必要とし、仮想マシン−中間コード変換器203における最適化が高度になればさらに変換処理に時間を必要とする。よって本実施の形態のサーバ装置101の仮想マシン−中間コード変換器203が最適化を行なうことは、クライアント装置102が仮想マシンコードプログラムの位置情報を含む処理要求を出してからサーバ装置101が変換済プログラムをクライアント装置102に送信するまでの時間が長くなる要因となる。そのため、クライアント装置102でのプログラム起動までの時間は長くなる。また、図11あるいは図12に挙げたループ展開やインライン展開といった仮想マシンコードプログラムの最適化は、プログラムサイズの増大につながる。そのため、メモリ容量が小さいような限られた装置資源の実行環境では変換されたプログラムが実行できない場合もある。
【0118】
しかし、メモリ容量が大きい実行環境であり、プログラム使用者がプログラムの実行速度を重視している場合は、プログラムの起動時間が長くてもよい場合がある。本実施の形態のクライアント装置102では、プログラム実行時のクライアント装置102の資源情報と、使用者がプログラムの実行に際して起動時間と実行時間とのいずれを重視するかの設定とを、ユーザ設定としてサーバ装置101に送信することによって、サーバ装置101の仮想マシン−中間コード変換器203における最適化の強度を変更することが可能である。
【0119】
ここで、クライアント装置102の資源情報とは、クライアント装置102のメモリ空き容量、実行速度、OS名とバージョン番号などを含む情報であって、実行環境に合わせた最適化を行なうための環境パラメータである。またユーザ設定とは、最適化で重視する項目などユーザが任意に指定することが可能な項目である。
【0120】
図13に、資源情報やユーザ設定を含む処理要求をサーバ装置101に対して送信する、本実施の形態のクライアント装置102の機能構成を表わす、機能ブロックの具体例を示す。
【0121】
図13を参照して、本実施の形態のクライアント装置102は、クライアント装置102を制御するクライアントコントローラ301と、有線または無線によって他の装置と通信を行なうためのモジュールであるネットワークインタフェース302と、中間コードプログラムをクライアント装置102のアーキテクチャで実行可能であるネイティブコードのプログラムに変換するコード変換を行なう中間−ネイティブコード変換器303と、モジュール化したプログラムとクライアント装置102が持つライブラリとを結合するリンカ304と、クライアント装置のユーザ設定を記録する設定記録領域305とを含む。なお、中間−ネイティブコード変換器303については、クライアント装置102のアーキテクチャが異なれば実行可能であるネイティブコードも異なるため、クライアント装置102によって搭載する変換器が異なる。
【0122】
このような本実施の形態のクライアント装置102において、クライアントコントローラ301は、クライアント装置102の使用者が行なう操作やクライアント装置102で実行する他のプログラムなどから、ネットワーク103に接続したサーバ装置101が管理する仮想マシンコードプログラムの実行命令を受けると、この仮想マシンコードプログラムの位置情報を含むサーバ装置101への処理要求を作成する。
【0123】
サーバ装置101への処理要求を作成する際に、本実施の形態のクライアント装置102のクライアントコントローラ301は、設定記録領域305に記録されたユーザ設定とクライアント装置102のメモリ使用量などの資源情報とを自動的に読出して前記処理要求に加えることを特徴とする。そして、この処理要求をネットワークインタフェース302によってサーバ装置101に向けて送信し、対応する処理応答をサーバ装置101から受信する。サーバ装置101までの通信やサーバ装置101での処理が正常に実行された場合、この処理応答には、前記処理要求に含めたプログラム位置情報に対応するプログラムが含まれている。
【0124】
受信したプログラムが中間コードプログラムである場合は、中間−ネイティブコード変換器303において、受信した中間コードプログラムをネイティブコードプログラムに変換する。また、受信したプログラムがネイティブコードプログラムである場合は、変換しなくてよい。
【0125】
処理要求を送信したサーバ装置101が上述のようなコード変換時の最適化を行なう機能を有している場合、受信したプログラムには、送信した資源情報やユーザ設定に基づいた最適化が行なわれている。
【0126】
このようにして最終的に得られたネイティブコードは、クライアント装置102のハードウェア操作するなどを行なうライブラリと、リンカ304によって結合され実行される。
【0127】
本実施の形態において、このようにサーバ装置101がコード変換時の最適化を行なう機能を備える場合には、クライアント装置102の資源情報やユーザ設定に応じて、各クライアント装置ごとに最適なプログラムを提供することができる。このため、クライアント装置においてプログラム実行までの時間を短くすることができる。
【0128】
また、クライアント装置102の装置資源が、メモリ容量が小さいような限られた装置資源である場合であっても、本実施の形態のサーバ装置101から提供された、変換されたプログラムが実行できないといった問題が発生しない。
【0129】
さらに、クライアント装置102のメモリ容量が大きい実行環境であり、プログラム使用者がプログラムの実行速度を重視している場合であっても、本実施の形態のサーバ装置101は、そのような要求にマッチした最適なプログラムを提供することができる。
【0130】
なお、本実施の形態のクライアント装置102は、受信したプログラムを保存するキャッシュ機能をさらに備えても構わない。図14に、キャッシュ機能を備えるクライアント装置102の機能構成を表わす、機能ブロックの具体例を示す。
【0131】
図14に示されるクライアント装置102の機能構成は、図13に示されるクライアント装置102の機能構成にプログラムを保存するキャッシュ装置306が追加された構成となっている。キャッシュ装置306は、処理要求に含めたプログラム位置情報とその処理要求に対応してサーバ装置101から受信した処理応答に含まれるプログラムとを関連付けて保存する。ここで、サーバ装置101からの処理応答に含まれるプログラムが中間コードプログラムである場合は、中間−ネイティブコード変換器303によって変換したネイティブコードプログラムとプログラム位置情報とを関連付けてキャッシュ装置306に保存することも可能である。
【0132】
クライアント装置102がキャッシュ機能を備える場合、クライアントコントローラ301は、処理要求を作成する際にキャッシュ装置306を確認し、この処理要求に含ませるプログラム位置情報と関連付けられたプログラムがキャッシュ装置306に保存されている場合は、この処理要求をサーバ装置102に送信しない。そして、キャッシュ装置306に保存された当該プログラムを読出して使用する。
【0133】
このように本実施の形態のクライアント装置102がキャッシュ機能を備えることで、サーバ装置101と通信を行なってプログラムを取得する必要がないため、プログラム実行までの時間を短縮することができる。
【0134】
なお、このような本実施の形態のクライアント装置102において、ユーザが最適化の強度を設定する際にクライアント装置102付属の表示装置に表示される表示画面の具体例を図15に示す。図15に示すような表示画面において、ユーザは、最適化についての強度を選択することが可能である。
【0135】
選択して設定した最適化強度は、クライアント装置102内部の設定記録領域305にユーザ設定として記録され、サーバ装置101に対して仮想マシンコードプログラムを要求する際に、仮想マシンコードプログラムの位置情報と共にサーバ装置101に対して送信する。
【0136】
具体的には、本実施の形態では、最適化について実行速度を重視するか起動速度を重視するかを4段階のレベルで指定するものとする。ここで指定した項目は、ユーザ設定となり、サーバ装置101に通知される。サーバ装置101では、要求された仮想マシンコードプログラムに対して、指定されたレベルに応じた最適化を行なう。例えば、最適化レベル1が指定されている場合にはループ展開、最適化レベル2が指定されている場合にはループ展開に加えてオンライン展開を行なう。このような最適化に関するユーザの設定項目や、ユーザ設定に応じてサーバ装置101上で行なう最適化項目は、システムに合わせて自由に決定することができる。
【0137】
[第5の実施の形態]
第5の実施の形態における情報処理システムにおいては、サーバ装置101は、サーバ装置101自身でデータを持たず管理しない代理サーバ装置であるものとする。代理サーバ装置は、Webサーバなどデータを管理して提供する機能を持つ他のサーバ装置とクライアント装置との間に位置して、通信を中継する機能を備える。
【0138】
図16に、本実施の形態における情報処理システムであって、代理サーバ装置105を含む情報処理システムの構成の具体例を示す。
【0139】
図16を参照して、本実施の形態における情報処理システムは、図1に示す第1〜第4の実施の形態における情報処理システムの構成に対して、さらに代理サーバ装置105を含む構成である。すなわち、ネットワーク103を介して接続されるクライアント装置102とサーバ装置104とに加えて、代理サーバ装置105をさらに含む。代理サーバ装置105とサーバ装置104、および代理サーバ装置105とクライアント装置102は、それぞれネットワーク103と接続して通信を行なう。サーバ装置104とクライアント装置102とは、直接通信を行なうことができなくても構わない。
【0140】
代理サーバ装置105は一般的なコンピュータなどで構成され、そのハードウェア構成は、図2に示されるサーバ装置101のハードウェア構成の具体例と同様であるため、ここでの説明を繰返さない。
【0141】
図17に、本情報処理システムを構成する代理サーバ装置105の機能構成を表わす、機能ブロックの具体例を示す。
【0142】
図17を参照して、代理サーバ装置105は、代理サーバ装置を制御するサーバコントローラ401と、有線または無線によって他の装置と通信を行なうためのモジュールであるネットワークインタフェース402と、仮想マシンコード−中間コード変換器403と、変換後のプログラムをキャッシュして保存するキャッシュ装置422とを含む。仮想マシンコード−中間コード変換器403とキャッシュ装置422とは、前述したサーバ装置101に含まれるものと同様のものであるため、ここでの説明は繰返さない。また、本代理サーバ装置105には前述したサーバ装置101に含まれる中間コード−ネイティブコード変換器303がさらに含まれてもよく、また、キャッシュ装置422が含まれていなくても構わない。
【0143】
図18に、上述のサーバコントローラ401の動作手順の具体例を表わすフローチャートを示す。図18に示される代理サーバ装置105における応答処理は、図示しない代理サーバ装置105のCPUが、ROMまたはHDDに記憶されるプログラムを読出してRAM上に展開し、図17に示される各部を機能させることによって実行される。
【0144】
図18を参照して、サーバコントローラ401は、実行を開始すると、始めに、他の装置と接続したネットワークインタフェース402において、クライアント装置102からの処理要求を待つ(S401)。ステップS401では、クライアント装置102から、仮想マシンコードプログラムの位置情報と、当該プログラムを提供するサーバ装置104を特定する情報とを含む処理要求を受付ける。
【0145】
次に、クライアント装置102から処理要求を受取ると、先行してキャッシュ装置422を検索し、プログラム位置情報と関連付けられた変換済プログラムがキャッシュ装置422に保存か否かを確認する(S402)。
【0146】
プログラム位置情報と関連付けられた変換済プログラムがキャッシュ装置422に保存されている場合(S402でYES)、キャッシュ装置422から変換済プログラムを取得して、処理応答としてクライアント装置102へ送信し(S410)、処理を終了する。
【0147】
一方、プログラム位置情報と関連付けられた変換済プログラムがキャッシュ装置422に保存されていない場合(S402でNO)、プログラム位置情報から取得したデータを提供するサーバ装置104を特定し、該当するサーバ装置104にプログラム位置情報を含む処理要求を中継して送信する(S403)。そして、この処理要求に対する処理応答を待受けてサーバ装置104より受信する(S404)。
【0148】
サーバ装置104より受信した処理応答には、中継して送信した処理要求に含むプログラム位置情報に対応するデータが含まれており、このデータが仮想マシンコードプログラムであるか否かを判別する(S405)。
【0149】
サーバ装置104より受信した処理応答に含まれるデータが仮想マシンコードプログラムとは異なるデータであったり、何らかのエラーによりデータを受信できない場合は(S405でNO)、別途処理を実行し(S411)、本処理を終了する。
【0150】
サーバ装置104より受信した処理応答に含まれるデータが仮想マシンコードプログラムである場合には(S405でYES)、仮想マシン−中間コード変換器403において、取得した仮想マシンコードプログラムを中間コードプログラムに変換する(S407)。ステップS407においては、本代理サーバ装置105が中間コード−ネイティブコード変換器を備え、かつクライアント装置101から受信した処理要求によってクライアント装置102のアーキテクチャが特定可能である場合は、中間コードをネイティブコードに変換することもできる。
【0151】
そして、変換後のプログラムをプログラム位置情報と関連付けてキャッシュ装置422に保存し(S408)、その後に変換後のプログラムを処理応答として要求元のクライアント装置102へ送信する(S409)。
【0152】
以上で代理サーバ装置105における応答処理を終了し、要求元のクライアント装置102に対して、実行可能な中間コードプログラムあるいはネイティブコードプログラムが送信される。
【0153】
本実施の形態における情報処理システムがこのように構成され、代理サーバ装置105がこのような処理を行なうことで、サーバ装置104やクライアント装置102の構成を簡略化することが可能である。
【0154】
なお、本実施の形態の代理サーバ装置105においても、前述の変換時に最適化する機能を適用することにより、仮想マシンコードから中間コードへの変換時、あるいは中間コードからネイティブコードへの変換時にコードの最適化を行なうことが可能である。このことによって、本実施の形態の代理サーバ装置105は、クライアント装置102に対して最適なプログラムを提供することができる。
【0155】
また、上述の処理を行なうためには、クライアント装置102が、仮想マシンコードプログラムの位置情報と共に、当該プログラムを提供するサーバ装置104を特定する情報を処理要求として代理サーバ装置105に送信することが必要である。この場合のクライアント装置102における処理は、上述の第4の実施の形態におけるユーザ設定を行なう場合の処理と同様で、図15に示されるようなクライアント装置102の表示装置上の表示画面において、プログラムを提供するサーバ装置104を指定することによって、サーバ装置104を特定する情報が処理要求として代理サーバ装置105に送信される。
【0156】
さらに、上述の情報処理システムにおいて行なわれる処理方法を、プログラムとして提供することもできる。このようなプログラムは、コンピュータに付属するフレキシブルディスク、CD−ROM(Compact Disc−Read Only Memory)、ROM(Read Only Memory)、RAM(Random Access Memory)およびメモリカードなどのコンピュータ読取り可能な記録媒体にて記録させて、プログラム製品として提供することもできる。あるいは、コンピュータに内蔵するハードディスクなどの記録媒体にて記録させて、プログラムを提供することもできる。また、ネットワークを介したダウンロードによって、プログラムを提供することもできる。
【0157】
提供されるプログラム製品は、ハードディスクなどのプログラム格納部にインストールされて実行される。なお、プログラム製品は、プログラム自体と、プログラムが記録された記録媒体とを含む。
【0158】
今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。
【図面の簡単な説明】
【図1】第1の実施の形態における情報処理システムの構成の具体例を示す図である。
【図2】第1の実施の形態におけるサーバ装置101のハードウェア構成の具体例を示すブロック図である。
【図3】第1の実施の形態におけるサーバ装置101の機能構成を表わす、機能ブロックの具体例を示す図である。
【図4】第1の実施の形態におけるサーバ装置101の、サーバコントローラ201の動作手順の具体例を表わすフローチャートである。
【図5】第2の実施の形態におけるサーバ装置101の機能構成を表わす、機能ブロックの具体例を示す図である。
【図6】第2の実施の形態におけるサーバ装置101の、サーバコントローラ210の動作手順の具体例を表わすフローチャートである。
【図7】第3の実施の形態におけるサーバ装置101の機能構成を表わす、機能ブロックの具体例を示す図である。
【図8】第3の実施の形態におけるサーバ装置101の、サーバコントローラ220の動作手順の具体例を表わすフローチャートである。
【図9】キャシュ装置222が持つキャッシュテーブルの具体例を示す図である。
【図10】変換元となる仮想マシンコードプログラムのソースコードの具体例を示す図である。
【図11】ループ展開を行なって最適化した仮想マシンコードプログラムのソースコードの具体例を示す図である。
【図12】インライン展開して最適化した仮想マシンコードプログラムのソースコードの具体例を示す図である。
【図13】第4の実施の形態におけるクライアント装置102の機能構成を表わす、機能ブロックの具体例を示す図である。
【図14】キャッシュ機能を備えるクライアント装置102の機能構成を表わす、機能ブロックの具体例を示す図である。
【図15】ユーザが最適化の強度を設定する際にクライアント装置102付属の表示装置に表示される表示画面の具体例を示す図である。
【図16】代理サーバ装置105を含む、第5の実施の形態における情報処理システムの構成の具体例を示す図である。
【図17】第5の実施の形態における代理サーバ装置105の機能構成を表わす、機能ブロックの具体例を示す図である。
【図18】第5の実施の形態における代理サーバ装置105の、サーバコントローラ401の動作手順の具体例を表わすフローチャートである。
【符号の説明】
11 CPU、12 ROM、13 RAM、14 HDD、15 I/F、101 サーバ装置、102 クライアント装置、103 ネットワーク、105 代理サーバ装置、201,210,220 サーバ装置のサーバコントローラ、202 サーバ装置のネットワークI/F、203 仮想マシン−中間コード変換器、204 データ管理器、205 仮想マシンコードプログラム、206 仮想マシンコードプログラム以外のデータ、211 サーバ装置の中間コード−ネイティブコード変換器、222 サーバ装置のキャッシュ装置、301 クライアントコントローラ、302 クライアント装置のネットワークI/F、303 クライアント装置の中間コード−ネイティブコード変換器、304 リンカ、305 設定記録領域、306 クライアント装置のキャッシュ装置、401 代理サーバ装置のサーバコントローラ、402 代理サーバ装置のネットワークI/F、403 代理サーバ装置の仮想マシン−中間コード変換器、422 代理サーバ装置のキャッシュ装置。[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an information processing apparatus, an information processing system, an information processing program, and a recording medium on which the program is recorded, and in particular, to an information processing apparatus capable of providing an optimal program to another information processing apparatus, The present invention relates to a system, an information processing program, and a recording medium on which the program is recorded.
[0002]
[Prior art]
Various programs exist as programs operating on a machine such as a computer. The Java (R) program therein is a program written by machine code operating on a virtual machine called Java (R) VM (Virtual Machine) which does not depend on a specific machine-specific environment, and is a Java (R) program. It can be run on any machine that has a program execution environment. Therefore, Java (R) has been widely used as an object-oriented language that can be commonly used on the Internet to which various types of machines are connected with the expansion of Internet users.
[0003]
The reason that the Java (R) program can be executed on various machines is that the Java (R) program operates in an interpreter type. The interpreter type is a method of sequentially repeating operations of analyzing and executing instructions written in a program line by line. For this reason, the interpreter type can safely execute by executing an error check by removing dangerous codes such as bugs at the analysis stage, but has a low execution speed because it performs processing line by line.
[0004]
Therefore, there is compilation as a technique for speeding up the execution of a virtual machine code program such as a Java (R) program. Compiling is a technique for collectively converting a program into native code that can be directly executed by a machine that wants to execute virtual machine code. Since the compiled program is executed directly on the machine, it can execute faster than the interpreted type.
[0005]
There are several types of compilers for compiling. Among them, a JIT (Just-In-Time) compiler is a compiler that outputs a code according to a machine that executes a virtual machine code directly. This JIT compiler is actually implemented in many Java (R) execution environments.
[0006]
[0007]
[Patent Document 1]
JP 2000-215181 A
[0008]
[Problems to be solved by the invention]
However, the conventional method using a JIT compiler that compiles on the same machine as the execution environment has a problem that it requires a large amount of machine resources such as memory capacity and arithmetic capacity. For this reason, it is difficult to adopt it in products with limited machine resources such as a mobile phone and a PDA (Personal Digital Assistants).
[0009]
In order to solve this problem, a substitute compiling device is provided in
[0010]
When a stationary personal computer used at home or the like is considered as a client, the communication speed with a proxy compiling device on the Internet is about 10% in the case of using a metal wire with the expansion of the broadband environment in recent years. In the case of using megabits and optical fibers, the cost is as high as 100 megabits, and the usage fee is a fixed fee system irrespective of the connection time and the amount of communication data. Therefore, the size of the program as described above does not matter much.
[0011]
However, when a mobile phone or a mobile information terminal is considered as a client, the communication environment is generally a mobile phone or a wireless system using a PHS (Personal Handyphone System), and the communication speed is as slow as tens to hundreds of kilobits per second. This is a method in which billing is generated according to the communication time and the amount of communication data. Therefore, the problem that the program size becomes large leads to a problem that the communication time is prolonged and the amount of communication increases, resulting in a large cost.
[0012]
Further, depending on the client device, there is an environment where the amount of available memory is large, that is, resources are abundant. In such a case, it may be desirable to operate at high speed even if the program size or the amount of memory used during program execution is slightly larger, and there is also a problem that it is necessary to flexibly respond to such a request. is there.
[0013]
The present invention has been made in view of these problems, and an information processing apparatus, an information processing system, an information processing program, and a program capable of providing an optimal program to a client apparatus with a low communication amount An object of the present invention is to provide a recording medium on which is recorded.
[0014]
[Means for Solving the Problems]
In order to achieve the above object, according to one aspect of the present invention, an information processing apparatus includes: a receiving unit configured to receive a processing request including position information of a program from another apparatus; Acquiring means for acquiring the program associated with the position information from the first storage device in which the program and the position information are associated and stored; and acquiring the program acquired from the first storage device into the virtual machine code. A conversion means for converting the program into a program composed of an intermediate code independent of a specific client device, and a transmission means for transmitting the converted program as a processing response to another device. Prepare.
[0015]
Further, the above-mentioned receiving means receives a processing request including the position information of the program and the information of the other apparatus from another apparatus, and the converting means receives the processing request obtained from the first storage apparatus, It is desirable to convert the program into a program suitable for another device based on information on the other device included in the request.
[0016]
Further, the above-mentioned conversion means is included in the received processing request when the program acquired from the first storage device is either a program composed of virtual machine codes or a program composed of intermediate codes. Based on the information of the other device, it is desirable to convert the program obtained from the first storage device as a program having a configuration suitable for the other device into a program composed of native codes operable in the other device. .
[0017]
The information processing apparatus further includes a storage unit that associates the position information of the program before conversion with the converted program and stores the converted program in the second storage device, and corresponds to the position information included in the received processing request. When the converted program to be stored is stored in the second storage device, the obtaining unit obtains the converted program from the second storage device, and the transmitting unit transmits the obtained converted program. It is desirable to do.
[0018]
Further, when the converted program corresponding to the position information of the program before conversion included in the received processing request is not stored in the second storage device, the storage unit may convert the converted program. It is desirable that the program is stored in the second storage device in association with the position information of the program before conversion.
[0019]
Further, the above-mentioned receiving means receives a processing request including position information of the program and information for specifying the first storage device storing the program from another device, and the obtaining means includes the processing request included in the received processing request. It is desirable to acquire a program associated with the position information from the specified first storage device based on the information specifying the first storage device to be specified.
[0020]
According to another aspect of the present invention, an information processing apparatus is an information processing apparatus that requests another apparatus to perform a processing request including position information of a program and information of the information processing apparatus. The information of the device is information including information on a memory free space of the information processing device, an execution speed of a program, a control program of the information processing device, and the like. Is included.
[0021]
According to still another aspect of the present invention, an information processing apparatus includes: a requesting unit that issues a processing request including location information of a program to another apparatus; and an acquisition unit that acquires a program corresponding to the location information from another apparatus. Means, and a storage means for storing a program obtained from another device in a storage device, wherein the requesting means is configured such that, when the program corresponding to the position information included in the processing request is not stored in the storage device, A processing request is issued to another device.
[0022]
According to still another aspect of the present invention, the information processing system is an information processing system including a plurality of information processing apparatuses, wherein the first information processing apparatus transmits program position information to the second information processing apparatus. And the second information processing apparatus reads, from the first storage device in which the program and the location information are stored in association with each other, based on the location information included in the received processing request. The second information processing device acquires a program associated with the information, and when the program acquired from the first storage device is a program configured by virtual machine code, the second information processing device does not depend on the specific client device. The program is converted into a program composed of intermediate codes and transmitted to the first information processing device.
[0023]
Further, the first information processing device makes a processing request including the position information of the program and the information of the first information processing device to the second information processing device. The first information processing apparatus converts a program acquired from the first storage device into a program having a configuration suitable for the first information processing device based on information of the first information processing device included in the received processing request. It is desirable to transmit to the device.
[0024]
Further, the second information processing device stores, in a second storage device that stores the position information of the program before conversion and the converted program in association with each other, the conversion corresponding to the position information included in the received processing request. When the converted program is stored, it is preferable that the converted program is obtained from the second storage device and transmitted to the first information processing device without performing the conversion.
[0025]
Further, the first information processing device issues a processing request to the second information processing device including the position information of the program and the information for specifying the first storage device that stores the program. It is desirable that the information processing device acquires a program associated with the position information from the specified first storage device based on the information that specifies the first storage device included in the received processing request.
[0026]
Further, the first information processing device stores the program acquired from the second information processing device in the storage device, and when the program corresponding to the position information included in the processing request is not stored in the storage device, It is desirable to make a processing request for the second information processing.
[0027]
According to still another aspect of the present invention, an information processing program is a program for causing a computer to execute an information processing method in an information processing device, and a receiving step of receiving a processing request including position information of the program from another device, An acquisition step of acquiring a program associated with position information from a first storage device in which a program and position information are associated and stored based on the position information included in the received processing request; If the program obtained from the storage device is a program constituted by virtual machine code, a conversion step of converting the program into a program constituted by intermediate code independent of a specific client device; and And transmitting the data as a processing response to the device.
[0028]
The receiving step described above receives a processing request including the position information of the program and the information of the other device from another device, and the converting step includes a process of receiving the program acquired from the first storage device. It is desirable to convert the program into a program suitable for another device based on information on the other device included in the request.
[0029]
Further, the above-mentioned conversion step is included in the received processing request when the program acquired from the first storage device is either a program composed of virtual machine codes or a program composed of intermediate codes. Based on the information of the other device, it is desirable to convert the program obtained from the first storage device as a program having a configuration suitable for the other device into a program composed of native codes operable in the other device. .
[0030]
Further, the information processing program further causes a storage step of storing the position information of the program before conversion and the converted program in the second storage device in association with each other. When the corresponding converted program is stored in the second storage device, the obtaining step obtains the converted program from the second storage device, and the transmitting step reads the obtained converted program. It is desirable to send.
[0031]
Further, in the above-described storage step, if the converted program corresponding to the position information of the program before conversion included in the received processing request is not stored in the second storage device, the converted program is converted in the conversion step. It is desirable that the program is stored in the second storage device in association with the position information of the program before conversion.
[0032]
The receiving step described above receives a processing request including position information of the program and information specifying the first storage device storing the program from another device, and the acquiring step is included in the received processing request. It is desirable to acquire a program associated with the position information from the specified first storage device based on the information specifying the first storage device.
[0033]
According to yet another aspect of the present invention, an information processing program provides a computer with an information processing method in an information processing apparatus that makes a processing request including position information of the program and information of the information processing apparatus to another apparatus. The program to be executed, the information of the information processing device is information including information on a memory free space of the information processing device, an execution speed of the program, a control program of the information processing device, and the like. It is characterized in that it is automatically read and included in the processing request.
[0034]
According to still another aspect of the present invention, an information processing program is a program for causing a computer to execute an information processing method in an information processing apparatus, and a request step for making a processing request including position information of the program to another apparatus. And executing an obtaining step of obtaining a program corresponding to the position information from another device, and a storing step of storing the program obtained from the other device in a storage device. If the program corresponding to the information is not stored in the storage device, a processing request is made to another device.
[0035]
According to still another aspect of the present invention, a recording medium is a computer-readable recording medium, and records the above-described information processing program.
[0036]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following description, the same parts and components are denoted by the same reference numerals. Their names and functions are the same. Therefore, detailed description thereof will not be repeated.
[0037]
[First Embodiment]
FIG. 1 shows a specific example of the configuration of the information processing system according to the first embodiment.
[0038]
With reference to FIG. 1, the information processing system according to the present embodiment includes a
[0039]
The
[0040]
Referring to FIG. 2,
[0041]
The
[0042]
The
[0043]
In the present information processing system, the
[0044]
The
[0045]
FIG. 3 shows a specific example of a functional block representing the functional configuration of the
[0046]
Referring to FIG. 3,
[0047]
Further, the
[0048]
The
[0049]
In the
[0050]
If the virtual machine code program associated with the position information is present in the data managed by the
[0051]
If the data associated with the position information is not a virtual machine code program or does not exist as data, it is processed separately.
[0052]
FIG. 4 is a flowchart illustrating a specific example of the operation procedure of the
[0053]
Referring to FIG. 4, when the
[0054]
Next, when a processing request including the position information of the virtual machine code program is received from the
[0055]
If the data associated with the designated position information is a virtual machine code program (YES in S103), the
[0056]
On the other hand, if the data associated with the specified location information is different from the virtual machine code program or if there is no data associated with the specified location information (NO in S103), the processing is performed separately (S107). ).
[0057]
Then, in the virtual machine-
[0058]
As described above, the response processing in the
[0059]
As described above, the
[0060]
Since this intermediate code program is a program constituted by instruction codes that do not depend on a specific machine, in the above-described step S103, the
[0061]
Further, in the
[0062]
Further, the
[0063]
Here, differences between the virtual machine code, the intermediate code, and the native code will be described.
[0064]
The native code is a group of instructions that can be directly executed on a real computer such as a personal computer or a mobile phone. In addition, the virtual machine code and the intermediate code are both instructions that can be executed on a virtual computer, but both have different architectures, and the latter has characteristics similar to the architecture of a computer on which native code operates. .
[0065]
For example, when a byte code of a Java (R) program is considered as the virtual machine code, the virtual machine is a Java (R) Virtual Machine (R). In addition, an existing computer includes Pentium (registered trademark) manufactured by Intel Corporation in the United States, and a dedicated native code can be directly executed. The Java (R) Virtual Machine (R) architecture is a stack type, while the Pentium (R) architecture is a register type, and the architecture of the machine on which the intermediate code operates is also a register type.
[0066]
Also, the machine on which the intermediate code operates is characterized in that many of the restrictions of existing computers have been removed so as to facilitate the conversion from the virtual machine code to the intermediate code. For example, the intermediate code can have an infinite number of registers. This allows all variables in the program to be assigned to registers.
[0067]
On the other hand, in a real computer, the number of registers is limited, and it is often impossible to assign all variables to registers. In this case, it is necessary to assign a variable to an external memory for use.
[0068]
Generally, calculations in a register-type computer require the use of registers, and therefore, in order to use the values in the external memory for the calculations, the values must be temporarily transferred to the registers. In some cases, it is necessary to transfer the current value stored in the register to another memory area to save the current value before transferring it from the external memory, and to return the saved value to the register after the operation.
[0069]
Since the intermediate code has an infinite number of such registers, the operation described above is not necessary. Therefore, the number of instructions is small, the program size is reduced, and the communication amount is reduced. Since the
[0070]
[Second embodiment]
The hardware configuration of
[0071]
FIG. 5 shows a specific example of a functional block representing the functional configuration of
[0072]
Specifically, referring to FIG. 5,
[0073]
Further, the
[0074]
The
[0075]
Since native codes to be created differ depending on the device environment such as a CPU and an operating system, the server device 100 of the present embodiment needs to prepare a code converter according to the environment of the device using the server device 100. Therefore, a plurality of code converters must be used properly.
[0076]
In the server device 100 of the present embodiment, the
[0077]
If the virtual machine code program associated with the position information is present in the data managed by the
[0078]
On the other hand, if the data associated with the position information is not a virtual machine code program or does not exist as data, it is processed separately.
[0079]
When the architecture cannot be specified from the client device information included in the processing request, an intermediate code program can be transmitted instead of the native code.
[0080]
FIG. 6 is a flowchart showing a specific example of the operation procedure of
[0081]
Referring to FIG. 6, when execution is started,
[0082]
Next, when a processing request including the position information of the virtual machine code program is received from the
[0083]
If the data associated with the designated position information is a virtual machine code program (YES in S203), the
[0084]
On the other hand, if the data associated with the specified location information is different from the virtual machine code program, or if there is no data associated with the specified location information (NO in S203), the processing is performed separately (S210). ).
[0085]
Next, the
[0086]
If the architecture of the
[0087]
If the architecture of the client device cannot be specified from the processing request from the client device 102 (NO in S206), the intermediate code program is transmitted to the requesting
[0088]
As described above, the response processing in the
[0089]
As described above, the
[0090]
By doing so, it is not necessary to convert the intermediate code program into an executable native code program in the
[0091]
[Third Embodiment]
The hardware configuration of
[0092]
FIG. 7 shows a specific example of a functional block representing the functional configuration of
[0093]
Specifically, referring to FIG. 7,
[0094]
Further, the
[0095]
The
[0096]
In the server device 100 of the present embodiment, the
[0097]
At that time, the
[0098]
FIG. 8 is a flowchart illustrating a specific example of the operation procedure of the
[0099]
Referring to FIG. 8, when receiving a processing request including the position information of the virtual machine code program from client device 102 (S301),
[0100]
If the converted program associated with the program position information is stored in the cache device 222 (YES in S302), the converted program is acquired from the
[0101]
On the other hand, if the converted program associated with the program position information is not stored in the cache device 222 (NO in S302), in steps S303 to S305 and S310, the same processing as the processing shown in the flowchart of FIG. . Then, the virtual machine code-
[0102]
Then, the converted program is stored in the
[0103]
As described above, the response processing in the
[0104]
As described above, the
[0105]
FIG. 9 shows a specific example of the cache table of the
[0106]
Referring to FIG. 9, the first line of the cache table stores the program position information program / Game. class iasd8013. Indicates that imc is stored.
[0107]
In step S301 described above, the
[0108]
Also, in the above-described step S301, the
[0109]
In the cache table, it is preferable that items such as the date and time when the program is stored in the
[0110]
[Fourth Embodiment]
The hardware configuration of
[0111]
When the virtual machine-
[0112]
Here, the optimization performed by the virtual machine-
[0113]
FIGS. 10 to 12 are diagrams showing a specific example in which the virtual machine-
[0114]
FIG. 11 is a diagram showing a specific example of a source code of a virtual machine code program optimized by performing a loop expansion of a for statement in the source code shown in FIG. 10, and the dispInt function call described in the loop is Only the number of loops is recorded, and the for statement has been removed. This eliminates the code for executing the loop the number of times, such as the code for determining whether to continue the loop and the code for jumping to the beginning of the loop, thereby increasing the execution speed of the virtual machine code program.
[0115]
FIG. 12 is a diagram showing a specific example of a source code of a virtual machine code program obtained by inlining the call of the dispInt procedure in the source code shown in FIG. 11 and optimizing the content. System. out. The println procedure is described. As a result, the code for loading the arguments necessary for calling the procedure on the stack and the code for jumping to the procedure are deleted, and the execution speed of the virtual machine code program is correspondingly increased.
[0116]
From these facts, the virtual machine code program which is the source code shown in FIG. 11 has a higher execution speed than the virtual machine code program which is the source code shown in FIG. 10, and the virtual machine code which is the source code shown in FIG. The execution speed of the code program is higher than that of the virtual machine code program which is the source code shown in FIG.
[0117]
Conversely, in general, performing the optimization at the time of conversion requires more time than the normal conversion without performing the optimization, and the more the optimization in the virtual machine-
[0118]
However, if the execution environment has a large memory capacity and the program user attaches importance to the execution speed of the program, the startup time of the program may be long. In the
[0119]
Here, the resource information of the
[0120]
FIG. 13 shows a specific example of a functional block representing the functional configuration of the
[0121]
Referring to FIG. 13,
[0122]
In the
[0123]
When creating a processing request to the
[0124]
If the received program is an intermediate code program, the intermediate-
[0125]
When the
[0126]
The native code finally obtained in this way is combined with a library for performing hardware operation of the
[0127]
In the present embodiment, when the
[0128]
Further, even when the device resources of the
[0129]
Further, even in a case where the execution environment has a large memory capacity of the
[0130]
Note that the
[0131]
The functional configuration of the
[0132]
When the
[0133]
Since the
[0134]
FIG. 15 shows a specific example of a display screen displayed on a display device attached to the
[0135]
The selected and set optimization strength is recorded as a user setting in the setting
[0136]
Specifically, in the present embodiment, it is assumed that whether to emphasize execution speed or startup speed in optimization is specified at four levels. The item specified here becomes a user setting and is notified to the
[0137]
[Fifth Embodiment]
In the information processing system according to the fifth embodiment, it is assumed that the
[0138]
FIG. 16 shows a specific example of a configuration of an information processing system including a
[0139]
Referring to FIG. 16, the information processing system according to the present embodiment has a configuration further including a
[0140]
[0141]
FIG. 17 shows a specific example of a functional block representing the functional configuration of the
[0142]
Referring to FIG. 17,
[0143]
FIG. 18 is a flowchart illustrating a specific example of the operation procedure of the
[0144]
Referring to FIG. 18, when execution is started,
[0145]
Next, when a processing request is received from the
[0146]
If the converted program associated with the program position information is stored in the cache device 422 (YES in S402), the converted program is acquired from the
[0147]
On the other hand, if the converted program associated with the program location information is not stored in the cache device 422 (NO in S402), the
[0148]
The processing response received from the
[0149]
If the data included in the processing response received from the
[0150]
If the data included in the processing response received from the
[0151]
Then, the converted program is stored in the
[0152]
As described above, the response process in the
[0153]
The information processing system according to the present embodiment is configured as described above, and the configuration of
[0154]
Also, in the
[0155]
Further, in order to perform the above-described processing, the
[0156]
Further, the processing method performed in the above-described information processing system can be provided as a program. Such a program is stored in a computer-readable recording medium such as a flexible disk, a compact disc-read only memory (CD-ROM), a read only memory (ROM), a random access memory (RAM), and a memory card attached to a computer. Can be recorded and provided as a program product. Alternatively, the program can be provided by being recorded on a recording medium such as a hard disk incorporated in the computer. Further, the program can be provided by downloading via a network.
[0157]
The provided program product is installed and executed in a program storage unit such as a hard disk. Note that the program product includes the program itself and a recording medium on which the program is recorded.
[0158]
The embodiments disclosed this time are to be considered in all respects as illustrative and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating a specific example of a configuration of an information processing system according to a first embodiment.
FIG. 2 is a block diagram illustrating a specific example of a hardware configuration of a
FIG. 3 is a diagram illustrating a specific example of a functional block representing a functional configuration of a
FIG. 4 is a flowchart illustrating a specific example of an operation procedure of a
FIG. 5 is a diagram illustrating a specific example of a functional block representing a functional configuration of a
FIG. 6 is a flowchart illustrating a specific example of an operation procedure of a
FIG. 7 is a diagram illustrating a specific example of a functional block representing a functional configuration of a
FIG. 8 is a flowchart illustrating a specific example of an operation procedure of a
FIG. 9 is a diagram illustrating a specific example of a cache table included in the
FIG. 10 is a diagram showing a specific example of a source code of a virtual machine code program serving as a conversion source.
FIG. 11 is a diagram showing a specific example of a source code of a virtual machine code program optimized by performing loop unrolling.
FIG. 12 is a diagram illustrating a specific example of a source code of a virtual machine code program optimized by performing inline expansion.
FIG. 13 is a diagram illustrating a specific example of a functional block representing a functional configuration of a
FIG. 14 is a diagram showing a specific example of a functional block representing a functional configuration of a
FIG. 15 is a diagram showing a specific example of a display screen displayed on a display device attached to the
FIG. 16 is a diagram illustrating a specific example of a configuration of an information processing system according to a fifth embodiment, including a
FIG. 17 is a diagram illustrating a specific example of a functional block representing a functional configuration of a
FIG. 18 is a flowchart illustrating a specific example of an operation procedure of a
[Explanation of symbols]
11 CPU, 12 ROM, 13 RAM, 14 HDD, 15 I / F, 101 server device, 102 client device, 103 network, 105 proxy server device, 201, 210, 220 server controller of server device, 202 network I of server device / F, 203 virtual machine-intermediate code converter, 204 data manager, 205 virtual machine code program, 206 data other than virtual machine code program, 211 intermediate code-native code converter of server device, 222 cache device of server device , 301 client controller, 302 client device network I / F, 303 client device intermediate code-native code converter, 304 linker, 305 setting recording area, 306 client device Cache devices, the
Claims (22)
前記受信した処理要求に含まれる前記位置情報に基づいて、プログラムと位置情報とが関連付けれられて格納されている第1の記憶装置から、前記位置情報に関連付けられたプログラムを取得する取得手段と、
前記第1の記憶装置から取得したプログラムが仮想マシンコードで構成されるプログラムである場合に、前記プログラムを特定のクライアント装置に依存しない中間コードで構成されるプログラムに変換する変換手段と、
前記変換したプログラムを前記他の装置に対する処理応答として送信する送信手段とを備える、情報処理装置。Receiving means for receiving a processing request including position information of the program from another device;
Acquiring means for acquiring a program associated with the position information from a first storage device in which a program and position information are associated and stored based on the position information included in the received processing request; and ,
A conversion unit configured to convert the program into a program including intermediate codes independent of a specific client device when the program obtained from the first storage device is a program including virtual machine codes;
An information processing apparatus comprising: a transmission unit configured to transmit the converted program as a processing response to the other apparatus.
前記変換手段は、前記第1の記憶装置から取得したプログラムを、前記受信した処理要求に含まれる前記他の装置の情報に基づいて、前記他の装置に適する構成のプログラムに変換する、請求項1に記載の情報処理装置。The receiving means receives, from the other device, a processing request including the position information of the program and the information of the other device,
The said conversion means converts the program acquired from the said 1st storage device into the program of the structure suitable for the said another apparatus based on the information of the said other apparatus contained in the said received processing request. 2. The information processing device according to 1.
前記受信した処理要求に含まれる前記位置情報に対応する前記変換されたプログラムが、前記第2の記憶装置に格納されている場合に、前記取得手段は、前記第2の記憶装置から前記変換されたプログラムを取得し、
前記送信手段は、前記取得した前記変換されたプログラムを送信する、請求項1に記載の情報処理装置。A storage unit that stores the position information of the program before conversion and the converted program in a second storage device in association with each other;
When the converted program corresponding to the position information included in the received processing request is stored in the second storage device, the obtaining unit may execute the conversion from the second storage device. Get the program
The information processing apparatus according to claim 1, wherein the transmitting unit transmits the obtained converted program.
前記取得手段は、前記受信した処理要求に含まれる前記第1の記憶装置を特定する情報に基づいて、前記特定された第1の記憶装置から前記位置情報に関連付けられたプログラムを取得する、請求項1に記載の情報処理装置。The receiving unit receives, from the other device, a processing request including position information of the program and information specifying the first storage device that stores the program,
The acquisition unit acquires a program associated with the location information from the specified first storage device based on information specifying the first storage device included in the received processing request. Item 2. The information processing device according to item 1.
前記当該情報処理装置の情報は、当該情報処理装置のメモリ空き容量、前記プログラムの実行速度、当該情報処理装置の制御プログラムに関する情報などを含む情報であって、前記処理要求を作成する際に自動的に読出して前記処理要求に含ませることを特徴とする、情報処理装置。An information processing apparatus that issues a processing request to another apparatus including position information of a program and information of the information processing apparatus,
The information of the information processing device is information including a memory free space of the information processing device, an execution speed of the program, information on a control program of the information processing device, and the like. An information processing apparatus characterized in that the information is read out and included in the processing request.
前記他の装置から、前記位置情報に対応するプログラムを取得する取得手段と、
前記他の装置から取得したプログラムを、記憶装置に格納する格納手段とを備え、
前記要求手段は、前記処理要求に含まれる前記位置情報に対応するプログラムが前記記憶装置に格納されていない場合には、前記他の装置に対して前記処理要求を行なう、情報処理装置。Request means for making a processing request including program location information to another device;
Acquiring means for acquiring a program corresponding to the position information from the other device;
Storing means for storing the program acquired from the other device in a storage device,
The information processing device, wherein the request unit issues the processing request to the other device when a program corresponding to the position information included in the processing request is not stored in the storage device.
第1の情報処理装置は、第2の情報処理装置に対してプログラムの位置情報を含む処理要求を行ない、
前記第2の情報処理装置は、前記受信した処理要求に含まれる前記位置情報に基づいて、プログラムと位置情報とが関連付けれられて格納されている第1の記憶装置から、前記位置情報に関連付けられたプログラムを取得し、
前記第1の記憶装置から取得したプログラムが仮想マシンコードで構成されるプログラムである場合に、前記第2の情報処理装置は、前記プログラムを特定のクライアント装置に依存しない中間コードで構成されるプログラムに変換して前記第1の情報処理装置に対して送信する、情報処理システム。An information processing system including a plurality of information processing apparatuses,
The first information processing device issues a processing request including the position information of the program to the second information processing device,
The second information processing device associates a program with position information based on the position information included in the received processing request and associates the program with the position information from the first storage device. Get the program
In a case where the program acquired from the first storage device is a program configured by virtual machine code, the second information processing device executes the program configured by an intermediate code independent of a specific client device. An information processing system, which converts the information to the first information processing apparatus and transmits the converted information to the first information processing apparatus.
前記第2の情報処理装置は、前記第1の記憶装置から取得したプログラムを、前記受信した処理要求に含まれる前記第1の情報処理装置の情報に基づいて、前記第1の情報処理装置に適する構成のプログラムに変換して前記第1の情報処理装置に対して送信する、請求項9に記載の情報処理システム。The first information processing device issues a processing request to the second information processing device including position information of a program and information of the first information processing device,
The second information processing device transmits a program acquired from the first storage device to the first information processing device based on information of the first information processing device included in the received processing request. The information processing system according to claim 9, wherein the information processing system converts the program into a program having a suitable configuration and transmits the program to the first information processing apparatus.
前記第2の情報処理装置は、前記受信した処理要求に含まれる前記第1の記憶装置を特定する情報に基づいて、前記特定された第1の記憶装置から前記位置情報に関連付けられたプログラムを取得する、請求項9に記載の情報処理システム。The first information processing device issues a processing request to the second information processing device including position information of the program and information specifying the first storage device that stores the program,
The second information processing device may execute a program associated with the position information from the specified first storage device based on information that specifies the first storage device included in the received processing request. The information processing system according to claim 9, wherein the information is acquired.
他の装置からプログラムの位置情報を含む処理要求を受付ける受信ステップと、
前記受信した処理要求に含まれる前記位置情報に基づいて、プログラムと位置情報とが関連付けれられて格納されている第1の記憶装置から、前記位置情報に関連付けられたプログラムを取得する取得ステップと、
前記第1の記憶装置から取得したプログラムが仮想マシンコードで構成されるプログラムである場合に、前記プログラムを特定のクライアント装置に依存しない中間コードで構成されるプログラムに変換する変換ステップと、
前記変換したプログラムを前記他の装置に対する処理応答として送信する送信ステップとを実行させる、情報処理プログラム。A program for causing a computer to execute an information processing method in an information processing apparatus,
A receiving step of receiving a processing request including position information of the program from another device;
An obtaining step of obtaining a program associated with the position information from a first storage device in which a program and position information are stored in association with each other based on the position information included in the received processing request; ,
When the program obtained from the first storage device is a program constituted by virtual machine code, a conversion step of converting the program into a program constituted by an intermediate code independent of a specific client device;
A transmitting step of transmitting the converted program as a processing response to the other device.
前記変換ステップは、前記第1の記憶装置から取得したプログラムを、前記受信した処理要求に含まれる前記他の装置の情報に基づいて、前記他の装置に適する構成のプログラムに変換する、請求項14に記載の情報処理プログラム。The receiving step, from the other device, accepts a processing request including the position information of the program and the information of the other device,
The said conversion step converts the program acquired from the said 1st storage device into the program of the structure suitable for the said another apparatus based on the information of the said other apparatus contained in the received processing request. 15. The information processing program according to 14.
前記受信した処理要求に含まれる前記位置情報に対応する前記変換されたプログラムが、前記第2の記憶装置に格納されている場合に、前記取得ステップは、前記第2の記憶装置から前記変換されたプログラムを取得し、
前記送信ステップは、前記取得した前記変換されたプログラムを送信する、請求項14に記載の情報処理プログラム。Storing the position information of the program before the conversion and the converted program in a second storage device in association with each other,
When the converted program corresponding to the position information included in the received processing request is stored in the second storage device, the obtaining step includes the step of obtaining the converted program from the second storage device. Get the program
The information processing program according to claim 14, wherein the transmitting step transmits the acquired converted program.
前記取得ステップは、前記受信した処理要求に含まれる前記第1の記憶装置を特定する情報に基づいて、前記特定された第1の記憶装置から前記位置情報に関連付けられたプログラムを取得する、請求項14に記載の情報処理プログラム。The receiving step receives, from the other device, a processing request including position information of the program and information specifying the first storage device that stores the program,
The acquisition step acquires the program associated with the position information from the specified first storage device based on information that specifies the first storage device included in the received processing request. Item 15. The information processing program according to Item 14.
前記情報処理装置の情報は、前記情報処理装置のメモリ空き容量、前記プログラムの実行速度、前記情報処理装置の制御プログラムに関する情報などを含む情報であって、前記処理要求を作成する際に自動的に読出して前記処理要求に含ませることを特徴とする、情報処理プログラム。A program that causes a computer to execute an information processing method in the information processing apparatus that makes a processing request including position information of the program and information of the information processing apparatus to another apparatus,
The information on the information processing device is information including a memory free space of the information processing device, an execution speed of the program, information on a control program of the information processing device, and the like. An information processing program characterized in that the information is read out and included in the processing request.
他の装置に対してプログラムの位置情報を含む処理要求を行なう要求ステップと、
前記他の装置から、前記位置情報に対応するプログラムを取得する取得ステップと、
前記他の装置から取得したプログラムを記憶装置に格納する格納ステップとを実行させ、
前記要求ステップは、前記処理要求に含まれる前記位置情報に対応するプログラムが前記記憶装置に格納されていない場合には、前記他の装置に対して前記処理要求を行なう、情報処理プログラム。A program for causing a computer to execute an information processing method in an information processing apparatus,
A requesting step of making a processing request including program location information to another device;
From the other device, an acquisition step of acquiring a program corresponding to the position information,
Storing the program acquired from the other device in a storage device, and
The information processing program, wherein in the requesting step, when a program corresponding to the position information included in the processing request is not stored in the storage device, the processing request is issued to the other device.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002355491A JP2004192038A (en) | 2002-12-06 | 2002-12-06 | Information processing apparatus, information processing system, information processing program, and recording medium storing the program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002355491A JP2004192038A (en) | 2002-12-06 | 2002-12-06 | Information processing apparatus, information processing system, information processing program, and recording medium storing the program |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2004192038A true JP2004192038A (en) | 2004-07-08 |
Family
ID=32756173
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2002355491A Pending JP2004192038A (en) | 2002-12-06 | 2002-12-06 | Information processing apparatus, information processing system, information processing program, and recording medium storing the program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2004192038A (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2009544195A (en) * | 2006-07-12 | 2009-12-10 | クゥアルコム・インコーポレイテッド | Method and apparatus for optimization of SIGCOMPUDMVM performance |
| JP2011155642A (en) * | 2010-01-26 | 2011-08-11 | Irdeto Corporate Bv | Computational efficiently obtaining control word in receiver using transformation |
| US8566715B2 (en) | 2008-02-19 | 2013-10-22 | Brother Kogyo Kabushiki Kaisha | Device, method and computer readable medium for processing commands in data described using a page description language |
| JP2015531502A (en) * | 2012-09-05 | 2015-11-02 | マイクロソフト テクノロジー ライセンシング,エルエルシー | Generate native code from intermediate language code for applications |
| WO2019235311A1 (en) * | 2018-06-06 | 2019-12-12 | ソニー株式会社 | Information processing device, information processing method, program, and iot device |
-
2002
- 2002-12-06 JP JP2002355491A patent/JP2004192038A/en active Pending
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2009544195A (en) * | 2006-07-12 | 2009-12-10 | クゥアルコム・インコーポレイテッド | Method and apparatus for optimization of SIGCOMPUDMVM performance |
| JP2016139413A (en) * | 2006-07-12 | 2016-08-04 | クゥアルコム・インコーポレイテッドQualcomm Incorporated | Method and apparatus for optimization of sigcomp udvm performance |
| US8566715B2 (en) | 2008-02-19 | 2013-10-22 | Brother Kogyo Kabushiki Kaisha | Device, method and computer readable medium for processing commands in data described using a page description language |
| JP2011155642A (en) * | 2010-01-26 | 2011-08-11 | Irdeto Corporate Bv | Computational efficiently obtaining control word in receiver using transformation |
| US9106795B2 (en) | 2010-01-26 | 2015-08-11 | Irdeto B.V. | Computational efficiently obtaining a control word in a receiver using transformations |
| JP2015531502A (en) * | 2012-09-05 | 2015-11-02 | マイクロソフト テクノロジー ライセンシング,エルエルシー | Generate native code from intermediate language code for applications |
| US10795652B2 (en) | 2012-09-05 | 2020-10-06 | Microsoft Technology Licensing, Llc | Generating native code from intermediate language code for an application |
| WO2019235311A1 (en) * | 2018-06-06 | 2019-12-12 | ソニー株式会社 | Information processing device, information processing method, program, and iot device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5167589B2 (en) | Application server device and virtual machine program | |
| US7213240B2 (en) | Platform-independent selective ahead-of-time compilation | |
| CN109766099B (en) | Front-end source code compilation method, device, storage medium and computer equipment | |
| CN112685035B (en) | Project development method and device, computer readable storage medium and electronic equipment | |
| JP2004038876A (en) | Method and apparatus for converting data format of programs and the like, and controller management system using the data format conversion apparatus | |
| US20020002605A1 (en) | Server/client system and program for implementing application distribution in this server/client system | |
| CN111913741B (en) | Object interception method, device, medium and electronic equipment | |
| KR20030000926A (en) | Java Compile-On-Demand Service System for Accelerating Processing Speed of Java Program on Data Processing System And Method Thereof | |
| JP2011107752A (en) | Information-processing device, communication system and program | |
| KR20020085876A (en) | Loading Object-Oriented Computer Programs | |
| EP1536322A2 (en) | System and method for developing target application on target system in cross development environment | |
| US20090144711A1 (en) | System and method for common compiler services based on an open services gateway initiative architecture | |
| CN103853535A (en) | Method and device for modifying middleware | |
| US20060070044A1 (en) | Method and apparatus for executing different Java methods | |
| KR20030056446A (en) | File Construction for Mobile Communication Device including Machine-Language-Code Execution Section and File Execution Method using the same | |
| JP2017068655A (en) | Information processing apparatus, method, and program | |
| JP2000122871A (en) | Application distribution method | |
| CN112148386A (en) | Application loading method, device and computer-readable storage medium | |
| KR101117165B1 (en) | Web platform unit for mobile terminal connectioned web-application program in heterogeneous operating system | |
| CN100470481C (en) | Method and apparatus for continuation passing in virtual machines | |
| JP2003216434A (en) | Method and system for optimizing downloaded program by activating user profile data in small it device | |
| US6862650B1 (en) | Data processing system and method for managing memory of an interpretive system | |
| CN116755713A (en) | Application program generation method, device, equipment and storage medium | |
| JP2004192038A (en) | Information processing apparatus, information processing system, information processing program, and recording medium storing the program | |
| CN109408057B (en) | Method, device, medium and computing equipment for automatically generating codes |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20051202 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20080508 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080909 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20081106 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20081209 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20090407 |