JPH11232294A - Www system and session managing method in www system - Google Patents

Www system and session managing method in www system

Info

Publication number
JPH11232294A
JPH11232294A JP10033317A JP3331798A JPH11232294A JP H11232294 A JPH11232294 A JP H11232294A JP 10033317 A JP10033317 A JP 10033317A JP 3331798 A JP3331798 A JP 3331798A JP H11232294 A JPH11232294 A JP H11232294A
Authority
JP
Japan
Prior art keywords
processing
data
request
database
counter value
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
JP10033317A
Other languages
Japanese (ja)
Inventor
Hiroki Yamazaki
浩樹 山崎
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.)
NTT Comware Corp
Original Assignee
NTT Communicationware Corp
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 NTT Communicationware Corp filed Critical NTT Communicationware Corp
Priority to JP10033317A priority Critical patent/JPH11232294A/en
Publication of JPH11232294A publication Critical patent/JPH11232294A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To assure continuity of a processing to data even under a condition that a series of processing requests from a client are performed under plural sessions. SOLUTION: Data structure of a database 5 is provided with a counter field to store a counter value for each piece of data. A WWW(world wide web) system 1 to manage the session when a series of processing requests for the database 5 becomes plural sessions is provided with a session managing part 2 including a reference processing function 3 to acquire the data whose reference is requested from a terminal 6 and the counter value for the data from the database 5 and to embed the counter value in a retrieval result to be returned to the terminal 6 and an update processing function 4 to compare the counter value embedded in a data update request from the terminal 6 with the counter value for the data to be updated and to update the data and the counter value for the data for the database 5 when the counter values coincide.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、WWW(World Wi
de Web)システムに関し、特にクライアントからデータ
ベースに対する一連の処理要求が複数のセッションとな
る場合のセッション管理を行うWWWシステムおよびW
WWシステムにおけるセッション管理方法に関するもの
である。
[0001] The present invention relates to a WWW (World Wi-Fi).
de Web) system, in particular, a WWW system and a WWW system for performing session management when a series of processing requests from a client to a database are made into a plurality of sessions
The present invention relates to a session management method in a WW system.

【0002】[0002]

【従来の技術】近年、インターネットの利用の便をより
よくするために電子メール、ファイル転送等の機能を備
えたWWWシステムが構築されている。このWWWシス
テムにおいて、インターネットのホームページはHTM
L(Hyper Text Markup Language)というハイパーテキ
スト記述言語で書かれており、サーバとなるWWWシス
テムとクライアントとなる端末との間は、HTTP(Hy
per Text Transfer Protocol)と呼ばれるプロトコルを
用いて通信が行われる。このようなWWWシステムを構
築するためのインフラが企業内にも整ってきたことか
ら、WWWシステムをサーバとしたデータベース検索、
更新システムの開発・構築が試みられている。ところ
で、従来のクライアント/サーバシステムでは、クライ
アントからデータベースの参照・更新といった一連の処
理要求がある場合、クライアント/サーバ間においてネ
ットワークを介して1回の論理的な接続関係、すなわち
1回のセッションが形成される。このセッションが形成
されている間は、他のクライアントによるデータに対す
る処理が行えないので、一連の処理途中で他のクライア
ントの更新要求によりそのデータの更新が行われるとい
ったことがなく、データ処理の一貫性が保証できる。
2. Description of the Related Art In recent years, WWW systems provided with functions such as e-mail and file transfer have been constructed in order to make the Internet more convenient. In this WWW system, the home page of the Internet is HTM
It is written in L (Hyper Text Markup Language), a hypertext description language, and between the WWW system serving as a server and the terminal serving as a client, an HTTP (Hyper Text Markup Language)
The communication is performed using a protocol called "Per Text Transfer Protocol". Since the infrastructure for constructing such a WWW system has been prepared in the enterprise, database search using the WWW system as a server,
Development and construction of an update system is being attempted. By the way, in a conventional client / server system, when a series of processing requests such as reference / update of a database are made from a client, one logical connection relationship between the client / server via a network, that is, one session is established. It is formed. While this session is being formed, data cannot be processed by another client, so the data is not updated by another client's update request during a series of processing, and the data processing is consistent. Can be guaranteed.

【0003】しかし、HTTPプロトコルを用いるWW
Wシステムでは、データベースの参照・更新といった一
連の処理要求がなされる場合、これら一連の処理要求に
おいて複数のセッションが形成される。よって、あるク
ライアントAが所定のデータの参照・更新をしようとす
る場合、例えばデータの参照において1回目のセッショ
ンが形成され、WWWシステムが参照要求のあったデー
タの検索処理を行いその検索結果の返送をクライアント
Aに対して行う。そして、クライアントAがその参照し
たデータの更新をする場合、新たに2回目のセッション
が形成され、WWWシステムが更新要求のあったデータ
の更新処理を行なう。上述の2回のセッション間には関
連付けがなされていないので、この2回のセッションの
間に、他のクライアントBから同じデータに対する更新
要求があった場合、このクライアントBの処理要求をW
WWシステムが行ってしまうことになる。その結果、ク
ライアントBの要求によりそのデータの更新がなされた
にもかかわらず、クライアントAの更新前のデータ情報
に基づいた更新要求により、そのデータの再更新が行わ
れ、データの2重更新が行われることになる。よって、
データ処理の一貫性が保証できなくなる。
However, WW using the HTTP protocol
In the W system, when a series of processing requests such as database reference / update are made, a plurality of sessions are formed by the series of processing requests. Therefore, when a certain client A tries to refer to or update predetermined data, for example, a first session is formed in referring to the data, and the WWW system performs a search process of the data requested to be referred to, and the search result is obtained. The return is performed to the client A. Then, when the client A updates the referred data, a second session is newly formed, and the WWW system updates the data requested to be updated. Since there is no association between the two sessions described above, if there is an update request for the same data from another client B during the two sessions, the processing request of this client B is sent to W
The WW system will do it. As a result, although the data is updated by the request of the client B, the data is updated again by the update request based on the data information before the update of the client A, and the double update of the data is performed. Will be done. Therefore,
Data processing consistency cannot be guaranteed.

【0004】そこで、HTTPプロトコルを用いる場
合、すなわちデータに対する一連の処理要求が複数のセ
ッションとなる場合においても、データ処理の一貫性を
持たせるためのWWWシステムの構成例を図8に示す。
図8のWWWシステム71を用いた場合において、クラ
イアントとなる端末75からデータの参照・更新という
一連の処理要求があった場合の動作概要を説明すると以
下のようになる。端末75がデータの参照要求を行う
と、WWWシステム間でセッションが形成され、WWW
システム71におけるID管理機能72により、この要
求に対するIDが付与される。そして、DB(データベ
ース)アクセス機能73を用いてデータベース74から
参照対象のデータを取得し、この取得したデータととも
にIDを端末75に対して返送し、セッションが開放さ
れる。なお、WWWシステム71では、このとき他のク
ライアントからのそのデータに対する更新が行われない
ようにデータベース74に対してロックを行う。そし
て、端末75が、受け取ったIDとともに参照したデー
タに対する更新要求をWWWシステム71に対して行う
と、新たなセッションが形成される。WWWシステム7
1は、ID管理機能72により受け取ったIDの比較を
行い、IDが送ったものと一致するようであれば、DB
アクセス機能73によりデータベース74に対してデー
タの更新を行うとともに、ロックの解除を行い、このセ
ッションが開放される。
[0004] Fig. 8 shows an example of the configuration of a WWW system for providing consistency in data processing even when the HTTP protocol is used, that is, when a series of data processing requests are made in a plurality of sessions.
When the WWW system 71 of FIG. 8 is used, an outline of the operation when a series of processing requests for data reference / update are made from the client terminal 75 will be described below. When the terminal 75 makes a data reference request, a session is formed between the WWW systems and WWW
An ID for this request is assigned by an ID management function 72 in the system 71. Then, the reference target data is acquired from the database 74 by using the DB (database) access function 73, and the ID is returned to the terminal 75 together with the acquired data, and the session is released. At this time, the WWW system 71 locks the database 74 so as not to update the data from another client. Then, when the terminal 75 issues an update request to the WWW system 71 for the data referenced together with the received ID, a new session is formed. WWW system 7
1 compares the IDs received by the ID management function 72, and if the IDs match those transmitted, the DB
The access function 73 updates the data in the database 74, releases the lock, and releases the session.

【0005】[0005]

【発明が解決しようとする課題】しかし、上述のWWW
システム71では、あるクライアントからのデータの参
照・更新といった一連の処理要求に対する処理が終了す
るまで、他のクライアントによる更新が行われないよう
にデータベース74のロックを行うので、その間、他の
クライアントはデータベース74に対する処理が行えず
処理性能が劣化する。さらに、多くのクライアントから
データベースに対する各種処理要求が行われた場合、デ
ータベースがロックされていると、これら処理要求に対
する処理が保証できない。なお、クライアントからの多
くの処理要求(トランザクション)を効率的に処理する
ために、図9に示すようにOLTP(On Line Transact
ion Process)という機能を持ったトランザクション管
理機能76をID管理機能72とともに導入することも
考えられる。しかし、このトランザクション管理機能7
6を単に導入しただけでは、ID管理機能72との間で
IDに基づいたクライアントからの要求に対する処理が
行われないことから、結局データの更新等における一貫
性を保証できない。
However, the above-mentioned WWW
The system 71 locks the database 74 so that the update by another client is not performed until the processing for a series of processing requests such as data reference / update from one client is completed. Processing cannot be performed on the database 74, and processing performance deteriorates. Further, when various processing requests for the database are made from many clients, if the database is locked, the processing for these processing requests cannot be guaranteed. In order to efficiently process many processing requests (transactions) from clients, as shown in FIG. 9, an OLTP (On Line Transact
It is also conceivable to introduce a transaction management function 76 having a function called “ion process” together with the ID management function 72. However, this transaction management function 7
6 simply does not process the request from the client based on the ID with the ID management function 72, so that it is not possible to guarantee the consistency in updating the data after all.

【0006】本発明はこのような事情に鑑みてなされた
もので、クライアントからのデータに対する一連の処理
要求が複数のセッションにたまがって処理される場合で
あっても、この処理要求に対する処理の一貫性を保証で
き、かつ、一度に大量の処理要求が発生しても、処理の
性能劣化が生じないようなWWWシステムおよびWWW
システムにおけるセッション管理方法を提供することを
目的とする。
The present invention has been made in view of such circumstances, and even when a series of processing requests for data from a client are processed collectively in a plurality of sessions, the processing for the processing requests is not performed. WWW system and WWW that can guarantee consistency and do not cause deterioration in processing performance even when a large number of processing requests are generated at once
An object of the present invention is to provide a session management method in a system.

【0007】[0007]

【課題を解決するための手段】上記目的を達成するため
に、本発明のうち請求項1に記載の発明は、データに対
してカウンタ値を格納するためのカウンタフィールドを
設けたデータ構造を有するデータベースに対する一連の
処理要求が複数のセッションのもと行われる場合のセッ
ション管理のためのセッション管理部を備えたWWWシ
ステムであって、前記セッション管理部は、参照要求さ
れたデータおよび該データに対するカウンタ値を前記デ
ータベースから取得し、該カウンタ値を返送する検索結
果に埋め込む参照処理機能と、データの更新要求に埋め
込まれたカウンタ値および該更新要求で更新対象となる
データに対するカウンタ値の比較を行い、一致する場合
に前記データベースに対して更新対象となるデータおよ
び該データに対するカウンタ値の更新を行う更新処理機
能とを含むことを特徴とするWWWシステムである。ま
た、請求項2に記載の発明は、請求項1に記載のWWW
システムにおいて、前記更新処理機能が、前記カウンタ
値の比較結果が一致しない場合には、エラー通知の準備
を行うことを特徴としている。
In order to achieve the above object, the invention according to claim 1 of the present invention has a data structure provided with a counter field for storing a counter value for data. A WWW system including a session management unit for session management when a series of processing requests for a database is made under a plurality of sessions, wherein the session management unit includes: a reference-requested data and a counter for the data. A reference processing function for acquiring a value from the database and embedding the counter value in a search result to be returned, and comparing the counter value embedded in the data update request and the counter value for the data to be updated in the update request. , If they match, the data to be updated in the database and the data A WWW system which comprises an update processing function and updating the counter value. According to a second aspect of the present invention, there is provided the WWW according to the first aspect.
In the system, the update processing function prepares for an error notification when the comparison result of the counter values does not match.

【0008】また、請求項3に記載の発明は、請求項1
または請求項2に記載のWWWシステムにおいて、前記
セッション管理部が、クライアント側が前記データベー
スに対する処理要求と処理結果参照とを別に要求し、そ
れらが別のセッションとなる場合において、要求内容を
スタックするためのトランザクションキューと、前記デ
ータベースに対する処理結果を格納するための処理結果
バッファと、前記トランザクションキューおよび処理結
果バッファを利用した非同期処理を行う非同期処理機能
とをさらに含み、前記非同期処理機能が、要求が処理要
求の場合には、前記トランザクションキューに要求内容
のスタックを行なうとともに受付通知をし、処理結果参
照の場合には、対応する処理結果を前記処理結果バッフ
ァから取得して処理結果の通知を行う処理部と、前記ト
ランザクションキューに要求内容がスタックされている
ならば、要求内容を取り出し、前記参照処理機能もしく
は更新処理機能を用いて前記データベースに対するデー
タ処理を行い、処理結果を前記処理結果バッファに格納
する処理部とを備えたことを特徴としている。
[0008] The invention described in claim 3 is the first invention.
3. The WWW system according to claim 2, wherein the session management unit stacks request contents when the client side requests a processing request for the database and a processing result reference separately, and the client requests another processing. A transaction queue, a processing result buffer for storing a processing result for the database, and an asynchronous processing function for performing asynchronous processing using the transaction queue and the processing result buffer. In the case of a processing request, the request content is stacked in the transaction queue and an acceptance notification is made. In the case of a processing result reference, the corresponding processing result is obtained from the processing result buffer and the processing result is notified. A processing unit; If the request content is stacked, a processing unit that extracts the request content, performs data processing on the database using the reference processing function or the update processing function, and stores a processing result in the processing result buffer. It is characterized by having.

【0009】次に、請求項4に記載の発明は、データに
対してカウンタ値を格納するためのカウンタフィールド
を設けたデータ構造を有するデータベースに対する一連
の処理要求が複数のセッションのもと行われる場合のW
WWシステムにおけるセッション管理方法であって、要
求が前記データベースのデータ参照である場合に、該要
求されたデータおよび該データに対するカウンタ値を前
記データベースから取得し、該カウンタ値を検索結果に
埋め込んで返送する第1の処理と、要求が前記データベ
ースのデータ更新である場合に、更新要求に埋め込まれ
たカウンタ値および該更新要求で更新対象となるデータ
に対するカウンタ値の比較を行い、一致する場合に前記
データベースに対して更新対象となるデータおよび該デ
ータに対するカウンタ値の更新を行う第2の処理とを含
むことを特徴とするWWWシステムにおけるセッション
管理方法である。また、請求項5に記載の発明は、請求
項4に記載のWWWシステムにおけるセッション管理方
法において、前記カウンタ値の比較結果が一致しない場
合には、エラー通知を行うことを特徴としている。
Next, according to the invention described in claim 4, a series of processing requests to a database having a data structure provided with a counter field for storing a counter value for data is made under a plurality of sessions. W in case
A session management method in a WW system, wherein when a request is a data reference of the database, the requested data and a counter value for the data are acquired from the database, and the counter value is embedded in a search result and returned. A first process for comparing the counter value embedded in the update request with the counter value for the data to be updated in the update request when the request is a data update of the database; A session management method for a WWW system, comprising: data to be updated in a database; and a second process of updating a counter value for the data. According to a fifth aspect of the present invention, in the session management method in the WWW system according to the fourth aspect, when the comparison result of the counter values does not match, an error notification is performed.

【0010】また、請求項6に記載の発明は、請求項4
または請求項5に記載のWWWシステムにおけるセッシ
ョン管理方法において、前記WWWシステムにおけるデ
ータベース管理方法が、クライアント側が前記データベ
ースに対する処理要求と処理結果参照とを別に要求し、
それらが別のセッションとなる場合において、要求が処
理要求の場合には、トランザクションキューに要求内容
のスタックを行なうとともに受付通知をし、要求が処理
結果参照の場合には、対応する処理結果を処理結果バッ
ファから取得して処理結果の返送を行う処理と、前記ト
ランザクションキューに要求内容がスタックされている
ならば、順次要求内容を取り出し、該要求内容に応じ
て、前記第1の処理もしくは前記第2の処理を利用して
前記データベースに対する処理を行い、処理結果を前記
処理結果バッファに格納する処理とを非同期に行うこと
を特徴としている。
[0010] The invention described in claim 6 is the invention according to claim 4.
Or the session management method in a WWW system according to claim 5, wherein the database management method in the WWW system is such that a client side requests a processing request for the database and a processing result reference separately,
In the case where they are different sessions, if the request is a processing request, stack the request contents in the transaction queue and notify the reception, and if the request is a processing result reference, process the corresponding processing result A process of obtaining a processing result from the result buffer and returning the processing result, and, if the request content is stacked in the transaction queue, sequentially fetch the request content and, depending on the request content, the first process or the second process. The processing of the database is performed using the processing of No. 2 and the processing of storing the processing result in the processing result buffer is performed asynchronously.

【0011】[0011]

【発明の実施の形態】以下、本発明の一実施形態による
WWWシステムおよびWWWシステムにおけるセッショ
ン管理方法を図面を参照して説明する。 (第1の実施の形態)図1は、本発明の一実施形態によ
るWWWシステムの構成図である。WWWシステム1
は、クライアントとなる端末6からの処理要求(トラン
ザクション)ごとに形成されるセッションを管理すため
のセッション管理部2を備えている。また、このセッシ
ョン管理部2は、端末6から参照要求に対する処理を主
に行う参照処理機能3と、更新要求に対する処理を主に
行う更新処理機能4を含んでいる。なお、これら参照処
理機能3、更新処理機能4を含むセッション管理部4
は、CPU(中央演算装置)および機能を実現するため
のプログラム等により実現されるものとする。なお、図
1において、サーバとなるWWWシステム1とクライア
ントとなる端末6との間は、HTTPと呼ばれるプロト
コルを用いて通信が行われるものとする。また、このW
WWシステム1は、ネットワークを介して複数の端末か
らの処理要求を処理できるが、図1ではWWWシステム
1に対して処理要求を行う端末の代表として端末6を1
つ示す。そして、端末6からのWWWシステム1に対す
る処理要求は、符号5に示すデータベースに格納された
データに対する処理要求であるものとする。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, a WWW system and a session management method in a WWW system according to an embodiment of the present invention will be described with reference to the drawings. (First Embodiment) FIG. 1 is a configuration diagram of a WWW system according to an embodiment of the present invention. WWW system 1
Includes a session management unit 2 for managing a session formed for each processing request (transaction) from the terminal 6 serving as a client. Further, the session management unit 2 includes a reference processing function 3 that mainly performs processing for a reference request from the terminal 6 and an update processing function 4 that mainly performs processing for an update request. The session management unit 4 including the reference processing function 3 and the update processing function 4
Are realized by a CPU (Central Processing Unit) and a program for realizing the function. In FIG. 1, communication between the WWW system 1 serving as a server and the terminal 6 serving as a client is performed using a protocol called HTTP. Also, this W
The WWW system 1 can process processing requests from a plurality of terminals via a network, but in FIG.
One. The processing request from the terminal 6 to the WWW system 1 is assumed to be a processing request for data stored in the database indicated by reference numeral 5.

【0012】ところで、このデータベース5のデータ構
造は、図2に示すようにデータ(レコード)11毎に、
カウンタフィールド12が設けられているものとする。
そして、このカウンタフィールド12には、セッション
管理部2でセッション管理のために利用するカウンタ値
が収められるものとする。このようなデータ構造をもつ
データベース5に対し、端末6からWWWシステム1に
データの参照要求があった場合、セッション管理部2
は、参照処理機能3を用いて、参照要求されたデータお
よびこのデータに対するカウンタ値をデータベース5か
ら取得する。そして、この取得したカウンタ値を端末6
に返送する検索結果に埋め込んで端末6に返送し、この
要求により形成されたセッションが開放される。一方、
端末6から参照したデータに対する更新要求がなされる
場合、セッション管理部2は、更新処理機能4を用いて
端末6からのデータの更新要求に埋め込まれたカウンタ
値およびこの更新要求で更新対象となるデータに対する
カウンタ値の取得・比較を行う。そして、一致する場合
にデータベース5に対して更新対象となるデータおよび
このデータに対するカウンタ値の更新を行ない、この要
求により形成されたセッションが開放される。以上のよ
うに、セッション管理部2は、データごとに設けられた
カウンタフィールド中のカウンタ値を利用することで、
クライアントからの一連の処理要求が複数のセッション
のもと行われる場合でも、この処理要求に対する処理の
一貫性を保証する。
The data structure of the database 5 is, as shown in FIG.
It is assumed that a counter field 12 is provided.
The counter field 12 stores a counter value used for session management by the session management unit 2. When there is a data reference request from the terminal 6 to the WWW system 1 to the database 5 having such a data structure, the session management unit 2
Obtains, from the database 5, the data requested to be referenced and the counter value for the data by using the reference processing function 3. Then, the obtained counter value is stored in the terminal 6.
Embedded in the search result returned to the terminal 6 and returned to the terminal 6, and the session formed by this request is released. on the other hand,
When an update request for data referenced from the terminal 6 is made, the session management unit 2 uses the update processing function 4 to update the counter value embedded in the data update request from the terminal 6 and to be updated by this update request. Obtain and compare counter values for data. If they match, the data to be updated and the counter value for this data are updated in the database 5, and the session formed by this request is released. As described above, the session management unit 2 uses the counter value in the counter field provided for each data,
Even when a series of processing requests from a client are made under a plurality of sessions, consistency of processing for the processing requests is guaranteed.

【0013】以下では、このセッション管理部2におけ
る参照処理機能3、更新処理機能4について図面を用い
てより詳細に説明する。図3は、端末からデータの参照
・更新といった一連の処理要求のうちの参照要求があっ
た場合のセッション管理部2の動作を示したフローチャ
ートである。なお、端末からの処理要求がデータの参照
のみの場合にも、図3に示す動作を行う。端末からの要
求によりセッションが形成されるが、セッション管理部
2は、この端末からの要求が参照要求であるか否かの判
断を行ない(ステップS11)、参照要求であれば、参
照処理を行うために参照処理機能3を起動させ、要求内
容を引き渡す。参照処理機能3は、端末からの要求内容
の解析を行い、参照要求のあったデータおよびこのデー
タに関するカウンタ値をデータベース5から取得するた
めに、SQL(Structural Query Language)を用いて
データ取得のための問い合わせを作成し、データベース
5に対して発行する。そして、データベース5から参照
要求のあったデータおよびカウンタ値の取得を行う(ス
テップS12)。
Hereinafter, the reference processing function 3 and the update processing function 4 in the session management unit 2 will be described in more detail with reference to the drawings. FIG. 3 is a flowchart showing the operation of the session management unit 2 when there is a reference request from a series of processing requests such as data reference / update from the terminal. Note that the operation shown in FIG. 3 is also performed when the processing request from the terminal is only data reference. A session is formed by a request from the terminal. The session management unit 2 determines whether the request from the terminal is a reference request (step S11). If the request is a reference request, the session management unit 2 performs a reference process. In order to do so, the reference processing function 3 is activated and the requested contents are delivered. The reference processing function 3 analyzes the contents of the request from the terminal and obtains the data requested to be referred and the counter value related to the data from the database 5 by using SQL (Structural Query Language). Is created and issued to the database 5. Then, the data and the counter value for which the reference is requested are obtained from the database 5 (step S12).

【0014】次に、参照処理機能3は、要求を行った端
末に返送する検索結果に取得したカウンタ値を埋め込
み、この検索結果をセッション管理部2に引き渡し、処
理を終了する。そして、セッション管理部2は、要求を
行った端末に受け取った検索結果を返送し(ステップS
13)、セッションが開放される。そして、端末からの
次の要求処理に備え、ステップS11に戻る。なお、検
索結果に埋め込まれたカウンタ値は、この検索結果を受
け取った端末において特に表示されるものではない。よ
って、端末の使用者であるユーザは、この埋め込まれた
カウンタ値を特に意識することなく端末での作業を行う
ことになる。以上のようにして、端末から参照要求があ
った場合の処理が、セッション管理部2において行われ
る。なお、この処理において、参照処理機能3は、上述
したセッション管理部2の処理の1部または全部を含め
た機能を有するようにしてもよい。
Next, the reference processing function 3 embeds the obtained counter value in the search result returned to the requesting terminal, passes the search result to the session management unit 2, and ends the processing. Then, the session management unit 2 returns the received search result to the requesting terminal (step S
13) The session is released. Then, the process returns to step S11 in preparation for the next request processing from the terminal. Note that the counter value embedded in the search result is not particularly displayed on the terminal that has received the search result. Therefore, a user who is a user of the terminal performs work on the terminal without being particularly aware of the embedded counter value. As described above, the processing when there is a reference request from the terminal is performed in the session management unit 2. In this processing, the reference processing function 3 may have a function including a part or all of the processing of the session management unit 2 described above.

【0015】図4は、端末から参照したデータに対する
更新要求があった場合のセッション管理部2の動作を示
したフローチャートである。なお、ここで、端末が参照
したデータに対する更新要求を行う場合、端末側が受け
取った検索結果に埋め込まれたカウンタ値もそのまま埋
め込まれ更新要求として、WWWシステム1に送られる
ものとする。また、この端末におけるカウンタ値を返す
処理は、ユーザに特に意識させないで自動的に行われる
ものとする。端末からの要求によりセッションが形成さ
れるが、セッション管理部2は、この端末からの要求が
更新要求であるか否かの判断を行ない(ステップS2
1)、更新要求であれば、更新処理を行うために更新処
理機能4を起動させ、要求内容を引き渡す。更新処理機
能4は、受け取った更新要求から埋め込まれたカウンタ
値αの取得を行う(ステップS22)。次に、端末から
の要求内容の解析を行い、更新要求のあったデータに関
するカウンタ値をデータベース5から取得するために、
SQLを用いてデータ取得のための問い合わせを作成
し、データベース5に対して発行する。そして、データ
ベース5から更新要求のあったデータに関するカウンタ
値βの取得を行う(ステップS23)。
FIG. 4 is a flowchart showing the operation of the session management unit 2 when there is an update request for the data referenced from the terminal. Here, when an update request for the data referred to by the terminal is made, the counter value embedded in the search result received by the terminal is also embedded as it is and sent to the WWW system 1 as an update request. It is assumed that the process of returning the counter value in this terminal is automatically performed without the user being particularly conscious. A session is formed by a request from the terminal. The session management unit 2 determines whether the request from the terminal is an update request (step S2).
1) If the request is an update request, the update processing function 4 is started to perform the update processing, and the request content is delivered. The update processing function 4 acquires the embedded counter value α from the received update request (step S22). Next, in order to analyze the contents of the request from the terminal and to obtain from the database 5 a counter value relating to the data requested to be updated,
An inquiry for data acquisition is created using SQL and issued to the database 5. Then, the counter value β for the data requested to be updated is obtained from the database 5 (step S23).

【0016】そして、更新要求に埋め込まれていたカウ
ンタ値αとデータベース5から取得したカウンタ値βの
比較を行う(ステップS24)。ところで、ある端末A
があるデータに対して参照・更新を行う途中で、他の端
末Bの更新要求によりそのデータに対して更新が行なわ
れたとすると、後述するステップS27でそのデータに
関するカウンタ値がインクリメントされ、カウンタ値の
更新が行われる。その結果、カウンタ値αとカウンタ値
βが一致しなくなる。一方、ある端末Aがあるデータに
対して参照・更新を行う途中で、他の端末Bによる要求
でそのデータへの更新が行われていないとすると、デー
タに関するカウンタ値が更新されない。その結果、カウ
ンタ値αとカウンタ値βが一致する。そこで、カウンタ
値αとカウンタ値βが一致する場合、すなわち、ある端
末Aがあるデータに対する参照・更新依頼を行う途中
で、他の端末Bによる要求でそのデータが更新されてい
なかった場合、更新処理機能4は、更新要求のあったデ
ータの更新およびそのデータに関するカウンタ値をイン
クリメントするための問い合わせを、SQLを用いて作
成し、データベース5に対して発行する。これにより、
更新要求のあったデータの更新を行う(ステップS2
5)とともに、更新したデータに対するカウンタ値のイ
ンクリメントを行ない(ステップS27)処理を終了す
る。なお、ステップS27の処理が終了した後、更新処
理機能4は、更新が行われたことをセッション管理部2
に通知し、セッション管理部2は、その旨を要求を行っ
た端末に通知するようにしてもよい。
Then, the counter value α embedded in the update request is compared with the counter value β obtained from the database 5 (step S24). By the way, a terminal A
If the data is updated by an update request from another terminal B while the data is being referred to and updated, the counter value for the data is incremented in step S27 to be described later, and the counter value is incremented. Is updated. As a result, the counter value α does not match the counter value β. On the other hand, if the terminal A does not update the data in response to a request from the other terminal B while performing reference / update on the data, the counter value related to the data is not updated. As a result, the counter value α matches the counter value β. Therefore, when the counter value α and the counter value β match, that is, when a certain terminal A makes a request for reference / update to certain data and the data is not updated by a request from another terminal B, the update is performed. The processing function 4 creates an inquiry for updating the data requested to be updated and incrementing the counter value related to the data using SQL, and issues the inquiry to the database 5. This allows
The data for which the update was requested is updated (step S2).
At the same time as 5), the counter value is incremented for the updated data (step S27), and the process ends. After the process of step S27 is completed, the update processing function 4 notifies the session management unit 2 that the update has been performed.
And the session management unit 2 may notify the requesting terminal to that effect.

【0017】一方、カウンタ値αとカウンタ値βが一致
しない場合、すなわち、ある端末Aがあるデータに対す
る参照・更新依頼を行う途中で、他の端末Bによる要求
でそのデータの更新がなされていた場合、更新処理機能
4は、データの更新ができない旨をセッション管理部2
に通知し、処理を終了する。そして、セッション管理部
2は、その旨を要求を行った端末に通知する(ステップ
S27)。なお、端末がこの通知を受けた場合には、端
末のユーザは、更新ができなかったことを認識できるの
で、再度データの参照・更新要求をすることができ、デ
ータ処理の一貫性を保つことができる。ステップS26
もしくはステップS27の処理が終了した後、セッショ
ンは開放され、次の端末からの要求処理に備え、ステッ
プS21に戻る。以上のようにして、端末から更新要求
があった場合の処理が、セッション管理部2において行
われる。なお、この処理において、更新処理機能4は、
上述したセッション管理部2の処理を含めた機能の1部
または全部を有するようにしてもよい。また、ステップ
S26では、カウンタ値の更新処理の一例として、カウ
ンタ値のインクリメントを行っているが、これに限定さ
れるものではない。
On the other hand, when the counter value α does not match the counter value β, that is, while a certain terminal A makes a request for reference / update to a certain data, the data is updated by a request from another terminal B. In this case, the update processing function 4 notifies the session management unit 2 that the data cannot be updated.
And terminates the process. Then, the session management unit 2 notifies the requesting terminal (step S27). When the terminal receives this notification, the terminal user can recognize that the update has not been performed, so that the user can request data reference / update again and maintain consistency of data processing. Can be. Step S26
Alternatively, after the process of step S27 is completed, the session is released, and the process returns to step S21 in preparation for a request process from the next terminal. As described above, the processing when the terminal receives the update request is performed in the session management unit 2. In this process, the update processing function 4
It may have one or all of the functions including the processing of the session management unit 2 described above. In step S26, the counter value is incremented as an example of the counter value update process, but the present invention is not limited to this.

【0018】以上のように、参照処理機能3において、
端末から参照要求されたデータおよびこのデータに対す
るカウンタ値をデータベースから取得し、このカウンタ
値を端末に返送する検索結果に埋め込み、更新処理機能
4において、端末からのデータ更新要求に埋め込まれた
カウンタ値と更新対象となるデータに対するカウンタ値
の比較を行い、一致する場合にデータとこのデータに対
するカウンタ値の更新を行なっている。よって、HTT
Pというプロトコルを使用するWWWシステムにおい
て、たとえ端末からのデータに対する一連の処理要求が
複数のセッションのもと行われる場合であっても、デー
タの2重更新がなくなり処理要求に対する処理の一貫性
を保証できるようになる。
As described above, in the reference processing function 3,
The data requested to be referred by the terminal and the counter value for the data are acquired from the database, and the counter value is embedded in the search result returned to the terminal. In the update processing function 4, the counter value embedded in the data update request from the terminal is obtained. Is compared with the counter value for the data to be updated, and if they match, the data and the counter value for this data are updated. Therefore, HTT
In a WWW system using the protocol P, even if a series of processing requests for data from a terminal are made under a plurality of sessions, there is no double updating of data and the consistency of processing for processing requests is reduced. Will be able to guarantee.

【0019】(第2の実施の形態)本実施の形態は、端
末側がデータベースに対する処理要求と処理結果参照と
を別々にWWWシステムに要求し、それぞれの要求に対
してセッションが形成される場合において、第1の実施
の形態のWWWシステム1に、端末からの要求処理とデ
ータベースに対する処理とを非同期に行う機能をさらに
加えることで、一度に大量の処理要求が発生しても、こ
の要求に対する処理の性能劣化が生じないようにしたも
のものである。図5は、本発明の一実施形態によるWW
Wシステム1の構成図である。なお、図5において図1
の各部に対応する部分には同一の符号を付け、その説明
を省略する。
(Second Embodiment) In this embodiment, the terminal side requests the WWW system separately for a processing request for a database and a processing result reference, and a session is formed for each request. By adding a function for asynchronously performing processing of a request from a terminal and processing of a database to the WWW system 1 of the first embodiment, even if a large number of processing requests occur at once, This is to prevent the performance degradation of. FIG. 5 shows a WW according to an embodiment of the present invention.
1 is a configuration diagram of a W system 1. FIG. In FIG. 5, FIG.
The same reference numerals are given to the portions corresponding to the respective portions, and the description thereof will be omitted.

【0020】このWWWシステム1が使用される前提と
して、端末1には、WWWシステム1に対して処理要求
を行う処理要求機能61と、この処理要求に対する処理
結果の参照を要求する結果参照機能62とが別個に存在
し、これらの機能による要求が別のセッションのもと行
われるものとする。なお、ユーザが処理要求を端末6に
対して入力すると、 a)処理要求機能61がWWWシステム1に処理要求を
行い、この処理要求の受け付け通知を受けるとセッショ
ンが開放され、 b)所定時間経過後、結果参照機能8が自動起動され、
その処理要求に対する処理結果参照の要求をWWWシス
テム1に対して行ない、その結果を受けるとセッション
が開放される ようにするとよい。なぜならば、これにより、端末6の
ユーザは、第1の実施の形態と同様の入力処理のみで済
み、処理要求機能61と結果参照機能62が別の処理と
して存在することを意識しなくて済むからである。
Assuming that the WWW system 1 is used, the terminal 1 has a processing request function 61 for making a processing request to the WWW system 1 and a result reference function 62 for requesting a reference to a processing result for the processing request. Exist separately, and requests by these functions are made under another session. When the user inputs a processing request to the terminal 6, a) the processing request function 61 makes a processing request to the WWW system 1, and upon receiving the reception notification of the processing request, the session is opened. Later, the result reference function 8 is automatically activated,
It is preferable to make a request to the WWW system 1 for referring to the processing result with respect to the processing request, and to receive the result to open the session. Because of this, the user of the terminal 6 only needs to perform the same input processing as in the first embodiment, and does not need to be aware that the processing request function 61 and the result reference function 62 exist as separate processing. Because.

【0021】図5と図1とを比較すると、本実施の形態
におけるWWWシステム1はセッション管理部2に、非
同期処理機能21、トランザクションキュー22、処理
結果バッファ23が新たに加えられている。ここで、ト
ランザクションキュー22は、端末からのデータ参照・
更新といった要求内容をスタックするためのものであ
る。また、処理結果バッファ23は、データベース5に
対する処理結果を格納するためのバッファである。そし
て、非同期処理機能21は、端末6からの要求に対する
対応のための処理と、トランザクションキュー22に要
求内容がスタックされている場合に参照処理機能3もし
くは更新処理機能4を用いてデータベース5に対する処
理を行う処理とを非同期に行なう。ここで、トランザク
ションキュー22および処理結果バッファ23は、メモ
リにより構成され、非同期処理機能21は、CPU(中
央演算装置)およびこの機能を実現するためのプログラ
ム等により実現されるものとする。
Comparing FIG. 5 with FIG. 1, the WWW system 1 in the present embodiment has a session management unit 2 in which an asynchronous processing function 21, a transaction queue 22, and a processing result buffer 23 are newly added. Here, the transaction queue 22 refers to data reference from the terminal.
This is for stacking request contents such as update. The processing result buffer 23 is a buffer for storing a processing result for the database 5. The asynchronous processing function 21 performs processing for responding to a request from the terminal 6 and processing for the database 5 using the reference processing function 3 or the update processing function 4 when the request content is stacked in the transaction queue 22. Is performed asynchronously. Here, the transaction queue 22 and the processing result buffer 23 are configured by a memory, and the asynchronous processing function 21 is realized by a CPU (Central Processing Unit) and a program for realizing this function.

【0022】次に、非同期処理機能21の動作を図面を
用いて詳細に説明する。図6は、非同期処理機能21に
おける端末に対する処理の動作を示したフローチャート
である。まず、端末からデータベース5に対する処理要
求や処理結果の参照に関する要求といった要求の受け付
けを行う(S31)。なお、これらの要求があった時点
でセッションが形成される。次に、受け付け内容が、デ
ータベースに対する処理要求か、処理結果の参照に関す
る要求を判断する(ステップS32)。要求が、データ
ベース5に格納されたデータの参照や更新といった処理
であるならば、トランザクションキュー22にその要求
内容をスタックする(ステップS33)。そして、要求
を行った端末に対して要求の受け付けが行われた旨の通
知を行ない(ステップS34)、セッションが開放され
る。なお、ステップS33の処理において、処理要求を
行った端末の識別ができるように、例えば端末とWWW
システム1との通信過程で得られる端末のIPアドレス
(Internet Protocol Address)もこのスタックする要
求内容に関連付けて記憶させておく。
Next, the operation of the asynchronous processing function 21 will be described in detail with reference to the drawings. FIG. 6 is a flowchart showing an operation of a process for a terminal in the asynchronous processing function 21. First, a request such as a processing request for the database 5 or a request for referring to a processing result is received from the terminal (S31). A session is formed when these requests are made. Next, it is determined whether the received content is a processing request for the database or a request for referring to the processing result (step S32). If the request is a process such as referring to or updating data stored in the database 5, the request is stacked in the transaction queue 22 (step S33). Then, the requesting terminal is notified that the request has been accepted (step S34), and the session is released. Note that, in the process of step S33, for example, the terminal and the WWW
The IP address (Internet Protocol Address) of the terminal obtained in the course of communication with the system 1 is also stored in association with the contents of the request to be stacked.

【0023】受け付けた要求が、処理結果の参照なら
ば、別途詳しく説明するデータベースに対する処理によ
り処理結果バッファ23に格納された対応する処理結果
を取得する(ステップS35)。そして、取得した処理
結果の通知を端末に対して行ない(ステップS36)、
セッションが開放される。このとき、その処理結果を処
理結果バッファ23から削除するものとする。なお、ス
テップS35において処理結果バッファ23から処理結
果を取得する場合、例えば、処理結果に関連して記録さ
れたIPアドレスを参照して行うものとする。ところ
で、対応する処理結果が処理結果バッファ23にない場
合には、処理がまだ済んでいないことを端末に対して通
知し、セッションが開放される。この通知を受けた端末
は、所定時間経過後、再度、処理結果参照機能62を自
動起動して処理結果の参照を行うことになる。そして、
ステップS34もしくはステップS36の処理が終了し
た後、端末からの次の要求の受け付けをするために、ス
テップS31に戻る。以上のようにして、非同期処理機
能21における端末に対する処理の動作が行われる。
If the received request refers to the processing result, the corresponding processing result stored in the processing result buffer 23 is obtained by processing the database, which will be described in detail separately (step S35). Then, the obtained processing result is notified to the terminal (step S36),
The session is released. At this time, the processing result is deleted from the processing result buffer 23. Note that when acquiring the processing result from the processing result buffer 23 in step S35, for example, the processing is performed with reference to the IP address recorded in association with the processing result. If the corresponding processing result is not stored in the processing result buffer 23, the terminal is notified that the processing has not been completed, and the session is released. The terminal that has received the notification automatically activates the processing result reference function 62 again after a predetermined time has elapsed, and refers to the processing result. And
After the processing of step S34 or step S36 is completed, the process returns to step S31 to accept the next request from the terminal. As described above, the operation of the process for the terminal in the asynchronous processing function 21 is performed.

【0024】図7は、非同期処理機能21におけるデー
タベース5に対する処理の動作を示したフローチャート
である。まず、この処理において、トランザクションキ
ュー22にスタックされた処理要求があるか判断を行う
(ステップS41)。処理要求がスタックされているな
らば、そこから処理要求の取得を行ない、その取得した
処理要求をトランザクションキュー22から削除する
(ステップS42)。なお、この処理要求の取得は、原
則として、最も古い処理要求から取得して行くものとす
るが、処理要求に対する優先順位が決められていある場
合には、その優先順位に従う。次に、参照処理機能3も
しくは更新処理機能4を用いたデータベース5に対する
処理を行う(ステップS43)。具体的には、以下のよ
うになる。まず処理要求がデータの参照であるか、デー
タの更新であるか判断を行なう。そして、判断の結果が
データの参照であるならば、参照処理機能3を起動さ
せ、その処理要求を参照処理機能3に引き渡し、データ
の参照処理を行わせる。一方、判断の結果がデータの更
新であるならば、更新処理機能4を起動させ、その処理
要求を更新処理機能4に引き渡し、データの更新処理を
行わせる。なお、この参照処理機能3および更新処理機
能4については、第1の実施の形態で説明した通りであ
り、ここでの説明は省略する。
FIG. 7 is a flowchart showing the operation of the asynchronous processing function 21 for processing the database 5. First, in this processing, it is determined whether there is a processing request stacked in the transaction queue 22 (step S41). If the processing requests are stacked, the processing requests are acquired from there, and the acquired processing requests are deleted from the transaction queue 22 (step S42). It should be noted that the processing request is acquired in principle from the oldest processing request. However, if the priority for the processing request is determined, the priority is followed. Next, processing is performed on the database 5 using the reference processing function 3 or the update processing function 4 (step S43). Specifically, it is as follows. First, it is determined whether the processing request is data reference or data update. Then, if the result of the determination is a data reference, the reference processing function 3 is activated, the processing request is passed to the reference processing function 3, and the data reference processing is performed. On the other hand, if the result of the determination is that the data is to be updated, the update processing function 4 is activated, the processing request is passed to the update processing function 4, and the data is updated. Note that the reference processing function 3 and the update processing function 4 are as described in the first embodiment, and a description thereof will be omitted.

【0025】そして、参照処理機能3もしくは更新処理
機能4によるデータベース5に対する処理が終了し、そ
の処理結果を受け取ったならば、その処理結果を処理結
果バッファ23に格納する(ステップS44)。このと
き格納した処理結果のもととなる処理要求に関連させて
記録された端末の識別情報もその処理結果に関連させて
格納する。これは、上述したように、端末からの処理要
求と処理結果とを関連付けるためである。そして、ステ
ップS44の処理が終わったならば、他の処理要求の処
理を行うべくステップS41に戻る。以上のようにし
て、非同期処理機能21におけるデータベースに対する
処理が行われる。以上説明した、図6に示す端末に対す
る処理と、図7に示すデータベースに対する処理とが非
同期処理機能21において、非同期に動作している。
Then, when the processing on the database 5 by the reference processing function 3 or the update processing function 4 is completed and the processing result is received, the processing result is stored in the processing result buffer 23 (step S44). At this time, the terminal identification information recorded in association with the processing request as the basis of the stored processing result is also stored in association with the processing result. This is for associating the processing request from the terminal with the processing result, as described above. When the process in step S44 is completed, the process returns to step S41 to perform another process request. As described above, the processing for the database in the asynchronous processing function 21 is performed. The above-described processing for the terminal shown in FIG. 6 and the processing for the database shown in FIG. 7 operate asynchronously in the asynchronous processing function 21.

【0026】このように、端末側がデータベース5に対
する処理要求と処理結果参照を別の処理として要求し、
それぞれ別のセッションが形成される場合において、W
WWシステム1の非同期処理機能21が、端末に対する
処理とデータベースに対する処理とを非同期に行うこと
で、第1の実施の形態と比較するとデータベースに対す
る処理が行われている間、セッションが形成されていな
いようになる。よって、クライアントとなる端末とサー
バとなるWWWシステム1との間で形成されるセッショ
ンの時間をより短くすることができる。よって、多くの
端末から処理要求が行われ、一度に大量の処理要求が発
生しても、サーバとなるWWWシステム1は、これら要
求の受け付けを行うことができ、要求に対する処理の性
能劣化が生じないようにすることができる。
As described above, the terminal requests the processing request for the database 5 and the processing result reference as separate processing,
In the case where separate sessions are formed, W
Since the asynchronous processing function 21 of the WW system 1 asynchronously performs the processing for the terminal and the processing for the database, no session is formed while the processing for the database is performed as compared with the first embodiment. Become like Therefore, the time of the session formed between the terminal serving as the client and the WWW system 1 serving as the server can be further reduced. Therefore, even if a large number of processing requests are issued from a large number of terminals at once, the WWW system 1 serving as a server can receive these requests, and the performance of the processing for the requests is degraded. Can not be.

【0027】なお、上記2つの実施形態として、WWW
システム1が処理対象とするデータベース5は、1つで
あるものとして説明したが、これに限定されるものでは
なく、ネットワークを介して複数のデータベースを処理
対象とするものであってもよい。また、上記2つの実施
形態におけるセッション管理部2は、クライアントから
の多くの処理要求を効率的に処理するためのOLTP
(On Line TransactionProcess)という機能を拡張し
て、実現するものであってもよい。また、上記2つの実
施形態にいて、端末6とWWWシステム1間は、HTT
Pプロトコルに基づきセッションの形成、開放が行われ
るものとして説明したが、これに限定されるものではな
く、端末からの一連の処理要求が複数のセッションのも
と行われる状況であれば、HTTPプロトコルでなくて
も適用可能である。 また、図1もしくは図5における
参照処理機能3、更新処理機能4等を含むセッション管
理部2の動作を実現するためのプログラムをコンピュー
タ読み取り可能な記録媒体に記録して、この記録媒体に
記録されたプログラムをコンピュータシステムに読み込
ませ、実行することによりこの動作を実現してもよい。
なお、ここでいう「コンピュータシステム」とは、OS
や周辺機器等のハードウェアを含むものとする。
In the above two embodiments, WWW
Although the description has been made assuming that the database 1 to be processed by the system 1 is one, the present invention is not limited to this, and a plurality of databases 5 may be processed via a network. Also, the session management unit 2 in the above two embodiments is an OLTP for efficiently processing many processing requests from clients.
(On Line Transaction Process) may be realized by extending the function. In the above two embodiments, the HTT is provided between the terminal 6 and the WWW system 1.
Although the description has been made assuming that a session is formed and released based on the P protocol, the present invention is not limited to this. If a series of processing requests from a terminal are performed under a plurality of sessions, the HTTP protocol is used. It is applicable even if it is not. In addition, a program for realizing the operation of the session management unit 2 including the reference processing function 3 and the update processing function 4 in FIG. 1 or 5 is recorded on a computer-readable recording medium, and is recorded on the recording medium. This operation may be realized by causing the computer system to read and execute the program.
Here, the “computer system” is an OS
And hardware such as peripheral devices.

【0028】[0028]

【発明の効果】以上説明したように、本発明によるWW
WシステムおよびWWWシステムにおけるセッション管
理方法によれば、下記の効果を得ることができる。請求
項1もしくは請求項4に記載の発明によれば、参照処理
機能において、端末から参照要求されたデータおよびこ
のデータに対するカウンタ値をデータベースから取得
し、このカウンタ値を端末に返送する検索結果に埋め込
み、更新処理機能において、端末からのデータ更新要求
に埋め込まれたカウンタ値と更新対象となるデータに対
するカウンタ値の比較を行い、一致する場合にデータと
このデータに対するカウンタ値の更新が行なわれてい
る。よって、たとえ端末からのデータに対する一連の処
理要求が複数のセッションのもと行われる場合であって
も、データの2重更新が行われなくなり、処理要求に対
する処理の一貫性を保証できるようになる。また、請求
項2もしくは請求項5に記載に発明によれば、比較対照
となる2つのカウンタ値の比較結果が一致しない場合に
は、端末に対するエラー通知の準備を行う。これによ
り、端末がこの通知を受けた場合には、端末のユーザ
は、更新ができなかったことを認識できるので、再度デ
ータの参照・更新要求をすることができる。
As described above, the WW according to the present invention is
According to the session management method in the W system and the WWW system, the following effects can be obtained. According to the invention described in claim 1 or 4, in the reference processing function, the data requested to be referred by the terminal and the counter value for the data are acquired from the database, and the counter value is returned to the terminal in the search result. In the embedding and updating processing function, the counter value embedded in the data update request from the terminal is compared with the counter value for the data to be updated, and if they match, the data and the counter value for this data are updated. I have. Therefore, even when a series of processing requests for data from a terminal are made under a plurality of sessions, double updating of data is not performed, and consistency of processing for processing requests can be guaranteed. . According to the second or fifth aspect of the invention, when the comparison result between the two counter values to be compared does not match, the terminal prepares for an error notification. Accordingly, when the terminal receives this notification, the user of the terminal can recognize that the update has not been performed, and thus can request data reference / update again.

【0029】また、請求項3もしくは請求項6に記載の
発明によれば、端末側がデータベースに対する処理要求
と処理結果参照を別の処理として要求し、それぞれ別の
セッションが形成される場合において、WWWシステム
は端末に対する処理とデータベースに対する処理とを非
同期に行なっている。これにより、データベースに対す
る処理が行われている間、セッションが形成されていな
いこととなり、クライアントとなる端末とサーバとなる
WWWシステムとの間で形成されるセッションの時間を
より短くすることができる。よって、多くの端末から処
理要求が行われ、一度に大量の処理要求が発生しても、
サーバとなるWWWシステムは、これらの要求を受け付
けることができ、要求に対する処理の性能劣化が生じな
いようにすることができる。
According to the third or sixth aspect of the present invention, when a terminal requests a processing request for a database and a reference to a processing result as separate processing, and different sessions are formed, WWW The system asynchronously performs processing for the terminal and processing for the database. As a result, a session is not formed while the database is being processed, and the time of a session formed between a terminal serving as a client and a WWW system serving as a server can be further reduced. Therefore, even if processing requests are made from many terminals and a large amount of processing requests occur at once,
The WWW system serving as a server can receive these requests, and can prevent performance degradation of processing for the requests.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 本発明の一実施形態によるWWWシステムの
構成図である。
FIG. 1 is a configuration diagram of a WWW system according to an embodiment of the present invention.

【図2】 処理対象となるデータベースのデータ構造を
示した図である。
FIG. 2 is a diagram showing a data structure of a database to be processed.

【図3】 参照処理における動作を示すフローチャート
である。
FIG. 3 is a flowchart illustrating an operation in a reference process.

【図4】 更新処理における動作を示すフローチャート
である。
FIG. 4 is a flowchart illustrating an operation in an update process.

【図5】 本発明の他の実施形態によるWWWシステム
の構成図である。
FIG. 5 is a configuration diagram of a WWW system according to another embodiment of the present invention.

【図6】 非同期処理機能における端末に対する処理の
動作を示したフローチャートである。
FIG. 6 is a flowchart showing an operation of processing for a terminal in the asynchronous processing function.

【図7】 非同期処理機能におけるデータベースに対す
る処理の動作を示したフローチャートである。
FIG. 7 is a flowchart illustrating an operation of processing on a database in the asynchronous processing function.

【図8】 WWWシステムの一従来例の構成図である。FIG. 8 is a configuration diagram of a conventional example of a WWW system.

【図9】 WWWシステムの他の従来例の構成図であ
る。
FIG. 9 is a configuration diagram of another conventional example of a WWW system.

【符号の説明】[Explanation of symbols]

1 WWWシステム 2 セッション
管理部 3 参照処理機能 4 更新処理機
能 5 データベース 6 端末(クラ
イアント) 21 非同期処理機能 22 トランザ
クションキュー 23 処理結果バッファ 61 処理要求機能 62 結果参照
機能
DESCRIPTION OF SYMBOLS 1 WWW system 2 Session management part 3 Reference processing function 4 Update processing function 5 Database 6 Terminal (client) 21 Asynchronous processing function 22 Transaction queue 23 Processing result buffer 61 Processing request function 62 Result reference function

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 FI H04L 11/20 101B ──────────────────────────────────────────────────の Continued on front page (51) Int.Cl. 6 Identification code FI H04L 11/20 101B

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 データに対してカウンタ値を格納するた
めのカウンタフィールドを設けたデータ構造を有するデ
ータベースに対する一連の処理要求が複数のセッション
のもと行われる場合のセッション管理のためのセッショ
ン管理部を備えたWWWシステムであって、 前記セッション管理部は、 参照要求されたデータおよび該データに対するカウンタ
値を前記データベースから取得し、該カウンタ値を返送
する検索結果に埋め込む参照処理機能と、 データの更新要求に埋め込まれたカウンタ値および該更
新要求で更新対象となるデータに対するカウンタ値の比
較を行い、一致する場合に前記データベースに対して更
新対象となるデータおよび該データに対するカウンタ値
の更新を行う更新処理機能とを含むことを特徴とするW
WWシステム。
1. A session management unit for managing a session when a series of processing requests for a database having a data structure provided with a counter field for storing a counter value for data are made under a plurality of sessions. A WWW system comprising: a session management unit that obtains, from the database, the data requested for reference and a counter value for the data, and a reference processing function that embeds the counter value in a search result that is returned. The counter value embedded in the update request and the counter value for the data to be updated in the update request are compared, and if they match, the data to be updated and the counter value for the data are updated in the database. W characterized by including an update processing function
WW system.
【請求項2】 前記更新処理機能は、 前記カウンタ値の比較結果が一致しない場合には、エラ
ー通知の準備を行うことを特徴とする請求項1に記載の
WWWシステム。
2. The WWW system according to claim 1, wherein the update processing function prepares an error notification when the comparison result of the counter values does not match.
【請求項3】 前記セッション管理部は、 クライアント側が前記データベースに対する処理要求と
処理結果参照とを別に要求し、それらが別のセッション
となる場合において、 要求内容をスタックするためのトランザクションキュー
と、 前記データベースに対する処理結果を格納するための処
理結果バッファと、 前記トランザクションキューおよび処理結果バッファを
利用した非同期処理を行う非同期処理機能とをさらに含
み、 前記非同期処理機能は、 要求が処理要求の場合には、前記トランザクションキュ
ーに要求内容のスタックを行なうとともに受付通知を
し、処理結果参照の場合には、対応する処理結果を前記
処理結果バッファから取得して処理結果の通知を行う処
理部と、 前記トランザクションキューに要求内容がスタックされ
ているならば、要求内容を取り出し、前記参照処理機能
もしくは更新処理機能を用いて前記データベースに対す
るデータ処理を行い、処理結果を前記処理結果バッファ
に格納する処理部とを備えたことを特徴とする請求項1
または請求項2に記載のWWWシステム。
3. The session management unit, wherein the client side separately requests a processing request and a processing result reference to the database, and when the client side is a different session, a transaction queue for stacking request contents; A processing result buffer for storing a processing result for the database; and an asynchronous processing function for performing asynchronous processing using the transaction queue and the processing result buffer. A processing unit for stacking request contents in the transaction queue and notifying reception, and in the case of referring to a processing result, acquiring a corresponding processing result from the processing result buffer and notifying the processing result; Request contents are stacked in the queue And a processing unit that retrieves the contents of the request, performs data processing on the database using the reference processing function or the update processing function, and stores a processing result in the processing result buffer. Item 1
Or the WWW system according to claim 2.
【請求項4】 データに対してカウンタ値を格納するた
めのカウンタフィールドを設けたデータ構造を有するデ
ータベースに対する一連の処理要求が複数のセッション
のもと行われる場合のWWWシステムにおけるセッショ
ン管理方法であって、 要求が前記データベースのデータ参照である場合に、該
要求されたデータおよび該データに対するカウンタ値を
前記データベースから取得し、該カウンタ値を検索結果
に埋め込んで返送する第1の処理と、 要求が前記データベースのデータ更新である場合に、更
新要求に埋め込まれたカウンタ値および該更新要求で更
新対象となるデータに対するカウンタ値の比較を行い、
一致する場合に前記データベースに対して更新対象とな
るデータおよび該データに対するカウンタ値の更新を行
う第2の処理とを含むことを特徴とするWWWシステム
におけるセッション管理方法。
4. A session management method in a WWW system when a series of processing requests for a database having a data structure provided with a counter field for storing a counter value for data is made under a plurality of sessions. A first process of acquiring the requested data and a counter value for the data from the database, embedding the counter value in a search result and returning the request, when the request is a data reference of the database; Is a data update of the database, the counter value embedded in the update request and the counter value for the data to be updated in the update request is compared,
And a second process of updating the data to be updated with respect to the database and a counter value for the data when the data match, a session management method in the WWW system.
【請求項5】 前記カウンタ値の比較結果が一致しない
場合には、 エラー通知を行うことを特徴とする請求項4に記載のW
WWシステムにおけるセッション管理方法。
5. The W according to claim 4, wherein when the comparison result of the counter values does not match, an error notification is performed.
Session management method in WW system.
【請求項6】 前記WWWシステムにおけるデータベー
ス管理方法は、 クライアント側が前記データベースに対する処理要求と
処理結果参照とを別に要求し、それらが別のセッション
となる場合において、 要求が処理要求の場合には、トランザクションキューに
要求内容のスタックを行なうとともに受付通知をし、要
求が処理結果参照の場合には、対応する処理結果を処理
結果バッファから取得して処理結果の返送を行う処理
と、 前記トランザクションキューに要求内容がスタックされ
ているならば、要求内容を取り出し、該要求内容に応じ
て、前記第1の処理もしくは前記第2の処理を利用して
前記データベースに対する処理を行い、処理結果を前記
処理結果バッファに格納する処理とを非同期に行うこと
を特徴とする請求項4または請求項5に記載のWWWシ
ステムにおけるセッション管理方法。
6. The database management method in the WWW system, wherein a client side requests a processing request for the database and a processing result reference separately, and when they are in different sessions, if the request is a processing request, Stacking the request contents in the transaction queue and notifying the reception, and when the request is a processing result reference, obtaining the corresponding processing result from the processing result buffer and returning the processing result; and If the request contents are stacked, the request contents are fetched, and the processing is performed on the database using the first processing or the second processing according to the request contents. 5. The method according to claim 4, wherein the processing of storing the data in the buffer is performed asynchronously. Item 6. A session management method in a WWW system according to Item 5.
JP10033317A 1998-02-16 1998-02-16 Www system and session managing method in www system Pending JPH11232294A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10033317A JPH11232294A (en) 1998-02-16 1998-02-16 Www system and session managing method in www system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10033317A JPH11232294A (en) 1998-02-16 1998-02-16 Www system and session managing method in www system

Publications (1)

Publication Number Publication Date
JPH11232294A true JPH11232294A (en) 1999-08-27

Family

ID=12383193

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10033317A Pending JPH11232294A (en) 1998-02-16 1998-02-16 Www system and session managing method in www system

Country Status (1)

Country Link
JP (1) JPH11232294A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001239063A (en) * 2000-02-25 2001-09-04 Konami Co Ltd Network game system, game distribution device, and distributing method of game
WO2004086243A1 (en) * 2003-03-25 2004-10-07 Toudai Tlo, Ltd. Script execution method and server-client system
JP2010257027A (en) * 2009-04-22 2010-11-11 Nec Corp Information processing apparatus, information updating method, program, and information processing system
JP2016161980A (en) * 2015-02-26 2016-09-05 沖電気工業株式会社 Database system, database server, database server program, database client, and database client program
JP2016224488A (en) * 2015-05-27 2016-12-28 富士通フロンテック株式会社 Order processing program, order processing device, and order processing method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001239063A (en) * 2000-02-25 2001-09-04 Konami Co Ltd Network game system, game distribution device, and distributing method of game
WO2004086243A1 (en) * 2003-03-25 2004-10-07 Toudai Tlo, Ltd. Script execution method and server-client system
JP2010257027A (en) * 2009-04-22 2010-11-11 Nec Corp Information processing apparatus, information updating method, program, and information processing system
JP2016161980A (en) * 2015-02-26 2016-09-05 沖電気工業株式会社 Database system, database server, database server program, database client, and database client program
JP2016224488A (en) * 2015-05-27 2016-12-28 富士通フロンテック株式会社 Order processing program, order processing device, and order processing method

Similar Documents

Publication Publication Date Title
US6477543B1 (en) Method, apparatus and program storage device for a client and adaptive synchronization and transformation server
US9817703B1 (en) Distributed lock management using conditional updates to a distributed key value data store
US9305056B1 (en) Results cache invalidation
EP1680745B1 (en) Method and system for transacted file operations over a network
US5920857A (en) Efficient optimistic concurrency control and lazy queries for B-trees and other database structures
WO2005124554A2 (en) Two-stage network device configuration process
JP2004303214A (en) System and method for requesting and receiving database change notification
CN111522631B (en) Distributed transaction processing method, device, server and medium
US20090262724A1 (en) Proxy server, communication system, communication method and program
US11720545B2 (en) Optimization of chaincode statements
US11409795B2 (en) Atomically executed application program interfaces
US8521875B2 (en) Identity for data sources
US10885036B2 (en) Obtaining incremental updates from a database using a partial query
US8694471B2 (en) System and method for updating a cache using a gating mechanism and events
WO2023011022A1 (en) Blockchain-based data processing method, and device and computer-readable storage medium
US7328222B2 (en) Method and apparatus for preserving data coherency in a database by generating a command object that includes instructions for writing a data record to a local cache
US20050091502A1 (en) Secure kernel transactions
CN113301390B (en) Data processing method, device and server for calling virtual resources
JPH11232294A (en) Www system and session managing method in www system
US7933962B1 (en) Reducing reliance on a central data store while maintaining idempotency in a multi-client, multi-server environment
US20200322165A1 (en) Distributed ledger device, distributed ledger system, and distributed ledger management method
US20090157600A1 (en) Federated pagination management
US11222003B1 (en) Executing transactions for a hierarchy of data objects stored in a non-transactional data store
US11348101B2 (en) Post-settlement processes
US11379463B1 (en) Atomic enforcement of cross-page data constraints in decoupled multi-writer databases

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20040706