JP2004192358A - Two-way communication method for transmitting/receiving between terminal and center side device, and program for two-way communication - Google Patents

Two-way communication method for transmitting/receiving between terminal and center side device, and program for two-way communication Download PDF

Info

Publication number
JP2004192358A
JP2004192358A JP2002359979A JP2002359979A JP2004192358A JP 2004192358 A JP2004192358 A JP 2004192358A JP 2002359979 A JP2002359979 A JP 2002359979A JP 2002359979 A JP2002359979 A JP 2002359979A JP 2004192358 A JP2004192358 A JP 2004192358A
Authority
JP
Japan
Prior art keywords
terminal
center
data
processing result
server
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
JP2002359979A
Other languages
Japanese (ja)
Inventor
Hitoshi Suzuki
仁 鈴木
Tomoteru Shirasawa
智輝 白沢
Hiroyuki Kanazawa
宏幸 金澤
Toshio Hirayama
俊雄 平山
Yuichi Tsujita
祐一 辻田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Japan Atomic Energy Agency
Hitachi Solutions East Japan Ltd
Original Assignee
Fujitsu Ltd
Japan Atomic Energy Research Institute
Hitachi East Japan Solutions Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd, Japan Atomic Energy Research Institute, Hitachi East Japan Solutions Ltd filed Critical Fujitsu Ltd
Priority to JP2002359979A priority Critical patent/JP2004192358A/en
Publication of JP2004192358A publication Critical patent/JP2004192358A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a communication method by which the use environment of a host side application is loosely restricted. <P>SOLUTION: In communication between a terminal and a server, a protocol approved by a firewall is used, and processing is prepared individually for reception and transmission. In the processing for reception and transmission, data is encapsulated by each stateless protocol, permitting two-way asynchronous communications. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、端末とセンタ側の装置との間の双方向の通信技術に関する。
【0002】
【従来の技術】
一般的にクライアント側の端末とセンタ側の装置であるサーバの間の双方向通信には、ソケット方式が広く使われている。ソケットとは、ネットワークにおける接続とデータの送信と受信を受け持つ機能である。ネットワーク上で通信を行う場合、通信を行うコンピュータ間で接続を確立する必要があり、ソケットはその接続の機能と、接続された状態でのデータの送信と受信の機能、接続の切断の機能を有している。
【0003】
ソケットを使用してクライアント側の端末とセンタ側の装置であるサーバの間の双方向通信を行う場合の例を以下に示す。まず初めに、センタ側の装置であるサーバは、ネットワークを介してクライアント側の端末に対して何らかのサービスを提供する。またセンタ側の装置であるサーバでは、そのサービスに対応したポート番号を用意し、常にクライアント側の端末からの接続を待ち受けているようにする。例えばWebサーバであれば、クライアント側の端末のブラウザからの要求に対して、HTMLページを送信するサービスを提供しており、ポート番号80番を使用していることが多い。
【0004】
次にクライアント側の端末は、ネットワークを介してセンタ側の装置であるサーバに対して何らかのサービスを要求し、またその応答に対して処理を行う。またその際クライアント側の端末では、そのサービスに対応したポート番号を使用して、ネットワークを介してサーバに対して接続を行う。例えばWebクライアント側の端末のブラウザであれば、ポート番号として80番を使用してサーバに接続する。それからサーバに対してHTMLページの送信を要求し、その結果としてサーバからHTMLページが送信された場合、ブラウザ側でそのHTMLページの内容を表示する。
【0005】
図1において、センタ側の装置であるサーバ150では、サーバのソケット160を使用し、サービスに対応した固定のポート番号を使用し、クライアント側の端末110からの接続を待ち受ける。クライアント側の端末110のソケット120からその固定ポートに対して接続した場合、サーバ150のソケット160は、新たにそのクライアント側の端末のソケット120と通信するためのセンタ側の装置であるサーバのソケット170を作成し、そのサーバのソケット170がクライアント側の端末のソケット120との通信を行う。この一連の処理の間、サーバ150で接続を待ち受けていたサーバのソケット160は、この新しいサーバのソケット170を作成した後、再度クライアント側端末からの接続を待ち受けている。
【0006】
サーバのソケット160は、クライアント側端末からの接続毎にその端末に対応したサーバのソケット170を順次作成する。クライアント側端末との通信を行うサーバのソケット170では、対応するクライアント側端末のソケット120に対して、ソケット120から送信されたデータ101を受信データ101として受信したり、端末のソケット120に対して送信するデータ103を送信することができる。またサーバのソケット170と端末のソケット120間のデータの送信と受信は非同期に行うことができる。この送信と受信の処理が終了した場合には、端末110のソケット120との接続180を切断する。
【0007】
上述したとおり、端末110のソケット120では、サービスに対応したポート番号を使用し、サーバ150に対して接続する。サーバ150での処理により、サーバ150のソケット170と接続した端末のソケット120では、サーバのソケット170に対して、ソケット170から送信されたデータ103を受信データ103として受信したり、サーバのソケット170に対して送信するデータ101を送信することができる。またクライアント側の端末のソケット120からサーバのソケット170に対してデータの送信と受信は非同期に行うことができる。処理が終了した場合にはサーバのソケット170との接続180を切断する。
【0008】
このように上記サーバとクライアント側の端末へのソケットの適用により、クライアント側の端末とセンタ側の装置であるサーバの間で双方向の通信を行うことができる。
【0009】
このようなクライアント側の端末とセンタ側の装置であるサーバとの間で双方向の通信ができる構成においては、通信は単なるデータの送信と受信だけではなく、新規にデータの構成と内容をクライアント側端末とサーバの間で、プロトコルとして決めることにより、その構成の上で動作するアプリケーションを作成することが可能である。
【0010】
その実装例の一つとしてRPC(Remote Procedure Call)がある。RPCとは、遠隔手続き呼出しであり、プログラムの一部の手続きの実行を、ネットワークに接続した別のマシンに委託するメカニズムである。そのメカニズムは、クライアント側の端末とセンタ側の装置であるサーバとでプロトコルを定め、クライアント側の端末側からデータを送信してセンタ側の装置であるサーバ側の関数を呼び出し、その関数の結果を、上記端末側がサーバ側から受信するというものである。
【0011】
図2において、クライアント側の端末210とセンタ側の装置であるサーバ250との間でプロトコルを定める。次に端末210ではRPCのプロトコルに従い、サーバ250において呼び出す関数とその関数に渡す引数を指定するデータ201を作成する。データ201はソケットにより作成されたソケット通信路290を使用して、サーバ250に対して送信される。サーバ250では、端末210から送信されたデータ201を受信し、RPCのプロトコルに従いデータの内容を解析する。データ内容の解析により、サーバ250で呼び出す関数と関数に渡す引数が取得される。なお、以下に示す英数字「S」はシステム動作手順であるステップを意味している。その後、サーバ250では取得した関数に対して取得した引数を渡してステップS260で、その指定された関数を引数付きで呼び出す。その結果をRPCのプロトコルに従いクライアント側の端末への送信用データ203として作成する。次にそのデータをソケット通信路290を使用して、クライアント端末210に対して送信する。クライアント端末210では、サーバ250によって送信された関数呼び出しの結果のデータ203を取得する。
【0012】
上記RPCにおいて、クライアント側端末からセンタ側のサーバへの手続きの要求を行う処理が1つの場合は、端末からサーバへの手続きの呼び出しの送信と、その結果を端末がサーバから受信するタイミングは同期を取っていても非同期であっても性能は変らない。しかし複数の独立したRPCの処理を行う場合に、ネットワークの資源を有効に使用するため等の理由から、クライアント側端末とセンタ側サーバの接続を複数行わずに、1つの接続の上で、クライアント側端末からサーバへの手続きの要求を行う処理を複数行う必要がある。その場合に、クライアント側端末からセンタ側サーバへの手続きの呼び出しの送信処理と、その送信に対する結果を端末がセンタ側サーバから受信するタイミングで同期を取ったとすると、次の問題が生じる。例えばあるセンタ側サーバ上の手続きの呼び出しがサーバ上で時間がかかった場合、独立した別のRPCによる処理の次の呼び出しが、その分遅れてしまうなど、性能に影響する問題が生じる。
【0013】
また、機能としても独立したRPCの処理に関しては、他の処理に影響されないようにすることが必要である。上述した理由により、クライアント側端末からセンタ側サーバへの手続きの要求を行う処理が複数の場合には、非同期での通信が求められる。非同期の通信が可能であれば、独立したRPCの処理で、ある手続きの呼び出しに時間がかかった場合でも、別のRPCの、手続きの呼び出しには影響を及ぼさない。またRPCに限らず、クライアント側の端末とセンタ側のサーバの間での双方向の通信は、性能や機能の面から非同期での通信が望ましい。
【0014】
このような状況下で、現状のソケットが使用されているクライアント側端末とセンタ側サーバでの通信では、ソケットがデータの送信と受信を非同期で行うことができる。そのため、クライアント側の端末とセンタ側のサーバで、送信と受信を行う処理を、例えばスレッドを使用して個別に作成することにより、上記で求められるような双方向の非同期での通信が可能である。
【0015】
次にソケットが使用されているクライアント側の端末とセンタ側のサーバの通信において、クライアント端末とサーバとで、送信と受信を行う処理を、例えばスレッドとして個別に作成することにより、双方向の非同期での通信を行う例を図3に示す。
【0016】
図3は、クライアント側の端末310とセンタ側のサーバ350の間の通信を、ソケット通信路390を使用して行う場合の例である。この例では、端末310とサーバ350において送信と受信の処理を個別にスレッドで処理することにより、双方向で非同期の通信を行うことに関して述べる。
【0017】
まず実装について説明する。端末310において、ソケット通信路390を用いて送信と受信を行う。その処理を、それぞれ端末の送信スレッド320、端末の受信スレッド330で実装している。またセンタ側のサーバ350において、ソケット通信路390を用いて送信を行う処理と受信を行う処理を、それぞれサーバの送信スレッド370、サーバの受信スレッド360で実装している。
【0018】
次に通信方式に関して述べる。まずクライアント側の端末310で、センタ側のサーバ350へ送信するデータ301が発生し送信が必要になったとする。その場合には、端末310の送信スレッド320において、ソケット通信路390を使用してデータ301を送信する。またクライアント側の端末310でセンタ側のサーバ350からのデータの受信が必要になった場合には、端末310の受信スレッド330において、ソケット通信路390を使用してデータを受信する。この場合、センタ側のサーバ350からクライアント側の端末310に対してデータ303が送信されている場合には端末310はデータ303をクライアントの受信スレッド330で受信することになる。
【0019】
また、センタ側のサーバ350で、クライアント側の端末310へ送信するデータ303が発生し送信が必要になったとする。その場合には、サーバ350の送信スレッド370においてソケット通信路390を使用してデータ303を送信する。またセンタ側のサーバ350で端末310からのデータの受信が必要になった場合には、サーバ350の受信スレッド360においてソケット通信路390を使用してデータを受信する。この場合、端末310からサーバ350に対してデータ301が送信されている場合にはサーバ350はサーバの受信スレッド360でデータ301を受信することになる。
【0020】
現在、一般にインターネットに接続している企業や組織の多くは、セキュリティ上の理由からファイアウォールを使用し、ファイアウォール経由でインターネットに接続している。ファイアウォールとは、インターネットを経由した不特定多数のセンタ側の装置であるサーバへのアクセスに対して、通過点を設定し、そこで全ての入出力をチェックするハードウェアとソフトウェアのことである。このファイアウォールにより、許可されていない通信を遮断し、許可している通信を通過させたりすることが可能である。ところが、このファイアウォールではステートレスなプロトコルであるHTTPやHTTPSのみ使用できるように制限していることが多い。
【0021】
その理由としては、ブラウザを利用して外部から企業の紹介等のホームページへのアクセスを可能としても、それ以外のFTP(ファイル転送プロトコル)等のプロトコルは許可せず、そのことにより内部のファイルの流出や外部から内部へのファイルの侵入を防ぐことができるからである。このような事情から、外部からはブラウザで上述の企業や組織のWebセンタ側の装置であるサーバにアクセスしてホームページを閲覧することはできても、ファイル転送はできないようにすることができる。
【0022】
なお、HTTP(HyperText Transfer Protocol)やHTTPS(Hypertext Transfer Protocol Security)は、WebサーバとWebクライアント(ブラウザ)との間でデータをやりとりするためのプロトコルである。またホームページ等Webブラウザで表示されるデータは、センタ側のサーバ上にHTML(HyperText Markup Language)形式で作成され保存されている。HTML形式で作成されるHypertextとは、文章や画像などに加え、例えばWebブラウザで表示したときに下線のついた文字があり、その文字を選択すると、他の文章が表示可能となるような、他の情報を関連付けした文書のことである。
【0023】
上述のHTTPやHTTPSはHTMLページの表示用のプロトコルであり、ステートレスなプロトコルの1つである。ステートレスなプロトコルとは、クライアント側の端末とセンタ側のサーバとの通信において、通信の開始は必ずクライアント側の端末から行い、端末からの要求の度に新しく接続を確立し、またクライアント側の端末が次回接続したときにはセンタ側のサーバは前回の接続や処理結果を記憶していないプロトコルのことである。そのため処理の流れは、例えば「クライアント側の端末からデータを送信し、センタ側のサーバではそのデータを受信し、その後でそのデータをセンタ側のサーバが処理し、その結果をセンタ側のサーバがクライアント側の端末に送信し、クライアント側の端末がそのデータを受信する」となる。この流れは1リクエスト1レスポンスの形になっている。
【0024】
一般のWebブラウザとWebサーバにおいて、上述で述べた処理の流れは例えば次のようになる。まず、最初にWebブラウザに対して企業または組織のトップページとして公開されているURL(Uniform Resource Locator:インターネットにおける情報の「住所」)を指定する。クライアントの端末であるブラウザは、URLの内容を解析し、目的のWebサーバに対して接続を行う。Webサーバとの接続が完了すると、クライアント側の端末はHTTPプロトコルを使用してセンタ側のサーバに対してHTML形式のデータの送信を要求する。センタ側のサーバはこの要求に対して、指定されたHTML形式のデータを取得してクライアント側の端末に対してデータを送信する。クライアント側の端末ではセンタ側のサーバから送られたデータを受信し、その後、そのデータの内容に従ってフォントサイズの設定や色の設定を行い、トップページの表示を行う。その後ブラウザを使用して他のページを表示する場合には、上記の接続とデータの送受信を再度繰り返し行うことにより、ページの表示を行うことになる。なお、HTTPSは、HTTPに関してセキュリティを付加したプロトコルであり、クライアント側の端末とセンタ側のサーバの間でデータの暗号化と復号化等を行う。
【0025】
また以前はファイアウォールでのプロトコルの制限がなくクライアント側の端末とセンタ側のサーバの間でソケットを使用することができた。しかしながら、現状においてはセキュリティを考慮してファイアウォールを設定することが必要となってきている。従って、ファイアフォールを設定することにより、使用できるプロトコルが、HTTPまたはHTTPSに制限されることになる。この状況において、例えば、以前に動作していた、ソケットを使用することによって実装されたクライアント側の端末とセンタ側のサーバの間、の双方向で非同期な通信を行う構成の上で実装されたRPC等のアプリケーションを動かす要求がある。このように、センタ側のサーバがファイアウォールを経由してネットワークに接続されている状態で、ファイアウォールの制限によりステートレスなプロトコルであるHTTPまたはHTTPSしか使用できない構成の上でも、双方向の非同期通信が動作するように、ソケットを使用していた以前の機能を利用できればたいへん便利である。
【0026】
ファイアウォールを介して接続する端末とセンタ装置間の通信技術を開示する文献としては次のものがある(例えば、特許文献1参照)。
【0027】
特許文献1には、二方向的なプロセス対プロセスのバイトストリームのプロトコルに関する技術が記載されており、詳細には次の内容が開示されている。
「ファイアウォールが使用されているネットワーク環境において分散型プログラミングを利用するための、ファイアウォールを通過する両方向プロセス・トゥ・プロセス・バイト・ストリーム・プロトコル」
【0028】
【特許文献1】
特表2002−517857号公報(段落〔0008〕−〔0009〕)
【0029】
【発明が解決しようとする課題】
上記従来技術では上位のアプリケーションの機能と密接に連携して通信を実現しており、ファイアウォールを使用する環境で使用できるプロトコルによる通信では同期通信しか実現できていない。すなわち上位アプリケーションの使用環境が厳しく制限される。できるだけ使用環境が緩やかなことが望ましい。
【0030】
本発明の目的は、上位のアプリケーションの、使用環境の制限が緩やかな通信方式を提供することである。すなわち、上位のアプリケーションが例えばサブルーチンのように自由度を持って扱える通信技術を提供することである。
【0031】
【課題を解決するための手段】
本発明による解決手段の1つは、端末とセンタ側の装置であるサーバとの通信において、端末からの処理結果の返信依頼に基づきセンタ側装置が送信を行うことである。
【0032】
本発明による解決手段の他の1つは、端末からの処理結果の返信依頼を、処理結果が得られない場合に、繰り返し送信することである。
【0033】
本発明によるさらに他の解決手段は、端末からの処理結果の返信依頼を、上位のプログラムの条件を満たすまで、繰り返し送信することである。本発明の他の解決手段は、クライアント側の端末とセンタ側装置とで、受信用と送信用の処理が相互に干渉することなく独立に任意のタイミングで処理するようにしたことである。その他の解決手段は、以下の、実施の形態の説明、の中で記述する。本発明によれば、上位アプリケーションの使用環境に係る自由度を確保できる。
【0034】
また以下に説明の実施の形態では次のような具体的な実施例の効果がある。
以前からソケットを通信の基盤として使用していたRPC(Remote ProcedureCall)のような上位アプリケーションを、本発明の通信方式、例えばHTTPまたはHTTPS等を使用した通信を基盤とするシステムに、容易に移行することができ、たいへん利用し易くなる。
【0035】
【発明の実施の形態】
上記従来の技術の欄で説明したごとく、セキュリティを考慮すると、ファイアウォールを端末とセンタ側装置との間に設けることが必要である。ファイアフォールを設けると、使用できるプロトコルがHTTPまたはHTTPSなど、特定のものに制限されることになる。
【0036】
以前からソケット方式が使用されている場合、ソケット方式を使用していたことによって端末とセンタ側のサーバとの間ですでに利用されていた、双方向で非同期な通信を行う構成を前提として既に実装されているRPC等のアプリケーションを、セキュリティを強化したファイアウォールを有するシステムで動作させてほしいとの要求が考えられる。このように、センタ側の装置がファイアウォールを経由してネットワークに接続されている状態で、ファイアウォールの制限によりステートレスなプロトコルであるHTTPまたはHTTPSしか使用できない構成の上でも、双方向の非同期通信が動作するようにでき、さらにソケットを使用していた以前のアプリケーション機能を利用できればたいへん便利である。
【0037】
また以下に説明する実施の形態では次のような考え方を考慮している。クライアント側の端末とセンタ側の装置、例えばサーバあるいはホストコンピュータ、の間で、HTTPやHTTPSしか使用できない環境において、HTTPやHTTPSはステートレスなプロトコルであるために、クライアント側の端末からの要求の度に新しく接続を確立し、クライアント側の端末が次回接続したときにはセンタ側の装置(以下代表してサーバと記す)は前回の接続や処理結果を記憶していないという問題がある。この問題を解決することが必要であり、この解決には、セッション管理という方法が考えられる。
【0038】
セッション管理では、センタ側のサーバ側でクライアント側の端末を管理し、クライアント側の端末の、以前の接続時の状況を管理する。そのため、例えば最初の接続でセンタ側のサーバに対して検索用の条件を送信しておき、次回の接続でその検索処理の結果をセンタ側のサーバから受信する、その結果を使用して次の接続では再度検索条件を絞り込んでセンタ側のサーバに送信する、といったような、以前の接続時の状況から今回の接続に対応したデータを送信および受信することが可能となる。しかしセッション管理においても、HTTPやHTTPSの1リクエスト1レスポンス方式は変わらない。そのため、この一連の処理に関しては、センタ側のサーバとクライアント側の端末では同期を取る必要があり、新たな課題が生じる。以下の実施の形態で説明する技術ではこのような課題に対して、図11から図12の説明で後述するように上位のアプリケーションにより簡単に対応できる。
【0039】
以下に説明する本発明の実施の形態では、例えばセンタ側のサーバがファイアウォールを経由してネットワークに接続されている状態で、ファイアウォールの制限によりステートレスなプロトコルであるHTTPやHTTPSしか使用できない場合において、クライアント側の端末とセンタ側のサーバとの間で双方向の非同期な通信を提供し、その上でRPC等のアプリケーションが双方向で非同期な通信を行って動作することを可能とする技術を提案している。
【0040】
また以下の実施の形態は、例えばネットワークを介して接続されたクライアント側の端末とセンタ側のサーバとの間でファイアウォールの制限のためにステートレスなプロトコルであるHTTPやHTTPSしか使用できない環境に対して、双方向の非同期な通信を行うアプリケーションを作成するための基盤の技術を提案している。
【0041】
次に本発明の一実施例について図4〜図10の図面を用いて説明する。
まず初めに、図4に示すシステムは、ネットワーク430を介してセンタ側の装置であるホストコンピュータ、例えばサーバ410とクライアント側の端末440が接続されている。センタ側の装置であるサーバ410はファイアウォール420を介してネットワーク430に接続している。一般に1つのセンタ側装置に接続するクライアント側の端末は1個以上であり、センタ側の装置はネットワークを介して接続する複数のクライアント側の端末440に対して並列的にサービスを提供する。インターネットに接続するセンタ側の装置であるサーバ410は、インターネットの特性上、不特定多数からのアクセスが想定される。そのためこの実施例では、セキュリティの強化の面からファイアウォール420を介してネットワーク430と接続している。このファイアウォール420はセキュリティを強化するために、クライアント側の端末440と接続可能なプロトコルをHTTPやHTTPSといったステートレスなプロトコルに限定している。
【0042】
図5に、クライアント側の端末とセンタ側の装置であるサーバとの間で、双方向で非同期な通信を行うための準備を行う処理のフローを示す。まず初めにクライアント側の端末440はステップ520でステートレスなプロトコルでサーバ410に接続する。ステップS522で端末440はリクエスト524をサーバ410に送信する。リクエスト524には、ストリーム通信の開始を要求する内容が入っている。次にそのリクエスト524を受信したサーバ410では、ステップS560で、接続を行ったクライアント側の端末を一意に識別できる識別情報を作成する。ステップS562で、サーバ410はこの識別情報をレスポンス561によって端末440に送信する。
【0043】
端末440では、上記識別情報を受信し、次の通信からこの識別情報を使用する。すなわちサーバ410へのデータの送信またはサーバ410からのデータの受信といった、サーバとのストリームの処理を行う場合にこの識別情報を使用する。またセンタ側のサーバ410では、複数のクライアント側の端末からの接続がある場合でも、上記識別情報によりクライアント側の端末を識別することが可能になる。
【0044】
双方向で非同期な通信を行うための準備が終了した後は、クライアント側の端末440からセンタ側のサーバ410へのデータの送信、またはクライアント側のサーバからのデータの受信が行われる。
その送受信は、クライアント側の端末440とセンタ側のサーバ410でそれぞれ相互に干渉することなく独立に任意のタイミングで行われる。
これは例えば、スレッドを使用することにより、双方向で非同期な通信が実現される。
【0045】
以下に、クライアント側の端末440からセンタ側の装置であるサーバ410へのデータの送信と、クライアント側の端末440でのサーバ410からのデータの受信の処理を説明する。
【0046】
図6は、クライアント側の端末440からセンタ側の装置であるサーバ410へのデータの送信方法のフローを示す。
最初にクライアント側の端末440からステートレスなプロトコルで、サーバ410に接続する。次にステップS620でクライアント側の端末を一意に識別できる識別情報とデータを伝送情報に設定して、クライアント側の端末からセンタ側のサーバへ、リクエスト621として送信する。センタ側のサーバ410ではその情報を受信し、ステップS660でクライアント側の端末を識別する識別情報を使用し、クライアント側の端末440からのデータを受信する準備をする。その後、センタ側の装置であるサーバ410ではステップS670でクライアント側の端末440から送信されたデータを受信する。
【0047】
センタ側の装置であるサーバ410ではそのデータを受信した後で、ステップS680で、正しくデータを受信したことを表すデータを作成しレスポンス681としてクライアント側の端末440に送信する。クライアント側の端末はセンタ側の装置であるサーバに対して送信するデータが発生する度に上記のデータ送信方式に従いデータの送信を行う。
【0048】
図7に、クライアント側の端末440からセンタ側の装置であるサーバ410に対してデータを送信する処理で使用される、HTTPのリクエスト710(第1のカプセル化したデータ)とそのレスポンス720(第2のカプセル化したデータ)の内容を示す。HTTPリクエスト710には、データのHTTPプロトコルによる通信情報のカプセル化により次の情報が設定されている。すなわちそれは、HTTPヘッダ、センタ側の装置であるサーバ410がクライアント側の端末440を一意に識別する情報、このHTTPリクエストがクライアント側の端末440からセンタ側のサーバ410へのデータの送信であることを表す情報、および送信するデータ711の各情報である。
またHTTPレスポンス720には、HTTPヘッダとセンタ側の装置であるサーバで設定した送信処理の成否が設定されている。
【0049】
図8に、センタ側のサーバ410からのデータを受信するクライアント側の端末440の受信方法を示す。
まず、クライアント側の端末440からステートレスなプロトコルでセンタ側の装置であるサーバ410に接続し、ステップS820でクライアント側の端末440を一意に識別できる情報をリクエスト821としてセンタ側の装置であるサーバ410に送信する。
次にセンタ側の装置であるサーバ410ではその情報を受信した後で、ステップS860でクライアント側の端末440へのデータ送信の準備としてクライアント側の端末へ送信するデータを検索する。
【0050】
検索した結果、データが有る場合には、センタ側の装置であるサーバ410はステップS870でクライアント側の端末440に対してそのデータをレスポンス871として送信する。
【0051】
データが無い場合には、センタ側のサーバ410はリクエスト821が届いてから一定時間内かどうかの判定を行うステップS880を行う。ステップS880では現在の時間が、リクエストがサーバ410に届いてから一定時間内かどうかを確認し、一定時間内であればデータの検索を行うステップS860を続けて行う。一定時間を過ぎた場合には、ステップS890の処理に移りデータが無かったことを、クライアントにレスポンス891で送信する。上述したとおり、センタ側の装置であるサーバ410は、一定時間内にデータが有る場合には、ステップS870でクライアント側の端末440に対してそのデータをレスポンスS871として送信する。
【0052】
検索処理S860で一定時間を過ぎた場合には、センタ側の装置であるサーバ410はステップS890でクライアント側の端末440に対してデータが無かったことを表すデータをレスポンス891として送信する。次にステップS891では本実施の処理を呼び出す上位のアプリケーションの要求処理を満たすか否かを判断する。その要求処理とは要求データの受信を完了した場合などである。要求処理を満足した場合は本処理を終了し、満足しない場合はステップS820に戻る。なおステップS891は上位のアプリケーションの使用方法によっては無くてもかまわない。一方クライアント側の端末440は、クライアント側の端末とセンタ側のサーバが通信を開始した直後、または一旦上記データ受信方式に従いデータ受信のリクエストを発行しレスポンスが返ってきた後で、常に上記のデータ受信方式に従いデータの受信を行う。
【0053】
クライアント側の端末440からセンタ側のサーバ410へのリクエストは、クライアント側端末の上位のアプリケーションで終了を指示するまで続けられる。
【0054】
図9は、クライアント側の端末440がセンタ側の装置であるサーバ410からデータを受信する処理で使用されるHTTPのリクエストとレスポンスのデータの内容を示している。
HTTPリクエスト910(第3のカプセル化したデータ)では、データのHTTPプロトコルによる通信情報のカプセル化により次の情報が設定されている。すなわちそれは、HTTPヘッダ、センタ側の装置であるサーバがクライアント側の端末を一意に識別する情報、このHTTPリクエストでクライアント側の端末440がセンタ側の装置であるサーバ410からデータを受信することを表す情報である。
【0055】
HTTPレスポンス920(第4のカプセル化したデータ)では、図8の870でセンタ側のサーバ410からクライアント側の端末440に送信されるHTTPレスポンス871のデータの内容を示している。そこでは、受信データがあることを表す情報と、センタ側のサーバ410からクライアント側の端末440に送信するデータ921を設定している。一方、HTTPレスポンス930(第4のカプセル化したデータ)では、図8の890でセンタ側の装置410からクライアント側の端末440に送信されるHTTPレスポンス891のデータの内容を示している。
ここでは、受信データがないことを表す情報を設定している。
【0056】
図10は、本発明によるクライアント側の端末440とセンタ側の装置であるサーバ410との間の通信を独立した2本のHTTP通信である送信用HTTP通信1110と受信用HTTP通信1120を使用して行う構成を示す。この構成では、クライアント側の端末440とセンタ側のサーバ410において送信と受信の処理を個別に独立して行う方法を示している。
【0057】
その方法は、スレッドで送信および受信に関する処理を行うことにより、双方向で非同期の通信を行うことである。以下、その処理を説明する。まずその処理の実装に関して述べる。クライアント側の端末440においては、送信用HTTP通信1110を使用して送信を行う処理をクライアント側の端末440の送信スレッド1020で、受信用HTTP通信1120を使用して受信を行う処理をクライアント側の端末440の受信スレッド1030で実装している。またセンタ側の装置であるサーバ410においては、送信用HTTP通信1110を使用して受信を行う処理をサーバ410の受信スレッド1060、受信用HTTP通信1120を使用して送信を行う処理をサーバ410の送信スレッド1070で実装している。
【0058】
次に処理の流れについて説明する。まずクライアント側の端末440で、センタ側の装置であるサーバ410へ送信するデータ1001が上位のアプリケーションで発生し、送信が必要になった場合に次の処理を行う。
このデータ1001は例えばある目的の演算処理をセンタ側装置に行わせるものである。
【0059】
上記データの送信では、クライアント側の端末440の送信スレッド1020を使用して送信を開始し、送信用HTTP通信1110を使用して図6に示す方式でデータ1001をセンタ側の装置であるサーバ410に対して送信する。データ1001は図7のHTTPリクエストの送信するデータ711に相当する。サーバ410に送信するデータはリクエスト621であり、その結果をサーバからレスポンス681として受信する。
【0060】
またクライアント側の端末440では、クライアント側の端末の受信スレッド1030によりセンタ側のサーバ410からのデータ1003の受信処理を行う。
この受信処理は図8に示す方式で、まず受信要求を表すリクエストをセンタ側のサーバ410に送信する。
【0061】
この受信要求を表すリクエストは、クライアント側の端末440の通信開始直後、または一旦クライアント側の端末の受信スレッド1030でセンタ側のサーバ410からのレスポンスを受け取った後で、常にセンタ側のサーバ410に対して送信しておく。次にセンタ側のサーバ410からライアント側の端末440に対して、送信するべきデータ1003が送られた場合には、クライアント側の端末440はデータ1003をセンタ側の装置であるサーバ410から受信する。サーバのデータ1003は例えば上記データ1001に基づく演算処理の結果として発生したデータであり、上記演算処理が終了すると上記端末440の識別情報が付加されて保持される。サーバ410は、図8のステップS860でこのデータの有無、すなわちリクエストされた演算処理の終了の有無および処理結果としてのデータの有無を検索する。上記処理結果であるデータ1003を上記識別情報に基づく検索により見つけると、上述のとおり、そのデータ1003を受信スレッド1030へ送信する。データ1003は図9のHTTPレスポンスの受信するデータ921に相当する。クライアント端末440に送信するデータはレスポンス871であり、その要求はクライアント端末440からリクエスト821として受信する。
【0062】
すなわち、センタ側の装置であるサーバ410ではリクエストに基づく処理を行った結果、クライアント側の端末440へ送信するべきデータ1003が発生した場合には、このデータを送信するため、サーバ410の送信スレッド1070を使用して送信を開始し、受信用HTTP通信1120を使用してデータを送信する。
【0063】
データの送信は、以下のステップの処理により実行される。
そのステップは、センタ側の装置であるサーバ410で、クライアント側の端末440に対する識別可能な情報等のデータを設定し、その情報をもとに図8のデータの検索でデータの取得が行われる。
またセンタ側のサーバ410は、クライアント側の端末440からのデータの受信が必要になった場合に、サーバ410の受信スレッド1060を使用して受信を開始し、送信用HTTP通信1110を使用してデータ1001を受信する。
【0064】
上述のように本実施例では、送信用HTTP通信路1110と受信用通信路1120を確保し続けることができる。この処理の終了処理は、例えば端末440の上位のアプリケーションプログラムが終了を判断し、指示した場合その中断命令によって実施される。
【0065】
以上、述べたように上記実施の形態によれば、ファイアウォールを通過するステートレスなプロトコルを用いて双方向で非同期な通信を実行できる。さらに、本方法は機能が独立しており、関数化できるので、上位アプリケーションとの密着度が少なく、上位アプリケーションからサブルーチン的に用いることができる。そのために、他の通信方法を使用していたシステムを本実施例の方式を用いたシステムに移行することが容易である。
【0066】
また、本実施例の方式で部分的に同期処理を実行するように上位のアプリケーションで調整することも、本実施例の機能独立性の高さから用意に実現できる。上位のアプリケーションから本発明の実施例の方法を用いて、部分的に同期処理を行う方法を図11と図12を用いて説明する。まず、図11は非同期で動作する本実施例で説明した関数を非同期処理で用いる上位アプリケーションの使用例である。Sub1、Sub2、Sub3は本実施例の方法で動作する関数、arg1、arg2、arg3はその関数の引数、Prid1、Prid2、Prid3は各関数が取得したプロセスidである。まずステップS1101で関数Sub1をコールする。続いてステップS1102で関数Sub2をコールし、さらに続いてステップS1103で関数Sub3をコールする。 この処理によりステップS1101からステップS1103は、それぞれ非同期で動作する。
【0067】
図12は非同期で動作する本実施例で説明した関数を同期処理で用いる上位アプリケーションの使用例である。Sub1、Sub2、Sub3は本実施例の方法で動作する関数、arg1、arg2、arg3はその関数の引数、Prid1、Prid2、Prid3は各関数が取得したプロセスidである。まずステップS1101で関数Sub1をコールする。ついでステップS1202でプロセスPrid1が終了するまで待機する。プロセスPrid1の終了を確認したのちステップS1203で関数Sub2をコールする。同様にステップS1204でプロセスPrid2が終了するまで処理を止めて待機する。プロセスPrid2が終了するのを確認したのち、ステップS1205で関数Sub3をコールする。 この一連の処理によりステップS1201、ステップS1203 、ステップS1205は、それぞれ同期をとって順番に動作する。
【0068】
また本実施例に関して、例えばクライアント側の端末をJava(R)のアプレット、センタ側の装置であるサーバをJava(R)のサーブレットで実装することも可能である。
その場合には、以下のような方法でクライアント側の端末とセンタ側の装置であるサーバの間の、データの送信と受信に関して保守・点検や異常が発生した場合の原因を確認する方法が実装できる。
【0069】
まずクライアント側の端末側では、Java(R)コンソールに対して、送信用のHTTP通信のリクエストとレスポンスの内容と、受信用のHTTP通信のリクエストとレスポンスの内容を出力する。次にセンタ側の装置であるサーバ側では、送信用のHTTP通信と受信用のHTTP通信によりクライアント側の端末から送信されたリクエストと、クライアント側の端末に返却するレスポンスの内容を、サーブレットの使用するログファイルに出力する。
このようにクライアント側の端末とセンタ側の装置であるサーバの上記出力を合わせて確認することにより、データが正確に送信または受信されているかを確認することができる。
【0070】
さらに、これまでにクライアント側の端末とセンタ側のサーバにおいてソケット等のファイアウォールなどのセキュリティ機能を通過できない通信機能を使用してアプリケーションを開発していた場合においても前述の方法を用いることで、ファイアウォールを通過する双方向の非同期な通信を行うアプリケーションへの移行がたいへん簡単になる。
【0071】
【発明の効果】
本発明では、自由度の大きい通信方式あるいは通信方式に係る技術を提供できる。
また上記実施の形態に記載の技術によれば、ファイアウォールによる制限を意識せずに、双方向の非同期な通信を行うアプリケーションを作成することがたいへん簡単になる。
【図面の簡単な説明】
【図1】クライアント側の端末とセンタ側の装置であるサーバの間をソケットで接続した場合の処理の例を示す図である。
【図2】クライアント側の端末とセンタ側の装置であるサーバの間の、通信の基盤をソケットで作成した場合で、上位のアプリケーションとしてRPCを実装した場合の処理の例を示す図である。
【図3】クライアント側の端末とセンタ側の装置であるサーバの間の、通信の基盤をソケットで作成した場合で、スレッドを使用することにより双方向で非同期の通信を行う例を示す図である。
【図4】クライアント側の端末とセンタ側の装置であるサーバがネットワークにより接続されていることを示す図である。
【図5】クライアント側の端末とセンタ側の装置であるサーバが通信の準備を行う処理を示す図である。
【図6】クライアント側の端末からセンタ側の装置であるサーバに対してデータを送信する処理を示す図である。
【図7】クライアント側の端末からセンタ側の装置であるサーバに対してデータを送信する処理で使用されるHTTPのリクエストとレスポンスのデータの内容を示す図である。
【図8】クライアント側の端末がセンタ側の装置であるサーバからデータを受信する処理を示す図である。
【図9】クライアント側の端末がセンタ側の装置であるサーバからデータを受信する処理で使用されるHTTPのリクエストとレスポンスのデータの内容を示す図である。
【図10】クライアント側の端末とセンタ側の装置であるサーバの間の、通信の基盤をHTTP通信で作成した場合で、スレッドを使用することにより双方向で非同期の通信を行う例を示す図である。
【図11】上位アプリケーションの非同期処理での使用例である。
【図12】上位アプリケーションの同期処理での使用例である。
【符号の説明】
101・・・クライアント側の端末からセンタ側のサーバに送信するデータおよびセンタ側のサーバが受信するデータ、103・・・センタ側のサーバからクライアント側の端末に送信するデータおよびクライアント側の端末が受信するデータ、110・・・クライアント側の端末、120・・・クライアント側の端末のソケット、150・・・センタ側の装置であるサーバ、160・・・センタ側のサーバのソケット、170・・・作成されたサーバのソケット、180・・・クライアントとサーバのソケットによる接続、201・・・RPCに従い作成された端末からサーバに送信するデータおよびサーバが受信するデータ、203・・・RPCに従い作成された端末に送信するデータおよびクライアント側の端末が受信するデータ、210・・・クライアント側の端末、250・・・センタ側のサーバ、290・・・ソケット通信路、301・・・クライアント側の端末からサーバに送信するデータおよびサーバが受信するデータ、303・・・サーバからクライアント側の端末に送信するデータおよびクライアント側の端末が受信するデータ、310・・・クライアント側の端末、320・・・クライアント側の端末の送信スレッド、330・・・クライアント側の端末の受信スレッド、350・・・センタ側のサーバ、360・・・センタ側の装置であるサーバの受信スレッド、370・・・サーバの送信スレッド、390・・・ソケット通信路、410・・・センタ側のサーバ、420・・・ファイアウォール、430・・・ネットワーク、440・・・クライアント側の端末、524・・・クライアント側の端末からのリクエスト、561・・・サーバからのレスポンス、621・・・クライアント側の端末からのリクエスト、681・・・サーバからのレスポンス、710・・・クライアント側の端末からデータを送信する場合のHTTPリクエスト、711・・・クライアントがサーバに送信するデータ、720・・・クライアント側の端末からデータを送信する場合のHTTPレスポンス、821・・・クライアント側の端末からのリクエスト、871・・・センタ側の装置であるサーバからのレスポンス、891・・・センタ側の装置であるサーバからのレスポンス、910・・・クライアント側の端末がデータを受信する場合のHTTPリクエスト、920・・・センタ側の装置であるサーバがクライアント側の端末に送信するデータがある場合のHTTPレスポンス、921・・・サーバがクライアントに送信するデータ、930・・・センタ側の装置であるサーバがクライアント側の端末に送信するデータがない場合のHTTPレスポンス、1001・・・クライアント側の端末からセンタ側の装置であるサーバに送信するデータ、1003・・・センタ側の装置であるサーバからクライアント側の端末に送信するデータ、1020・・・クライアント側の端末の送信スレッド、1030・・・クライアント側の端末の受信スレッド、1060・・・センタ側の装置であるサーバの受信スレッド、1070・・・センタ側の装置であるサーバの送信スレッド、1110・・・送信用HTTP通信、1120・・・受信用HTTP通信
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a bidirectional communication technology between a terminal and a device on the center side.
[0002]
[Prior art]
Generally, a socket method is widely used for two-way communication between a terminal on the client side and a server as a device on the center side. The socket is a function that handles connection and transmission and reception of data in a network. When communicating on a network, it is necessary to establish a connection between the communicating computers, and the socket has the function of the connection, the function of transmitting and receiving data while connected, and the function of disconnecting the connection. Have.
[0003]
An example in which bidirectional communication is performed between a terminal on the client side and a server as a device on the center side using a socket will be described below. First, a server, which is a device on the center side, provides some service to a terminal on the client side via a network. Also, the server, which is a device on the center side, prepares a port number corresponding to the service and always waits for a connection from the terminal on the client side. For example, a Web server provides a service for transmitting an HTML page in response to a request from a browser of a client terminal, and often uses a port number of 80.
[0004]
Next, the terminal on the client side requests some service from the server, which is a device on the center side, via the network, and processes the response. At that time, the client terminal uses a port number corresponding to the service to connect to the server via the network. For example, in the case of a browser of a terminal on the Web client side, a port number 80 is used to connect to the server. Then, the server requests the server to transmit the HTML page. As a result, when the HTML page is transmitted from the server, the content of the HTML page is displayed on the browser side.
[0005]
In FIG. 1, a server 150 as a device on the center side uses a socket 160 of the server, uses a fixed port number corresponding to a service, and waits for a connection from a terminal 110 on a client side. When a connection is made from the socket 120 of the client terminal 110 to the fixed port, the socket 160 of the server 150 is a server socket that is a device on the center side for newly communicating with the socket 120 of the client terminal. 170 is created, and the socket 170 of the server communicates with the socket 120 of the terminal on the client side. During this series of processes, the socket 160 of the server that has been waiting for a connection in the server 150 has created a socket 170 for this new server, and is again waiting for a connection from the client terminal.
[0006]
For the server socket 160, a server socket 170 corresponding to the terminal is sequentially created for each connection from the client terminal. In the socket 170 of the server that communicates with the client terminal, the data 101 transmitted from the socket 120 is received as received data 101 for the corresponding socket 120 of the client terminal. The data 103 to be transmitted can be transmitted. Transmission and reception of data between the server socket 170 and the terminal socket 120 can be performed asynchronously. When the transmission and reception processes are completed, the connection 180 between the terminal 110 and the socket 120 is disconnected.
[0007]
As described above, the socket 120 of the terminal 110 connects to the server 150 using the port number corresponding to the service. As a result of the processing in the server 150, the socket 120 of the terminal connected to the socket 170 of the server 150 receives the data 103 transmitted from the socket 170 as received data 103, Can be transmitted. Data transmission and reception from the client terminal socket 120 to the server socket 170 can be performed asynchronously. When the processing is completed, the connection 180 with the socket 170 of the server is disconnected.
[0008]
As described above, by applying the socket to the server and the terminal on the client side, two-way communication can be performed between the terminal on the client side and the server as the device on the center side.
[0009]
In such a configuration in which bidirectional communication can be performed between the client terminal and the server serving as the center device, communication is not merely transmission and reception of data, but a new data configuration and contents are transmitted to the client. By deciding as a protocol between the terminal and the server, it is possible to create an application that operates on that configuration.
[0010]
One of the implementation examples is RPC (Remote Procedure Call). RPC is a remote procedure call, and is a mechanism for entrusting execution of some procedures of a program to another machine connected to a network. The mechanism defines a protocol between the client terminal and the server that is the center device, transmits data from the client terminal, calls the server function that is the center device, and returns the result of the function. Is received from the server by the terminal.
[0011]
In FIG. 2, a protocol is determined between a terminal 210 on the client side and a server 250 which is a device on the center side. Next, the terminal 210 creates data 201 specifying a function to be called in the server 250 and arguments to be passed to the function according to the RPC protocol. The data 201 is transmitted to the server 250 using the socket communication path 290 created by the socket. The server 250 receives the data 201 transmitted from the terminal 210 and analyzes the contents of the data according to the RPC protocol. By analyzing the data content, a function to be called by the server 250 and arguments to be passed to the function are obtained. It should be noted that the following alphanumeric characters “S” mean steps which are system operation procedures. Thereafter, the server 250 passes the acquired argument to the acquired function, and calls the specified function with the argument in step S260. The result is created as transmission data 203 to the client terminal according to the RPC protocol. Next, the data is transmitted to the client terminal 210 using the socket communication path 290. The client terminal 210 acquires the data 203 of the result of the function call transmitted by the server 250.
[0012]
In the above RPC, when there is one process for requesting a procedure from the client terminal to the server on the center side, the transmission of the procedure call from the terminal to the server and the timing at which the terminal receives the result from the server are synchronized. The performance does not change regardless of whether it is taken or asynchronous. However, in the case of performing a plurality of independent RPC processes, the client side terminal and the center side server are not connected a plurality of times, and the client It is necessary to perform a plurality of processes for requesting a procedure from the side terminal to the server. In this case, if the process of transmitting the procedure call from the client terminal to the center server and the timing at which the terminal receives the result of the transmission from the center server are synchronized, the following problem occurs. For example, if a procedure call on a certain server on the center side takes a long time on the server, the next call for processing by another independent RPC will be delayed by that much, causing a problem that affects performance.
[0013]
In addition, it is necessary to make the RPC process independent as a function unaffected by other processes. For the reasons described above, when there are a plurality of processes for requesting a procedure from the client terminal to the center server, asynchronous communication is required. If asynchronous communication is possible, even if it takes time to call a procedure in independent RPC processing, it will not affect the call to a procedure of another RPC. In addition to the RPC, the bidirectional communication between the terminal on the client side and the server on the center side is desirably an asynchronous communication in terms of performance and functions.
[0014]
In such a situation, in communication between the client-side terminal using the current socket and the center-side server, the socket can asynchronously transmit and receive data. For this reason, by separately creating, for example, a thread using a thread to perform transmission and reception processing between the client-side terminal and the center-side server, bidirectional asynchronous communication as required above can be performed. is there.
[0015]
Next, in the communication between the client-side terminal and the center-side server in which the socket is used, the client terminal and the server separately perform transmission and reception processes, for example, as threads, thereby enabling bidirectional asynchronous communication. FIG. 3 shows an example in which the communication is performed by the communication.
[0016]
FIG. 3 shows an example in which communication between the client-side terminal 310 and the center-side server 350 is performed using the socket communication path 390. In this example, a description will be given of bidirectional and asynchronous communication by processing the transmission and reception processes separately in the terminal 310 and the server 350 by using threads.
[0017]
First, the implementation will be described. In the terminal 310, transmission and reception are performed using the socket communication path 390. The processing is implemented by the transmission thread 320 of the terminal and the reception thread 330 of the terminal, respectively. Further, in the server 350 on the center side, a process of performing transmission using the socket communication path 390 and a process of performing reception are implemented by a server transmission thread 370 and a server reception thread 360, respectively.
[0018]
Next, the communication method will be described. First, it is assumed that data 301 to be transmitted to the server 350 on the center side is generated on the terminal 310 on the client side and transmission is necessary. In this case, the transmission thread 320 of the terminal 310 transmits the data 301 using the socket communication path 390. When the client terminal 310 needs to receive data from the server 350 on the center side, the reception thread 330 of the terminal 310 receives data using the socket communication path 390. In this case, when the data 303 is transmitted from the server 350 on the center side to the terminal 310 on the client side, the terminal 310 receives the data 303 by the reception thread 330 of the client.
[0019]
It is also assumed that data 303 to be transmitted to the terminal 310 on the client side is generated in the server 350 on the center side, and transmission is required. In that case, the transmission thread 370 of the server 350 transmits the data 303 using the socket communication path 390. When the server 350 on the center side needs to receive data from the terminal 310, the data is received using the socket communication path 390 in the reception thread 360 of the server 350. In this case, when the data 301 is transmitted from the terminal 310 to the server 350, the server 350 receives the data 301 by the receiving thread 360 of the server.
[0020]
At present, many companies and organizations generally connected to the Internet use a firewall for security reasons and connect to the Internet through the firewall. A firewall refers to hardware and software for setting a passing point and checking all inputs and outputs there for access to an unspecified number of servers on the center side via the Internet. With this firewall, it is possible to block unauthorized communication and pass allowed communication. However, in many cases, this firewall restricts the use of only stateless protocols such as HTTP and HTTPS.
[0021]
The reason is that even if a browser can be used to access a homepage such as an introduction of a company from the outside, other protocols such as FTP (File Transfer Protocol) are not permitted. This is because it is possible to prevent a file from leaking out or intruding from the outside into the inside. Under such circumstances, it is possible to prevent a file from being transferred even if the user can access the server, which is a device on the Web center side of the company or organization described above, with a browser from the outside and browse the home page.
[0022]
Note that HTTP (HyperText Transfer Protocol) and HTTPS (Hypertext Transfer Protocol Security) are protocols for exchanging data between a Web server and a Web client (browser). Data displayed on a Web browser such as a homepage is created and stored in HTML (HyperText Markup Language) format on a server on the center side. Hypertext created in the HTML format includes, for example, text that is underlined when displayed on a Web browser in addition to text and images, and when the character is selected, another text can be displayed. This is a document to which other information is associated.
[0023]
The above-described HTTP and HTTPS are protocols for displaying HTML pages, and are one of stateless protocols. A stateless protocol is a communication between a client terminal and a server at the center, where communication is always initiated from the client terminal, and a new connection is established each time a request is made from the terminal. When the next connection is made, the server on the center side does not store the previous connection or processing result. For this reason, the processing flow is, for example, "transmit data from the client terminal, receive the data at the server on the center side, and then process the data on the server on the center side, and the server on the center side processes the result. The data is transmitted to the client terminal, and the client terminal receives the data. " This flow is in the form of one request and one response.
[0024]
In a general Web browser and Web server, the flow of the processing described above is, for example, as follows. First, a URL (Uniform Resource Locator: “address” of information on the Internet) that is disclosed as a top page of a company or organization to a Web browser is specified. A browser, which is a client terminal, analyzes the contents of the URL and connects to a target Web server. When the connection with the Web server is completed, the terminal on the client side requests transmission of data in HTML format to the server on the center side using the HTTP protocol. In response to this request, the server on the center side acquires the specified HTML format data and transmits the data to the terminal on the client side. The client terminal receives the data sent from the center server, and then sets the font size and color according to the contents of the data, and displays the top page. Thereafter, when another page is displayed using the browser, the page is displayed by repeating the above connection and transmission / reception of data again. Note that HTTPS is a protocol with security added to HTTP, and performs encryption and decryption of data between a terminal on the client side and a server on the center side.
[0025]
Previously, there was no restriction on the protocol in the firewall, and sockets could be used between the terminal on the client side and the server on the center side. However, at present, it is necessary to set a firewall in consideration of security. Therefore, by setting the firewall, the protocol that can be used is limited to HTTP or HTTPS. In this situation, for example, it was implemented on a configuration that performs bidirectional and asynchronous communication between a client-side terminal and a center-side server that were previously implemented by using sockets and that was implemented using sockets. There is a request to run an application such as RPC. In this way, in a state where the server on the center side is connected to the network via the firewall, bidirectional asynchronous communication operates even in a configuration in which only a stateless protocol, HTTP or HTTPS, can be used due to firewall restrictions. It would be very useful if you could take advantage of the old features that used sockets.
[0026]
There are the following documents that disclose communication technology between a terminal connected through a firewall and a center device (for example, see Patent Document 1).
[0027]
Patent Literature 1 discloses a technology related to a protocol of a bidirectional process-to-process byte stream, and specifically discloses the following content.
"A two-way process-to-process byte stream protocol through firewalls to take advantage of distributed programming in network environments where firewalls are used"
[0028]
[Patent Document 1]
JP-T-2002-517857 (paragraphs [0008]-[0009])
[0029]
[Problems to be solved by the invention]
In the above prior art, communication is realized in close cooperation with the function of a higher-level application, and only synchronous communication can be realized in communication using a protocol that can be used in an environment using a firewall. That is, the usage environment of the host application is severely restricted. It is desirable that the use environment is as gentle as possible.
[0030]
An object of the present invention is to provide a communication method in which the use environment of a higher-level application is moderately restricted. In other words, it is an object of the present invention to provide a communication technique in which a higher-level application can be handled with a degree of freedom like a subroutine.
[0031]
[Means for Solving the Problems]
One of the solutions according to the present invention is that, in communication between a terminal and a server which is a device on the center side, the center side device transmits based on a request for returning a processing result from the terminal.
[0032]
Another solution according to the present invention is to repeatedly transmit a request for returning a processing result from a terminal when the processing result cannot be obtained.
[0033]
Still another solution according to the present invention is to repeatedly transmit a request for returning a processing result from a terminal until the condition of a higher-order program is satisfied. Another solution of the present invention is that the processing for reception and the processing for transmission are independently performed at an arbitrary timing between the client-side terminal and the center-side device without mutual interference. Other solutions are described in the following description of the embodiments. According to the present invention, it is possible to secure the degree of freedom relating to the usage environment of the host application.
[0034]
In the embodiment described below, there are the effects of the following specific examples.
A higher-level application such as RPC (Remote Procedure Call), which previously used a socket as a communication base, can be easily transferred to a system based on communication using the communication method of the present invention, for example, HTTP or HTTPS. Can be very easy to use.
[0035]
BEST MODE FOR CARRYING OUT THE INVENTION
As described in the section of the related art, when considering security, it is necessary to provide a firewall between the terminal and the center-side device. Providing a firewall limits the protocols that can be used to specific ones, such as HTTP or HTTPS.
[0036]
If the socket method has been used for a long time, the two-way asynchronous communication that has already been used between the terminal and the server on the center side due to the use of the socket method has already been assumed. There is a demand that an application such as an RPC that is mounted be operated on a system having a firewall with enhanced security. As described above, in a state where the center-side device is connected to the network via the firewall, bidirectional asynchronous communication operates even in a configuration in which only a stateless protocol, HTTP or HTTPS, can be used due to firewall restrictions. It would be very useful to be able to do so, and to take advantage of the old application features that used sockets.
[0037]
In the embodiment described below, the following concept is considered. In an environment where only HTTP or HTTPS can be used between a client-side terminal and a center-side device, for example, a server or a host computer, HTTP or HTTPS is a stateless protocol. A new connection is established, and when the client terminal connects next time, there is a problem that the device on the center side (hereinafter, referred to as a server) does not store the previous connection or the processing result. It is necessary to solve this problem, and for this solution, a method called session management can be considered.
[0038]
In the session management, the server on the center side manages the terminal on the client side, and the state of the terminal on the client side at the time of the previous connection is managed. Therefore, for example, the search condition is transmitted to the server on the center side in the first connection, and the result of the search processing is received from the server on the center side in the next connection. In the connection, it is possible to transmit and receive data corresponding to the current connection from the situation at the time of the previous connection, such as narrowing down the search condition again and transmitting it to the server on the center side. However, even in session management, the one-request one-response method of HTTP or HTTPS does not change. Therefore, regarding this series of processing, it is necessary to synchronize the server on the center side and the terminal on the client side, and a new problem arises. In the technology described in the following embodiments, such a problem can be easily dealt with by a higher-level application as described later with reference to FIGS.
[0039]
In the embodiment of the present invention described below, for example, in a state where a server on the center side is connected to a network via a firewall and only the stateless protocols HTTP and HTTPS can be used due to firewall restrictions, Proposal of technology that provides bidirectional asynchronous communication between the client terminal and the center server, and enables applications such as RPC to operate by performing bidirectional asynchronous communication. are doing.
[0040]
Further, the following embodiment is applicable to an environment in which only a stateless protocol, such as HTTP or HTTPS, can be used to restrict a firewall between a client terminal and a center server connected via a network. Has proposed a basic technology for creating applications that perform two-way asynchronous communication.
[0041]
Next, an embodiment of the present invention will be described with reference to FIGS.
First, in the system shown in FIG. 4, a host computer as a device on the center side, for example, a server 410 and a terminal 440 on the client side are connected via a network 430. The server 410, which is a device on the center side, is connected to the network 430 via the firewall 420. Generally, the number of client-side terminals connected to one center-side device is one or more, and the center-side device provides services in parallel to a plurality of client-side terminals 440 connected via a network. The server 410, which is a device on the center side connected to the Internet, is assumed to be accessed from an unspecified number of people due to the characteristics of the Internet. Therefore, in this embodiment, the network is connected to the network 430 via the firewall 420 to enhance security. In order to enhance security, the firewall 420 limits a protocol connectable to the client terminal 440 to a stateless protocol such as HTTP or HTTPS.
[0042]
FIG. 5 shows a flow of processing for preparing for performing bidirectional and asynchronous communication between a client-side terminal and a server as a center-side device. First, in step 520, the client terminal 440 connects to the server 410 using a stateless protocol. In step S522, the terminal 440 transmits the request 524 to the server 410. The request 524 contains the content requesting the start of the stream communication. Next, in step S560, the server 410 that has received the request 524 creates identification information that can uniquely identify the connected client-side terminal. In step S562, server 410 transmits this identification information to terminal 440 by response 561.
[0043]
The terminal 440 receives the identification information and uses the identification information from the next communication. In other words, the identification information is used when processing a stream with the server, such as transmitting data to the server 410 or receiving data from the server 410. The server 410 on the center side can identify the terminal on the client side based on the identification information even when there are connections from a plurality of terminals on the client side.
[0044]
After the preparation for performing bidirectional asynchronous communication is completed, data is transmitted from the client terminal 440 to the center server 410 or data is received from the client server.
The transmission / reception is performed at an arbitrary timing independently without mutual interference between the client-side terminal 440 and the center-side server 410.
For example, bidirectional and asynchronous communication is realized by using a thread.
[0045]
Hereinafter, a process of transmitting data from the client-side terminal 440 to the server 410 as the center-side device and a process of receiving data from the server 410 at the client-side terminal 440 will be described.
[0046]
FIG. 6 shows a flow of a method of transmitting data from the terminal 440 on the client side to the server 410 which is a device on the center side.
First, the terminal 440 on the client side connects to the server 410 using a stateless protocol. Next, in step S620, identification information and data that can uniquely identify the client terminal are set as transmission information, and transmitted from the client terminal to the center server as a request 621. The server 410 on the center side receives the information, and prepares to receive data from the terminal 440 on the client side by using the identification information for identifying the terminal on the client side in step S660. After that, the server 410, which is the device on the center side, receives the data transmitted from the terminal 440 on the client side in step S670.
[0047]
After receiving the data, the server 410 on the center side creates data indicating that the data has been correctly received in step S680, and transmits it as a response 681 to the terminal 440 on the client side. The client terminal transmits data in accordance with the above-described data transmission method each time data to be transmitted to the server, which is a device on the center side, occurs.
[0048]
FIG. 7 shows an HTTP request 710 (first encapsulated data) and a response 720 (first encapsulated data) used in the process of transmitting data from the client-side terminal 440 to the server 410 as the center-side device. 2 encapsulated data). The following information is set in the HTTP request 710 by encapsulating communication information of the data by the HTTP protocol. That is, the HTTP header, information that the server 410 as the center device uniquely identifies the client terminal 440, and that the HTTP request is transmission of data from the client terminal 440 to the center server 410. And information of data 711 to be transmitted.
In the HTTP response 720, an HTTP header and the success or failure of the transmission process set by the server which is a device on the center side are set.
[0049]
FIG. 8 shows a receiving method of the terminal 440 on the client side for receiving data from the server 410 on the center side.
First, the terminal 440 on the client side connects to the server 410 as the center side device using a stateless protocol, and in step S820, information that can uniquely identify the terminal 440 on the client side is set as a request 821 as the request 821. Send to
Next, after receiving the information, the server 410 serving as the center device searches for data to be transmitted to the client terminal in preparation for transmitting data to the client terminal 440 in step S860.
[0050]
As a result of the search, if there is data, the server 410, which is the device on the center side, transmits the data as a response 871 to the terminal 440 on the client side in step S870.
[0051]
If there is no data, the server 410 on the center side performs step S880 of determining whether or not the request 821 has arrived within a predetermined time. In step S880, it is checked whether the current time is within a certain time after the request arrives at the server 410, and if it is within the certain time, step S860 for searching for data is continuously performed. If the predetermined time has elapsed, the process proceeds to step S890, and the absence of data is transmitted to the client in response 891. As described above, when there is data within a certain period of time, the server 410, which is a device on the center side, transmits the data as a response S871 to the terminal 440 on the client side in step S870.
[0052]
If the predetermined time has elapsed in the search processing S860, the server 410 as the center apparatus transmits data indicating that there is no data to the client terminal 440 as a response 891 in step S890. Next, in step S891, it is determined whether or not the request processing of the upper application that calls the processing of the present embodiment is satisfied. The request processing is, for example, when reception of request data is completed. If the request processing is satisfied, this processing ends, and if not, the flow returns to step S820. Step S891 may be omitted depending on the method of using the higher-level application. On the other hand, immediately after the client terminal and the center server start communication, or after a request for data reception has been issued and a response has been returned according to the data reception method, the terminal 440 on the client side always has the above data. Data is received according to the receiving method.
[0053]
The request from the client-side terminal 440 to the center-side server 410 is continued until an application on the client-side terminal instructs termination.
[0054]
FIG. 9 shows the contents of HTTP request and response data used in the process in which the client terminal 440 receives data from the server 410 as the center device.
In the HTTP request 910 (third encapsulated data), the following information is set by encapsulating communication information of the data by the HTTP protocol. That is, the HTTP header, information that the server as the center device uniquely identifies the client terminal, and that the client terminal 440 receives data from the server 410 as the center device by this HTTP request. This is the information to represent.
[0055]
The HTTP response 920 (fourth encapsulated data) indicates the data content of the HTTP response 871 transmitted from the server 410 on the center side to the terminal 440 on the client side at 870 in FIG. Here, information indicating that there is received data and data 921 to be transmitted from the server 410 on the center side to the terminal 440 on the client side are set. On the other hand, the HTTP response 930 (fourth encapsulated data) indicates the data content of the HTTP response 891 transmitted from the device 410 on the center side to the terminal 440 on the client side at 890 in FIG.
Here, information indicating that there is no received data is set.
[0056]
FIG. 10 shows the communication between the client-side terminal 440 and the server 410 as the center-side device using two independent HTTP communications, the transmission HTTP communication 1110 and the reception HTTP communication 1120 according to the present invention. The following shows the configuration performed. This configuration shows a method in which the client terminal 440 and the center server 410 perform transmission and reception processes individually and independently.
[0057]
The method is to perform bidirectional asynchronous communication by performing processing related to transmission and reception by a thread. Hereinafter, the processing will be described. First, the implementation of the processing will be described. In the client-side terminal 440, the process of transmitting using the transmission HTTP communication 1110 is performed by the transmission thread 1020 of the client-side terminal 440, and the process of performing reception using the reception HTTP communication 1120 is performed by the client. It is implemented in the receiving thread 1030 of the terminal 440. Also, in the server 410, which is a device on the center side, the process of performing reception using the transmission HTTP communication 1110 is performed by the reception thread 1060 of the server 410, and the process of performing transmission using the reception HTTP communication 1120 is performed by the server 410. This is implemented in the transmission thread 1070.
[0058]
Next, a processing flow will be described. First, when data 1001 to be transmitted to the server 410 as a device on the center side is generated by a higher-level application at the terminal 440 on the client side and transmission is required, the following processing is performed.
The data 1001 is for, for example, causing the center-side device to perform a certain purpose of arithmetic processing.
[0059]
In the data transmission, transmission is started using the transmission thread 1020 of the client terminal 440, and the data 1001 is transmitted using the transmission HTTP communication 1110 in the method shown in FIG. Send to Data 1001 corresponds to the data 711 transmitted by the HTTP request in FIG. The data transmitted to the server 410 is a request 621, and the result is received as a response 681 from the server.
[0060]
In the terminal 440 on the client side, reception processing of the data 1003 from the server 410 on the center side is performed by the reception thread 1030 of the terminal on the client side.
In this reception processing, a request indicating a reception request is first transmitted to the server 410 on the center side by the method shown in FIG.
[0061]
The request representing the reception request is always sent to the center server 410 immediately after the communication of the client terminal 440 starts or after a response is received from the center server 410 by the reception thread 1030 of the client terminal. To be sent. Next, when data 1003 to be transmitted is sent from the server 410 on the center side to the terminal 440 on the client side, the terminal 440 on the client side receives the data 1003 from the server 410 which is a device on the center side. . The server data 1003 is, for example, data generated as a result of arithmetic processing based on the data 1001, and when the arithmetic processing ends, the identification information of the terminal 440 is added and held. In step S860 of FIG. 8, the server 410 searches for the presence or absence of this data, that is, the presence or absence of the end of the requested arithmetic processing and the presence or absence of data as a processing result. When the data 1003 as the processing result is found by the search based on the identification information, the data 1003 is transmitted to the receiving thread 1030 as described above. Data 1003 corresponds to the data 921 received by the HTTP response in FIG. The data transmitted to the client terminal 440 is a response 871, and the request is received as a request 821 from the client terminal 440.
[0062]
That is, when the server 410 serving as the center device performs processing based on the request and, as a result, data 1003 to be transmitted to the client terminal 440 is generated, the transmission thread of the server 410 is used to transmit the data. Transmission is started using 1070 and data is transmitted using the HTTP communication for reception 1120.
[0063]
Data transmission is performed by the following steps.
In this step, data such as identifiable information for the client-side terminal 440 is set in the server 410, which is a device on the center side, and data is obtained by searching the data in FIG. 8 based on the information. .
When it becomes necessary to receive data from the terminal 440 on the client side, the server 410 on the center side starts reception using the receiving thread 1060 of the server 410 and uses the HTTP communication 1110 for transmission. The data 1001 is received.
[0064]
As described above, in the present embodiment, it is possible to continue to secure the transmission HTTP communication path 1110 and the reception communication path 1120. The termination processing of this processing is executed by, for example, an interruption command of the higher-level application program of the terminal 440, when it determines the termination and gives an instruction.
[0065]
As described above, according to the above-described embodiment, bidirectional and asynchronous communication can be performed using a stateless protocol that passes through a firewall. Further, since the method has independent functions and can be functioned, the method has a low degree of close contact with a higher-level application and can be used as a subroutine from the higher-level application. Therefore, it is easy to transfer a system using another communication method to a system using the method of the present embodiment.
[0066]
Further, adjustment by an upper-level application so as to partially execute the synchronization processing in the method of the present embodiment can be easily realized from the high function independence of the present embodiment. A method for partially performing a synchronization process from a higher-level application using the method of the embodiment of the present invention will be described with reference to FIGS. First, FIG. 11 shows a usage example of a higher-level application that uses the functions described in the present embodiment that operate asynchronously in asynchronous processing. Sub1, Sub2, and Sub3 are functions operated by the method of the present embodiment, arg1, arg2, and arg3 are arguments of the function, and Prid1, Prid2, and Prid3 are process ids obtained by each function. First, in step S1101, the function Sub1 is called. Subsequently, in step S1102, the function Sub2 is called, and subsequently, in step S1103, the function Sub3 is called. By this processing, steps S1101 to S1103 operate asynchronously.
[0067]
FIG. 12 shows an example of use of a higher-level application that uses the functions described in the present embodiment that operate asynchronously in synchronous processing. Sub1, Sub2, and Sub3 are functions operated by the method of the present embodiment, arg1, arg2, and arg3 are arguments of the function, and Prid1, Prid2, and Prid3 are process ids obtained by each function. First, in step S1101, the function Sub1 is called. Next, in step S1202, the process waits until the process Prid1 ends. After confirming the end of the process Prid1, the function Sub2 is called in step S1203. Similarly, in step S1204, the process is stopped and waits until the process Prid2 ends. After confirming that the process Prid2 has ended, the function Sub3 is called in step S1205. By this series of processing, steps S1201, S1203, and S1205 operate sequentially in synchronization with each other.
[0068]
In this embodiment, for example, it is also possible to mount the client terminal with a Java (R) applet and the center side device with a Java (R) servlet.
In such a case, the following methods are implemented to check the cause of the maintenance and inspection of data transmission and reception between the client-side terminal and the server that is the center-side device, and the cause of any abnormalities. it can.
[0069]
First, the client terminal outputs the contents of the transmission HTTP communication request and response and the reception HTTP communication request and response to the Java (R) console. Next, the server, which is a device on the center side, uses the servlet to transmit the request transmitted from the terminal on the client side and the contents of the response returned to the terminal on the client side by the HTTP communication for transmission and the HTTP communication for reception. Output to a log file.
In this way, by checking the above output of the client side terminal and the server which is the center side device together, it is possible to check whether data is transmitted or received correctly.
[0070]
Furthermore, even if the client terminal and the server at the center have developed applications using communication functions that cannot pass through security functions such as firewalls such as sockets, the above method can be used. It is very easy to move to an application that performs two-way asynchronous communication passing through.
[0071]
【The invention's effect】
According to the present invention, a communication method having a high degree of freedom or a technique related to the communication method can be provided.
Further, according to the technology described in the above embodiment, it is very easy to create an application that performs bidirectional asynchronous communication without being aware of restrictions imposed by a firewall.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating an example of processing when a terminal on a client side and a server as a device on a center side are connected by a socket.
FIG. 2 is a diagram illustrating an example of processing in a case where a communication base between a client-side terminal and a server which is a center-side device is created by a socket, and RPC is implemented as a higher-order application.
FIG. 3 is a diagram illustrating an example of performing bidirectional asynchronous communication by using a thread when a communication base between a client terminal and a server as a center apparatus is created by a socket. is there.
FIG. 4 is a diagram showing that a terminal on the client side and a server as a device on the center side are connected via a network.
FIG. 5 is a diagram illustrating a process in which a terminal on the client side and a server as a device on the center side prepare for communication.
FIG. 6 is a diagram showing a process of transmitting data from a terminal on the client side to a server which is a device on the center side.
FIG. 7 is a diagram illustrating the contents of HTTP request and response data used in a process of transmitting data from a client terminal to a server that is a center device.
FIG. 8 is a diagram showing a process in which a terminal on the client side receives data from a server which is a device on the center side.
FIG. 9 is a diagram showing contents of HTTP request and response data used in a process in which a client terminal receives data from a server which is a center device.
FIG. 10 is a diagram showing an example in which bidirectional asynchronous communication is performed by using a thread when a communication base between a terminal on the client side and a server which is a device on the center side is created by HTTP communication. It is.
FIG. 11 is an example of use in asynchronous processing of a higher-level application.
FIG. 12 is an example of use in a synchronization process of a host application.
[Explanation of symbols]
101: Data transmitted from the client side terminal to the center side server and data received by the center side server; 103: Data transmitted from the center side server to the client side terminal and the client side terminal Data to be received, 110: terminal on the client side, 120: socket on the terminal on the client side, 150: server as a device on the center side, 160: socket on the server on the center side, 170 ... · Created server socket, 180: Connection by client and server socket, 201: Data transmitted from terminal to server and data received by server created according to RPC, 203: Created according to RPC Data to be sent to the client terminal and data to be received by the client terminal, 0: terminal on the client side, 250: server on the center side, 290: socket communication path, 301: data transmitted from the terminal on the client side to the server and data received by the server, 303 ... Data transmitted from the server to the client terminal and data received by the client terminal, 310: client terminal, 320: transmission thread of the client terminal, 330: client terminal , Receiving thread of 350, a server on the center side, 360, receiving thread of a server which is a device on the center side, 370, transmitting thread of server, 390, socket communication path, 410, center Side server, 420 ... firewall, 430 ... network, 440 ... client 524: Request from client-side terminal, 561: Response from server, 621: Request from client-side terminal, 681: Response from server, 710: Client HTTP request when transmitting data from the terminal on the client side, 711... Data transmitted from the client to the server, 720... HTTP response when transmitting data from the terminal on the client side, 821. Request from terminal, 871... Response from server as center-side device, 891... Response from server as center-side device, 910... When client terminal receives data HTTP request, 920 ... HTTP response when there is data to be transmitted to the client side terminal, 921... Data transmitted from the server to the client, 930... When there is no data transmitted from the server as the center side device to the client side terminal 1001 ... data transmitted from the client terminal to the server which is the center device, 1003 ... data transmitted from the server which is the center device to the client terminal, 1020 ... A transmission thread of the client-side terminal, 1030... A reception thread of the client-side terminal, 1060... A reception thread of the server as the center-side device, 1070. 1110: HTTP communication for transmission, 1120: HTTP communication for reception

Claims (7)

センタ側の装置と端末との間でファイアウォールを介して通信を行う通信方式であって、
端末からの送信に基づき、センタ側の装置は識別情報を作成し、上記作成された識別情報をセンタ側の装置は送信し、上記端末がこれを受け取り、
上記識別情報を付加したデータを有するリクエストを上記端末からセンタ側の装置に送信し、センタ側の装置は上記データを有するリクエストを受け取り、データの受取に基づき端末にレスポンスを送ると共に、センタ側の装置は受け取ったデータに基づく処理を行い、
上記端末は、処理結果を返信するためのリクエストをセンタ側の装置に行い、センタ側の装置は上記端末からのリクエストに対し、処理結果の有無を調べ、処理結果の有無あるいは処理結果を伝送するためのレスポンスを上記端末に行い、
上記端末は、上記レスポンスが処理結果が無い状態を示す場合、処理結果を返信するためのリクエストをセンタ側の装置に行い、
上記処理結果を返信するための端末からのリクエストの送信と、センタ側の装置が行う、該リクエストに対する処理結果の有無の調査および端末へのレスポンスの送信と、を繰り返すことを特徴とする、端末とセンタ側の装置との間で送受信を行うための双方向通信方式。
A communication method for performing communication between a device on the center side and a terminal through a firewall,
Based on the transmission from the terminal, the center-side device creates identification information, the center-side device transmits the created identification information, and the terminal receives this,
A request having the data with the identification information added is transmitted from the terminal to the device on the center side, and the device on the center side receives the request having the data, sends a response to the terminal based on the reception of the data, and The device performs processing based on the received data,
The terminal makes a request for returning a processing result to the center device, and the center device checks the presence or absence of the processing result in response to the request from the terminal, and transmits the presence or absence of the processing result or the processing result. Response to the above terminal,
If the response indicates that there is no processing result, the terminal makes a request for returning the processing result to the center-side device,
A terminal that repeats transmission of a request from the terminal for returning the processing result and investigation of the presence or absence of a processing result for the request and transmission of a response to the terminal performed by the center-side device. A two-way communication system for transmitting and receiving data between the device and the center.
センタ側の装置と端末との間でファイアウォールを介して通信を行う通信方式であって、
端末からの送信を受けて、センタ側の装置は識別情報を作成し、上記作成された識別情報をセンタ側の装置は上記端末へ送信し、
上記識別情報が付加したデータを有するリクエストを上記端末から受け、センタ側の装置は受け取ったデータに基づく処理を行い、
処理結果を返信するためのリクエストを端末から受け、センタ側の装置は、端末からのリクエストに関する処理結果の有無を調べ、処理結果の有無あるいは処理結果を伝送のためのレスポンスを上記端末に行い、
上記センタ側の装置は、端末からの処理結果を返信するためのリクエストを受信する度に、該リクエストに対する処理結果の有無の調査および端末へのレスポンスの送信を繰り返すことを特徴とする、端末とセンタ側の装置との間で送受信を行うための双方向通信方式。
A communication method for performing communication between a device on the center side and a terminal through a firewall,
Upon receiving the transmission from the terminal, the center-side device creates identification information, and the center-side device transmits the created identification information to the terminal,
A request having the data to which the identification information is added is received from the terminal, and the center-side device performs a process based on the received data,
A request for returning the processing result is received from the terminal, the device on the center side checks the presence or absence of the processing result regarding the request from the terminal, performs the presence or absence of the processing result or sends a response for transmitting the processing result to the terminal,
Each time the center-side device receives a request for returning a processing result from the terminal, the device repeats checking for the presence or absence of a processing result for the request and transmitting a response to the terminal. A two-way communication method for transmitting and receiving data to and from the equipment on the center side.
請求項2に記載の通信方式において、送受信をHTTPまたはHTTPSに基づいて行うことを特徴とする、端末とセンタ側の装置との間で送受信を行うための双方向通信方式。3. A two-way communication system for transmitting and receiving between a terminal and a device on the center side according to claim 2, wherein transmission and reception are performed based on HTTP or HTTPS. センタ側の装置と端末との間でファイアウォールを介して通信を行う通信方式であって、
端末は、センタ側の装置に識別情報を依頼して、該識別情報をセンタ側の装置から受け取り、
上記端末は、上記識別情報を付加したデータを有する処理依頼をセンタ側の装置に送信し、
上記端末は、上記処理依頼の処理結果を返信するためのリクエストをセンタ側の装置に送信し、
上記端末は、上記リクエストに対する、処理結果の有無あるいは処理結果を示すレスポンスを上記センタ側の装置から受け取り、
上記端末は、上記レスポンスが処理結果が無い状態を示す場合、処理結果を返信するためのリクエストをセンタ側の装置に送信して、このレスポンスを受け取り、
上記端末は、上記レスポンスが処理結果が無い状態を示す場合に、上記処理結果を返信するためのリクエストの送信を繰り返すことを特徴とする、端末とセンタ側の装置との間で送受信を行うための双方向通信方式。
A communication method for performing communication between a device on the center side and a terminal through a firewall,
The terminal requests the center device for identification information, receives the identification information from the center device,
The terminal transmits a processing request having data to which the identification information is added to the center-side device,
The terminal transmits a request for returning a processing result of the processing request to the center-side device,
The terminal receives a response indicating the presence or absence of a processing result or a processing result with respect to the request from the center-side device,
When the response indicates that there is no processing result, the terminal transmits a request for returning the processing result to the center-side device, receives the response,
The terminal is configured to repeat transmission of a request for returning the processing result when the response indicates that there is no processing result, for transmitting and receiving between the terminal and the center-side device. Two-way communication system.
請求項4に記載の通信方式において、送受信をHTTPまたはHTTPSに基づいて行うことを特徴とする、端末とセンタ側の装置との間で送受信を行うための双方向通信方式。5. The two-way communication system for transmitting and receiving between a terminal and a center-side device according to claim 4, wherein transmission and reception are performed based on HTTP or HTTPS. センタ側の装置と端末との間で通信を行うためのプログラムであって、コンピュータを有するシステムは本プログラムを実行することで以下の機能を有することを特徴とする双方向通信のためのプログラム。
端末からの送信に基づき、センタ側の装置は識別情報を作成し、上記識別情報をセンタ側の装置は上記端末に送信し、
上記識別情報を有する第1のカプセル化したデータを備えた送信を上記端末からセンタ側の装置に行い、
センタ側の装置は、データの受取に基づき第2のカプセル化したデータをレスポンスとして端末に送信し、
上記端末は、第1のカプセル化したデータを備えた送信の処理結果を返信するための第3のカプセル化したデータを備えた送信をセンタ側に行い、
センタ側の装置は上記端末からの第3のカプセル化したデータを備えた送信に対し、処理結果の有無あるいは処理結果を伝送するための第4のカプセル化したデータを上記端末に送信し、
上記端末は、第4のカプセル化したデータが処理結果が無い状態を示す場合、処理結果を返信するための第3のカプセル化したデータを備えた送信をセンタ側に行い、
第4のカプセル化したデータが処理結果が無い状態を示す場合の、上記処理結果を返信するための端末からの送信と、これに基づいてセンタ側の装置が行う、を繰り返す。
A program for performing communication between a center-side device and a terminal, wherein a system having a computer has the following functions by executing the program, and is a program for two-way communication.
Based on the transmission from the terminal, the center-side device creates identification information, and the center-side device transmits the identification information to the terminal,
Performing transmission with the first encapsulated data having the identification information from the terminal to the center-side device,
The center-side device transmits the second encapsulated data to the terminal as a response based on the data reception,
The terminal performs transmission with the third encapsulated data to the center side for returning a processing result of the transmission with the first encapsulated data,
In response to the transmission with the third encapsulated data from the terminal, the center-side device transmits the presence or absence of the processing result or the fourth encapsulated data for transmitting the processing result to the terminal,
When the fourth encapsulated data indicates that there is no processing result, the terminal transmits to the center side the third encapsulated data for returning the processing result,
When the fourth encapsulated data indicates that there is no processing result, the transmission from the terminal for returning the processing result and the operation of the center-side device based on the transmission are repeated.
センタ側の装置と端末との間で通信を行うためのプログラムであって、コンピュータを有するシステムは本プログラムを実行することで以下の機能を有することを特徴とする双方向通信のためのプログラム、
端末の識別情報を有する第1のカプセル化したデータを端末から受け、センタ側の装置はデータの受取に基づき第2のカプセル化したデータをレスポンスとして端末に送信し、
処理結果を返信するためのリクエストとして第3のカプセル化したデータを端末から受け、センタ側の装置は、処理結果の有無あるいは処理結果を伝送のために第4のカプセル化したデータを端末に送信し、
センタ側の装置は、端末からの処理結果を返信するための第3のカプセル化したデータを受信する度に、第4のカプセル化したデータの送信を繰り返す。
A program for performing communication between the center-side device and the terminal, wherein the system having a computer has a function for performing two-way communication by executing the present program,
Receiving the first encapsulated data having the identification information of the terminal from the terminal, and transmitting the second encapsulated data to the terminal as a response based on the reception of the data;
The third encapsulated data is received from the terminal as a request for returning the processing result, and the device on the center side transmits the fourth encapsulated data to the terminal for the presence or absence of the processing result or for transmitting the processing result. And
The center-side device repeats the transmission of the fourth encapsulated data each time it receives the third encapsulated data for returning the processing result from the terminal.
JP2002359979A 2002-12-11 2002-12-11 Two-way communication method for transmitting/receiving between terminal and center side device, and program for two-way communication Pending JP2004192358A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002359979A JP2004192358A (en) 2002-12-11 2002-12-11 Two-way communication method for transmitting/receiving between terminal and center side device, and program for two-way communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002359979A JP2004192358A (en) 2002-12-11 2002-12-11 Two-way communication method for transmitting/receiving between terminal and center side device, and program for two-way communication

Publications (1)

Publication Number Publication Date
JP2004192358A true JP2004192358A (en) 2004-07-08

Family

ID=32759214

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002359979A Pending JP2004192358A (en) 2002-12-11 2002-12-11 Two-way communication method for transmitting/receiving between terminal and center side device, and program for two-way communication

Country Status (1)

Country Link
JP (1) JP2004192358A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008003689A (en) * 2006-06-20 2008-01-10 Nec Corp Information processing system and information processing method for web service
JP2008140275A (en) * 2006-12-04 2008-06-19 Fuji Xerox Co Ltd Communication device and communicating method
JP2008533784A (en) * 2005-03-10 2008-08-21 インターナショナル・ビジネス・マシーンズ・コーポレーション Method, system, and computer program for communication in a computer system
JP2008310701A (en) * 2007-06-15 2008-12-25 Canon Inc Peripheral device control system, information processor, peripheral device control method, program, storage medium, printer controller, printer control program, and printer control method
WO2010058634A1 (en) * 2008-11-20 2010-05-27 Nec Corporation Client - server communications in mobile radio communications device
US8386783B2 (en) 2006-12-04 2013-02-26 Fuji Xerox Co., Ltd. Communication apparatus and communication method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008533784A (en) * 2005-03-10 2008-08-21 インターナショナル・ビジネス・マシーンズ・コーポレーション Method, system, and computer program for communication in a computer system
US7945676B2 (en) 2005-03-10 2011-05-17 International Business Machines Corporation Processing requests transmitted using a first communication protocol directed to an application that uses a second communication protocol
US8510376B2 (en) 2005-03-10 2013-08-13 International Business Machines Corporation Processing requests transmitted using a first communication directed to an application that uses a second communication protocol
JP2008003689A (en) * 2006-06-20 2008-01-10 Nec Corp Information processing system and information processing method for web service
JP4496492B2 (en) * 2006-06-20 2010-07-07 日本電気株式会社 Information processing system and information processing method for Web service
JP2008140275A (en) * 2006-12-04 2008-06-19 Fuji Xerox Co Ltd Communication device and communicating method
US8386783B2 (en) 2006-12-04 2013-02-26 Fuji Xerox Co., Ltd. Communication apparatus and communication method
JP2008310701A (en) * 2007-06-15 2008-12-25 Canon Inc Peripheral device control system, information processor, peripheral device control method, program, storage medium, printer controller, printer control program, and printer control method
WO2010058634A1 (en) * 2008-11-20 2010-05-27 Nec Corporation Client - server communications in mobile radio communications device
US8948101B2 (en) 2008-11-20 2015-02-03 Nec Corporation Client-server communications in mobile radio communications device

Similar Documents

Publication Publication Date Title
Soni et al. API features individualizing of web services: REST and SOAP
US7930365B2 (en) Method and apparatus to modify network identifiers at data servers
JP4061288B2 (en) WEB service system, requester, SOAP message intermediate processing device, requester request SOAP message processing method, requestor response SOAP message processing method, SOAP message intermediate processing device request SOAP message processing method, SOAP message intermediate SOAP message processing method and program for response of processing device
Lampesberger Technologies for web and cloud service interaction: a survey
CN102904959B (en) Network accelerating method and gateway
CN107463453B (en) Method, device, equipment and storage medium for communication between different applications of same terminal
CN104253857A (en) Back-to-back virtual WEB Real-Time Communications (WebRTC) agents, and related methods and systems
US11196833B1 (en) Proxy server synchronizer
CZ2001163A3 (en) Method of transmitting information data from a sender to a receiver via a transcoder, method of transcoding information data, method for receiving transcoded information data, transmitter, transcoder and receiver
US10367894B2 (en) Information processing apparatus, method for controlling the same, non-transitory computer-readable storage medium, and information processing system
CN110769009B (en) User identity authentication method and system
US20140280883A1 (en) Secure URL update for HTTP redirects
CN107332854B (en) Message serialization negotiation method and service providing equipment
CN109561010B (en) Message processing method, electronic equipment and readable storage medium
WO2017211302A1 (en) Application program development method, apparatus and system
JP6521762B2 (en) HTTP server, control method therefor, image forming apparatus and program
JP2004192358A (en) Two-way communication method for transmitting/receiving between terminal and center side device, and program for two-way communication
KR101349201B1 (en) Apparatus for interoperability between Web-browser and Local-resources in the Mobile Device and method thereof
TW582147B (en) Inbound connector
KR20070050670A (en) Apparatus for providing web service, apparatus for requesting web service, method for providing web service and method for requesting web service
JP4313091B2 (en) Information processing system
Sarker et al. Learning Python Network Programming
US7406496B2 (en) System and method for processing callback requests, which include a client port and address, included in web-based procedure calls
CN115580666A (en) IP-NDN intercommunication method, system, equipment and storage medium for content access
CN113992641A (en) Data processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051202

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20060228

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20060303

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080326

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080401

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080529

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20080624