JP2008176483A - Information providing system - Google Patents
Information providing system Download PDFInfo
- Publication number
- JP2008176483A JP2008176483A JP2007008227A JP2007008227A JP2008176483A JP 2008176483 A JP2008176483 A JP 2008176483A JP 2007008227 A JP2007008227 A JP 2007008227A JP 2007008227 A JP2007008227 A JP 2007008227A JP 2008176483 A JP2008176483 A JP 2008176483A
- Authority
- JP
- Japan
- Prior art keywords
- information
- notification
- update
- unit
- http
- 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
- Information Transfer Between Computers (AREA)
Abstract
Description
本発明は、ネットワークのトラフィックを低減させた情報提供システムに関する。 The present invention relates to an information providing system that reduces network traffic.
近年、HTTPクライアント側で実行されるスクリプトが、サービスを提供するサーバと非同期通信を行い、画面遷移なしに動的にその結果をHTTPクライアント領域に反映させる技術を活用した、いわゆるウェブアプリケーションがサービスの提供に用いられるようになっている。 In recent years, a script executed on the HTTP client side performs asynchronous communication with a server that provides a service, and a so-called web application that utilizes a technology that dynamically reflects the result in the HTTP client area without screen transition is a service application. It has come to be used for provision.
このようなウェブアプリケーションでは、HTTPクライアント側では、例えばJavaScript(登録商標)におけるxmlHttpRequestによって必要な情報を取得して処理を実行するようになっている。 In such a web application, on the HTTP client side, for example, necessary information is acquired and executed by xmlHttpRequest in JavaScript (registered trademark).
しかしながら、一般的にHTTPプロトコルは、クライアントからの要求(リクエスト)に対する応答(レスポンス)によって情報を提供するいわゆるPull型のプロトコルであるため、HTTPクライアントからの要求なしに、HTTPサーバからHTTPクライアントに対して情報を送信するPush型の通信はできない。 However, in general, the HTTP protocol is a so-called Pull type protocol that provides information by a response to a request (request) from a client, and therefore, without request from the HTTP client, the HTTP server to the HTTP client. Push type communication that transmits information cannot be performed.
このため、ウェブアプリケーション側で、HTTPサーバ側でのファイルの変更等に迅速に対応したい場合には、例えば、ウェブアプリケーション側で、所定の短い間隔でHTTPリクエストを送信し、HTTPサーバの応答を得る必要があった。 For this reason, when the web application side wants to respond quickly to a file change or the like on the HTTP server side, for example, the web application side transmits an HTTP request at a predetermined short interval to obtain a response of the HTTP server. There was a need.
しかし、このような方法では、HTTPリクエストを頻繁に送信する必要があり、HTTPサーバからの応答に応じた処理を実行する必要があった。また、HTTPリクエストは、ヘッダ情報など付加情報も多いため、ネットワークの負荷の観点からも必要以上に送信することは望ましくない。なお、出願人は、上記背景技術に関する公知技術文献の存在を知らない。 However, in such a method, it is necessary to frequently transmit HTTP requests, and it is necessary to execute processing according to a response from the HTTP server. Further, since the HTTP request has a lot of additional information such as header information, it is not desirable to transmit more than necessary from the viewpoint of the load on the network. The applicant does not know the existence of known technical documents related to the background art.
本発明は、上述のような課題に鑑みてなされたものであり、HTTPリクエストの頻度を低減させてネットワークのトラフィックを低減させることができる情報提供システムを提供することを目的とする。 The present invention has been made in view of the above-described problems, and an object of the present invention is to provide an information providing system capable of reducing network traffic by reducing the frequency of HTTP requests.
この課題を解決するために、本発明に係る情報提供システムは、HTTPサーバにより情報を提供する情報提供手段と,監視対象となる情報の更新の有無を繰り返し確認する更新確認手段と,一のセッションにおいて、更新検出手段の検出出力に応じて情報の更新があった旨を通知する通知手段を備える情報提供サーバと、情報提供手段が提供する情報を取得する情報取得手段と,通知手段からの通知に応じて情報取得手段に情報の取得を指示する取得指示手段とを有するHTTPクライアントを備える情報利用端末とを有することを特徴とする。 In order to solve this problem, an information providing system according to the present invention includes an information providing unit that provides information using an HTTP server, an update confirming unit that repeatedly confirms whether or not information to be monitored is updated, and one session. , An information providing server comprising a notification means for notifying that the information has been updated according to the detection output of the update detection means, an information acquisition means for obtaining information provided by the information provision means, and a notification from the notification means And an information using terminal including an HTTP client having an acquisition instruction unit that instructs the information acquisition unit to acquire information.
情報提供サーバが提供する情報には、例えばチャットサービス,ファイル共有サービス,検索サービス,DBアクセスサービス等の出力情報等が含まれる。「一のセッションにおいて」とは、通知手段とHTTPクライアントの取得指示手段間で1つのセッションが維持され、当該セッションにおいて、複数の通知が送信され得ることを意味している。また、更新確認手段による「繰り返し確認」には、例えば所定時間毎の確認,動作状態に応じて変更可能なタイマーによる不定期な確認等が含まれる。 The information provided by the information providing server includes, for example, output information such as a chat service, a file sharing service, a search service, and a DB access service. “In one session” means that one session is maintained between the notification unit and the acquisition instruction unit of the HTTP client, and a plurality of notifications can be transmitted in the session. The “repetitive confirmation” by the update confirmation means includes, for example, confirmation every predetermined time, irregular confirmation by a timer that can be changed according to the operation state, and the like.
また、HTTPサーバが更新検出手段が監視対象となる情報の更新を検出した際に更新検出手段の差分を検出する差分検出手段を有し、HTTPサーバの通知手段が通知中に差分検出手段が検出した差分を示す差分情報を含めて通知し、HTTPクライアントの情報取得手段が通知中の差分情報を取得する構成としてもよい。さらに、HTTPサーバが、通知手段が通知を送信してからの経過時間を求める計時手段と、経過時間が所定の閾値を超えた場合に通知手段にダミー情報を送信させるダミー情報送信手段とを備える構成としてもよい。 In addition, the HTTP server has a difference detection unit that detects a difference of the update detection unit when the update detection unit detects an update of information to be monitored, and the difference detection unit detects while the notification unit of the HTTP server notifies It is good also as a structure which notifies including the difference information which shows the difference which carried out, and the information acquisition means of an HTTP client acquires the difference information in notification. Further, the HTTP server includes time measuring means for obtaining an elapsed time since the notification means transmits the notification, and dummy information transmission means for causing the notification means to transmit dummy information when the elapsed time exceeds a predetermined threshold. It is good also as a structure.
また、本発明に係る情報提供サーバ装置は、端末装置に情報を提供する情報提供手段と、監視対象となる情報の更新の有無を繰り返し確認する更新確認手段と、一のセッションにおいて、更新検出手段の検出出力に応じて情報の更新があった旨を端末装置に通知する通知手段とを備えることを特徴とする。 In addition, the information providing server device according to the present invention includes an information providing unit that provides information to the terminal device, an update confirmation unit that repeatedly confirms whether or not information to be monitored is updated, and an update detection unit in one session. And a notification means for notifying the terminal device that the information has been updated according to the detected output.
また、本発明に係る情報利用端末装置は、HTTPサーバにより情報を提供する情報提供手段と,監視対象となる情報の更新の有無を繰り返し確認する更新確認手段と,一のセッションにおいて、更新検出手段の検出出力に応じて情報の更新があった旨を通知する通知手段を備える情報提供サーバが提供する情報を利用する情報利用端末であって、情報提供手段が提供する情報を取得する情報取得手段と,通知手段からの通知に応じて情報取得手段に情報の取得を指示する取得指示手段とを有するHTTPクライアントを備えることを特徴とする。 The information utilization terminal device according to the present invention includes an information providing means for providing information by an HTTP server, an update confirmation means for repeatedly confirming whether or not information to be monitored is updated, and an update detection means in one session. An information use terminal that uses information provided by an information providing server provided with a notification means for notifying that information has been updated in accordance with the detection output of the information acquisition means for acquiring information provided by the information providing means And an acquisition instruction means for instructing the information acquisition means to acquire information in response to a notification from the notification means.
本発明によれば、情報提供サーバ装置の更新確認手段が、監視対象となる情報の更新の有無を繰り返し確認し、通知手段が、一のセッションにおいて、更新検出手段の検出出力に応じて情報の更新があった旨を通知することにより、情報利用端末装置側から一定時間毎にHTTPリクエストを送信して情報の更新を確認する必要がなく、一のセッションにおいて、通知手段からの通知を監視し、情報の更新があった場合のみ、情報提供手段に情報を要求することができる。これにより、情報利用端末装置側からのHTTPリクエストの頻度を低減させて、ネットワークのトラフィックを低減させることができる。 According to the present invention, the update confirmation unit of the information providing server apparatus repeatedly confirms whether or not the information to be monitored is updated, and the notification unit performs the information update according to the detection output of the update detection unit in one session. By notifying that there has been an update, there is no need to send an HTTP request at regular intervals from the information-use terminal device side to check the information update, and the notification from the notification means can be monitored in one session. Only when information is updated, information can be requested from the information providing means. Thereby, the frequency of the HTTP request from the information utilization terminal device side can be reduced, and the network traffic can be reduced.
また、HTTPサーバが更新検出手段が監視対象となる情報の更新を検出した際に更新検出手段の差分を検出する差分検出手段を有し、HTTPサーバの通知手段が通知中に差分検出手段が検出した差分を示す差分情報を含めて通知し、HTTPクライアントの情報取得手段が通知中の差分情報を取得する構成とすれば、通知に応じてHTTPクライアント側からHTTPリクエストを送信して監視対象となる情報を取得する必要がなく、さらなるトラフィックの低減に寄与することができる。 In addition, the HTTP server has a difference detection unit that detects a difference of the update detection unit when the update detection unit detects an update of information to be monitored, and the difference detection unit detects while the notification unit of the HTTP server notifies If the information acquisition unit of the HTTP client is configured to acquire the difference information being notified, the HTTP request is transmitted from the HTTP client side in response to the notification and becomes a monitoring target. There is no need to acquire information, which can contribute to further traffic reduction.
さらに、HTTPサーバが、通知手段が通知を送信してからの経過時間を求める計時手段と、経過時間が所定の閾値を超えた場合に通知手段にダミー情報を送信させるダミー情報送信手段とを備える構成とすれば、タイムアウトにより通知手段とHTTPクライアントの取得指示手段との間のセッションが切断されてしまうことを防止することができる。 Further, the HTTP server includes time measuring means for obtaining an elapsed time since the notification means transmits the notification, and dummy information transmission means for causing the notification means to transmit dummy information when the elapsed time exceeds a predetermined threshold. With this configuration, it is possible to prevent the session between the notification unit and the HTTP client acquisition instruction unit from being disconnected due to a timeout.
本発明は、例えばネットワーク経由で接続されたクライアント端末にチャット,ファイル共有等のサービスを提供する情報提供システムに適用することができる。 The present invention can be applied to an information providing system that provides services such as chat and file sharing to client terminals connected via a network, for example.
(全体構成)
本発明の実施例1に係る情報提供システムは、例えば図1に示すように、情報の提供を受けるユーザが使用するクライアント端末10と、このクライアント端末10とネットワーク20で接続された情報提供サーバ30とを備えている。この情報提供サーバ30は、例えばチャット,ファイル共有等の情報提供サービスを提供する。クライアント端末10及び情報提供サーバ30は、例えばCPU(Central Processing Unit),メモリ等を有するパーソナルコンピュータ等の情報処理装置から構成されており、制御プログラムを実行することにより、この図1に示すように機能する。
(overall structure)
As shown in FIG. 1, for example, the information providing system according to the first embodiment of the present invention includes a client terminal 10 used by a user who receives information, and an
クライアント端末10は、ネットワーク20経由の通信の制御を行う通信制御部11と、HTTPサービスを利用するHTTPクライアント12と、表示画面を有する表示部14とを備えている。HTTPクライアント12は、JavaScript(登録商標)を実行できるスクリプト実行環境13を備えており、スクリプト実行環境13は、情報提供サーバ30が提供する情報提供サービスの利用に用いるクライアント側の処理を実行する。このスクリプト実行環境13でスクリプトを実行することにより、チャットアプリケーション131,ファイル共有アプリケーション132等のHTTPクライアント12を利用したWebアプリケーションを実行することができるようになっている。なお、この実施例では、HTTPクライアント12としてInternet Explorer6.0を使用しており、以後も同様である。
The client terminal 10 includes a communication control unit 11 that controls communication via the
情報提供サーバ30は、ネットワーク20経由の通信の制御を行う通信制御部31と、HTTPサービスを提供するHTTPサーバ32と、スクリプト言語で記述された処理を実行するスクリプト実行環境33と、ハードディスク装置(HDD)34とを備えている。スクリプト実行環境33は、例えばPerl,JSP(Java(登録商標)ServerProgram)等の言語で記述された処理を実行するもので、例えばユーザ間でチャットを行うチャットサービス,ユーザ間でファイルを共有するファイル共有サービス,目的のファイルを検索するファイル検索サービス,データベースに対するアクセスを提供するDBアクセスサービス等のHTTPサーバ32をフロントエンドとして提供する情報提供サービス等の処理を実行する。なお、この実施例では、スクリプト言語実行環境33としてPerl5.8を使用しており、以後も同様である。
The
この情報提供システムでは、チャットサービスは、チャットを行うメンバーが共通にアクセス(読み出し、追記等)できるログファイル341を介して提供されるようになっている。チャットサービスを利用したいユーザはクライアント端末10を操作してHTTPサーバ32にログインする。具体的には、例えばHTTPクライアント12で、チャットサービスに対応するURL(例えば“http://srv_url/chat.html”)を指定して、HTTPサーバ32にログインを要求し、HTTPサーバ32からの応答に応じてユーザID,パスワード等の認証情報を送信する。ログイン処理は、例えばスクリプト実行環境33で実行されるチャットサービス331によって処理され、ログインが許可されると、HTTPサーバ32は、チャットの画面を構成する表示データをHTTPクライアント12に送信する。これに応じて、HTTPクライアント12は、例えば図2に示すように、表示部14内のブラウザウィンドウ141内にチャットウィンドウ142を表示させる。また、チャットサービス331は、例えばチャットグループ毎にチャット状態保存ファイル343を作成し、当該チャットグループのチャットの状態(各メンバーのログイン状態等)を管理する。
In this information providing system, the chat service is provided via a
チャットウィンドウ142内には、送信する文字を入力する入力欄,チャットを行っている相手のユーザについての情報を表示する領域,チャットのログを表示させるログ表示領域142a等が設けられている。この図2中では、便宜的に、ログ表示領域142aを表示データ内の対応する定義の記述で図示しているが、実際には、ログ表示領域142a内には、例えば図3に示すように、ログ内の文字列が表示される。また、図2中では、後述の表示データ(chat.html)内のiframeタグで定義され、後述の更新確認スクリプト331a(chatupdate.cgi)からの通知(上位フレームの更新命令)を受信するフレームを、便宜的に符号142bとして図示しているが、当該フレームは非表示状態として定義されているため、実際には画面上には表示されない。
In the
図4は、チャットを行うグループ内のユーザからのメッセージが記録されるログファイル341の例を示す図である。チャットサービスを利用するユーザが操作するHTTPクライアント12を介して入力されたメッセージは、通信制御部11,ネットワーク20,通信制御部31を介してHTTPサーバ32に供給され、当該ユーザを示す情報等と共にログファイル341に記録される。
FIG. 4 is a diagram illustrating an example of a
図5は、HTTPサーバ32からHTTPクライアント12に供給され、チャットウィンドウ142を表示させる表示データ131aの例を示す図である。但し、チャットウィンドウ142での表示のスタイルを決める部分、送信する文字を入力する入力欄、チャットを行っている相手のユーザについての情報を表示する領域ならびにこれらを取得する手段など、本発明の技術に直接無関係な部分については便宜のために省略または簡易な記載に留めている。以後においても、この点は同様である。Scriptタグ内で定義されている関数(updatefunc(v))は、HTTPサーバ32に、xmlHttpRequestを発行し、ログファイル341からチャット内容を示す文字データを取得し、当該表示データ131a内のdivタグ内の領域に出力する関数である。HTTPクライアント12は、この表示データ131aに従ってチャットウィンドウ142内にチャットの内容を表示させるようになっている。なお、この図5中には図示していないが、チャットアプリケーション131では、例えばボタンの指示あるいはメニューの選択等に応じたチャット終了処理が定義されており、ユーザからの指示等があると、チャット終了の通知をHTTPサーバ32側に送信し、チャットウィンドウ142を閉じるようになっている。
FIG. 5 is a diagram illustrating an example of
図6は、ログファイル341の更新を監視する処理等を定義した更新確認スクリプト331aの例を示している。この例では、perl言語によって処理を定義した例を示している。HTTPクライアント12がこの更新確認スクリプト331aのURLに対して要求を送信すると、この更新確認スクリプト331aの処理が開始され、スクリプト実行環境33は、図6中の2行目と3行目の定義に従って、クライアントに送信する所定のヘッダ情報等をバッファに出力させる。続けて、スクリプト実行環境33は、8行目の$|=1の命令に応じて、このヘッダ情報等をHTTPクライアント12宛に送信させる。なお、この命令($|=1)は、perl言語において、バッファに保持されているデータ(それまでに実行された行のprint文でHTTPサーバ32のバッファに保持された内容)を送信させるflush命令である。また、この実施例では、8行目のflush命令を確実に実行させるためのダミーデータ(文字列“0123・・・”)を出力させるprint文を追加している。この後、終了条件(例えばHTTPクライアント12からチャット終了の通知により、チャット状態保存ファイル343(continue.txt)の内容が変更になる等、スクリプト実行環境33内のフラグ$finの値が終了を示す値[0などの論理偽となる値]となる条件)を満たすまで、while命令中の処理を実行し、ログファイル341の更新を一定時間毎に監視する(whileループ中で、関数(サブプロシージャ)&getchatlinesの値を変数$afに代入し、初期値$bfと比較して更新の有無を判断する)。
FIG. 6 shows an example of the
チャットに参加しているユーザによる書き込み等により、ログファイル341が更新されると、ログファイル341の行数が増加する。更新の監視は、例えば関数&getchatlinesによってログファイル341の行数を取得し、前回の確認時の行数($bf)と比較することによって行うことができる。この結果、ログファイル341が更新されていれば、スクリプト実行環境33はif文中のprint文を実行した後flush命令を実行し、更新されていなければ当該print文等を実行しない。
When the
if文中のprint文は、当該if文中で規定された命令(当該更新確認スクリプト331aを要求したフレームの上位のフレームの更新を指示する命令[parent.updatefunc])をバッファに出力させ、スクリプト実行環境33は、続くflush文($|=1)に応じてバッファの内容をHTTPクライアント12に送信させる。すなわち、この更新確認スクリプト331aは、ログファイル341が更新される都度、上位のフレーム(当該“chatupdate.cgi”を要求した“index.html”)の更新を指示する命令をHTTPクライアント12に送信して表示データ133aの更新を指示するようになっている。
The “print” statement in the “if” statement outputs a command (instruction [parent.updatefunc] for instructing an update of a frame higher than the frame that requested the
(チャットサービス動作)
図7は、チャットサービスにおけるログの更新処理を示すシーケンス図である。
ユーザがチャットサービスの利用を指示すると、HTTPクライアント12は、HTTPサーバ32にチャットウィンドウ142の表示データ131a(chat.html)を要求する(S101)。HTTPサーバ32は、これに応じて上述の図5に示す表示データ131aをHTTPクライアント12に供給する(S102)。表示データ131aが供給されると、HTTPクライアント12は、上述のように表示データ131a内のiframeタグ内で定義された更新確認スクリプト331aの要求に従って、更新確認スクリプト331a(chatupdate.cgi)を要求する(S105)。
(Chat service operation)
FIG. 7 is a sequence diagram illustrating a log update process in the chat service.
When the user instructs to use the chat service, the HTTP client 12 requests the
更新確認スクリプト331aが要求されると、スクリプト実行環境33は、当該更新確認スクリプト331aの実行を開始する。更新確認スクリプト331aは、まず、ヘッダ情報等を送信し(S106)、この後、所定時間毎(上述の図6中のwhileループの実行毎)にログファイル341の更新を監視する(S201,S202,…,S203)。ログファイル341の更新を検出すると(S202)、更新確認スクリプト331aは、その旨をHTTPクライアント12宛に通知する(S107)。
When the
この通知には、上述のように、当該出力を要求したフレームの上位のフレーム(すなわち表示データ131aによるフレーム)の更新を指示するスクリプト(parent.updatefunc)が含まれているため、これを受信すると、HTTPクライアント12は、上述の関数updatefunc(v)を実行させる。これにより、再度、ログファイル341が要求され(S108)、これに応じて供給されたログファイル341(S109)に応じた文字が、例えば図8の142aに示すように、表示データ131a(chat.html)内のdivタグ内に挿入される。これにより、新たなチャットの内容が、チャットウィンドウ142内のログ表示領域142aに表示される。
As described above, the notification includes a script (parent.updatefunc) that instructs to update a frame higher than the frame that requested the output (that is, the frame based on the
このような動作を繰り返すことにより、ログファイル341が更新されたときのみログファイルを要求するHTTPリクエストを送信させて、表示データ131aを更新させて、チャットの内容を表示させることができる。
By repeating such an operation, an HTTP request for requesting a log file can be transmitted only when the
なお、チャットサービス331は、チャット状態保存ファイル343(continue.txt)によりチャットグループ毎の状態を管理しており、全てのユーザがログアウトする等チャットが終了すると、チャット状態保存ファイル343の値を0とする。上述の図6に示す更新確認スクリプト331aは、関数&contにより、チャットの状態を監視しており、チャット状態保存ファイル343の値が0となると、この関数&contの値が代入された変数$finの値が論理偽を示す“0”となり、上述のwhileループの処理が終了され、更新確認スクリプト331aは、最後に、</body></html>を出力して(S110)、セッションを終了させる。このように、更新確認スクリプト331aからの通知を受信するフレーム(上述の図5中の<iframe>タグで定義されたフレーム)の受信が終了すると、HTTPクライアント12は、表示データ131a中の<body>タグ内の記述(<body onLoad=“doonLoad()”>)に従って関数doonLoad()を実行する。なお、onLoadは、当該<body>タグ内で定義された全ての表示が終了した際に実行される処理を示している。この関数doonLoad()の実行により、ログ表示領域142a内にチャットが終了した旨を示す文字「チャットを終了しました」が表示される。
Note that the chat service 331 manages the state of each chat group by the chat state storage file 343 (continue.txt), and when the chat ends, for example, when all users log out, the value of the chat
(効果)
HTTPクライアントを用いた従来のチャットシステムでは、所定の間隔でHTTPリクエストを送信し、チャットの内容を反映させた表示を行うようになっているため、HTTPリクエストの頻度が高くなり、トラフィックが増加する問題があった。これに対し、この情報提供システムでは、以上説明したように、情報提供サーバ30側で実行される更新確認スクリプト(chatupdate.cgi)331aがログファイル341の更新を監視しており、更新があるときのみ、HTTPサーバ32にログファイルを要求して、ログの表示を更新させることができる。これにより、HTTPリクエストの頻度を低減させてトラフィックを低減させることができる。
(effect)
In the conventional chat system using an HTTP client, an HTTP request is transmitted at a predetermined interval and a display reflecting the content of the chat is performed. Therefore, the frequency of the HTTP request increases and traffic increases. There was a problem. On the other hand, in this information providing system, as described above, the update confirmation script (chapdate.cgi) 331a executed on the
また、この情報提供システムでは、サーバ側で実行されている更新確認スクリプト331aがwhileループが繰り返される間、短い間隔で繰り返しログファイル341の更新を確認しているため、ログファイル341の更新を確認した後、速やかにHTTPクライアント12側に通知を送ることができるため、チャットサービス331aが十分短い間隔でログファイル341の更新を確認していれば、ログファイル341の更新に対するチャットアプリケーション131におけるログの表示の更新の応答性を向上させることができる。
In this information providing system, the
また、この情報提供システムでは、チャットが終了した際に、サーバ側から<iframe>タグで定義されたフレームの終端を示す情報</body></html>を送信することにより、表示データ131aの<body>タグ内のonLoadで定義された処理、例えば上述の図5内の関数doonLoad()で定義されたチャットの終了を示す表示を実行させることができる。 Further, in this information providing system, when the chat is ended, the information </ body> </ html> indicating the end of the frame defined by the <iframe> tag is transmitted from the server side. A process defined by onLoad in the <body> tag, for example, a display indicating the end of chat defined by the function donLoad () in FIG. 5 described above can be executed.
(変形例)
なお、上述の実施例では、図5に示すように、予めiframeタグによるフレームの定義を表示データ131a内で定義していたが、最初のupdatefunc関数が実行された後に、動的にiframeタグによるフレームの定義が追加されるよう処理を定義しておいてもよい。これにより、チャットアプリケーション131の起動後、最新のチャットのログを取得した後、更新確認スクリプト331aによるチャットの更新確認を開始させることができるようになる。つまり、より詳しく説明すれば、チャットのメイン画面(例えば上述の“http://srv_url/chat.html”に対応)の表示に何らかの事情で時間がかかる場合がある。このため、iframeの定義が静的である場合には、メイン画面の表示途中に複数回のリクエストをHTTPサーバ32に送ることになる。これに対し、iframeを動的に生成することにすれば、一度メイン画面の表示を完了してから一度のリクエストでそれまでのログを一気に取得することができ、HTTPサーバ32との通信回数を減少させることができ、通信の効率を向上させることができる。
(Modification)
In the above embodiment, as shown in FIG. 5, the frame definition by the iframe tag is defined in the
また、上述の実施例では、HTTPクライアント12からの更新確認スクリプト331aに対するリクエストは1回だけだったが、通信エラーなどが生じた場合は、再度リクエストを発行するようにしてもよい。
In the above-described embodiment, the HTTP client 12 requests the
(サーバ側は一定以上間隔をあけず情報発信)
また、上述の実施例では、更新があった場合に通知を送信するようにしていたが、更新の有無に関わらず、所定期間毎に、ダミー情報を送信するようにしてもよい。この場合、HTTPサーバ32側では、上述の図6に示す処理の代わりに、例えば図9に示すように、whileループ中で、ログファイル341が変更されていない場合でも “ ”(半角スペース)等のダミー情報をバッファに出力し、flush命令によりHTTPクライアント12側に送信するようにする。
(Information transmission on the server side without a certain interval)
In the above-described embodiment, the notification is transmitted when there is an update. However, the dummy information may be transmitted every predetermined period regardless of whether there is an update. In this case, on the
長時間、チャットの更新がない場合には、上述の図6に示す処理だと、HTTPクライアント12に対する送信が長時間行われず、HTTPクライアント12側でタイムアウトになることも考えられる。しかしながら、この図9に示す処理では、例えば図10に示すように、ログ確認処理毎に、HTTPクライアント12に対して情報が送信されるため、例えばチャットの更新がない場合等においても、ダミー情報を送信し(S405,S407)、HTTPクライアント12側でタイムアウトになることを防止することができる。 In the case where there is no chat update for a long time, in the process shown in FIG. 6 described above, transmission to the HTTP client 12 is not performed for a long time, and a timeout may occur on the HTTP client 12 side. However, in the process shown in FIG. 9, for example, as shown in FIG. 10, information is transmitted to the HTTP client 12 for each log confirmation process. Can be prevented (S405, S407), and the HTTP client 12 can be prevented from timing out.
上述の実施例1では、HTTPサーバ32側で、更新確認スクリプト331aが、ログファイル341の更新を監視し、更新があった場合にその旨を通知するだけであったが、例えば図11及び図12に示すように、更新があった際に、ログファイル341の差分をHTTPクライアント12側に送信するようにしてもよい。
In the first embodiment described above, the
チャットの開始が指示されると、チャットアプリケーション131は、上述の図11に示す表示データ131aを所得し、iframeタグ内の定義に従って更新確認スクリプト331aを要求する。これに応じて、更新確認スクリプト331aは、図12の処理を開始し、まず、2行目から8行目のprint文を実行し、9行目のflush文でそれまでのprint文の実行によるバッファの内容を送信させる。8行目のprint文では、getLog()関数の実行を指示するスクリプトが出力されており、このようなスクリプトを含む応答を受信すると、チャットアプリケーション131は、表示データ131a中の関数getLog()の定義に従って、これまでのログを取得し、改行コードを変換して当該表示データ131aのログ表示領域142a内に挿入する。
When the start of chat is instructed, the chat application 131 obtains the
この後、更新確認スクリプト331aは、図13に示すように、ログファイル341の更新を監視するが、更新があった際に、更新前後のログファイルの差分を求めて所定の変数($chatupdate)の値とし、表示データ131a内のiframeに対する応答としてHTTPクライアント12側に送信する(S304)。
Thereafter, as shown in FIG. 13, the
チャットアプリケーション131は、chatupdate.cgiからの応答があると、当該応答内のparent.updatefunc命令に応じて、当該parent.updatefunc命令中の変数$chatupdateを引数(v)としてupdatefunc関数を実行させる。updatefunc関数の実行により、チャットアプリケーション131は、引数vで指定された文字を、表示データ131a内のdivタグで定義されたログ表示領域に追記し、ログ表示領域142aの表示を更新させる。これにより、更新されたログの内容がログ表示領域142a内に表示される。チャットが終了すると、更新確認スクリプト331aは、上述の実施例1と同様に、終了情報(</body></html>)を出力して(S305)、セッションを終了させる。これに応じて、チャットアプリケーション131は、ログ表示領域142a内にチャットが終了した旨を示す文字「チャットを終了しました」を表示させる。
The chat application 131 is chatupdate. When there is a response from cgi, parent. In response to the updatefunc instruction, the parent. The updatefunc function is executed with the variable $ chatupdate in the updatefunc instruction as an argument (v). By executing the updatefunc function, the chat application 131 adds the character specified by the argument v to the log display area defined by the div tag in the
上述の実施例1では、更新確認スクリプト331aからの通知に応じて、チャットアプリケーション131側からログファイル341を要求する必要があったが、この実施例2では、チャットアプリケーション131側からは、最初に更新確認スクリプト331aを要求するだけで、ログファイル341の差分を順次取得することができる。これにより、さらにトラフィックを低減させることができる。
In the first embodiment described above, it is necessary to request the
なお、本発明の技術的思想は、上述の各実施形態に限定されない。例えば上述の説明では、チャットサービスを例に説明したが、ファイル共有サービス332,検索サービス333,DBアクセスサービス334等のサービスを利用する際にも、チャットアプリケーション131と同様に、HTTPサーバ32側においてデータの更新等を監視し、更新等があった場合に、HTTPクライアント12側に通知し、スクリプト実行環境13がサービスの実行結果を取得することにより、上述と同様の作用効果を奏することができる。また、上述の各実施形態では、更新確認スクリプト331aのwhileループの実行毎にログファイル341の更新を確認する例について示したが、スクリプト実行環境33において、更新確認スクリプト331aの中の$sleep命令の引数(図6,図9,図12中の値“1”)を変数として動的に変更する処理を追加し、例えばログファイル341の更新頻度が低いときには$sleep命令で処理を止める時間を長くするといった調整ができるようする等の変形例も考えられる。
The technical idea of the present invention is not limited to the above-described embodiments. For example, in the above description, the chat service has been described as an example. However, when using services such as the file sharing service 332, the
10…クライアント端末、12…HTTPクライアント、13…スクリプト実行環境、131…チャットアプリケーション、20…ネットワーク、30…情報提供サーバ、33…スクリプト実行環境、331…チャットサービス、331a…更新確認スクリプト、341…ログファイル。 DESCRIPTION OF SYMBOLS 10 ... Client terminal, 12 ... HTTP client, 13 ... Script execution environment, 131 ... Chat application, 20 ... Network, 30 ... Information providing server, 33 ... Script execution environment, 331 ... Chat service, 331a ... Update check script, 341 ... logfile.
Claims (6)
前記情報提供手段が提供する情報を取得する情報取得手段と,前記通知手段からの通知に応じて前記情報取得手段に情報の取得を指示する取得指示手段とを有するHTTPクライアントを備える情報利用端末と
を有することを特徴とする情報提供システム。 An information providing means for providing information by an HTTP server, an update detecting means for repeatedly checking whether or not the information to be monitored is updated, and in one session, the update detecting means updates the information to be monitored. An information providing server comprising a notification means for notifying that the information has been updated when detected;
An information use terminal comprising an HTTP client, comprising: an information acquisition means for acquiring information provided by the information providing means; and an acquisition instruction means for instructing the information acquisition means to acquire information in response to a notification from the notification means; An information providing system characterized by comprising:
前記HTTPサーバの通知手段は、前記通知中に前記差分検出手段が検出した差分を示す差分情報を含めて通知し、
前記HTTPクライアントの情報取得手段は、前記通知中の差分情報を取得する
ことを特徴とする請求項1記載の情報提供システム。 The HTTP server has a difference detection unit that detects a difference of the update detection unit when the update detection unit detects an update of the information to be monitored.
The notification means of the HTTP server notifies including the difference information indicating the difference detected by the difference detection means during the notification,
The information providing system according to claim 1, wherein the information acquisition unit of the HTTP client acquires the difference information in the notification.
前記通知手段が通知を送信してからの経過時間を求める計時手段と、
経過時間が所定の閾値を超えた場合に前記通知手段にダミー情報を送信させるダミー情報送信手段と
を備えることを特徴とする請求項1又は請求項2のいずれかに記載の情報提供システム。 The HTTP server is
Time measuring means for obtaining an elapsed time since the notification means transmits the notification;
3. The information providing system according to claim 1, further comprising: dummy information transmission unit that causes the notification unit to transmit dummy information when an elapsed time exceeds a predetermined threshold value. 4.
監視対象となる前記情報の更新の有無を繰り返し確認する更新検出手段と、
一のセッションにおいて、前記更新検出手段の検出出力に応じて情報の更新があった旨を前記端末装置に通知する通知手段と
を備えることを特徴とする情報提供サーバ装置。 Information providing means for providing information to the terminal device;
Update detection means for repeatedly checking whether or not the information to be monitored is updated;
An information providing server device comprising: a notification unit that notifies the terminal device that information has been updated according to a detection output of the update detection unit in one session.
HTTPクライアント上で実行され,前記情報提供手段が提供する情報を取得する情報取得手段と,前記通知手段からの通知に応じて前記情報取得手段に情報の取得を指示する取得指示手段と
を備えることを特徴とする情報利用端末装置。 Information providing means for providing information by an HTTP server, update detecting means for repeatedly confirming whether or not the information to be monitored is updated, and updating of information in accordance with the detection output of the update detecting means in one session An information use terminal that uses information provided by an information providing server provided with a notification means for notifying that there has been,
An information acquisition unit that is executed on an HTTP client and acquires information provided by the information providing unit, and an acquisition instruction unit that instructs the information acquisition unit to acquire information in response to a notification from the notification unit An information utilization terminal device characterized by the above.
HTTPクライアント上で実行され,前記情報提供手段が提供する情報を取得する情報取得ステップと,前記通知手段からの通知に応じて前記情報取得ステップに情報の取得を指示する取得指示ステップと
を備えることを特徴とする情報利用プログラム。 Information providing means for providing information by an HTTP server, update detecting means for repeatedly confirming whether or not the information to be monitored is updated, and updating of information in accordance with the detection output of the update detecting means in one session An information use program that uses information provided by an information providing server provided with a notification means for notifying that there has been,
An information acquisition step that is executed on an HTTP client and acquires information provided by the information providing unit, and an acquisition instruction step that instructs the information acquisition step to acquire information in response to a notification from the notification unit An information utilization program characterized by
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007008227A JP2008176483A (en) | 2007-01-17 | 2007-01-17 | Information providing system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007008227A JP2008176483A (en) | 2007-01-17 | 2007-01-17 | Information providing system |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008176483A true JP2008176483A (en) | 2008-07-31 |
Family
ID=39703467
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007008227A Pending JP2008176483A (en) | 2007-01-17 | 2007-01-17 | Information providing system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008176483A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015207088A (en) * | 2014-04-18 | 2015-11-19 | 株式会社リコー | Information processing system, information processor and program |
JP2018097547A (en) * | 2016-12-12 | 2018-06-21 | 中国電力株式会社 | Load comparison device, load comparison program and load comparison method |
-
2007
- 2007-01-17 JP JP2007008227A patent/JP2008176483A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015207088A (en) * | 2014-04-18 | 2015-11-19 | 株式会社リコー | Information processing system, information processor and program |
JP2018097547A (en) * | 2016-12-12 | 2018-06-21 | 中国電力株式会社 | Load comparison device, load comparison program and load comparison method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11550870B2 (en) | Method and system for detecting slow page load | |
US7519689B2 (en) | Method and system to provide message communication between different browser based applications running on a desktop | |
US8112548B2 (en) | Method for providing a clip for viewing at a remote device | |
CN108833950B (en) | Barrage message issuing method, server, system and storage medium | |
US20060294396A1 (en) | Multiplatform synchronized data access from mobile devices of dynamically aggregated content | |
CN104967542B (en) | A kind of test method, the device and system of the mobile terminal page | |
EP2254302B1 (en) | Method and apparatus for restoring state information of remote user interface | |
US20080263139A1 (en) | Method for providing content to a mobile device, gateway for providing content and mobile device | |
JP2009116630A (en) | Web-screen sharing system, web-screen sharing terminal, and sharing program thereof | |
JP2013041611A (en) | Device and method for managing and displaying user interface | |
JP2006107487A (en) | Method for offering content through network, and system and program therefor | |
KR20180004093A (en) | Transmitting media content during instant messaging | |
JP6093449B2 (en) | Homepage forming method, peripheral device, and homepage forming system | |
EP1641217A2 (en) | Method, apparatus and system for passing messages to a web browser | |
CN110674435A (en) | Page access method, server, terminal, electronic equipment and readable storage medium | |
KR20060054295A (en) | Method and system for maintaining font sizes on different platforms | |
JP2007108953A (en) | Chat program | |
US20060075069A1 (en) | Method and system to provide message communication between different application clients running on a desktop | |
JP2008176483A (en) | Information providing system | |
AU2018390863B2 (en) | Computer system and method for extracting dynamic content from websites | |
US11546344B2 (en) | Browsing management server, browsing management method, and browsing management system | |
TW200805972A (en) | Context based navigation | |
JP5053040B2 (en) | Information processing apparatus and client server system | |
CN113965357B (en) | Cross-domain website login state synchronization method, electronic equipment and storage medium | |
KR100716673B1 (en) | Method and system for putting an ad on the network |