Movatterモバイル変換


[0]ホーム

URL:


JP2011003147A - Client device, server device, computer system, method for accessing file system, and client program and server program - Google Patents

Client device, server device, computer system, method for accessing file system, and client program and server program
Download PDF

Info

Publication number
JP2011003147A
JP2011003147AJP2009147852AJP2009147852AJP2011003147AJP 2011003147 AJP2011003147 AJP 2011003147AJP 2009147852 AJP2009147852 AJP 2009147852AJP 2009147852 AJP2009147852 AJP 2009147852AJP 2011003147 AJP2011003147 AJP 2011003147A
Authority
JP
Japan
Prior art keywords
handle
file
parent
event
child
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.)
Granted
Application number
JP2009147852A
Other languages
Japanese (ja)
Other versions
JP5395532B2 (en
Inventor
Kota Uenishi
康太 上西
Daigoro Yokozeki
大子郎 横関
Shunichi Ichikawa
俊一 市川
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone CorpfiledCriticalNippon Telegraph and Telephone Corp
Priority to JP2009147852ApriorityCriticalpatent/JP5395532B2/en
Publication of JP2011003147ApublicationCriticalpatent/JP2011003147A/en
Application grantedgrantedCritical
Publication of JP5395532B2publicationCriticalpatent/JP5395532B2/en
Expired - Fee Relatedlegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Landscapes

Abstract

Translated fromJapanese

【課題】ファイルシステムへのアクセスにおいて、クライアントとサーバとの間で発生する通信を低減する。
【解決手段】サーバコンピュータ2は、クライアント毎に親ハンドル23を生成し、親ハンドル23によりファイルシステムへのアクセスを管理する。クライアントコンピュータ3は、ファイルシステムに対してファイル内容の読込み等の各操作を要求するクライアントアプリケーション31と、サーバ側から取得した親ハンドル33に従属させて子ハンドル34を生成してクライアントアプリケーション31に渡し、クライアントアプリケーション31から同一ファイルに対して子ハンドル34を用いて順次要求される各操作を中継し、親ハンドル33を用いてファイルシステムにアクセスするクライアントライブラリ32とを有する。これにより、例えば、サーバ側から読み込んだファイル内容をキャッシュした後には同一ファイルに対するネットワーク通信を防止できる。
【選択図】図2
Communication between a client and a server during access to a file system is reduced.
A server computer 2 generates a parent handle 23 for each client, and manages access to the file system by the parent handle 23. The client computer 3 generates a child handle 34 subordinate to the client application 31 that requests each operation such as reading of file contents from the file system and the parent handle 33 acquired from the server side, and passes it to the client application 31. A client library 32 that relays each operation sequentially requested from the client application 31 to the same file by using the child handle 34 and accesses the file system by using the parent handle 33. Thereby, for example, after the file content read from the server side is cached, network communication for the same file can be prevented.
[Selection] Figure 2

Description

Translated fromJapanese

本発明は、クライアント/サーバ型のファイルシステムへのアクセス技術に関する。  The present invention relates to a technology for accessing a client / server type file system.

従来、ファイル共有システムとして、例えば、NFS(Network File System)やCIFS(Common Internet File System)が知られている。
例えば、非特許文献1に記載のクライアント/サーバ型の分散ファイルシステムにおいて、各クライアントは、サーバからファイルの内容を一度でも読み込むと、そのファイルの内容をキャッシュする。一般的に、キャッシュは、キャッシュコヒーレンシ(Cache Coherency)が課題となる。つまり、サーバ側でファイルの内容の更新が要求された際に、そのファイルの内容をキャッシュしている各クライアントがそれぞれ保持している情報の均一性を保つことが課題となる。
Conventionally, as a file sharing system, for example, NFS (Network File System) and CIFS (Common Internet File System) are known.
For example, in the client / server type distributed file system described in Non-PatentDocument 1, when each client reads the contents of a file from the server, the contents of the file are cached. In general, cache coherency is an issue for a cache. In other words, when updating of the contents of a file is requested on the server side, it becomes a problem to maintain the uniformity of the information held by each client that caches the contents of the file.

非特許文献1に記載の方法では、サーバ側でファイルの内容の更新が要求された際に、ファイルの内容をキャッシュしている全てのクライアントのキャッシュを削除した時点で初めてファイルの内容を更新する。言い換えると、この方法では、サーバは、全てのクライアントに対して、キャッシュ無効化を行い、クライアントでのキャッシュクリアを確認するか、または、クライアントとのセッションが途絶するか、のいずれかの条件が、全てのクライアントに対して満たされない限り、ファイルの内容の更新を完了できない。非特許文献1に記載の方法では、このような方式により、キャッシュコヒーレンシの課題を解決している。  In the method described in Non-PatentDocument 1, when update of the file contents is requested on the server side, the contents of the file are updated for the first time when the caches of all clients caching the file contents are deleted. . In other words, in this method, the server invalidates the cache for all clients and confirms whether the client clears the cache, or the session with the client is interrupted. Unless it is satisfied for all clients, the update of the contents of the file cannot be completed. In the method described inNon-Patent Document 1, the problem of cache coherency is solved by such a method.

Mike Burrows,“The Chubby lock service for loosely-coupled distributed systems”, OSDI'06, Seattle, WA, November, 2006.Mike Burrows, “The Chubby lock service for loosely-coupled distributed systems”, OSDI'06, Seattle, WA, November, 2006.

しかしながら、従来技術では、例えば、NFSやCIFSでは、クライアントが、サーバとの通信において、サーバ上の所定のファイルおよびディレクトリにアクセスする回数が多数に及んだ場合には、そのアクセスに対応して、ファイルのオープンを行った回数と同数の重複した多数のハンドル(ファイルハンドル)が提供される。つまり、ネットワークの通信回数および通信量が多くなり、クライアント内部では多数のハンドルを格納するために多くのメモリ領域が消費される。  However, in the prior art, for example, in NFS or CIFS, when the client accesses the predetermined file and directory on the server many times in communication with the server, it corresponds to the access. A number of overlapping handles (file handles) equal to the number of times the file has been opened are provided. That is, the number of network communications and the amount of communications increase, and a large amount of memory area is consumed to store a large number of handles inside the client.

また、クライアントが、サーバとの通信において、サーバ上の所定のファイルおよびディレクトリに対して、各種オペレーション(オープン、クローズ、読込み、書込み等)を実行した際にも、そのオペレーションを実行した回数だけネットワーク上の通信が行われる。したがって、ネットワークの通信回数および通信量が多くなり、ネットワークに負荷をかけることとなる。  In addition, when a client performs various operations (open, close, read, write, etc.) on a predetermined file and directory on the server in communication with the server, the network is executed as many times as the operation is performed. The above communication takes place. Therefore, the number of times of communication and the amount of communication on the network increase, and a load is applied to the network.

また、優先度の高い他の通信アプリケーション(クライアントアプリケーション)によりネットワークの通信の大部分が占有されている中で、この優先度の高い他の通信アプリケーションとの通信帯域の奪い合いを避けるために、対象とする通信アプリケーションを含むシステム内で通信量を低減できる技術が要望されている。  In addition, the majority of network communications are occupied by other high-priority communication applications (client applications). To avoid contention for communication bands with other high-priority communication applications, the target There is a demand for a technology that can reduce the amount of communication in a system including a communication application.

また、キャッシュコヒーレンシの課題に関しては、非特許文献1に記載の方法では、クライアント内で複数開かれているハンドルに対して、キャッシュされたファイルの内容の一次記憶領域(メモリ)がファイルのオープンを行った回数と同数必要である。さらに、この場合、ファイルの内容の転送に係る通信も同様に重複するため、本来は不要な通信が発生していることになる。  Regarding the problem of cache coherency, in the method described in Non-PatentDocument 1, the primary storage area (memory) of the contents of the cached file opens the file with respect to a handle that is opened in the client. You need as many times as you have done. Further, in this case, since the communication related to the transfer of the file contents is also duplicated, originally unnecessary communication has occurred.

そこで、本発明では、前記した問題を解決し、ファイルシステムへのアクセスにおいて、クライアントとサーバとの間で発生する通信の回数や量を低減することのできる技術を提供することを目的とする。  Therefore, an object of the present invention is to solve the above-described problems and to provide a technique that can reduce the number and amount of communications that occur between a client and a server in accessing a file system.

前記目的を達成するために、本願発明者らは、クライアント/サーバ型のファイルシステムにおいて種々検討を行った。その結果、同一のクライアントがサーバ上の同じファイルおよびディレクトリに対して複数回のアクセスを行う際に用いる複数回分のハンドルを、親ハンドルおよび子ハンドルのデータ構造に分け、かつ、クライアント内で親ハンドルの処理と子ハンドルの処理とを分けることで、ファイルシステムに対する複数回のアクセスをクライアント内で集約可能であることを見出した。  In order to achieve the above object, the inventors of the present application have made various studies on a client / server type file system. As a result, multiple handles used when the same client accesses the same file and directory on the server multiple times are divided into a parent handle and a child handle data structure, and the parent handle in the client. It was found that multiple accesses to the file system can be aggregated in the client by separating the above processing and child handle processing.

そこで、本発明に係るクライアント装置は、ファイルおよびディレクトリを管理するファイルシステムを備えるサーバ装置と、前記ファイルシステムが管理するファイルまたはディレクトリを、ハンドルを用いて操作するクライアント装置とを備えるコンピュータシステムにおける前記クライアント装置であって、前記ファイルシステムに対する所定操作の実行を要求するアプリケーション部と、前記アプリケーション部による要求を中継して前記ファイルシステムにアクセスするライブラリ部と、を有し、前記アプリケーション部が、前記ライブラリ部に対して、前記ファイルシステム上のファイルまたはディレクトリの操作に対応するハンドルの作成を要求するハンドル作成依頼を作成し、前記ライブラリ部が、前記アプリケーション部から1回目の前記ハンドル作成依頼を受領したときに、前記サーバ装置とのセッションを通じて、前記ハンドルとして前記ファイルシステム上のファイルまたはディレクトリを特定し操作できる親ハンドルを前記サーバ装置から取得し、前記親ハンドルに従属して前記セッションにおいて有効な子ハンドルを生成し、生成した前記子ハンドルを前記アプリケーション部に返却し、前記セッション中に前記アプリケーション部から前記ファイルと同一のファイルに対して、2回目以降のハンドル作成依頼を受領したときに、前記同一のファイルに対応して前記親ハンドルに関連付けて新たに生成した子ハンドルを返却し、前記親ハンドルの識別情報と生成した前記子ハンドルの識別情報とを関連付けたハンドルリストを生成し、記憶手段に格納しておく親子ハンドル管理手段を備えることを特徴とする。  Therefore, a client device according to the present invention is a computer system that includes a server device including a file system that manages files and directories, and a client device that operates a file or directory managed by the file system using a handle. A client device, comprising: an application unit that requests execution of a predetermined operation on the file system; and a library unit that relays a request from the application unit to access the file system, and the application unit includes the Create a handle creation request for requesting the library unit to create a handle corresponding to the operation of the file or directory on the file system, and the library unit includes the application unit. When the first handle creation request is received, a parent handle that can specify and operate a file or directory on the file system as the handle is obtained from the server device through the session with the server device. Subordinate to the handle, a valid child handle is generated in the session, the generated child handle is returned to the application unit, and the second and subsequent times for the same file as the file from the application unit during the session When a handle creation request is received, a newly generated child handle is returned in association with the parent handle corresponding to the same file, and the identification information of the parent handle and the generated identification information of the child handle are returned. A handle list that associates Characterized in that it comprises a child handles management means previously.

かかる構成によれば、クライアント装置は、サーバ側から付与された親ハンドルに対して従属する子ハンドルをライブラリ部にて生成し、アプリケーション部に返却する。アプリケーション部は、所定操作として、オープンまたはクローズ(ハンドルの作成または削除)や、ファイルの作成または削除を要求する。また、ライブラリ部で生成されるそれぞれの子ハンドルは、アプリケーション部においては、別々のハンドルとして利用できる。つまり、クライアント装置は、対象とするオープンによって得られた子ハンドルと、別のオープンによって得られた子ハンドルとを区別しつつ、他のオペレーションを集約することができる。したがって、同一クライアント装置から同じファイルおよびディレクトリに対する別ハンドルのアクセスを集約することができる。  According to such a configuration, the client device generates a child handle subordinate to the parent handle given from the server side in the library unit and returns it to the application unit. The application unit requests opening or closing (creation or deletion of a handle) or creation or deletion of a file as a predetermined operation. In addition, each child handle generated in the library unit can be used as a separate handle in the application unit. That is, the client device can aggregate other operations while distinguishing the child handle obtained by the target open from the child handle obtained by another open. Therefore, accesses from different handles to the same file and directory from the same client device can be aggregated.

また、本発明に係るクライアント装置は、前記アプリケーション部が、前記ライブラリ部に対して、前記サーバ装置の前記ファイルシステムで管理されたファイルの内容を取得することを要求するファイル内容取得依頼を作成し、前記ライブラリ部が、前記アプリケーション部から前記子ハンドルを用いた1回目の前記ファイル内容取得依頼を受領したときに、前記親ハンドルと共に前記ファイル取得依頼を前記サーバ装置に送信することで、前記サーバ装置から前記ファイルの内容を取得し、取得した前記ファイルの内容を前記親ハンドルに関連付けて記憶手段にキャッシュ情報として登録し、前記セッション中に前記アプリケーション部から、前記1回目のファイル取得依頼と同一のファイルに対して、取得した前記ファイルの内容に関連付けた前記親ハンドルに従属する子ハンドルを用いた2回目以降のファイル内容取得依頼を受領したときに、登録されている前記キャッシュ情報を返却するキャッシュ情報登録手段をさらに備えることが好ましい。  In the client device according to the present invention, the application unit creates a file content acquisition request for requesting the library unit to acquire the content of the file managed by the file system of the server device. When the library unit receives the first file content acquisition request using the child handle from the application unit, the library unit transmits the file acquisition request together with the parent handle to the server device. Acquires the content of the file from the device, registers the acquired content of the file as cache information in the storage means in association with the parent handle, and is the same as the first file acquisition request from the application unit during the session With respect to the contents of the acquired file. When the receipt of the file content acquisition request the second time using a dependent child handle to the parent handle attached, it may further include a cache information registration means for returning the cache information registered.

かかる構成によれば、クライアント装置は、親子ハンドルのデータ構造による集約として、オープンまたはクローズ(ハンドルの作成または削除)の集約や、ファイルの作成または削除の集約の他に、ファイルの書込または読込の集約(ファイルの内容のキャッシュ)も行うことができる。  According to such a configuration, the client device can write or read a file in addition to aggregation of open or closed (handle creation or deletion) and file creation or deletion as aggregation by the data structure of the parent-child handle. Can also be aggregated (cache the contents of files).

また、本発明に係るクライアント装置は、前記アプリケーション部が、前記サーバ装置で管理するファイルおよびディレクトリの少なくとも1つの状態の変化を示すイベントが発生した場合にイベント発生通知を受け取るためのイベント監視登録依頼を子ハンドル毎に作成する際に、監視するイベント種別とイベント発生通知時の処理を示すコールバック処理の情報を前記ライブラリ部に登録し、前記ライブラリ部の前記親子ハンドル管理手段が、前記ハンドルリストにおいて、前記イベント監視登録依頼で用いられる子ハンドル毎に前記コールバック処理の情報を記憶し、前記ライブラリ部が、前記アプリケーション部から、前記イベント監視登録依頼を前記子ハンドルと共に受領したときに、前記子ハンドル毎に記憶されている前記コールバック処理の情報を集約して前記親ハンドルの識別情報および当該イベント監視登録依頼と共に前記サーバ装置に送信し、前記サーバ装置から、前記集約したコールバック処理の情報を前記イベント発生通知として受信したときに、受信した前記コールバック処理の情報における集約を解除することで、当該イベント発生通知に該当する子ハンドルを探索し、前記探索された子ハンドルに付与されているイベント発生通知時の処理を実行するイベント通知制御手段をさらに備えることが好ましい。  In the client device according to the present invention, an event monitoring registration request for receiving an event occurrence notification when the application unit generates an event indicating a change in the state of at least one of a file and a directory managed by the server device. Is created for each child handle, the event type to be monitored and the callback processing information indicating the processing at the time of event occurrence notification are registered in the library unit, and the parent-child handle management means of the library unit registers the handle list. And storing the callback processing information for each child handle used in the event monitoring registration request, and when the library unit receives the event monitoring registration request together with the child handle from the application unit, The code stored for each child handle When the back processing information is aggregated and transmitted to the server device together with the parent handle identification information and the event monitoring registration request, and the aggregated callback processing information is received as the event occurrence notification from the server device In addition, by canceling the aggregation in the received callback processing information, the child handle corresponding to the event occurrence notification is searched, and the processing at the event occurrence notification attached to the searched child handle is executed. It is preferable to further comprise event notification control means for

かかる構成によれば、クライアント装置は、親子ハンドルのデータ構造による集約として、サーバ上でイベントが発生したときに、同一のクライアント装置にて当該イベントを複数の子ハンドルを用いて監視しているときに、イベント通知を集約することができる。  According to such a configuration, when an event occurs on the server as an aggregation based on the data structure of the parent / child handle, the client device monitors the event using a plurality of child handles at the same client device. In addition, event notifications can be aggregated.

また、本発明に係るクライアント装置は、前記ライブラリ部が前記イベント通知制御手段を備える態様において、前記アプリケーション部が、前記コールバック処理の情報として、監視するイベント種別とイベント発生通知時の処理の有無を管理するマスク値を前記ライブラリ部に登録し、前記ライブラリ部の前記親子ハンドル管理手段が、前記子ハンドルに対して、前記コールバック処理の情報であるイベント毎の前記マスク値の集合をイベントマスクとして付与して記憶し、前記ライブラリ部のイベント通知制御手段が、前記イベント監視登録依頼と共に受領した前記子ハンドルのイベントマスク値と、前記親ハンドルのイベントマスク値との論理和を計算することで前記コールバック処理の情報を集約し、この計算結果で前記親ハンドルのイベントマスク値を更新し、前記更新により生成された新イベントマスクの登録依頼を、前記イベント監視登録依頼と共に前記サーバ装置に送信し、前記サーバ装置から、前記イベント発生通知として前記新イベントマスクを受信したときに、前記ハンドルリストに記載された前記子ハンドルのイベントマスク値と前記受信した新イベントマスクのマスク値との論理積を計算することで、受信した前記新イベントマスクにおける前記子ハンドルのイベントマスク値の集約を解除することが好ましい。  In the client device according to the present invention, in the aspect in which the library unit includes the event notification control unit, the application unit monitors the event type to be monitored and the presence / absence of processing at the time of event occurrence notification as the callback processing information. The parent / child handle management means of the library unit registers the set of mask values for each event, which is information of the callback processing, with respect to the child handle. The event notification control unit of the library unit calculates the logical sum of the event mask value of the child handle received together with the event monitoring registration request and the event mask value of the parent handle. The callback processing information is aggregated, and the parent hand is calculated based on the calculation result. The event mask value is updated, a new event mask registration request generated by the update is transmitted to the server device together with the event monitoring registration request, and the server device transmits the new event mask as the event occurrence notification. When received, by calculating the logical product of the event mask value of the child handle described in the handle list and the mask value of the received new event mask, the child handle in the received new event mask is calculated. It is preferable to cancel the aggregation of the event mask values.

かかる構成によれば、クライアント装置は、コールバック処理の情報としてイベントマスクを、親ハンドルと、その親ハンドルに従属した子ハンドルとに付与して管理する。イベントマスクは、イベント種別毎に、例えば、イベント発生通知処理の「有」および「無」を、それぞれ論理値の「1」および「0」としたビット列で表現できる。そして、クライアント装置は、サーバ側からイベント発生通知を受信したときに親ハンドルと子ハンドルとの論理積を計算することでイベント発生を通知すべき子ハンドルを容易に探索できる。これは、クライアント装置が、イベント監視登録依頼をサーバ側に送信する前に、親ハンドルと子ハンドルの論理値の論理和を計算して更新した新イベントマスクの所定のイベントについてのマスク値が「1」かつ、子ハンドルの当該イベントについてのマスク値が「1」であるときにだけイベント発生通知処理をすればよいことが決定できるからである。  According to this configuration, the client apparatus assigns and manages an event mask as callback processing information to a parent handle and a child handle subordinate to the parent handle. The event mask can be expressed for each event type by, for example, a bit string in which “present” and “none” in the event occurrence notification process are logical values “1” and “0”, respectively. The client device can easily search for the child handle to be notified of the event occurrence by calculating the logical product of the parent handle and the child handle when the event occurrence notification is received from the server side. This is because the mask value for a predetermined event of the new event mask updated by calculating the logical sum of the logical values of the parent handle and the child handle before the client device sends the event monitoring registration request to the server side is “ This is because it can be determined that the event occurrence notification process only needs to be performed when the mask value for the event of the child handle is “1”.

また、本発明に係るクライアント装置は、前記アプリケーション部が、前記ライブラリ部に対して、前記セッションにおいて前記サーバ装置に記憶された前記ファイルシステムで管理されたファイルまたはディレクトリに対するロックを前記子ハンドルが取得することを要求するロック取得依頼を作成し、前記ライブラリ部の前記親子ハンドル管理手段が、前記ハンドルリストにて前記子ハンドルのロック取得状況の情報を前記子ハンドルに関連付けて記憶し、前記ライブラリ部が、前記アプリケーション部から、前記ファイルシステムで管理された所定のファイルまたはディレクトリに対する前記ロック取得依頼を前記子ハンドルと共に受領したときに、前記受領した子ハンドルのロック取得状況の情報が前記ハンドルリストに記憶されている場合に当該ロック取得状況の情報を返却し、一方、記憶されていない場合に、当該子ハンドルの前記ロック取得依頼を前記親ハンドルの識別情報と共に前記サーバ装置に送信し、前記サーバ装置から、サーバ側にて当該子ハンドルのロック取得状況の情報が登録されたことを示す応答を受信したときに、受信した前記応答で示されるロック取得状況の情報を、当該子ハンドルのロック取得状況の情報として前記ハンドルリストに登録するロック制御管理手段をさらに備えることが好ましい。  In the client device according to the present invention, the child unit acquires a lock for the file or directory managed by the file system stored in the server device in the session for the library unit by the application unit. A lock acquisition request for requesting to be generated, and the parent-child handle management means of the library unit stores information on the lock acquisition status of the child handle in the handle list in association with the child handle, and the library unit When the lock acquisition request for the predetermined file or directory managed by the file system is received from the application unit together with the child handle, information on the lock acquisition status of the received child handle is displayed in the handle list. Remembered Information on the lock acquisition status is returned to the server device when it is not stored, and the request for acquiring the lock of the child handle is transmitted to the server device together with the identification information of the parent handle. When the server side receives a response indicating that the information on the lock acquisition status of the child handle has been registered, the information on the lock acquisition status indicated in the received response is the information on the lock acquisition status of the child handle. It is preferable to further include lock control management means for registering in the handle list.

かかる構成によれば、クライアント装置は、ロック機能を有しているので、ファイルシステムで管理されたファイルまたはディレクトリに対する他のクライアント装置によるアクセスを排他することができる。したがって、対象のクライアント装置とは別のクライアント装置から、同じファイルおよびディレクトリに対する別ハンドルのアクセスが生じる場合にも、当該対象のクライアント装置から、当該同じファイルおよびディレクトリに対する別ハンドルのアクセスを集約することができる。  According to such a configuration, since the client device has a lock function, it is possible to exclude access by another client device to a file or directory managed by the file system. Therefore, even when another handle access to the same file and directory occurs from a client device different from the target client device, the access of another handle to the same file and directory is aggregated from the target client device. Can do.

また、前記目的を達成するために、本発明に係るサーバ装置は、ファイルおよびディレクトリを管理するファイルシステムを備えるサーバ装置と、前記ファイルシステムが管理するファイルまたはディレクトリを、親ハンドルに従属する子ハンドルを用いて操作するアプリケーション部を備えるクライアント装置とを備えるコンピュータシステムにおける前記サーバ装置であって、前記クライアント装置とのセッションにより、前記アプリケーション部から、前記ファイルシステム上のファイルまたはディレクトリの操作に対応する前記親ハンドルの作成を要求するハンドル作成依頼を受信し、前記親ハンドルを生成し、生成した前記親ハンドルを当該クライアント装置に返却し、当該クライアント装置のアプリケーション部と生成した前記親ハンドルの識別情報とを関連付けたハンドルリストを生成し、記憶手段に格納しておくハンドル管理手段を備えることを特徴とする。  In order to achieve the above object, a server apparatus according to the present invention includes a server apparatus including a file system that manages files and directories, and a child handle that subordinates a file or directory managed by the file system to a parent handle. The server apparatus in a computer system including a client apparatus including an application unit that operates using the application unit, and responds to a file or directory operation on the file system from the application unit by a session with the client apparatus. The handle creation request for requesting creation of the parent handle is received, the parent handle is generated, the generated parent handle is returned to the client device, and the application unit of the client device is generated. Generating a handle list correlating the handle identification information, characterized in that it comprises a handle management means stored in the storage means.

かかる構成によれば、サーバ装置は、クライアント側からのハンドル作成依頼に応答して親ハンドルを生成してクライアント装置のアプリケーション部に付与し、ハンドルリストを生成する。したがって、ハンドルリストを用いることでクライアントのアプリケーション部毎に親ハンドルを管理することができる。  According to such a configuration, the server device generates a parent handle in response to a handle creation request from the client side, assigns it to the application unit of the client device, and generates a handle list. Therefore, the parent handle can be managed for each application unit of the client by using the handle list.

また、本発明に係るサーバ装置は、前記セッションにより、前記アプリケーション部から、前記ファイルシステムで管理されたファイルの内容を取得することを要求するファイル取得依頼を、当該アプリケーション部と前記ファイルに対応した前記親ハンドルと共に受信し、当該ファイルの内容を当該クライアント装置に返却し、前記ハンドルリストにて、返却した前記ファイルの内容が当該クライアント装置にキャッシュされていることを示すキャッシュ状態情報を、前記受信した親ハンドルの識別情報と関連付けて登録するキャッシュ管理手段をさらに備えることが好ましい。  Further, the server device according to the present invention corresponds to a file acquisition request for requesting acquisition of the contents of the file managed by the file system from the application unit by the session, for the application unit and the file. Received together with the parent handle, returns the content of the file to the client device, and received the cache status information indicating that the content of the returned file is cached in the client device in the handle list It is preferable to further include cache management means for registering in association with the identification information of the parent handle.

かかる構成によれば、サーバ装置は、クライアント側からのファイル取得依頼に応答したときに、ハンドルリストにて、キャッシュ状態を親ハンドルに関連付けて登録する。ここで、同一クライアント装置から同じファイルに対する別ハンドルのアクセスは、クライアント装置内で集約されているため、一度キャッシュされた後には、ファイル取得依頼に係るファイルシステムへのアクセスを防止できる。また、サーバ側でファイルの内容の更新が要求された際に、サーバは、ハンドルリストを用いることで、ファイルの内容をキャッシュしている全てのクライアントのアプリケーション部に対して、キャッシュ無効化を行い、クライアントのアプリケーション部でのキャッシュクリアを容易に確認することができる。  According to this configuration, when the server apparatus responds to the file acquisition request from the client side, the cache state is registered in the handle list in association with the parent handle. Here, since accesses of different handles from the same client device to the same file are aggregated in the client device, access to the file system related to the file acquisition request can be prevented after being cached once. In addition, when a file content update is requested on the server side, the server invalidates the cache for all client application units that cache the file contents by using the handle list. It is possible to easily confirm the cache clearing in the application unit of the client.

また、本発明に係るサーバ装置は、前記セッションにより、前記アプリケーション部から、当該サーバ装置で管理するファイルおよびディレクトリの少なくとも1つの状態の変化を示すイベントが発生した場合にイベント発生通知を受け取るためのイベント監視登録依頼および前記親ハンドルの識別情報を、監視するイベント種別とイベント発生通知時の処理を示すコールバック処理の情報と共に受信したときに、前記ハンドルリストにて、受信した前記コールバック処理の情報を前記親ハンドルの識別情報と関連付けて登録し、前記イベントが発生したことを検知したときに、当該発生したイベントを通知するために登録されている前記親ハンドルを前記ハンドルリストからすべて抽出し、抽出された前記親ハンドルに基づいて、該当するクライアント装置のアプリケーション部に対してセッションを通じて、当該親ハンドルに関連付けて登録されている前記コールバック処理の情報を送信するイベント管理手段をさらに備えることが好ましい。  The server device according to the present invention is configured to receive an event occurrence notification when an event indicating a change in at least one state of a file and a directory managed by the server device is generated from the application unit by the session. When the event monitoring registration request and the identification information of the parent handle are received together with the information of the event type to be monitored and the callback process information indicating the process at the time of the event occurrence notification, in the handle list, the received callback process The information is registered in association with the identification information of the parent handle, and when the occurrence of the event is detected, all the parent handles registered for notifying the occurrence of the event are extracted from the handle list. Applicable based on the extracted parent handle Throughout a session to the application of the client device preferably further includes an event management means for transmitting the information of the call-back process that is registered in association with the parent handle.

かかる構成によれば、サーバ装置は、クライアント側から、イベント監視登録依頼として取得したコールバック処理の情報を、ハンドルリストにて親ハンドルに関連付けて登録しておく。つまり、サーバ装置は、ハンドルリストにてコールバック処理の情報をクライアントのアプリケーション部毎に登録しておく。そして、イベント発生時には、サーバは、ハンドルリストに登録されたコールバック処理の情報を用いることでクライアントのアプリケーション部毎のセッションを通じてイベント発生を通知することができる。  According to this configuration, the server device registers the callback processing information acquired as the event monitoring registration request from the client side in association with the parent handle in the handle list. That is, the server device registers callback processing information for each application unit of the client in the handle list. When an event occurs, the server can notify the occurrence of the event through the session for each application unit of the client by using the callback processing information registered in the handle list.

また、本発明に係るサーバ装置は、前記イベント管理手段が、前記コールバック処理の情報として、イベント発生通知時の処理の有無を管理するイベント毎のマスク値の集合であるイベントマスクを前記親ハンドルの識別情報と共に受信したときに、前記ハンドルリストにて、前記受信したイベントマスクを前記親ハンドルの識別情報と関連付けて登録し、前記イベントが発生したことを検知したときに、前記コールバック処理の情報として、前記親ハンドルの識別情報に関連付けて登録されているイベントマスクを送信することが好ましい。  In the server device according to the present invention, the event management means may use, as the callback processing information, an event mask that is a set of mask values for each event for managing the presence / absence of processing at the time of event occurrence notification as the parent handle. The received event mask is registered in the handle list in association with the identification information of the parent handle in the handle list, and when the occurrence of the event is detected, the callback process is performed. As information, it is preferable to transmit an event mask registered in association with the identification information of the parent handle.

かかる構成によれば、サーバ装置は、コールバック処理の情報としてイベントマスクを、親ハンドルの識別情報と共に管理する。イベントマスクは、イベント種別毎に、例えば、イベント発生通知処理の「有」および「無」を、それぞれ論理値の「1」および「0」としたビット列で表現できる。このため、サーバ装置は、イベントマスクのマスク値を参照することで、イベントが発生したときの通知先を容易に識別することができる。例えば、所定のイベントが発生したことを検知したときに、当該イベントについてのマスク値が「1」である親ハンドルに対応したクライアント装置にはセッションを通じてイベント通知を送信し、当該イベントについてのマスク値が「0」である親ハンドルに対応したクライアント装置には、通知しない。そのため、イベント通知の必要のないクライアントへのネットワーク通信を確実に防止できる。  According to such a configuration, the server device manages the event mask as the callback process information together with the identification information of the parent handle. The event mask can be expressed for each event type by, for example, a bit string in which “present” and “none” in the event occurrence notification process are logical values “1” and “0”, respectively. Therefore, the server device can easily identify the notification destination when an event occurs by referring to the mask value of the event mask. For example, when it is detected that a predetermined event has occurred, an event notification is transmitted through the session to the client device corresponding to the parent handle whose mask value for the event is “1”, and the mask value for the event Is not notified to the client device corresponding to the parent handle whose is is “0”. Therefore, network communication to a client that does not require event notification can be reliably prevented.

また、本発明に係るサーバ装置は、前記記憶手段が、前記親ハンドルに従属して前記クライアント装置で生成され前記セッションにおいて有効な子ハンドルの識別情報と、前記セッションにおいて当該サーバ装置に記憶された前記ファイルシステムで管理されたファイルまたはディレクトリに対するロックを前記子ハンドルが取得していることを表す情報との対応関係を示すロック取得リストをさらに記憶し、前記セッションにより、前記アプリケーション部から、当該アプリケーション部に対応した前記親ハンドルと前記子ハンドルと共に、当該子ハンドルが前記ファイルシステムで管理された所定のファイルまたはディレクトリに対する前記ロックを取得することを要求するロック取得依頼を受信したときに、受信した前記ロック取得依頼にて対象とするファイルまたはディレクトリが別のクライアント装置によってロック取得済みであることを表す情報が前記ロック取得リストに記憶されているか否かを判別し、当該情報が前記ロック取得リストに記憶されている場合には、前記別のクライアント装置によるロックが解除されるまで、受信した前記子ハンドルをロック待ち行列の記憶手段に登録して管理し、一方、当該情報が前記ロック取得リストに記憶されていない場合には、受信した前記子ハンドルを前記ロック取得リストに登録し、前記判別の結果に応じて、受信した前記子ハンドルのロック取得状況の情報を前記クライアント装置のアプリケーション部に返却するロック管理手段をさらに備えることが好ましい。  Further, in the server device according to the present invention, the storage means is subordinate to the parent handle and is generated by the client device and is valid in the session, and is stored in the server device in the session. Further storing a lock acquisition list indicating a correspondence relationship with information indicating that the child handle has acquired a lock for the file or directory managed by the file system, and from the application unit, the application unit Received when receiving a lock acquisition request for requesting that the child handle acquire the lock for a predetermined file or directory managed by the file system, together with the parent handle and the child handle corresponding to a part The lock acquisition To determine whether or not information indicating that the target file or directory has been acquired by another client device is stored in the lock acquisition list, and the information is stored in the lock acquisition list. The received child handle is registered and managed in the storage means of the lock queue until the lock by the other client device is released, while the information is stored in the lock acquisition list. If not, the received child handle is registered in the lock acquisition list, and the received lock information of the child handle is returned to the application unit of the client device according to the determination result. Preferably further means are provided.

かかる構成によれば、サーバ装置は、ロック取得リストにて親ハンドル毎すなわちクライアントのアプリケーション部毎にロック取得済みの子ハンドルを登録しておき、クライアント側から、当該クライアントの子ハンドルのロック取得依頼を受信し、ロック取得リストまたはロック待ち行列の記憶手段に登録する。ロック取得リストでは、子ハンドル毎にロック取得済みの子ハンドルを登録し、ロック待ち行列でもロック取得状況を子ハンドル毎に管理できるので、クライアント装置の同一アプリケーション部から、同じファイルに対するロック取得依頼が生じる場合にも、当該アプリケーション部への応答を集約することができる。  According to such a configuration, the server device registers a child handle that has been acquired for each parent handle, that is, for each client application unit in the lock acquisition list, and requests a lock acquisition of the child handle of the client from the client side. Is registered in the storage means of the lock acquisition list or lock queue. In the lock acquisition list, a child handle that has been acquired for each child handle is registered, and the lock acquisition status can be managed for each child handle even in the lock queue, so a lock acquisition request for the same file can be issued from the same application unit of the client device. Even when it occurs, responses to the application unit can be aggregated.

また、前記目的を達成するために、本発明に係るコンピュータシステムは、前記したクライアント装置と、前記したサーバ装置とを備えることを特徴とする。  In order to achieve the above object, a computer system according to the present invention includes the client device described above and the server device described above.

また、前記目的を達成するために、本発明に係るファイルシステムアクセス方法は、ファイルおよびディレクトリを管理するファイルシステムを備えるサーバ装置と、前記ファイルシステムが管理するファイルまたはディレクトリを、ハンドルを用いて操作するクライアント装置とを備え、前記クライアント装置が、前記ファイルシステムに対する所定操作の実行を要求するアプリケーション部と、前記アプリケーション部による要求を中継して前記ファイルシステムにアクセスするライブラリ部とを有しているコンピュータシステムにおいて前記ファイルシステムにアクセスするファイルシステムアクセス方法であって、前記クライアント装置の前記ライブラリ部が、前記アプリケーション部による前記ファイルシステム上のファイルまたはディレクトリの操作に対応する子ハンドルを生成する際に、当該ファイルに対する1以上の前記子ハンドルを集約した親ハンドルがクライアント側ハンドルリストに登録されているか否かを判別する親ハンドル登録判別ステップと、前記親ハンドルが登録されていない場合に、前記親ハンドルの作成を要求するハンドル作成依頼を前記サーバ装置に送信するハンドル作成依頼送信ステップとを実行し、前記サーバ装置が、前記ハンドル作成依頼に基づいて、前記親ハンドルを生成し、生成した前記親ハンドルを当該クライアント装置に返却すると共に、当該クライアント装置の前記アプリケーション部と生成した前記親ハンドルの識別情報とを関連付けたサーバ側ハンドルリストを生成し、記憶手段に格納する親ハンドル生成ステップを実行し、前記クライアント装置の前記ライブラリ部が、前記サーバ装置から受信した親ハンドルの識別情報を前記クライアント側ハンドルリストに記憶する親ハンドル情報格納ステップと、前記親ハンドル登録判別ステップにて前記親ハンドルが登録されている場合、または、前記親ハンドル情報格納ステップにて前記親ハンドルの識別情報を記憶した場合に、当該親ハンドルに従属する子ハンドルを生成し、生成した前記子ハンドルの識別情報と当該親ハンドルの識別情報とを関連付けたハンドルリストを生成し、記憶手段に格納する子ハンドル生成ステップとを実行することを特徴とする。  In order to achieve the above object, a file system access method according to the present invention operates a server device having a file system for managing files and directories, and a file or directory managed by the file system using a handle. A client device, and the client device includes an application unit that requests execution of a predetermined operation on the file system, and a library unit that relays a request from the application unit and accesses the file system. A file system access method for accessing the file system in a computer system, wherein the library unit of the client device is a file or file on the file system by the application unit. A parent handle registration determination step of determining whether or not a parent handle obtained by aggregating one or more child handles for the file is registered in the client-side handle list when generating a child handle corresponding to a directory operation; When the parent handle is not registered, a handle creation request transmission step is performed for transmitting a handle creation request for requesting creation of the parent handle to the server device, and the server device is based on the handle creation request. The parent handle is generated, the generated parent handle is returned to the client device, and a server-side handle list in which the application unit of the client device is associated with the generated identification information of the parent handle is generated. The parent handle generation step stored in the storage means is executed. Then, the library unit of the client device stores the parent handle identification information received from the server device in the parent handle information storage step for storing the parent handle identification information in the client side handle list, and the parent handle registration determining step When registered, or when the identification information of the parent handle is stored in the parent handle information storing step, a child handle subordinate to the parent handle is generated, and the generated identification information of the child handle and the A handle list in which the identification information of the parent handle is associated is generated, and a child handle generation step stored in the storage means is executed.

本発明に係るコンピュータシステム、または、本発明に係るファイルシステムアクセス方法によれば、親子ハンドルのデータ構造による集約として、ファイルのオープンまたはクローズの集約や、ファイルの作成または削除の集約を行うことができる。  According to the computer system according to the present invention or the file system access method according to the present invention, file open / close aggregation and file creation / deletion aggregation are performed as aggregation based on the data structure of the parent / child handle. it can.

また、本発明に係るクライアントプログラムは、前記したクライアント装置を構成する各手段としてコンピュータを機能させるためのプログラムである。このように構成されることにより、このプログラムをインストールされたコンピュータは、このプログラムに基づいた各機能を実現することができる。  Further, the client program according to the present invention is a program for causing a computer to function as each means constituting the client device described above. By being configured in this way, a computer in which this program is installed can realize each function based on this program.

また、本発明に係るサーバプログラムは、前記したサーバ装置を構成する各手段としてコンピュータを機能させるためのプログラムである。このように構成されることにより、このプログラムをインストールされたコンピュータは、このプログラムに基づいた各機能を実現することができる。  The server program according to the present invention is a program for causing a computer to function as each means constituting the server device described above. By being configured in this way, a computer in which this program is installed can realize each function based on this program.

本発明によれば、クライアント/サーバ型のファイルシステムへのアクセスに用いるハンドルを親ハンドルおよび子ハンドルとしてクライアント内で親ハンドルおよび子ハンドルの処理を分けたので、同一クライアント装置から同じファイルおよびディレクトリに対する別ハンドルのアクセスを集約することができる。その結果、クライアントとサーバとの間で発生する通信の回数や量を低減することができる。  According to the present invention, the processing of the parent handle and the child handle is divided in the client by using the handle used for accessing the client / server type file system as the parent handle and the child handle. Access of different handles can be aggregated. As a result, the number and amount of communications that occur between the client and the server can be reduced.

本発明の実施形態に係るコンピュータシステムを構成する装置を示す図である。It is a figure which shows the apparatus which comprises the computer system which concerns on embodiment of this invention.本発明の実施形態に係るサーバコンピュータおよびクライアントコンピュータの論理構成を示す図である。It is a figure which shows the logical structure of the server computer and client computer which concern on embodiment of this invention.本発明の実施形態に係るコンピュータシステムで利用される各種データの一例を示す図であって、(a)はクライアント側データ、(b)はサーバ側データをそれぞれ示している。It is a figure which shows an example of the various data utilized with the computer system which concerns on embodiment of this invention, Comprising: (a) has shown client side data, (b) has each shown server side data.本発明の実施形態に係るコンピュータシステムで利用されるハンドルリストのデータ構造の一例を示す図であって、(a)はクライアント側データ、(b)はサーバ側データをそれぞれ示している。It is a figure which shows an example of the data structure of the handle list utilized with the computer system which concerns on embodiment of this invention, Comprising: (a) has shown client side data, (b) has each shown server side data.図4に示すイベントマスクの一例であって、(a)はイベント種別、(b)はイベントマスク値の計算方法をそれぞれ示している。FIG. 4 is an example of the event mask shown in FIG. 4, where (a) shows an event type and (b) shows a method for calculating an event mask value.図5に示すイベントマスクによるイベント通知の振り分け方法の説明図であって、(a)は親ハンドル、(b)は通知すべき子ハンドルの選択方法をそれぞれ示している。6A and 6B are explanatory diagrams of an event notification distribution method using the event mask shown in FIG. 5, in which FIG. 5A shows a parent handle, and FIG. 5B shows a method of selecting a child handle to be notified.本発明の実施形態に係るコンピュータシステムにおけるハンドル作成処理を示すフローチャートである。It is a flowchart which shows the handle | steering-wheel creation process in the computer system which concerns on embodiment of this invention.本発明の実施形態に係るコンピュータシステムにおけるロック取得および子ハンドル登録処理を示すフローチャートである。It is a flowchart which shows the lock acquisition in the computer system which concerns on embodiment of this invention, and a child handle registration process.本発明の実施形態に係るコンピュータシステムにおけるロック解除および子ハンドル登録削除処理を示すフローチャートである。It is a flowchart which shows the lock release in the computer system which concerns on embodiment of this invention, and a child handle registration deletion process.本発明の実施形態に係るコンピュータシステムにおけるファイル読込およびキャッシュ作成処理を示すフローチャートである。It is a flowchart which shows the file reading in the computer system which concerns on embodiment of this invention, and cache preparation processing.本発明の実施形態に係るコンピュータシステムにおけるノードイベント監視登録処理を示すフローチャートである。It is a flowchart which shows the node event monitoring registration process in the computer system which concerns on embodiment of this invention.本発明の実施形態に係るコンピュータシステムにおけるイベント通知処理を示すフローチャートである。It is a flowchart which shows the event notification process in the computer system which concerns on embodiment of this invention.

図面を参照して本発明のコンピュータシステムおよび装置を実施するための形態(以下「実施形態」という)について詳細に説明する。以下では、説明の都合上、発明の概要として、1.コンピュータシステムのハードウェア構成、2.コンピュータシステムにおける前提条件、3.親子ハンドルの構成、4.親子ハンドルの管理方式、5.親子ハンドルのキャッシュ方式、6.親子ハンドルのイベント通知方式の各章の説明をした後に、7.具体的な構成および動作の章について順次説明することとする。  An embodiment (hereinafter referred to as “embodiment”) for carrying out the computer system and apparatus of the present invention will be described in detail with reference to the drawings. In the following, for convenience of explanation, as an overview of the invention, 1. 1. Hardware configuration ofcomputer system 2. Preconditions incomputer system 3. Configuration of parent /child handle 4. Parent-childhandle management method 5. Parent-child handle cache method, After explaining each chapter of the event notification method for parent and child handles, Specific configuration and operation chapters will be described sequentially.

[1.コンピュータシステムのハードウェア構成]
本発明の実施形態に係るコンピュータシステム1のハードウェア構成を図1に示す。
本実施形態では、クライアント/サーバ型(以下、C/S型という)のコンピュータシステム1は、オペレーティングシステム(OS:Operating System)等により構築された、LAN(Local Area Network)上での分散コンピュータシステムとして構成した。図1に示すように、コンピュータシステム1は、ネットワークNを介して通信可能に接続された、サーバコンピュータ(サーバ装置)2と、クライアントコンピュータ(クライアント装置)3とを備えている。ここで、サーバコンピュータ2と、クライアントコンピュータ3の台数は任意である。
[1. Hardware configuration of computer system]
FIG. 1 shows a hardware configuration of acomputer system 1 according to the embodiment of the present invention.
In this embodiment, a client / server type (hereinafter referred to as C / S type)computer system 1 is a distributed computer system on a LAN (Local Area Network) constructed by an operating system (OS) or the like. Configured as. As shown in FIG. 1, thecomputer system 1 includes a server computer (server device) 2 and a client computer (client device) 3 that are communicably connected via a network N. Here, the number ofserver computers 2 andclient computers 3 is arbitrary.

サーバコンピュータ2およびクライアントコンピュータ3(3a,3b)は、CPU(Central Processing Unit)4およびメモリ5等の演算装置と、外部との各種情報の送受信を行うネットワークI/F(ネットワークインタフェース)6と、ハードディスク等の永続性記憶装置7とを備えたコンピュータと、このコンピュータにインストールされたプログラムとから構成される。  Theserver computer 2 and the client computer 3 (3a, 3b) are composed of an arithmetic device such as a CPU (Central Processing Unit) 4 and amemory 5 and a network I / F (network interface) 6 for transmitting / receiving various information to / from the outside, The computer includes apermanent storage device 7 such as a hard disk and a program installed in the computer.

サーバコンピュータ2の永続性記憶装置7は、ファイルデータ8と、サーバ側データ9と、ハンドル管理プログラム11と、ロック管理プログラム12と、キャッシュ管理プログラム13と、イベント管理プログラム14とを記憶している。
クライアントコンピュータ3の永続性記憶装置7は、クライアント側データ10と、親子ハンドル管理プログラム15と、ロック制御管理プログラム16と、イベント通知制御プログラム17と、キャッシュ情報登録プログラム18とを記憶している。
なお、各データおよびプログラムの詳細については後記する。
Thepersistence storage device 7 of theserver computer 2 stores file data 8, server-side data 9, ahandle management program 11, alock management program 12, acache management program 13, and anevent management program 14. .
Thepersistence storage device 7 of theclient computer 3 stores client-side data 10, a parent / childhandle management program 15, a lockcontrol management program 16, an eventnotification control program 17, and a cacheinformation registration program 18.
Details of each data and program will be described later.

[2.コンピュータシステムにおける前提条件]
コンピュータシステム1において、クライアントコンピュータ3が、中央のサーバコンピュータ2で管理するファイルやディレクトリを示す資源を操作するためのキーとしてのハンドルを管理することを前提としている。前記のハードウェア構成と図2に示す論理構成を前提として、コンピュータシステムにおける前提条件と、ハンドルを含む用語の定義を以下に記述する。
[2. Prerequisites for computer systems]
In thecomputer system 1, it is assumed that theclient computer 3 manages a handle as a key for operating resources indicating files and directories managed by thecentral server computer 2. Based on the above hardware configuration and the logical configuration shown in FIG. 2, the preconditions in the computer system and definitions of terms including handles are described below.

<2−1>ハンドルの概要
ハンドルとは、ある管理された領域の外側から、内側のオブジェクトを操作するためのキーとなるデータ、ポインタ、インスタンスである。例えば、Windows(登録商標)システムでは、OSによって管理された領域中の資源を、OS上で実行されているプログラムから操作する際に、ハンドルを用いる。例えば、ハンドルを用いてファイル、プロセス、スレッド、デバイスなどを操作することができる。Windowsシステムでは、ハンドルは32ビットの整数により表現される。本実施形態では、それのメタファーとして、ハンドルという用語を用いる。ここでは、親ハンドルや子ハンドルと区別せずに総称してハンドルと呼ぶこととする。ハンドルを用いる、前記したある管理された領域とは、サーバによって管理されたファイルシステムの領域であり、ファイルシステムを管理するのはサーバである。また、クライアントアプリケーション31(図2参照)は、ハンドルを通じてサーバ上のファイルを操作する。本実施形態のコンピュータシステム1では、ハンドルは、クライアントコンピュータ3中のメモリ上に構築された構造体を指すポインタであり、メモリ領域上にはハンドルやファイルに関連する情報(サーバ情報、ファイル名)が格納されている。
<2-1> Outline of Handle A handle is data, a pointer, and an instance that are keys for operating an inner object from the outside of a managed area. For example, in a Windows (registered trademark) system, a handle is used when a resource in an area managed by the OS is operated from a program executed on the OS. For example, files, processes, threads, devices, etc. can be manipulated using handles. In the Windows system, a handle is represented by a 32-bit integer. In the present embodiment, the term “handle” is used as a metaphor thereof. Here, they are collectively referred to as a handle without being distinguished from a parent handle and a child handle. The above-described certain managed area using the handle is an area of the file system managed by the server, and the server manages the file system. Further, the client application 31 (see FIG. 2) operates a file on the server through the handle. In thecomputer system 1 of the present embodiment, the handle is a pointer that points to a structure built on the memory in theclient computer 3, and information related to the handle and file (server information, file name) is stored in the memory area. Is stored.

<2−2>ファイルおよびディレクトリの定義
ファイルおよびディレクトリに関しては、一般的なOSにおけるファイルシステムと同様の概念である。このうち、ファイルに対しては、作成、削除、読込、書込(更新)、ロック取得、ロック解除(ロック解放)のオペレーションが可能である。同様に、ディレクトリに対しては、作成、削除、一覧表示のオペレーションが可能である。以下、ファイルとディレクトリを総称する場合にノードと呼ぶことにする。
<2-2> Definitions of Files and Directories Files and directories have the same concept as a file system in a general OS. Among these, operations such as creation, deletion, reading, writing (updating), lock acquisition, and unlocking (lock releasing) are possible for files. Similarly, operations such as creation, deletion, and list display are possible for directories. Hereinafter, a file and a directory are collectively referred to as a node.

<2−3>サーバの定義
コンピュータシステム1の論理構成を図2に示す。
C/S型ファイルシステムにおけるサーバとは、複数のファイルおよびディレクトリを特定する名前空間を持ち、バイト配列を記録するファイルと、より下位のファイルおよびディレクトリを管理するディレクトリとに対して、オペレーションおよびサービスを、ハンドルを用いてネットワークを通じて提供するプログラムによって動作しているプロセスを示す。ここで、サービスとは、イベント監視やイベント通知を指す。なお、同様に、オペレーションおよびサービスを、ネットワークを通じて提供するコンピュータがサーバコンピュータ2である。図2に示すサーバ(サーバプログラム)21は、プログラムによって動作しているプロセスに当たる。なお、サーバ21は、バックエンドデータベース22に、ファイルシステムとして複数のファイルおよびディレクトリを特定する名前空間25を持っている。
<2-3> Server Definition FIG. 2 shows a logical configuration of thecomputer system 1.
The server in the C / S type file system has a name space that identifies a plurality of files and directories, and operates and services for files that record byte arrays and directories that manage lower-level files and directories. Shows a process operating by a program that provides a handle using the handle. Here, the service refers to event monitoring and event notification. Similarly, theserver computer 2 is a computer that provides operations and services through a network. A server (server program) 21 shown in FIG. 2 corresponds to a process operating by the program. Theserver 21 has aname space 25 for identifying a plurality of files and directories as a file system in the back-end database 22.

<2−4>クライアントの定義
C/S型ファイルシステムにおけるクライアントとは、ネットワークを隔てたサーバ内のファイルシステムについてサーバにより提供される各種サービスを利用して、サーバ内にあるファイルおよびディレクトリを示す資源にアクセスするプログラムにより動作しているプロセスを指す。同様に、サーバ内にあるファイルおよびディレクトリを示す資源にアクセスするコンピュータがクライアントコンピュータ3である。図2に示すクライアントコンピュータ3は、プログラムによって動作しているプロセスとして、クライアントアプリケーション(アプリケーション部)31と、クライアントライブラリ(ライブラリ部)32とを備えている。クライアントアプリケーション31はサーバ21上の各種サービスを利用する。クライアントライブラリ32は、クライアントアプリケーション31からの操作を受け付け、サーバ21との通信を媒介する。
<2-4> Definition of Client A client in the C / S type file system indicates a file and a directory in the server by using various services provided by the server for the file system in the server across the network. A process running by a program that accesses a resource. Similarly, aclient computer 3 is a computer that accesses resources indicating files and directories in the server. Theclient computer 3 shown in FIG. 2 includes a client application (application unit) 31 and a client library (library unit) 32 as processes operating by programs. Theclient application 31 uses various services on theserver 21. Theclient library 32 accepts an operation from theclient application 31 and mediates communication with theserver 21.

<2−5>セッションの定義
セッションとは、クライアントライブラリ32とサーバ21との通信の単位であり、クライアントコンピュータ3上に1つまたは複数起動されているプロセスと、サーバ21との通信を区切る単位である。
サーバ21が冗長化されており、故障によりフェイルオーバした場合、セッションおよび永続化されていたファイルシステムの内容は、フェイルオーバ後のサーバにも引き継がれる。このような場合、セッションが切れるのは、次の3つのケースのみである。
(1)クライアントがセッションを切った場合
(2)サーバとクライアント間のネットワークが一定時間以上不通となった場合
(3)サーバが多重故障した場合
1つのクライアントは、論理的に異なる複数のサーバのそれぞれに対して、最大で1つのセッションを生成することができる。
ここで、クライアントアプリケーション31とクライアントライブラリ32は、1対1のセットの構成をとって、このセットがクライアントコンピュータ2内に複数あってもよく、複数のクライアントアプリケーション31と1つのクライアントライブラリ32とが対応付けられている構成(N対1)であってもよい。
なお、以下では、簡便のため、1対1のセットの構成をとって、クライアント(クライアント装置)として説明する。単にクライアント(クライアント装置)あるいはクライアント毎(クライアント装置毎)と表現するときには、クライアントアプリケーション31あるいはクライアントアプリケーション31毎であることを表すこととする。
<2-5> Definition of Session A session is a unit of communication between theclient library 32 and theserver 21, and a unit that divides communication between theserver 21 and one or more processes activated on theclient computer 3. It is.
When theserver 21 is made redundant and fails over due to a failure, the contents of the session and the file system that has been made permanent are also taken over by the server after the failover. In such a case, the session is disconnected only in the following three cases.
(1) When the client disconnects the session (2) When the network between the server and the client is disconnected for a certain period of time (3) When the server has multiple failures A single client is connected to multiple logically different servers A maximum of one session can be created for each.
Here, theclient application 31 and theclient library 32 take a configuration of a one-to-one set, and there may be a plurality of sets in theclient computer 2, and a plurality ofclient applications 31 and oneclient library 32 are included. An associated configuration (N to 1) may be used.
In the following, for the sake of simplicity, a one-to-one set configuration is taken and described as a client (client device). When simply representing a client (client device) or each client (each client device), it represents that eachclient application 31 or eachclient application 31.

なお、図2に示すセッション41は、クライアントコンピュータ3aとサーバコンピュータ2との間の通信の通信量および通信回数をサーバ側およびクライアント側でそれぞれ利用されるセッショ用メモリにより概念的に示したものである。同様に、セッション42は、クライアントコンピュータ3bとサーバコンピュータ2との間の通信を示すものである。  Note that thesession 41 shown in FIG. 2 conceptually shows the communication volume and the number of communication between theclient computer 3a and theserver computer 2 by session memory respectively used on the server side and the client side. is there. Similarly, the session 42 indicates communication between theclient computer 3b and theserver computer 2.

<2−6>ハンドルの定義
クライアントとサーバの間でセッションが張られている場合に限り、クライアントは、
サーバ上の“ファイルおよびディレクトリ”をオープンし、サーバによって管理されている領域にあるファイルを操作することができる。すなわち、ハンドルとは、サーバによって管理されている領域(ファイルシステム)上にある資源(ファイルおよびディレクトリ)に対する操作を行うために、サーバがクライアントに提供するキーである。また、ハンドルとは、クライアントが操作する資源をサーバに指示するために、サーバがクライアントに提供するキーでもある。親子ハンドルについては後記する。
<2-6> Definition of handle Only when a session is established between the client and the server, the client
You can open "files and directories" on the server and manipulate files in the area managed by the server. That is, the handle is a key that the server provides to the client in order to perform operations on resources (files and directories) on an area (file system) managed by the server. The handle is also a key provided by the server to the client in order to instruct the server of resources operated by the client. The parent and child handles will be described later.

<2−7>ハンドルを通じて提供されるオペレーション
図2に示すクライアントアプリケーション31は、ハンドルを通じて、“ファイルおよびディレクトリ”に対して、作成、削除、イベント監視要求およびその応答の受付、の各オペレーションを実行できる。
また、クライアントアプリケーション31は、ファイルに対してのみ、書込、読込、ロック取得、ロック解除、の各オペレーションを実行できる。
さらに、クライアントアプリケーション31は、ディレクトリに対してのみ、下位ファイルおよびディレクトリの一覧表示のオペレーションを実行できる。
<2-7> Operations Provided through Handles Theclient application 31 shown in FIG. 2 performs operations such as creation, deletion, event monitoring request and reception of responses to “files and directories” through the handles. it can.
In addition, theclient application 31 can execute write, read, lock acquisition, and unlock operations only on files.
Further, theclient application 31 can execute an operation for displaying a list of lower files and directories only for the directory.

<2−8>ロックの定義
図2に示すクライアントアプリケーション31は、ハンドルを用いて、“ファイルおよびディレクトリ”に対するロックを取得することができる。ロックとは、ファイルに対するアクセスを排他する手段である。ここでは、ハンドルを用いて、例えばあるファイルへアクセスする際に、同じファイルに別ハンドルを用いアクセスすることを排他するような場合を、“ハンドルがロックを取得している”と表現する。ロックを取得している子ハンドルは、ロックを取得していない子ハンドルと明確に区別される。
クライアントアプリケーション31は、クライアントライブラリ32に対して、ロック取得依頼(ロック取得依頼メッセージ)を作成する。ロック取得依頼は、セッションにおいてサーバ側に記憶されたファイルシステム62で管理されたファイルまたはディレクトリに対するロックを子ハンドルが取得することを要求するものである。
なお、アクセスを排他する手段とは、物理的な構成ではなく情報であり、例えば、排他する権利や権限を有していることを示す識別情報や証明書を含むことができる。
<2-8> Definition of Lock Theclient application 31 shown in FIG. 2 can acquire a lock on “file and directory” using the handle. A lock is a means for exclusive access to a file. Here, for example, when accessing a certain file by using a handle and accessing the same file using another handle is expressed as “the handle acquires a lock”. A child handle that has acquired a lock is clearly distinguished from a child handle that has not acquired a lock.
Theclient application 31 creates a lock acquisition request (lock acquisition request message) for theclient library 32. The lock acquisition request is a request for the child handle to acquire a lock for the file or directory managed by thefile system 62 stored on the server side in the session.
The means for exclusive access is not a physical configuration but information, and can include, for example, identification information and a certificate indicating that the exclusive right or authority is possessed.

ロックには、属性として、アドバイザリロック(advisory lock)と、マンダトリロック(mandatory lock)とがある。
アドバイザリロックは、ファイルに対するロックの取得だけを排他する。アドバイザリロックを用いてファイルへアクセスする場合は、ファイルに対する処理をアプリケーション同士の紳士協定によって排他する。
マンダトリロックは、ファイルに対する特定のオペレーションを禁止し、ロックを取得しているハンドルだけが特定のオペレーションを実行することができる。
アドバイザリロックとマンダトリロックとを比較した場合、一般的にはアドバイザリロックの方が軽量で計算コストが少ないという性質がある。一方、マンダトリロックは、安全性が高いが、計算コストも高いという性質がある。
The lock includes attributes such as an advisory lock and a mandatory lock.
Advisory locks only exclude acquisition of locks on files. When accessing a file using the advisory lock, the processing on the file is excluded by a gentleman agreement between the applications.
Mandatory locking prohibits certain operations on the file, and only the handle acquiring the lock can perform certain operations.
When the advisory lock and the mandatori lock are compared, in general, the advisory lock has the property of being lighter and having a lower calculation cost. On the other hand, Mandatory Lock has a high safety but a high calculation cost.

ロックにおける第二の属性として、共有ロックと排他ロックとがある。
排他ロックとは、1つのハンドルに対してのみ取得できるものである。すなわち、ある“ファイルおよびディレクトリ”に対する排他ロックを取得しているハンドルは、常に1個または0個である。
共有ロックとは、複数のハンドルにより共有することができるロックである。すなわち、共有ロックが既に取得されている“ファイルおよびディレクトリ”に対しては、排他ロックを取得することができない。
The second attribute of the lock includes a shared lock and an exclusive lock.
An exclusive lock can be acquired for only one handle. That is, the number of handles that acquire an exclusive lock for a certain “file and directory” is always one or zero.
A shared lock is a lock that can be shared by a plurality of handles. That is, an exclusive lock cannot be acquired for “files and directories” for which a shared lock has already been acquired.

<2−9>イベントの定義
イベントとは、サーバの状態に変化が起きた際に、その変化それ自体を指す。イベントには、変化の種別が識別されるコード、内容およびタイミングの情報を含む。
サーバは、“ファイルおよびディレクトリ”の状態に変化が起きた際に、イベントをクライアントに対して通知することができる。なお、イベントは、ファイルおよびディレクトリの少なくとも1つの状態の変化を示す。
また、図2に示すクライアントライブラリ32は、サーバ上のファイルの変化を検知してクライアントアプリケーション31に対してイベントを通知することができる。
ここでは、“ファイルおよびディレクトリ”に関するイベントのことをノードイベントと呼ぶ。本実施形態では、例えば合計8種類のノードイベントを想定している。
<2-9> Event definition An event refers to a change itself when a change occurs in the state of a server. The event includes code, content, and timing information for identifying the type of change.
The server can notify the client of an event when the “file and directory” state changes. An event indicates a change in the state of at least one of a file and a directory.
Further, theclient library 32 shown in FIG. 2 can detect a change in a file on the server and notify theclient application 31 of an event.
Here, an event related to “file and directory” is called a node event. In the present embodiment, for example, a total of eight types of node events are assumed.

まず、ファイルおよびディレクトリに共通のノードイベントには、例えば次の2種類がある。
(1)ハンドル無効化(ノード削除等によりノードにアクセスできなくなった)
(2)マスタのフェイルオーバ(マスタ(サーバ)がフェイルオーバし、一部のイベント通知が欠送した可能性がある)
なお、フェイルオーバ(Fail-over)は、例えば、優先順位の高い回線に異常が発生したときに、メッセージトラフィックが次に優先順位の高い回線に途切れることなく送信されることを示す。
First, there are the following two types of node events common to files and directories, for example.
(1) Invalidation of handle (node cannot be accessed due to node deletion etc.)
(2) Master failover (Master (server) may have failed over and some event notifications may have been missed)
Note that failover (Fail-over) indicates that, for example, when an abnormality occurs in a high priority line, message traffic is transmitted to the next highest priority line without interruption.

次に、本実施形態で定義するノードイベントのうち、ファイルのハンドルに対して登録可能なイベントのことをファイルイベントと呼ぶ。
ファイルイベントには、例えば次の4種類がある。
(3)コンテンツ更新(ファイルの内容の更新が行われた)
(4)メタ情報更新(ファイル属性の更新が行われた)
(5)ロック取得(ロックの取得に成功した)
(6)ロック解除(ファイルがロックされていない状態になった)
Next, among the node events defined in this embodiment, an event that can be registered for a file handle is called a file event.
For example, there are the following four types of file events.
(3) Content update (file content was updated)
(4) Meta information update (file attribute was updated)
(5) Lock acquisition (successfully acquired lock)
(6) Unlock (file is not locked)

さらに、本実施形態で定義するノードイベントのうち、ディレクトリに対して登録可能なイベントのことをディレクトリイベントと呼ぶ。
ディレクトリイベントには、例えば次の2種類がある。
(7)ノード作成(ディレクトリ下にノードが作成された)
(8)ノード削除(ディレクトリ下のノードが削除された)
Furthermore, among the node events defined in this embodiment, an event that can be registered in the directory is called a directory event.
For example, there are the following two types of directory events.
(7) Node creation (node created under directory)
(8) Node deletion (nodes under the directory were deleted)

<2−10>イベントの管理方式
図2に示すサーバ21およびクライアントライブラリ32では、イベントをマスク値によって管理する。
本実施形態では、上記の通り、例えば(1)〜(8)の8種類のイベントがある。それぞれのイベントについては、「要通知」、「通知不要」の2通りの登録状態がある。これに対して、本実施形態では8ビットのそれぞれの桁にイベントを割り付け、あるイベントに対して、それに対応するビットが「0」であれば「通知不要」、「1」であれば「要通知」として管理することとした。なお、ビットの0,1の集合をリスナと呼び、ビットの0,1を適宜入れ替えることで、リスナのオンオフを切り替える。なお、図4には、6種類のイベントに対応した例を示した。
<2-10> Event Management Method Theserver 21 and theclient library 32 shown in FIG. 2 manage events using mask values.
In the present embodiment, as described above, for example, there are eight types of events (1) to (8). For each event, there are two registration states: “notification required” and “notification required”. In contrast, in this embodiment, an event is assigned to each 8-bit digit, and for a certain event, if the corresponding bit is “0”, “notification is not required”, and if “1”, “required” is required. It was decided to manage as “notification”. A set ofbits 0 and 1 is called a listener, and the listener is switched on and off by appropriately replacingbits 0 and 1. FIG. 4 shows an example corresponding to six types of events.

[3.親子ハンドルの構成]
<3−1>個数および管理の関係
ハンドルは、親ハンドルと子ハンドルから構成される。同一セッション内においては、オープンされているファイルにつき、親ハンドルは必ず1つ確保される。
子ハンドルは、図2に示すクライアントアプリケーション31がオープン操作を実行した回数だけ、クライアント側で確保される。クライアントから、“ロック要求”が発生するまで、サーバ側では、子ハンドルは管理しない。
[3. Configuration of parent / child handle]
<3-1> Relationship between number and management A handle is composed of a parent handle and a child handle. In the same session, one parent handle is always secured for each open file.
The child handle is secured on the client side by the number of times that theclient application 31 shown in FIG. Until the “lock request” is issued from the client, the child handle is not managed on the server side.

<3−2>親ハンドルの定義
親ハンドルとは、図2に示すクライアントライブラリ32が、サーバ21に対する処理を要求する際に用いるハンドルである。
サーバ21は、親ハンドルを用いて、クライアントを識別すると共に、要求されているものがファイルなのかディレクトリなのかを識別する。
図2に示すクライアントライブラリ32は、子ハンドルを用いたクライアントアプリケーション31からの要求に応じて、サーバ21に対する処理を要求する。なお、親ハンドルは、クライアントアプリケーション31毎に作成される。
<3-2> Definition of Parent Handle The parent handle is a handle used when theclient library 32 shown in FIG.
Theserver 21 uses the parent handle to identify the client and whether the requested item is a file or a directory.
Theclient library 32 shown in FIG. 2 requests processing for theserver 21 in response to a request from theclient application 31 using the child handle. The parent handle is created for eachclient application 31.

<3−3>子ハンドルの定義
子ハンドルとは、図2に示すクライアントアプリケーション31が、サーバ21に対する処理をクライアントライブラリ32に要求する際に用いるハンドルである。
従って、クライアントアプリケーション31は、子ハンドルの単位で、ファイルシステムに対する処理を要求する。
本実施形態で定義する子ハンドルは、従来技術で定義されるところの“ハンドル”やファイルディスクリプタに相当する。すなわち、図2に示すクライアントアプリケーション31は、“ファイルおよびディレクトリ”のオープンに対して、必ず別々のハンドルが提供される。
<3-3> Definition of Child Handle A child handle is a handle used when theclient application 31 shown in FIG.
Therefore, theclient application 31 requests processing for the file system in units of child handles.
The child handle defined in this embodiment corresponds to a “handle” or a file descriptor as defined in the prior art. That is, theclient application 31 shown in FIG. 2 is always provided with a separate handle for opening a “file and directory”.

次に、唯一、サーバ側で子ハンドルを厳密に区別しなければならないケースについて記述する。すなわち、ロックの取得可否および保持確認については、図2に示すクライアントアプリケーション31が認識している単位あるいは管理している単位で、サーバ側でも同様に管理する必要がある。  Next, only the case where the child handle must be strictly distinguished on the server side will be described. That is, whether or not the lock can be acquired and whether or not the lock is confirmed need to be similarly managed on the server side in the unit recognized by theclient application 31 shown in FIG.

[4.親子ハンドルの管理方式]
<4−1>ハンドル作成およびハンドル削除
本節では、ハンドルのライフサイクルおよび具体的なデータ構造について説明する。
ここでは、場合分けとして、親ハンドルと子ハンドルそれぞれについて(2通り)、クライアント側のハンドルかサーバ側のハンドルか(2通り)、ハンドルの生成のタイミングおよび破壊のタイミング(2通り)の組み合わせに関して、8通りのケースについて説明する。
[4. Management method of parent / child handle]
<4-1> Handle Creation and Handle Deletion In this section, the life cycle of a handle and a specific data structure will be described.
Here, as a case classification, with respect to each of the parent handle and the child handle (two ways), the handle on the client side or the server side (two ways), the combination of the handle generation timing and the destruction timing (two ways) The eight cases will be described.

≪親ハンドルについて≫
クライアント側で親ハンドルが生成されるタイミングは、図2に示すクライアントアプリケーション31が、クライアントライブラリ32にパス指定で、ノードオープンを最初に要求した際のみである。
サーバ側で親ハンドルが生成されるタイミングは、図2に示すクライアントライブラリ32が、ネットワーク通信を経て、オープンを要求したときのみである。
≪About parent handle≫
The parent handle is generated on the client side only when theclient application 31 shown in FIG. 2 first requests theclient library 32 to open a node by specifying a path.
The timing at which the parent handle is generated on the server side is only when theclient library 32 shown in FIG. 2 requests opening through network communication.

クライアント側で親ハンドルが削除されるタイミングは、以下の3通りである。
(1)セッションが切断した場合
(2)該当するノードが削除された場合
(3)親ハンドル用のメモリ領域が不足しており、かつ、クローズ済みのハンドルが存在する場合
There are three timings at which the parent handle is deleted on the client side.
(1) When the session is disconnected (2) When the corresponding node is deleted (3) When the memory area for the parent handle is insufficient and there is a closed handle

このうち、(3)のケースでは、新たな親ハンドルを作成しようとするときにメモリ領域が不足していた場合に、以前に作成してクローズ済みである別の親ハンドルを削除することを意味する。つまり、クライアントによってクローズが明示的に行われた場合であっても、メモリ領域が不足しなければ、クローズ済みの親ハンドルは削除されない。ただし、クライアントアプリケーション31がオープンしているハンドルが全て、クライアントによって明示的にクローズされている場合であって、明示的にオープンされているハンドルが1つもクライアントアプリケーション31に存在していない場合には、セッションは切断される。そのため、この場合には、(1)のケースに該当することになり、その結果、クローズ済みである(親)ハンドルは削除されることになる。  Of these cases, in case (3), if there is not enough memory space when trying to create a new parent handle, it means that another parent handle that has been created and closed is deleted. To do. That is, even when the closing is explicitly performed by the client, the closed parent handle is not deleted unless the memory area is insufficient. However, in the case where all the handles opened by theclient application 31 are explicitly closed by the client, and no handle that is explicitly opened exists in theclient application 31. The session is disconnected. Therefore, in this case, it corresponds to the case of (1), and as a result, the closed (parent) handle is deleted.

サーバ側で親ハンドルが削除されるタイミングは、以下の3通りである。
(1)ハンドルを持っているセッションが切断した場合
(2)該当するノードが削除された場合
(3)クライアントから明示的にクローズを要求された場合
There are three timings when the parent handle is deleted on the server side.
(1) When the session that has the handle is disconnected (2) When the corresponding node is deleted (3) When the client explicitly requests close

≪子ハンドルについて≫
クライアント側で子ハンドルが生成されるタイミングは、図2に示すクライアントアプリケーション31が、クライアントライブラリ32にパス指定で、ノードオープンを要求した際である。
サーバ側で子ハンドルが生成されるタイミングは、図2に示すクライアントアプリケーション31が、明示的にロック取得を要求した場合のみである。
≪About child handle≫
The child handle is generated on the client side when theclient application 31 shown in FIG. 2 requests theclient library 32 to open a node by specifying a path.
A child handle is generated on the server side only when theclient application 31 shown in FIG. 2 explicitly requests acquisition of a lock.

クライアント側で子ハンドルが削除されるタイミングは、図2に示すクライアントアプリケーション31が、クライアントライブラリ32にハンドルのクローズを明示的に要求した場合、および、セッションが切断した場合である。
サーバ側で子ハンドルが削除されるタイミングは、図2に示すクライアントアプリケーション31がロックの解除およびロック待ちの解除を要求し、成功した場合、および、セッションが切断した場合である。ただし、上記の解除のオペレーションは失敗しない前提であり、セッションがなくなれば、サーバ側では自動的に解除する。
The timing at which the child handle is deleted on the client side is when theclient application 31 shown in FIG. 2 explicitly requests theclient library 32 to close the handle and when the session is disconnected.
The timing at which the child handle is deleted on the server side is when theclient application 31 shown in FIG. 2 requests the release of the lock and the release of the lock wait and succeeds, and when the session is disconnected. However, it is assumed that the above release operation does not fail, and if there is no session, the server automatically releases it.

<4−2>ハンドル内で管理される情報
クライアント側の親ハンドルで管理される情報は、サーバと共通のハンドルID、ノードパスおよび子ハンドルのリスト、後記するイベントマスクの値であり、ファイルの場合には、さらに、ファイルの内容のキャッシュが管理される。
クライアント側の子ハンドルで管理される情報は、同じ親ハンドルを持つ子ハンドルを区別できる子ハンドルID、ロック取得状態、イベントマスクの値である。
親ハンドルについては、サーバ側では、キャッシュを除きクライアントと同様の情報を管理する。
<4-2> Information Managed in Handle Information managed in the parent handle on the client side is a handle ID common to the server, a node path and a list of child handles, an event mask value described later, and a file. In addition, a cache of file contents is managed.
Information managed by the child handle on the client side includes a child handle ID that can distinguish child handles having the same parent handle, a lock acquisition state, and an event mask value.
Regarding the parent handle, the server manages the same information as the client except for the cache.

<4−3>サーバ側でファイルに付属する情報
サーバ側では、あるファイルに対して、次の5つの情報を保持する。
(1)ファイルをオープンしているハンドル全て
(2)ファイルに対するイベントを監視しているハンドル全て
(3)ファイルの内容をキャッシュしているハンドル全て
(4)ファイルに対するロック取得済みハンドル
(5)ファイルに対するロック待ち行列のリスト
<4-3> Information attached to file on server side On the server side, the following five pieces of information are held for a certain file.
(1) All handles that open the file (2) All handles that monitor events for the file (3) All handles that cache the contents of the file (4) Handles that have already been locked for the file (5) File List of lock queues for

このうち、ここでは、(4)ロック取得済みハンドル、および、(5)ファイルに対するロック待ち行列のリストについて言及する。これら(4)、(5)のハンドルに関しては、ハンドルIDと子ハンドルIDによって全ての子ハンドルを識別している。すなわち、図2に示すクライアントライブラリ32は、ロックの取得を要求する際に初めて、子ハンドルの存在をサーバに登録する。これにより、子ハンドルによる、不要なネットワーク上の通信を省略している(図8、図9参照)  Among these, here, (4) a lock acquired handle and (5) a list of lock queues for files are referred to. Regarding the handles (4) and (5), all child handles are identified by the handle ID and the child handle ID. That is, theclient library 32 shown in FIG. 2 registers the existence of a child handle in the server for the first time when requesting acquisition of a lock. Thereby, unnecessary communication on the network by the child handle is omitted (see FIGS. 8 and 9).

[5.親子ハンドルのキャッシュ方式]
≪書込みの集約および読込みの集約≫
本実施形態では、非特許文献1の方法と同様に、ファイルの内容を一度でも読み込んだクライアントは、図2に示すクライアントライブラリ32内にてファイルの内容をキャッシュする。ただし、本実施形態では、1つのクライアントプロセス内での同じファイルに対するキャッシュは、親ハンドルに対応づけて管理する。これにより、重複している一次記憶領域(メモリ)を低減し、ファイルの内容を転送する通信量および通信回数を節約することができる。すなわち、例えば図2に示す片方の子ハンドル34により、一度読み込まれたファイルの内容は、同じクライアントが保持している別の子ハンドル34による読み込みの際でも、キャッシュを保持することができる(図10参照)。
[5. Cache method for parent / child handles]
<< Aggregation of writing and aggregation of reading >>
In the present embodiment, as in the method ofNon-Patent Document 1, a client that has read the contents of a file even once caches the contents of the file in theclient library 32 shown in FIG. However, in this embodiment, the cache for the same file in one client process is managed in association with the parent handle. Thereby, the primary storage area (memory) which overlaps can be reduced and the communication amount and the frequency | count of communication which transfer the content of a file can be saved. That is, for example, the contents of a file once read by one child handle 34 shown in FIG. 2 can be held in the cache even when read by another child handle 34 held by the same client (FIG. 2). 10).

[6.親子ハンドルのイベント通知方式]
<6−1>イベント監視の登録および集約
図2に示すクライアントアプリケーション31は、クライアントライブラリ32にイベント監視要求を行う際、イベント種別およびイベント通知時の処理(コールバック処理)を登録する。ここで、クライアントアプリケーション31は、イベント監視要求を行うときに、クライアントライブラリ32に対して、イベントが発生した場合にイベント発生通知を受け取るためのイベント監視登録依頼(イベント監視登録依頼メッセージ)を作成する。クライアントアプリケーション31は、イベント監視登録依頼を作成する際に、監視するイベント種別とイベント発生通知時の処理の有無を管理するマスク値とを示すコールバック処理の情報をクライアントライブラリ32に登録する。
クライアントライブラリ32は、イベント種別に対応する子ハンドルの真偽値記憶領域を更新し、一時記憶領域(メモリ)にコールバック処理を記憶する。ここで、クライアントライブラリ32の親子ハンドル管理手段131は、ハンドルリスト52において、イベント監視登録依頼で用いられる子ハンドルに対して、コールバック処理の情報であるイベント毎のマスク値の集合をイベントマスクとして付与して記憶する。
次に、クライアントライブラリ32は、親ハンドルとサーバとに登録するイベントマスク値を計算する。
[6. Event notification method for parent and child handles]
<6-1> Event Monitoring Registration and Aggregation When theclient application 31 shown in FIG. 2 makes an event monitoring request to theclient library 32, the event type and event notification processing (callback processing) are registered. Here, when making an event monitoring request, theclient application 31 creates an event monitoring registration request (event monitoring registration request message) for receiving an event occurrence notification when an event occurs with respect to theclient library 32. . When creating an event monitoring registration request, theclient application 31 registers in theclient library 32 callback processing information indicating an event type to be monitored and a mask value for managing the presence or absence of processing at the time of event occurrence notification.
Theclient library 32 updates the true / false value storage area of the child handle corresponding to the event type, and stores the callback process in the temporary storage area (memory). Here, the parent / child handle management means 131 of theclient library 32 uses, as an event mask, a set of mask values for each event, which is information of callback processing, for the child handle used in the event monitoring registration request in thehandle list 52. Give and remember.
Next, theclient library 32 calculates an event mask value registered in the parent handle and the server.

<6−2>サーバ側に登録されるイベントマスク(真偽値集合)
あるハンドルの親ハンドルをP、子ハンドル集合を

Figure 2011003147
とする。このハンドルが登録している、あるイベント種別eiについて、サーバに登録されるリスナの真偽値Lp(ei)は、論理和を用いて、式(1)によって定義される。<6-2> Event mask registered on the server side (true / false value set)
The parent handle of a handle is P, the child handle set is
Figure 2011003147
And The handle is registered for a certain event type ei, boolean Lp of the listener to be registered in the server (ei), using a logical sum is defined by equation (1).

Figure 2011003147
Figure 2011003147

親ハンドルは、イベント種別に対応する真偽値記憶領域を、真偽値Lp(ei)の値によって更新し、同様の値(更新した値)をサーバに送信する。
これを受信したサーバは、

Figure 2011003147
の値を登録する(図5、図11参照)。なお、iの最大値「8」は一例であって、イベント種別eiは、8種類に限定されるものではない。The parent handle updates the truth value storage area corresponding to the event type with the value of the truth value Lp (ei ), and transmits the same value (updated value) to the server.
The server that received this
Figure 2011003147
Is registered (see FIGS. 5 and 11). Note that the maximum value “8” of i is an example, and the event type ei is not limited to eight types.

<6−3>子ハンドルに対するイベントの通知
あるハンドルがイベント監視を登録している“ファイルおよびディレクトリ”において、イベントが発生した場合に、イベント通知が、クライアント側の子ハンドルに届くまでを説明する。
サーバ内で、イベントが発生した場合、サーバプログラム21は、該当するイベントを監視している親ハンドル(クライアントアプリケーション31に相当する)を列挙し、それらのハンドルを所有しているクライアント(クライアントアプリケーション31に相当する)に対して、ネットワークを通してイベント通知を行う。クライアントライブラリ32は、イベント通知をサーバより受信した後、イベント種別eiを判定し、

Figure 2011003147
が真である子ハンドルCjにのみ、イベントを通知し、指定する領域に保存されているコールバック処理を実行する(図6、図12参照)。これによって、1つのクライアント(クライアントアプリケーション31に相当する)における、子ハンドルに対するイベント関連の処理を集約することができ、本来は子ハンドルの個数分だけ必要であった通信を、ただ一度だけの通信で完了することができる。<6-3> Notification of an event to a child handle When an event occurs in a “file and directory” in which a certain handle registers event monitoring, a description will be given of the event notification reaching the child handle on the client side. .
When an event occurs in the server, theserver program 21 enumerates parent handles (corresponding to the client application 31) monitoring the corresponding event, and a client (client application 31) that owns these handles. Event notification through the network. Theclient library 32, after receiving from the server an event notification determines the event type ei,
Figure 2011003147
Only the child handle Cj for which is true is notified of the event, and the callback process stored in the designated area is executed (see FIGS. 6 and 12). As a result, event-related processing for child handles in one client (corresponding to the client application 31) can be consolidated, and communication that was originally required for the number of child handles can be performed only once. Can be completed with.

[7.具体的な構成および動作]
(第1実施形態)
<7−1>具体的な構成
図1〜図4を参照して、第1実施形態のコンピュータシステム1におけるサーバコンピュータ2およびクライアントコンピュータ3の詳細な構成を説明する。
≪サーバ側≫
図1を参照して、サーバコンピュータ2の永続性記憶装置7に格納された情報について説明する。
ファイルデータ8は、読込み/書込み対象のファイルの内容を示すデータである。
サーバ側データ9は、図3(b)に示すように、ハンドルリスト61と、ファイルシステム62と、セッションリスト63と、ロック取得リスト64とを備えている。
ハンドルリスト61には、親ハンドルと、監視対象のイベントの情報が記述される。その詳細は後記する。
ファイルシステム62には、ファイルデータ8の名前空間におけるファイルおよびディレクトリが記述されている。
セッションリスト63には、サーバに接続されているクライアントの管理情報(イベント通知先等)が記述されている。
ロック取得リスト64には、ロック取得状態の情報や子ハンドルの情報が記述されている。
[7. Specific configuration and operation]
(First embodiment)
<7-1> Specific Configuration A detailed configuration of theserver computer 2 and theclient computer 3 in thecomputer system 1 of the first embodiment will be described with reference to FIGS.
≪Server side≫
The information stored in thepersistent storage device 7 of theserver computer 2 will be described with reference to FIG.
File data 8 is data indicating the contents of a file to be read / written.
As shown in FIG. 3B, the server-side data 9 includes ahandle list 61, afile system 62, asession list 63, and alock acquisition list 64.
In thehandle list 61, a parent handle and information on events to be monitored are described. Details will be described later.
In thefile system 62, files and directories in the name space of the file data 8 are described.
Thesession list 63 describes management information (such as event notification destination) of clients connected to the server.
Thelock acquisition list 64 describes lock acquisition state information and child handle information.

図1に戻って説明を続ける。
サーバコンピュータ2において、永続性記憶装置7に格納されたハンドル管理プログラム11、ロック管理プログラム12、キャッシュ管理プログラム13、イベント管理プログラム14を、CPU4が読み込んで、メモリ5に展開する。これにより、ハードウェア装置とソフトウェアとが協働することによって、前記したハードウェア資源がプログラムによって制御されることにより実現され、図4(b)に示すサーバ21内のハンドル管理部121、ロック管理部122、キャッシュ管理部123、イベント管理部124として動作する。これらハンドル管理部121、ロック管理部122、キャッシュ管理部123、イベント管理部124の動作については後記する。
Returning to FIG. 1, the description will be continued.
In theserver computer 2, thehandle management program 11, thelock management program 12, thecache management program 13, and theevent management program 14 stored in thepersistent storage device 7 are read by theCPU 4 and expanded in thememory 5. As a result, the hardware device and the software cooperate to realize the above-described hardware resource by the program, and thehandle management unit 121 in theserver 21 shown in FIG.Unit 122,cache management unit 123, andevent management unit 124. The operations of thehandle management unit 121,lock management unit 122,cache management unit 123, andevent management unit 124 will be described later.

ここで、図4(b)に示すサーバ21内のファイルシステム管理部125は、ファイルシステムを管理し、オープン、読み込み、クローズ等の処理を行う。
また、同様に、セッション管理部126は、サーバとクライアントとのセッションを管理するものである。
Here, the filesystem management unit 125 in theserver 21 shown in FIG. 4B manages the file system and performs processing such as open, read, and close.
Similarly, thesession management unit 126 manages a session between the server and the client.

≪クライアント側≫
図1を参照してクライアントコンピュータ3の永続性記憶装置7に格納された情報について説明する。
クライアント側データ10は、図3(a)に示すように、キャッシュリスト51と、ハンドルリスト52とを備えている。
キャッシュリスト51には、キャッシュ情報が記述されている。
ハンドルリスト52には、親ハンドルの識別情報と子ハンドルのの識別情報とが関連付けられて記述される。その詳細は後記する。
≪Client side≫
Information stored in thepersistent storage device 7 of theclient computer 3 will be described with reference to FIG.
The client-side data 10 includes acache list 51 and ahandle list 52 as shown in FIG.
In thecache list 51, cache information is described.
In thehandle list 52, the identification information of the parent handle and the identification information of the child handle are described in association with each other. Details will be described later.

図1に戻って説明を続ける。
クライアントコンピュータ3において、永続性記憶装置7に格納された親子ハンドル管理プログラム15、ロック制御管理プログラム16、イベント通知制御プログラム17、キャッシュ情報登録プログラム18をCPU4が読み込んで、メモリ5に展開する。これにより、ハードウェア装置とソフトウェアとが協働することによって、前記したハードウェア資源がプログラムによって制御されることにより実現され、図4(a)に示すクライアントライブラリ32内の親子ハンドル管理部131、ロック制御部132、イベント通知制御部133、キャッシュ情報登録部134として動作する。これら親子ハンドル管理部131、ロック制御部132、イベント通知制御部133、キャッシュ情報登録部134の動作については後記する。
Returning to FIG. 1, the description will be continued.
In theclient computer 3, theCPU 4 reads the parent / childhandle management program 15, the lockcontrol management program 16, the eventnotification control program 17, and the cacheinformation registration program 18 stored in thepersistent storage device 7 and expands them in thememory 5. As a result, the hardware device and software cooperate to realize the above-described hardware resource by the program, and the parent-childhandle management unit 131 in theclient library 32 shown in FIG. It operates as alock control unit 132, an eventnotification control unit 133, and a cacheinformation registration unit 134. The operations of the parent / childhandle management unit 131, thelock control unit 132, the eventnotification control unit 133, and the cacheinformation registration unit 134 will be described later.

≪ハンドルリストのデータ構造≫
コンピュータシステム1で利用されるハンドルリストのデータ構造の一例を図4に示す。図4(a)にはクライアント側のハンドルリスト52、図4(b)にはサーバ側のハンドルリスト61を対比してそれぞれ示している。
<< Data structure of handle list >>
An example of the data structure of the handle list used in thecomputer system 1 is shown in FIG. FIG. 4A shows thehandle list 52 on the client side, and FIG. 4B shows thehandle list 61 on the server side.

図4(a)に示すハンドルリスト52は、子ハンドル領域70と、親ハンドル領域80とを備えている。子ハンドル領域70は、細分化された領域(細分化領域)として、子ハンドルID領域71と、ロック取得状態領域72と、イベントマスク領域73と、子ハンドルID領域74と、ロック取得状態領域75と、イベントマスク領域76と、子ハンドルID領域77と、ロック取得状態領域78と、イベントマスク領域79とを備えている。なお、各細分化領域には、値を例示しているが、例えば、符号78は、値が未決定の細分化領域を示している。また、各値が格納されるタイミングについては後記する。  Thehandle list 52 shown in FIG. 4A includes achild handle area 70 and aparent handle area 80. Thechild handle area 70 is subdivided (segmented area) into a childhandle ID area 71, a lockacquisition state area 72, anevent mask area 73, a childhandle ID area 74, and a lockacquisition state area 75. Anevent mask area 76, a childhandle ID area 77, a lockacquisition state area 78, and anevent mask area 79. In addition, although the value is illustrated in each subdivision area | region, the code |symbol 78 has shown the subdivision area | region for which the value has not been determined, for example. The timing at which each value is stored will be described later.

図4(a)に示す親ハンドル領域80は、同様な細分化領域として、親ハンドルID領域81と、イベントマスク領域82とを備えている。なお、各細分化領域には、値を例示しているが、例えば、キャッシュ情報登録部134がキャッシュリスト51にキャッシュ情報を格納したときに、図4(b)に符号93で示すキャッシュ状態情報領域を、細分化領域として新たに設け、「キャッシュ取得」を示す値を記述することもできる。  Theparent handle area 80 shown in FIG. 4A includes a parenthandle ID area 81 and anevent mask area 82 as similar segmentation areas. In addition, although the value is illustrated in each subdivided area, for example, when the cacheinformation registration unit 134 stores the cache information in thecache list 51, the cache status information indicated byreference numeral 93 in FIG. It is also possible to newly provide an area as a subdivided area and describe a value indicating “cache acquisition”.

図4(b)に示すハンドルリスト61は、親ハンドル領域90を備えている。図4(b)に示す親ハンドル領域90は、図4(a)に示す親ハンドル領域80と同様なものであり、符号93で示すキャッシュ状態情報領域を備えている。  Thehandle list 61 shown in FIG. 4B includes aparent handle area 90. Aparent handle area 90 shown in FIG. 4B is similar to theparent handle area 80 shown in FIG. 4A, and includes a cache state information area indicated byreference numeral 93.

≪イベントマスクの具体例≫
図5(a)に示すイベントマスク501は、前記した式(1)において、サーバに登録されるリスナの真偽値Lp(ei)の集合を模式的に示したものである。ここでは、一例として、8種類のイベント種別として、ハンドル無効化e1と、マスタフェイルオーバe2と、コンテンツ更新e3と、メタ情報更新e4と、ロック取得e5と、ロック解除e6と、ノード作成e7と、ノード削除e8とを想定した。なお、ノード種別の数は、任意である。
≪Specific example of event mask≫
Theevent mask 501 shown in FIG. 5A schematically shows a set of listener's true / false values Lp (ei ) registered in the server in the above-described equation (1). Here, as an example, handle invalidation e1 , master failover e2 , content update e3 , meta information update e4 , lock acquisition e5 , and lock release e6 are included as eight event types. The node creation e7 and the node deletion e8 are assumed. Note that the number of node types is arbitrary.

図5(b)に示すように、一例として、子ハンドル1に、イベントマスク502が付与され、子ハンドル2に、イベントマスク503が付与されているものとすると、図4(a)に示すクライアントライブラリ32内の親子ハンドル管理部131は、イベントマスク502のマスク値と、イベントマスク503のマスク値との論理和を計算することで、親ハンドルのマスク値を計算する。これをイベントマスク504として示した。  As shown in FIG. 5B, as an example, if anevent mask 502 is assigned to thechild handle 1 and anevent mask 503 is assigned to thechild handle 2, the client shown in FIG. The parent-childhandle management unit 131 in thelibrary 32 calculates the mask value of the parent handle by calculating the logical sum of the mask value of theevent mask 502 and the mask value of theevent mask 503. This is shown as anevent mask 504.

≪イベント通知の振り分けの具体例≫
図6(a)に、図5(b)に示した親ハンドルのマスク値(イベントマスク504)を示す。また、図6(b)に、図5(b)に示した子ハンドル1および子ハンドル2のマスク値(イベントマスク502,503)を示す。
図6(a)および図6(b)に示す例において、図4(b)に示すサーバ21内のイベント管理部124による動作と、図4(a)に示すクライアントライブラリ32内のイベント通知制御部133による動作とを、次の4つのケースについて説明する。
≪Specific example of event notification distribution≫
FIG. 6A shows the mask value (event mask 504) of the parent handle shown in FIG. FIG. 6B shows mask values (event masks 502 and 503) of thechild handle 1 and the child handle 2 shown in FIG. 5B.
In the example shown in FIGS. 6A and 6B, the operation by theevent management unit 124 in theserver 21 shown in FIG. 4B and the event notification control in theclient library 32 shown in FIG. 4A. The operation of theunit 133 will be described in the following four cases.

第1ケース:サーバ側でハンドル無効化イベントが発生した場合
この場合には、図6(a)に示した親ハンドルのマスク値(イベントマスク504)において、ハンドル無効化e1の値は、「0」、つまり、フラグが偽であるため、イベント管理部124は、イベントの発生を親ハンドル(クライアントアプリケーション31に相当する:以下同様)に通知しない。したがって、サーバからクライアントへのイベント通知はない。
First case: in this case when the handle invalidation event on the server side has occurred, the mask value of the parent handle shown in FIGS. 6 (a) in (event mask 504), the value of the handle invalidation e1 is " Since the flag is false, theevent management unit 124 does not notify the parent handle (corresponding to theclient application 31; the same applies hereinafter) of the occurrence of the event. Therefore, there is no event notification from the server to the client.

第2ケース:サーバ側でハンドルマスタフェイルオーバイベントが発生した場合
この場合には、図6(a)に示した親ハンドルのマスク値(イベントマスク504)において、マスタフェイルオーバe2の値は、「1」、つまり、フラグが真であるため、イベント管理部124は、イベントの発生を親ハンドルに通知する。したがって、サーバからクライアントへのイベント通知がある。
この場合、クライアント側のイベント通知制御部133は、図6(b)に示した子ハンドル1のマスク値(イベントマスク502)において、マスタフェイルオーバe2の値が、「1」、つまり、フラグが真であると判定し、子ハンドル1(クライアントアプリケーション31の集約した処理のうちの1つに相当する:以下同様)のみに通知する。
Second case: in this case when the handle master failover event on the server side has occurred, the mask value of the parent handle shown in FIGS. 6 (a) in (event mask 504), the value of the master failover e2 is "1 That is, since the flag is true, theevent management unit 124 notifies the occurrence of the event to the parent handle. Therefore, there is an event notification from the server to the client.
In this case, the eventnotification control unit 133 on the client side sets the master failover e2 value to “1” in the mask value (event mask 502) of the child handle 1 shown in FIG. It is determined to be true, and only the child handle 1 (corresponding to one of the processes aggregated by theclient application 31; the same applies hereinafter) is notified.

第3ケース:サーバ側でコンテンツ更新イベントが発生した場合
この場合には、図6(a)に示した親ハンドルのマスク値(イベントマスク504)において、コンテンツ更新e3の値は、符号601で示すように「1」であるため、イベント管理部124は、イベントの発生を親ハンドルに通知する。したがって、サーバからクライアントへのイベント通知がある。この場合、クライアント側のイベント通知制御部133は、図6(b)に示した子ハンドル1のマスク値(イベントマスク502)において、コンテンツ更新e3の値が、符号602で示すように「0」であると判定し、一方、子ハンドル2のマスク値(イベントマスク503)において、コンテンツ更新e3の値が、符号603で示すように「1」であると判定するので、子ハンドル2のみに通知する。つまり、イベント通知制御部133は、親ハンドルと、子ハンドルの該当するマスク値の論理積が真である場合に、その子ハンドルにイベント通知を行う。
Third case: When a content update event occurs on the server side In this case, the value of the content update e3 in the mask value (event mask 504) of the parent handle shown in FIG. Since it is “1” as shown, theevent management unit 124 notifies the occurrence of the event to the parent handle. Therefore, there is an event notification from the server to the client. In this case, the client-side eventnotification control unit 133 sets the content update e3 value “0” in the mask value (event mask 502) of the child handle 1 shown in FIG. On the other hand, in the mask value of the child handle 2 (event mask 503), it is determined that the value of the content update e3 is “1” as indicated by reference numeral 603, so that only thechild handle 2 is Notify That is, the eventnotification control unit 133 notifies the child handle of an event when the logical product of the parent handle and the corresponding mask value of the child handle is true.

第4ケース:サーバ側でロック取得イベントが発生した場合
この場合には、図6(a)に示した親ハンドルのマスク値(イベントマスク504)において、ロック取得e5の値は「1」であるため、イベント管理部124は、イベントの発生を親ハンドルに通知する。この場合、クライアント側のイベント通知制御部133は、図6(b)に示した子ハンドル1,2のマスク値(イベントマスク502,503)の双方において、ロック取得e5の値が「1」であるので、子ハンドル1,2の双方に通知する。以下、同様に振り分けることができる。
Fourth case: When a lock acquisition event occurs on the server side In this case, in the mask value (event mask 504) of the parent handle shown in FIG. 6A, the value of lock acquisition e5 is “1”. Therefore, theevent management unit 124 notifies the parent handle of the occurrence of the event. In this case, the eventnotification control unit 133 on the client side sets the value of the lock acquisition e5 to “1” in both of the mask values (event masks 502 and 503) of the child handles 1 and 2 shown in FIG. Therefore, both the child handles 1 and 2 are notified. Hereinafter, it can be similarly distributed.

<7−2>具体的な動作
次に、コンピュータシステム1の動作について、図7乃至図12を参照(適宜図1乃至図6参照)して説明する。
<7−2−1>ハンドル作成処理
図7に示すハンドル作成処理は、図4(a)に示すクライアントライブラリ32内の親子ハンドル管理部131の動作と、図4(b)に示すサーバ21内のハンドル管理部121の動作により行われる。
<7-2> Specific Operation Next, the operation of thecomputer system 1 will be described with reference to FIGS. 7 to 12 (refer to FIGS. 1 to 6 as appropriate).
<7-2-1> Handle Creation Process The handle creation process shown in FIG. 7 is performed by the operation of the parent / childhandle management unit 131 in theclient library 32 shown in FIG. 4A and theserver 21 shown in FIG. This is performed by the operation of thehandle management unit 121.

図7に示すように、クライアント側において、クライアントライブラリ32は、クライアントアプリケーション31から、ハンドル作成依頼を受領する(ステップS1)。そして、クライアントライブラリ32は、同じファイルに対する親ハンドルが既に存在するか否かを判別する(ステップS2)。親ハンドルが未作成である場合(ステップS2:No)、クライアントライブラリ32は、ハンドルリスト52(図4参照)に親ハンドル領域80(メモリ領域)を確保する(ステップS3)。なお、新規作成した時点では、ハンドルリスト52(図4参照)において、親ハンドルID領域81、イベントマスク領域82の各値は未決定である。そして、クライアントライブラリ32は、ファイル名とイベントリスナとをサーバ側へ送信する(ステップS4)。このハンドルをオープンするオペレーションにおいては、ファイル作成オプションフラグが存在している。このフラグとファイルオープン結果との関係は、次の通りである。
(a)フラグにおいて、ファイル作成オプションがONの場合
(a1)ファイルがあっても成功
(a2)ファイルがなければ作成し、オープンは成功
(b)フラグにおいて、ファイル作成オプションがOFFの場合
(b1)ファイルがあれば成功
(b2)ファイルがなければ失敗
As shown in FIG. 7, on the client side, theclient library 32 receives a handle creation request from the client application 31 (step S1). Then, theclient library 32 determines whether or not a parent handle for the same file already exists (step S2). If the parent handle has not been created (step S2: No), theclient library 32 secures the parent handle area 80 (memory area) in the handle list 52 (see FIG. 4) (step S3). At the time of new creation, the values of the parenthandle ID area 81 and theevent mask area 82 are not yet determined in the handle list 52 (see FIG. 4). Then, theclient library 32 transmits the file name and the event listener to the server side (step S4). In an operation for opening this handle, a file creation option flag exists. The relationship between this flag and the file open result is as follows.
(A) If the file creation option is ON in the flag (a1) Even if there is a file, it is successful (a2) If there is no file, it is created successfully. (B) If the file creation option is OFF in the flag (b1) ) Success if file exists (b2) Failure if file does not exist

サーバ21は、受信データのファイル作成オプションフラグにより、ファイルの作成処理の要求を含んでいるか否かを判別する(ステップS5)。ファイルの作成処理を含んでいない場合(ステップS5:No)、サーバ21は、ハンドルリスト61(図4参照)に親ハンドル領域90(メモリ領域)を確保し(親ハンドルを登録し)、親ハンドルIDを発行する(ステップS6)。なお、この時点では、親ハンドルID領域91の値は決定しているが、イベントマスク領域92の値と、キャッシュ状態領域93の値とは未決定である。  Theserver 21 determines whether or not a request for file creation processing is included based on the file creation option flag of the received data (step S5). When the file creation process is not included (step S5: No), theserver 21 secures the parent handle area 90 (memory area) in the handle list 61 (see FIG. 4) (registers the parent handle), and the parent handle. An ID is issued (step S6). At this time, the value of the parenthandle ID area 91 is determined, but the value of theevent mask area 92 and the value of thecache state area 93 are not determined.

続いて、クライアントライブラリ32は、ファイルオープン結果と親ハンドルIDとをサーバ側から受信する(ステップS7)。そして、クライアントライブラリ32は、親ハンドルIDを記憶する(ステップS8)。つまり、この時点で、ハンドルリスト52(図4参照)の親ハンドルID領域81の値が決定する。そして、クライアントライブラリ32は、ハンドルリスト52(図4参照)に子ハンドル領域70(メモリ領域)を確保し、親ハンドルに登録する(ステップS9)。つまり、ハンドルリスト52(図4参照)において、子ハンドル領域70と親ハンドル領域80とが関連付けられる。なお、この時点では、クライアントライブラリ32は、子ハンドル領域70(図4参照)において、例えば、子ハンドルID領域71を決定しているが、ロック取得状態領域72については未決定である。イベントマスク領域73についてはデフォルト値(イベントリスナは0だけの集合)が入力される。  Subsequently, theclient library 32 receives the file open result and the parent handle ID from the server side (step S7). Then, theclient library 32 stores the parent handle ID (step S8). That is, at this time, the value of the parenthandle ID area 81 of the handle list 52 (see FIG. 4) is determined. Theclient library 32 secures a child handle area 70 (memory area) in the handle list 52 (see FIG. 4) and registers it in the parent handle (step S9). That is, in the handle list 52 (see FIG. 4), thechild handle area 70 and theparent handle area 80 are associated with each other. At this point, theclient library 32 has determined, for example, the childhandle ID area 71 in the child handle area 70 (see FIG. 4), but has not yet determined the lockacquisition state area 72. For theevent mask area 73, a default value (the event listener is a set of only 0) is input.

また、前記したステップS2において、親ハンドルが既に作成されている場合(ステップS2:Yes)、クライアントライブラリ32は、直ちにステップS9に進む。ステップS9に続いて、クライアントライブラリ32は、クライアントアプリケーション31に、子ハンドルを返却する(ステップS10)。これにより、クライアントアプリケーション31は、子ハンドルIDを取得する。  If the parent handle has already been created in step S2 (step S2: Yes), theclient library 32 immediately proceeds to step S9. Following step S9, theclient library 32 returns a child handle to the client application 31 (step S10). Thereby, theclient application 31 acquires the child handle ID.

また、前記したステップS5において、ファイルの作成処理を含んでいる場合(ステップS5:Yes)、サーバ21は、ファイルを作成し(ステップS11)、ステップS6に進む。また、ファイルを作成した場合、サーバ21は、作成したファイルの親ディレクトリを監視しているハンドル(子ハンドル)があるか否かを判別する(ステップS12)。親ディレクトリを監視するハンドルがない場合(ステップS12:No)、特になにもせずに処理を終了するが、親ディレクトリを監視するハンドルがある場合(ステップS12:Yes)、当該ハンドル(監視ハンドル)に対してはイベントが発生したことになるので、後記するイベント通知処理を実行する。  If the file creation process is included in step S5 described above (step S5: Yes), theserver 21 creates a file (step S11) and proceeds to step S6. If a file is created, theserver 21 determines whether there is a handle (child handle) that monitors the parent directory of the created file (step S12). If there is no handle for monitoring the parent directory (step S12: No), the process is terminated without doing anything, but if there is a handle for monitoring the parent directory (step S12: Yes), the handle (monitor handle) Since an event has occurred, event notification processing described later is executed.

<7−2−2>ロック取得処理および子ハンドル登録処理
図8に示すロック取得処理および子ハンドル登録処理は、図4(a)に示すクライアントライブラリ32内のロック制御部132の動作と、図4(b)に示すサーバ21内のロック管理部122の動作により行われる。
図8に示すように、クライアント側において、クライアントライブラリ32は、クライアントアプリケーション31から、ロック取得依頼を受領する(ステップS21)。このとき、クライアントアプリケーション31から、子ハンドルを受領する。クライアントライブラリ32は、受領した子ハンドルが有効か否かを判別する(ステップS22)。なお、受領した子ハンドルの子ハンドルIDが登録されている場合に当該子ハンドルを有効であると判定することができる。
<7-2-2> Lock Acquisition Process and Child Handle Registration Process The lock acquisition process and child handle registration process shown in FIG. 8 are the same as the operations of thelock control unit 132 in theclient library 32 shown in FIG. This is performed by the operation of thelock management unit 122 in theserver 21 shown in 4 (b).
As shown in FIG. 8, on the client side, theclient library 32 receives a lock acquisition request from the client application 31 (step S21). At this time, a child handle is received from theclient application 31. Theclient library 32 determines whether or not the received child handle is valid (step S22). If the child handle ID of the received child handle is registered, it can be determined that the child handle is valid.

受領した子ハンドルが有効である場合(ステップS22:Yes)、続けて、クライアントライブラリ32は、ハンドルリスト52を参照して、子ハンドルが、既にロック取得しているハンドル、または、現在ロック待ちのハンドルであるか否かを判別する(ステップS23)。子ハンドルが、ロック取得済みのハンドルでもなく、また、ロック待ちのハンドルでもない場合(ステップS23:No)、クライアントライブラリ32は、親ハンドルIDと当該子ハンドルIDとを、ロック取得依頼と共にサーバ側に送信する(ステップS24)。  If the received child handle is valid (step S22: Yes), theclient library 32 refers to thehandle list 52, and the child handle has already acquired a lock or is currently waiting for a lock. It is determined whether or not the handle is a handle (step S23). If the child handle is neither a handle that has been acquired a lock nor a handle that is waiting for a lock (step S23: No), theclient library 32 sends the parent handle ID and the child handle ID together with the lock acquisition request to the server side. (Step S24).

サーバ21は、ロック取得依頼を受信すると、ロック取得依頼の対象のファイルが別のクライアントによってロック取得済みのファイルであるか否かを判別する(ステップS25)。ロック取得依頼の対象のファイルが、別のクライアントによってロック取得済みのファイルである場合(ステップS25:Yes)、サーバ21は、受信した子ハンドルを、ロック待ち行列27(図2参照)のロック待ち領域に登録する(ステップS26)。そして、サーバ21は、ロック取得依頼の対象のファイルについて、別のクライアントによるロックが解除され、受信した子ハンドルがロック取得するまで待機する(ステップS27)。続いて、サーバ21は、受信した子ハンドルを、ロック取得リスト64(図3参照)に登録し(ステップS28)、ロック取得依頼応答をクライアント側に返信する。  Upon receiving the lock acquisition request, theserver 21 determines whether or not the target file for the lock acquisition request is a file for which the lock has been acquired by another client (step S25). If the lock acquisition request target file is a file that has been acquired by another client (step S25: Yes), theserver 21 uses the received child handle to wait for the lock in the lock queue 27 (see FIG. 2). Registration in the area (step S26). Then, theserver 21 waits until the lock for the lock acquisition request is released by another client and the received child handle acquires the lock (step S27). Subsequently, theserver 21 registers the received child handle in the lock acquisition list 64 (see FIG. 3) (step S28), and returns a lock acquisition request response to the client side.

前記したステップS25において、ロック取得依頼の対象のファイルが、別のクライアントによってロック取得済みのファイルではない場合(ステップS25:No)、サーバ21は、ステップS26,S27の処理をスキップしてステップS28に進む。  In the above-described step S25, when the lock acquisition request target file is not a file for which the lock has been acquired by another client (step S25: No), theserver 21 skips the processing of steps S26 and S27, and proceeds to step S28. Proceed to

クライアント側において、クライアントライブラリ32は、ロック取得依頼応答をサーバ側から受信する(ステップS29)。クライアントライブラリ32は、子ハンドルのロック情報を記憶する(ステップS30)。つまり、この時点で、クライアントライブラリ32は、子ハンドル領域70(図4参照)において、ロック取得状態領域72の値を決定する。そして、クライアントライブラリ32は、クライアントアプリケーション31に、ロック取得の成功を通知する(ステップS31)。なお、現在ロック待ちのハンドルである場合には、待機中であることも合わせて通知する。  On the client side, theclient library 32 receives a lock acquisition request response from the server side (step S29). Theclient library 32 stores child handle lock information (step S30). That is, at this point, theclient library 32 determines the value of the lockacquisition state area 72 in the child handle area 70 (see FIG. 4). Then, theclient library 32 notifies theclient application 31 of successful lock acquisition (step S31). If the handle is currently waiting for a lock, it is also notified that it is waiting.

前記したステップS23において、子ハンドルが、既にロック取得しているハンドル、または、現在ロック待ちのハンドルである場合(ステップS23:Yes)、クライアントライブラリ32は、直ちにステップS31に進む。
また、前記したステップS22において、クライアントアプリケーション31から受領した子ハンドルが無効である場合(ステップS22:No)、クライアントライブラリ32は、クライアントアプリケーション31に、ロック取得の失敗を通知する(ステップS32)。
In step S23 described above, when the child handle is a handle that has already been locked or a handle that is currently waiting for lock (step S23: Yes), theclient library 32 immediately proceeds to step S31.
If the child handle received from theclient application 31 is invalid in step S22 described above (step S22: No), theclient library 32 notifies theclient application 31 of failure to acquire the lock (step S32).

<7−2−3>ロック解除処理および子ハンドル登録削除処理
図9に示すロック解除処理および子ハンドル登録削除処理は、図4(a)に示すクライアントライブラリ32内のロック制御部132の動作と、図4(b)に示すサーバ21内のロック管理部122の動作により行われる。
図9に示すように、クライアント側において、クライアントライブラリ32は、クライアントアプリケーション31から、ロック解除依頼を受領する(ステップS41)。このとき、クライアントアプリケーション31から、子ハンドルを受領する。クライアントライブラリ32は、受領した子ハンドルが有効か否かを判別する(ステップS42)。受領した子ハンドルが有効である場合(ステップS42:Yes)、続けて、クライアントライブラリ32は、子ハンドルが、既にロック取得しているハンドル、または、現在ロック待ちのハンドルであるか否かを判別する(ステップS43)。子ハンドルが既にロック取得しているハンドル、または、現在ロック待ちのハンドルである場合(ステップS43:Yes)、クライアントライブラリ32は、親ハンドルIDと当該子ハンドルIDとを、ロック解除依頼と共にサーバ側に送信する(ステップS44)。
<7-2-3> Lock Release Processing and Child Handle Registration Deletion Processing The lock release processing and child handle registration deletion processing shown in FIG. 9 are the same as the operations of thelock control unit 132 in theclient library 32 shown in FIG. This is performed by the operation of thelock management unit 122 in theserver 21 shown in FIG.
As shown in FIG. 9, on the client side, theclient library 32 receives a lock release request from the client application 31 (step S41). At this time, a child handle is received from theclient application 31. Theclient library 32 determines whether or not the received child handle is valid (step S42). If the received child handle is valid (step S42: Yes), theclient library 32 subsequently determines whether the child handle is a handle that has already acquired a lock or a handle that is currently waiting for a lock. (Step S43). If the child handle is a handle that has already been locked or a handle that is currently waiting for a lock (step S43: Yes), theclient library 32 sends the parent handle ID and the child handle ID together with the lock release request to the server side. (Step S44).

サーバ21は、ロック解除依頼と共に受信した当該子ハンドルが、当該クライアントによってロック取得済みのファイルのものであるか否かを判別する(ステップS45)。当該クライアントによってロック取得済みのファイルのハンドルである場合(ステップS45:Yes)、サーバ21は、受信した子ハンドルを、ロック取得リスト64(図3参照)から削除し(ステップS46)、ロック解除依頼応答をクライアント側に返信する。
一方、ステップS45において、ロック解除依頼と共に受信した当該子ハンドルが、当当該クライアントによってロック待ちのファイルのものである場合(ステップS45:No)、サーバ21は、受信した子ハンドルを、ロック待ち行列27(図2参照)のロック待ち領域から削除し(ステップS47)、ロック解除依頼応答をクライアント側に返信する。
Theserver 21 determines whether or not the child handle received together with the unlock request is for a file for which the lock has been acquired by the client (step S45). If it is the handle of the file whose lock has been acquired by the client (step S45: Yes), theserver 21 deletes the received child handle from the lock acquisition list 64 (see FIG. 3) (step S46), and requests unlocking. A response is returned to the client side.
On the other hand, if the child handle received together with the unlock request in step S45 is a file waiting for lock by the client (step S45: No), theserver 21 sends the received child handle to the lock queue. 27 (see FIG. 2) is deleted from the lock waiting area (step S47), and a lock release request response is returned to the client side.

クライアント側において、クライアントライブラリ32は、ロック取得解除応答をサーバ側から受信する(ステップS48)。そして、クライアントライブラリ32は、ハンドルリスト52(図4参照)の子ハンドル領域70において、子ハンドルのロック情報を更新して記憶する(ステップS49)。クライアントライブラリ32は、クライアントアプリケーション31に、ロック解除の成功を通知する(ステップS50)。  On the client side, theclient library 32 receives a lock acquisition release response from the server side (step S48). Then, theclient library 32 updates and stores the lock information of the child handle in thechild handle area 70 of the handle list 52 (see FIG. 4) (step S49). Theclient library 32 notifies theclient application 31 of the successful lock release (step S50).

前記したステップS43において、子ハンドルが、ロック取得済みのハンドルでもなく、また、ロック待ちのハンドルでもない場合(ステップS43:No)、クライアントライブラリ32は、直ちにステップS50に進む。また、前記したステップS42において、クライアントアプリケーション31から受領した子ハンドルが無効である場合(ステップS42:No)、クライアントライブラリ32は、クライアントアプリケーション31に、ロック解除の失敗を通知する(ステップ51)。  In step S43 described above, when the child handle is neither a handle for which lock has been acquired nor a handle waiting for lock (step S43: No), theclient library 32 immediately proceeds to step S50. If the child handle received from theclient application 31 is invalid in step S42 described above (step S42: No), theclient library 32 notifies theclient application 31 of a failure to unlock (step 51).

<7−2−4>ファイル読込処理およびキャッシュ作成処理
図10に示すファイル読込処理およびキャッシュ作成処理は、図4(a)に示すクライアントライブラリ32内のキャッシュ情報登録部134の動作と、図4(b)に示すサーバ21内のキャッシュ管理部123の動作により行われる。
図10に示すように、クライアント側において、クライアントライブラリ32は、クライアントアプリケーション31から、ファイル内容取得依頼を受領する(ステップS61)。このとき、クライアントアプリケーション31から、子ハンドルを受領する。クライアントライブラリ32は、受領した子ハンドルが有効か否かを判別する(ステップS62)。受領した子ハンドルが有効である場合(ステップS62:Yes)、続けて、クライアントライブラリ32は、ハンドルリスト52(図4参照)の親ハンドル領域80にキャッシュが存在するか否かを判別する(ステップS63)。親ハンドル領域80(図4参照)に、“キャッシュ保持”を示すキャッシュ状態が記録されていない場合(ステップS63:No)、クライアントライブラリ32は、親ハンドルIDを、ファイル内容取得依頼と共にサーバ側に送信する(ステップS64)。
<7-2-4> File Read Processing and Cache Creation Processing The file read processing and cache creation processing shown in FIG. 10 are the same as the operations of the cacheinformation registration unit 134 in theclient library 32 shown in FIG. This is performed by the operation of thecache management unit 123 in theserver 21 shown in (b).
As shown in FIG. 10, on the client side, theclient library 32 receives a file content acquisition request from the client application 31 (step S61). At this time, a child handle is received from theclient application 31. Theclient library 32 determines whether or not the received child handle is valid (step S62). If the received child handle is valid (step S62: Yes), theclient library 32 subsequently determines whether or not a cache exists in theparent handle area 80 of the handle list 52 (see FIG. 4) (step S62). S63). When the cache state indicating “cache holding” is not recorded in the parent handle area 80 (see FIG. 4) (step S63: No), theclient library 32 sets the parent handle ID to the server side together with the file content acquisition request. Transmit (step S64).

サーバ21は、ファイル内容取得依頼と共に受信した親ハンドルに対応するファイルが存在するか否かを判別する(ステップS65)。親ハンドルに対応するファイルが存在する場合(ステップS65:Yes)、サーバ21は、バックエンドデータベース22(図2参照)から該当するファイルの内容(以下、ファイル内容という)を取得して読み込み(ステップS66)、ファイル内容をクライアント側に返信する。なお、この時点で、ハンドルリスト61(図4参照)の親ハンドル領域90のキャッシュ状態領域93が“キャッシュ保持”に書き換えられる。一方、ステップS65において、親ハンドルに対応するファイルが存在しない場合(ステップS65:No)、サーバ21は、ファイルの読み込みが失敗したことを示す応答をクライアント側に返信する。  Theserver 21 determines whether there is a file corresponding to the parent handle received together with the file content acquisition request (step S65). If there is a file corresponding to the parent handle (step S65: Yes), theserver 21 acquires and reads the contents of the corresponding file (hereinafter referred to as file contents) from the back-end database 22 (see FIG. 2) (step S65). S66), the file contents are returned to the client side. At this time, thecache status area 93 of theparent handle area 90 of the handle list 61 (see FIG. 4) is rewritten to “cache hold”. On the other hand, if the file corresponding to the parent handle does not exist in step S65 (step S65: No), theserver 21 returns a response indicating that the file reading has failed to the client side.

クライアント側において、前記したステップS66に続いて、クライアントライブラリ32は、ファイル内容をサーバ側から受信する(ステップS67)。そして、クライアントライブラリ32は、親ハンドルのキャッシュ情報にファイル内容を登録する(ステップS68)。なお、この時点で、ハンドルリスト52(図4参照)の親ハンドル領域80に、“キャッシュ保持”を示すキャッシュ状態情報が記録される。そして、クライアントライブラリ32は、クライアントアプリケーション31に、ファイル内容取得の成功を通知し、ファイル内容を返却する(ステップS69)。これにより、クライアントコンピュータ3(図1参照)のメモリ5または永続性記憶装置7に、ファイル内容が記憶される。  On the client side, following step S66 described above, theclient library 32 receives the file contents from the server side (step S67). Then, theclient library 32 registers the file contents in the cache information of the parent handle (Step S68). At this time, the cache status information indicating “cache holding” is recorded in theparent handle area 80 of the handle list 52 (see FIG. 4). Then, theclient library 32 notifies theclient application 31 of the successful acquisition of the file contents, and returns the file contents (step S69). As a result, the file contents are stored in thememory 5 or thepersistent storage device 7 of the client computer 3 (see FIG. 1).

また、クライアント側において、前記したステップS65でNoの場合に続いて、クライアントライブラリ32は、ファイルの読み込みが失敗したことを示す応答をサーバ側から受信する場合(ステップS70)、クライアントアプリケーション31に、ファイル内容取得の失敗を通知する(ステップS72)。なお、前記したステップS62において、クライアントアプリケーション31から受領した子ハンドルが無効である場合も(ステップS62:No)、ファイル内容取得の失敗を通知する。  On the client side, following the case of No in step S65 described above, when theclient library 32 receives a response indicating that the file reading has failed from the server side (step S70), theclient application 31 Notification of failure in file content acquisition is sent (step S72). In addition, also in the above-mentioned step S62, also when the child handle received from theclient application 31 is invalid (step S62: No), the failure of file content acquisition is notified.

一方、前記したステップS63において、ハンドルリスト52(図4参照)の親ハンドル領域80に“キャッシュ保持”を示すキャッシュ状態が記録されている場合(ステップS63:Yes)、クライアントライブラリ32は、直ちに、保持しているキャッシュ情報を読み込み(ステップS71)、ステップS69に進む。  On the other hand, when the cache state indicating “cache holding” is recorded in theparent handle area 80 of the handle list 52 (see FIG. 4) in step S63 described above (step S63: Yes), theclient library 32 immediately The stored cache information is read (step S71), and the process proceeds to step S69.

<7−2−5>ノードイベント監視登録処理
図11に示すノードイベント監視登録処理は、図4(a)に示すクライアントライブラリ32内のイベント通知制御部133の動作と、図4(b)に示すサーバ21内のイベント管理部124の動作により行われる。
図11に示すように、クライアント側において、クライアントライブラリ32は、クライアントアプリケーション31から、イベント監視登録依頼を受領する(ステップS81)。このとき、クライアントアプリケーション31から、子ハンドルを受領する。クライアントライブラリ32は、受領した子ハンドルが有効か否かを判別する(ステップS82)。受領した子ハンドルが有効である場合(ステップS82:Yes)、続けて、クライアントライブラリ32は、当該子ハンドルのイベントマスク値と、現在の親ハンドルのイベントマスク値との論理和を計算する(ステップS83)。
<7-2-5> Node Event Monitoring Registration Processing The node event monitoring registration processing shown in FIG. 11 is performed according to the operation of the eventnotification control unit 133 in theclient library 32 shown in FIG. This is performed by the operation of theevent management unit 124 in theserver 21 shown.
As shown in FIG. 11, on the client side, theclient library 32 receives an event monitoring registration request from the client application 31 (step S81). At this time, a child handle is received from theclient application 31. Theclient library 32 determines whether or not the received child handle is valid (step S82). When the received child handle is valid (step S82: Yes), theclient library 32 calculates the logical sum of the event mask value of the child handle and the event mask value of the current parent handle (step S82). S83).

なお、初めて論理和をとる段階において、現在の親ハンドルのイベントマスク値とは、親ハンドルのイベントマスクの初期値のことである。この親ハンドルのイベントマスクの初期値は、ハンドルリスト52(図4参照)の子ハンドル領域70のリスト一番目の子ハンドルのイベントマスク値と同一となる。具体的には、図4(a)の子ハンドルID領域71が「子ハンドルid0」である子ハンドルは、図4(a)に示す例において、3つの中で最初に作成された子ハンドルである。そして、「子ハンドルid0」である子ハンドルのイベントマスクは、一例としてイベント種別eiを6種類としたときに、イベントマスク領域73に示すように、「000000」である。したがって、親ハンドルのイベントマスクの初期値は、「000000」となる。It should be noted that at the stage of first ORing, the current event mask value of the parent handle is the initial value of the event mask of the parent handle. The initial value of the event mask of the parent handle is the same as the event mask value of the first child handle in the list in thechild handle area 70 of the handle list 52 (see FIG. 4). Specifically, the child handle whose childhandle ID area 71 in FIG. 4A is “child handle id0” is the child handle created first among the three in the example shown in FIG. 4A. is there. The event mask of the child handle “child handle id0” is “000000” as shown in theevent mask area 73 when the event type ei is six types as an example. Therefore, the initial value of the event mask of the parent handle is “000000”.

クライアントライブラリ32は、ステップS83の計算結果により、親ハンドル領域80(図4参照)のイベントマスク領域82に登録されているイベントマスク値を更新する(ステップS84)。そして、クライアントライブラリ32は、親ハンドルIDおよび新イベントマスク値を、イベント監視登録依頼と共にサーバ側に送信する(ステップS85)。  Theclient library 32 updates the event mask value registered in theevent mask area 82 of the parent handle area 80 (see FIG. 4) based on the calculation result of step S83 (step S84). Then, theclient library 32 transmits the parent handle ID and the new event mask value to the server side together with the event monitoring registration request (step S85).

サーバ21は、イベント監視対象のファイルが存在するか否かを判別する(ステップS86)。イベント監視対象のファイルが存在する場合(ステップS86:Yes)、サーバ21は、受信した新イベントマスク値を登録し(ステップS87)、イベントマスク登録結果をクライアント側に返信する。なお、この時点で、ハンドルリスト61(図4参照)における親ハンドル領域90のイベントマスク領域92の値が決定する。
一方、イベント監視対象のファイルが存在しない場合(ステップS86:No)、サーバ21は、イベント監視登録が失敗したことを示す応答をクライアント側に返信する。
Theserver 21 determines whether or not the event monitoring target file exists (step S86). If the event monitoring target file exists (step S86: Yes), theserver 21 registers the received new event mask value (step S87), and returns the event mask registration result to the client side. At this time, the value of theevent mask area 92 of theparent handle area 90 in the handle list 61 (see FIG. 4) is determined.
On the other hand, when the event monitoring target file does not exist (step S86: No), theserver 21 returns a response indicating that the event monitoring registration has failed to the client side.

クライアント側において、前記したステップS87に続いて、クライアントライブラリ32は、イベントマスク登録結果をサーバ側から受信する(ステップS88)。そして、クライアントライブラリ32は、クライアントアプリケーション31から受領した当該子ハンドルのイベント情報を登録する(ステップS89)。そして、クライアントライブラリ32は、クライアントアプリケーション31に、子ハンドルによるイベント監視登録の成功を通知する(ステップS90)。  On the client side, following step S87 described above, theclient library 32 receives the event mask registration result from the server side (step S88). Then, theclient library 32 registers the event information of the child handle received from the client application 31 (step S89). Then, theclient library 32 notifies theclient application 31 of the success of event monitoring registration by the child handle (step S90).

なお、ステップS89よりも前において、クライアント側で論理和の計算に用いられるイベントマスクは、クライアント側のみの“仮登録”である。一方、ステップS89における子ハンドルのイベント情報の登録処理は、イベント監視登録が成功してサーバ側で実際にイベント監視が実行可能になっているので、コンピュータシステム1における“本登録”である。つまり、イベント通知処理では、新イベントマスク値を有したイベントマスク(新イベントマスク)だけが利用されることとなる。  Prior to step S89, the event mask used for the logical sum calculation on the client side is “temporary registration” only on the client side. On the other hand, the event information registration processing of the child handle in step S89 is “main registration” in thecomputer system 1 because the event monitoring registration has succeeded and the event monitoring can actually be executed on the server side. That is, in the event notification process, only an event mask (new event mask) having a new event mask value is used.

また、クライアント側において、前記したステップS86でNoの場合に続いて、クライアントライブラリ32は、イベント監視登録が失敗したことを示す応答をサーバ側から受信する場合、クライアントアプリケーション31に、イベント監視登録の失敗を通知する(ステップS91)。なお、前記したステップS82において、クライアントアプリケーション31から受領した子ハンドルが無効である場合も(ステップS82:No)、イベント監視登録の失敗を通知する。  On the client side, following the case of No in step S86 described above, when theclient library 32 receives a response indicating that the event monitoring registration has failed from the server side, theclient library 31 registers the event monitoring registration. A failure is notified (step S91). In addition, also in the above-mentioned step S82, also when the child handle received from theclient application 31 is invalid (step S82: No), the failure of event monitoring registration is notified.

<7−2−6>イベント通知処理
図12に示すイベント通知処理は、図4(a)に示すクライアントライブラリ32内のイベント通知制御部133の動作と、図4(b)に示すサーバ21内のイベント管理部124の動作により行われる。
図12に示すように、サーバコンピュータ2において、ファイルシステム62で管理しているファイルやディレクトリの状態が変化すると、サーバ21は、当該ハンドル(監視ハンドル)に対してイベント発生を検知する(ステップS101)。例えば、図7に示したように、サーバ側において、ハンドル作成時に、サーバ21がファイルを作成し、作成したファイルの親ディレクトリを監視しているハンドル(子ハンドル)がある場合(ステップS12:Yes)、図7および図12の符号「A」で示すように、ステップS101に進む。そして、サーバ21は、ハンドルリスト61(図4参照)から、発生したイベントの通知を受けるように(監視するように)登録されているリスナの情報を抽出し、抽出したリスナ一覧をメモリ5に複製して親ハンドルリストを取得する(ステップS102)。
<7-2-6> Event Notification Processing The event notification processing shown in FIG. 12 is performed by the operation of the eventnotification control unit 133 in theclient library 32 shown in FIG. 4A and theserver 21 shown in FIG. This is performed by the operation of theevent management unit 124.
As shown in FIG. 12, in theserver computer 2, when the state of the file or directory managed by thefile system 62 changes, theserver 21 detects the occurrence of an event for the handle (monitoring handle) (step S101). ). For example, as shown in FIG. 7, on the server side, when a handle is created, there is a handle (child handle) in which theserver 21 creates a file and monitors the parent directory of the created file (step S12: Yes). ), The process proceeds to step S101 as indicated by the reference numeral “A” in FIGS. Then, theserver 21 extracts the registered listener information so as to receive (monitor) the notification of the occurred event from the handle list 61 (see FIG. 4), and stores the extracted listener list in thememory 5. The parent handle list is acquired by duplication (step S102).

そして、サーバ21は、この親ハンドルリストからすべての親ハンドルを削除するまで該当するリスナに対してイベント通知を実行する。すなわち、サーバ21は、更新した親ハンドルリストが空になったと判別した場合(ステップS103:Yes)、イベント通知処理を終了する。さもなければ(ステップS103:No)、サーバ21は、親ハンドルリスト中の親ハンドルの情報から、イベント通知先(クライアントとのセッション)の情報を取得する(ステップS104)。そして、サーバ21は、取得した情報に基づいて、セッションを経由して、該当する親ハンドルIDと新イベントマスクとをクライアントへ送信する(ステップS105)。そして、サーバ21は、親ハンドルリストから、該当するクライアントの親ハンドルを削除し(ステップS106)、ステップS103に戻る。  Then, theserver 21 performs event notification to the corresponding listener until all parent handles are deleted from the parent handle list. In other words, when theserver 21 determines that the updated parent handle list is empty (step S103: Yes), the event notification process ends. Otherwise (step S103: No), theserver 21 acquires information on the event notification destination (session with the client) from the information on the parent handle in the parent handle list (step S104). Then, theserver 21 transmits the corresponding parent handle ID and new event mask to the client via the session based on the acquired information (step S105). Then, theserver 21 deletes the parent handle of the corresponding client from the parent handle list (step S106), and returns to step S103.

前記したステップS105に続いて、クライアント側において、クライアントライブラリ32は、イベント通知により新イベントマスクを受信する(ステップS107)。そして、クライアントライブラリ32は、ハンドルリスト52(図4参照)から、イベント通知により受信した親ハンドルに所属する全ての子ハンドルの情報を抽出し、抽出した子ハンドル一覧をメモリ5に複製した子ハンドルリスト(以下、複製リストという)を取得する(ステップS108)。  Subsequent to step S105 described above, on the client side, theclient library 32 receives a new event mask by event notification (step S107). Then, theclient library 32 extracts information on all child handles belonging to the parent handle received by the event notification from the handle list 52 (see FIG. 4), and copies the extracted child handle list to thememory 5. A list (hereinafter referred to as a replication list) is acquired (step S108).

そして、クライアントライブラリ32は、この複製リストからすべての子ハンドルを削除するまで、コールバックを必要とする子ハンドルを探索する処理を実行する。すなわち、クライアントライブラリ32は、更新した複製リストが空になったと判別した場合(ステップS109:Yes)、探索処理を終了する。さもなければ(ステップS109:No)、クライアントライブラリ32は、現在の複製リストの先頭の子ハンドルの情報を取得する(ステップS110)。  Then, theclient library 32 executes a process of searching for a child handle that requires a callback until all child handles are deleted from the duplicate list. That is, when theclient library 32 determines that the updated copy list is empty (step S109: Yes), theclient library 32 ends the search process. Otherwise (step S109: No), theclient library 32 acquires information on the first child handle of the current replication list (step S110).

そして、クライアントライブラリ32は、当該子ハンドルのイベントマスク値と、イベント通知により受信した新イベントマスク値との論理積を計算する(ステップS111)。具体的には、一例として、図6に、子ハンドルのイベントマスクおよび新イベントマスクのイベント種別が「コンテンツ更新e3」である値の論理積を求める場合の計算方法を符号601〜603で示した。計算の結果、論理積が真であれば、当該子ハンドルは、コールバックを必要とする子ハンドルであるので、クライアントライブラリ32は、コールバック呼び出しを実行する(ステップS112)。すなわち、クライアントライブラリ32は、コールバック処理を行う。そして、クライアントライブラリ32は、複製リストから、該当子ハンドルを削除し(ステップS113)、ステップS109に戻る。一方、ステップS111の計算の結果、論理積が偽であれば、クライアントライブラリ32は、ステップS112をスキップして、ステップS113に進む。Then, theclient library 32 calculates a logical product of the event mask value of the child handle and the new event mask value received by the event notification (step S111). Specifically, as an example,reference numeral 601 to 603 indicates a calculation method for obtaining a logical product of values whose event types of the child handle event mask and the new event mask are “content update e3 ”. It was. If the logical product is true as a result of the calculation, since the child handle is a child handle that requires a callback, theclient library 32 executes a callback call (step S112). That is, theclient library 32 performs a callback process. Then, theclient library 32 deletes the corresponding child handle from the replication list (step S113), and returns to step S109. On the other hand, if the logical product is false as a result of the calculation in step S111, theclient library 32 skips step S112 and proceeds to step S113.

第1実施形態のコンピュータシステム1によれば、クライアントライブラリ32が、サーバ側で付与された親ハンドルに従属する子ハンドルを生成し、クライアントアプリケーション31に返却し、クライアントアプリケーション31が、子ハンドルを用いたサーバ側のファイルシステムへのオペレーションを要求したときに、クライアントライブラリ32がこの要求を中継する。このとき、それぞれの子ハンドルは、クライアントアプリケーション31においては、別々のハンドルとして利用できるので、ネットワーク通信においては、同一のクライアントから同じファイルおよびディレクトリに対する別ハンドルのアクセスを親ハンドルに集約することができる。その結果、ファイルシステムへのアクセスにおいて、クライアントとサーバとの間で発生する通信の回数や量を低減することができる。  According to thecomputer system 1 of the first embodiment, theclient library 32 generates a child handle subordinate to the parent handle given on the server side, returns it to theclient application 31, and theclient application 31 uses the child handle. Theclient library 32 relays this request when an operation to the server-side file system is requested. At this time, since each child handle can be used as a separate handle in theclient application 31, in the network communication, access of different handles for the same file and directory from the same client can be aggregated into the parent handle. . As a result, it is possible to reduce the number and amount of communications that occur between the client and the server in accessing the file system.

(第2実施形態)
第1実施形態のコンピュータシステム1は、ベストモードの構成で説明したが、本発明はこれに限定されず、ロック機能を備えずに構成することも可能である。この場合には、図4(a)に示すクライアントライブラリ32内のロック制御部132や、図4(b)に示すサーバ21内のロック管理部122を除去する点が異なるだけで、同様に、簡易なコンピュータシステムを構成することができる。
(Second Embodiment)
Although thecomputer system 1 according to the first embodiment has been described with the configuration of the best mode, the present invention is not limited to this, and can be configured without a lock function. In this case, the only difference is that thelock control unit 132 in theclient library 32 shown in FIG. 4A and thelock management unit 122 in theserver 21 shown in FIG. A simple computer system can be configured.

(第3実施形態)
本発明は、イベント監視およびイベント通知機能を備えずに構成することも可能である。この場合には、図4(a)に示すクライアントライブラリ32内のイベント通知制御部133と、図4(b)に示すサーバ21内のイベント管理部124を除去する点が異なるだけで、同様に、簡易なコンピュータシステムを構成することができる。
(Third embodiment)
The present invention can also be configured without the event monitoring and event notification functions. In this case, the eventnotification control unit 133 in theclient library 32 shown in FIG. 4A is different from theevent management unit 124 in theserver 21 shown in FIG. A simple computer system can be configured.

(第4実施形態)
本発明は、キャッシュ機能を備えずに構成することも可能である。この場合には、図4(a)に示すクライアントライブラリ32内のキャッシュ情報登録部134と、図4(b)に示すサーバ21内のキャッシュ管理部123を除去する点が異なるだけで、同様に、簡易なコンピュータシステムを構成することができる。
なお、上記ロック機能、イベント監視およびイベント通知機能、キャッシュ機能のうちの任意の2つ以上を備えずに、さらに簡易なコンピュータシステムを構成することも可能である。
(Fourth embodiment)
The present invention can also be configured without a cache function. In this case, the cacheinformation registration unit 134 in theclient library 32 shown in FIG. 4A and thecache management unit 123 in theserver 21 shown in FIG. A simple computer system can be configured.
Note that a simpler computer system can be configured without providing any two or more of the lock function, event monitoring and event notification function, and cache function.

以上、本発明の各実施形態について説明したが、本発明はこれらに限定されるものではなく、その趣旨を変えない範囲で実施することができる。例えば、各実施形態では、C/S型のコンピュータシステムは、OS等により構築されたLAN上での分散コンピュータシステムとして構成したが、OSおよびコンピュータの種別を問わず、ネットワーク上に分散したコンピュータシステムに対して本発明を適用することができる。  As mentioned above, although each embodiment of this invention was described, this invention is not limited to these, It can implement in the range which does not change the meaning. For example, in each embodiment, the C / S type computer system is configured as a distributed computer system on a LAN constructed by an OS or the like, but the computer system is distributed on the network regardless of the type of the OS and the computer. The present invention can be applied to.

1 コンピュータシステム
2 サーバコンピュータ(サーバ装置)
3(3a,3b) クライアントコンピュータ(クライアント装置)
4 CPU
5 メモリ
6 ネットワークI/F(ネットワークインタフェース)
7 永続性記憶装置
8 ファイルデータ
9 サーバ側データ
10 クライアント側データ
11 ハンドル管理プログラム
12 ロック管理プログラム
13 キャッシュ管理プログラム
14 イベント管理プログラム
15 親子ハンドル管理プログラム
16 ロック制御管理プログラム
17 イベント通知制御プログラム
18 キャッシュ情報登録プログラム
21 サーバ(サーバプログラム)
22 バックエンドデータベース(データベース)
31 クライアントアプリケーション(アプリケーション部)
32 クライアントライブラリ(ライブラリ部)
51 キャッシュリスト
52 ハンドルリスト(クライアント側ハンドルリスト)
61 ハンドルリスト(サーバ側ハンドルリスト)
62 ファイルシステム
63 セッションリスト
64 ロック取得リスト
121 ハンドル管理部(ハンドル管理手段)
122 ロック管理部(ロック管理手段)
123 キャッシュ管理部(キャッシュ管理手段)
124 イベント管理部(イベント管理手段)
125 ファイルシステム管理部
126 セッション管理部
131 親子ハンドル管理部(親子ハンドル管理手段)
132 ロック制御部(ロック制御管理手段)
133 イベント通知制御部(イベント通知制御手段)
134 キャッシュ情報登録部(キャッシュ情報登録手段)
N ネットワーク
1Computer system 2 Server computer (server device)
3 (3a, 3b) Client computer (client device)
4 CPU
5Memory 6 Network I / F (Network Interface)
7 Persistent storage device 8File data 9Server side data 10Client side data 11Handle management program 12Lock management program 13Cache management program 14Event management program 15 Parent-childhandle management program 16 Lockcontrol management program 17 Eventnotification control program 18 Cacheinformation Registration program 21 Server (server program)
22 Backend database (database)
31 Client application (application part)
32 Client library (library part)
51Cache list 52 Handle list (client-side handle list)
61 Handle list (handle list on the server side)
62File system 63Session list 64Lock acquisition list 121 Handle management unit (handle management means)
122 Lock management unit (lock management means)
123 Cache management unit (cache management means)
124 Event management section (event management means)
125File system manager 126Session manager 131 Parent-child handle manager (parent-child handle manager)
132 Lock control unit (lock control management means)
133 Event notification control unit (event notification control means)
134 Cache information registration unit (cache information registration means)
N network

Claims (14)

Translated fromJapanese
ファイルおよびディレクトリを管理するファイルシステムを備えるサーバ装置と、前記ファイルシステムが管理するファイルまたはディレクトリを、ハンドルを用いて操作するクライアント装置とを備えるコンピュータシステムにおける前記クライアント装置であって、
前記ファイルシステムに対する所定操作の実行を要求するアプリケーション部と、
前記アプリケーション部による要求を中継して前記ファイルシステムにアクセスするライブラリ部と、を有し、
前記アプリケーション部は、前記ライブラリ部に対して、前記ファイルシステム上のファイルまたはディレクトリの操作に対応するハンドルの作成を要求するハンドル作成依頼を作成し、
前記ライブラリ部は、
前記アプリケーション部から1回目の前記ハンドル作成依頼を受領したときに、前記サーバ装置とのセッションを通じて、前記ハンドルとして前記ファイルシステム上のファイルまたはディレクトリを特定し操作できる親ハンドルを前記サーバ装置から取得し、前記親ハンドルに従属して前記セッションにおいて有効な子ハンドルを生成し、生成した前記子ハンドルを前記アプリケーション部に返却し、前記セッション中に前記アプリケーション部から前記ファイルと同一のファイルに対して、2回目以降のハンドル作成依頼を受領したときに、前記同一のファイルに対応して前記親ハンドルに関連付けて新たに生成した子ハンドルを返却し、前記親ハンドルの識別情報と生成した前記子ハンドルの識別情報とを関連付けたハンドルリストを生成し、記憶手段に格納しておく親子ハンドル管理手段を備えることを特徴とするクライアント装置。
A client device in a computer system comprising a server device comprising a file system for managing files and directories, and a client device for operating a file or directory managed by the file system using a handle,
An application unit that requests execution of a predetermined operation on the file system;
A library unit that relays a request by the application unit and accesses the file system,
The application unit creates a handle creation request for requesting the library unit to create a handle corresponding to a file or directory operation on the file system,
The library part is
When the first handle creation request is received from the application unit, a parent handle capable of specifying and operating a file or directory on the file system as the handle is acquired from the server device through the session with the server device. , Subordinate to the parent handle to generate a valid child handle in the session, return the generated child handle to the application unit, and from the application unit to the same file as the file during the session, When the second or subsequent handle creation request is received, a newly generated child handle associated with the parent handle corresponding to the same file is returned, and the identification information of the parent handle and the generated child handle are returned. Handle list associated with identification information Form, the client apparatus characterized by comprising a parent handle management unit stored in the storage means.
前記アプリケーション部は、前記ライブラリ部に対して、前記サーバ装置の前記ファイルシステムで管理されたファイルの内容を取得することを要求するファイル内容取得依頼を作成し、
前記ライブラリ部は、
前記アプリケーション部から前記子ハンドルを用いた1回目の前記ファイル内容取得依頼を受領したときに、前記親ハンドルと共に前記ファイル取得依頼を前記サーバ装置に送信することで、前記サーバ装置から前記ファイルの内容を取得し、取得した前記ファイルの内容を前記親ハンドルに関連付けて記憶手段にキャッシュ情報として登録し、前記セッション中に前記アプリケーション部から、前記1回目のファイル取得依頼と同一のファイルに対して、取得した前記ファイルの内容に関連付けた前記親ハンドルに従属する子ハンドルを用いた2回目以降のファイル内容取得依頼を受領したときに、登録されている前記キャッシュ情報を返却するキャッシュ情報登録手段をさらに備えることを特徴とする請求項1に記載のクライアント装置。
The application unit creates a file content acquisition request for requesting the library unit to acquire the content of a file managed by the file system of the server device,
The library part is
When the first file content acquisition request using the child handle is received from the application unit, the file acquisition request is transmitted to the server device together with the parent handle, whereby the file content is transmitted from the server device. And the contents of the acquired file are registered as cache information in the storage means in association with the parent handle, and from the application unit during the session, for the same file as the first file acquisition request, A cache information registration means for returning the registered cache information when receiving a second or subsequent file content acquisition request using a child handle subordinate to the parent handle associated with the acquired file content; The client device according to claim 1, further comprising:
前記アプリケーション部は、前記サーバ装置で管理するファイルおよびディレクトリの少なくとも1つの状態の変化を示すイベントが発生した場合にイベント発生通知を受け取るためのイベント監視登録依頼を子ハンドル毎に作成する際に、監視するイベント種別とイベント発生通知時の処理を示すコールバック処理の情報を前記ライブラリ部に登録し、
前記ライブラリ部の前記親子ハンドル管理手段は、前記ハンドルリストにおいて、前記イベント監視登録依頼で用いられる子ハンドル毎に前記コールバック処理の情報を記憶し、
前記ライブラリ部は、
前記アプリケーション部から、前記イベント監視登録依頼を前記子ハンドルと共に受領したときに、前記子ハンドル毎に記憶されている前記コールバック処理の情報を集約して前記親ハンドルの識別情報および当該イベント監視登録依頼と共に前記サーバ装置に送信し、前記サーバ装置から、前記集約したコールバック処理の情報を前記イベント発生通知として受信したときに、受信した前記コールバック処理の情報における集約を解除することで、当該イベント発生通知に該当する子ハンドルを探索し、前記探索された子ハンドルに付与されているイベント発生通知時の処理を実行するイベント通知制御手段をさらに備える、
ことを特徴とする請求項1または請求項2に記載のクライアント装置。
The application unit creates an event monitoring registration request for receiving an event occurrence notification when an event indicating a change in at least one state of a file and a directory managed by the server device occurs for each child handle. Register the callback processing information indicating the event type to be monitored and the processing at the time of event occurrence notification in the library section,
The parent-child handle management means of the library unit stores information on the callback processing for each child handle used in the event monitoring registration request in the handle list,
The library part is
When the event monitoring registration request is received from the application unit together with the child handle, the callback processing information stored for each child handle is aggregated to identify the parent handle identification information and the event monitoring registration. When the request is transmitted to the server device together with the request and the aggregated callback processing information is received as the event occurrence notification from the server device, the aggregation in the received callback processing information is canceled, It further comprises event notification control means for searching for a child handle corresponding to the event occurrence notification and executing processing at the event occurrence notification given to the searched child handle.
The client device according to claim 1, wherein the client device is a device.
前記アプリケーション部は、前記コールバック処理の情報として、監視するイベント種別とイベント発生通知時の処理の有無を管理するマスク値を前記ライブラリ部に登録し、
前記ライブラリ部の前記親子ハンドル管理手段は、前記子ハンドルに対して、前記コールバック処理の情報であるイベント毎の前記マスク値の集合をイベントマスクとして付与して記憶し、
前記ライブラリ部のイベント通知制御手段は、
前記イベント監視登録依頼と共に受領した前記子ハンドルのイベントマスク値と、前記親ハンドルのイベントマスク値との論理和を計算することで前記コールバック処理の情報を集約し、この計算結果で前記親ハンドルのイベントマスク値を更新し、前記更新により生成された新イベントマスクの登録依頼を、前記イベント監視登録依頼と共に前記サーバ装置に送信し、前記サーバ装置から、前記イベント発生通知として前記新イベントマスクを受信したときに、前記ハンドルリストに記載された前記子ハンドルのイベントマスク値と前記受信した新イベントマスクのマスク値との論理積を計算することで、受信した前記新イベントマスクにおける前記子ハンドルのイベントマスク値の集約を解除することを特徴とする請求項3に記載のクライアント装置。
The application unit registers, as the callback processing information, a mask value for managing the event type to be monitored and the presence / absence of processing at the event occurrence notification in the library unit,
The parent-child handle management means of the library unit assigns and stores a set of mask values for each event, which is information of the callback processing, to the child handle as an event mask,
The event notification control means of the library unit includes:
The callback process information is aggregated by calculating a logical sum of the event mask value of the child handle received together with the event monitoring registration request and the event mask value of the parent handle, and the parent handle is calculated based on the calculation result. The event mask value is updated, a new event mask registration request generated by the update is transmitted to the server device together with the event monitoring registration request, and the server device transmits the new event mask as the event occurrence notification. When received, by calculating the logical product of the event mask value of the child handle described in the handle list and the mask value of the received new event mask, the child handle in the received new event mask is calculated. The cluster according to claim 3, wherein the event mask value aggregation is canceled. Ant apparatus.
前記アプリケーション部は、前記ライブラリ部に対して、前記セッションにおいて前記サーバ装置に記憶された前記ファイルシステムで管理されたファイルまたはディレクトリに対するロックを前記子ハンドルが取得することを要求するロック取得依頼を作成し、
前記ライブラリ部の前記親子ハンドル管理手段は、前記ハンドルリストにて前記子ハンドルのロック取得状況の情報を前記子ハンドルに関連付けて記憶し、
前記ライブラリ部は、
前記アプリケーション部から、前記ファイルシステムで管理された所定のファイルまたはディレクトリに対する前記ロック取得依頼を前記子ハンドルと共に受領したときに、前記受領した子ハンドルのロック取得状況の情報が前記ハンドルリストに記憶されている場合に当該ロック取得状況の情報を返却し、一方、記憶されていない場合に、当該子ハンドルの前記ロック取得依頼を前記親ハンドルの識別情報と共に前記サーバ装置に送信し、前記サーバ装置から、サーバ側にて当該子ハンドルのロック取得状況の情報が登録されたことを示す応答を受信したときに、受信した前記応答で示されるロック取得状況の情報を、当該子ハンドルのロック取得状況の情報として前記ハンドルリストに登録するロック制御管理手段をさらに備える、
ことを特徴とする請求項1乃至請求項4のいずれか一項に記載のクライアント装置。
The application unit creates a lock acquisition request for requesting the child handle to acquire a lock on the file or directory managed by the file system stored in the server device in the session in the library unit. And
The parent-child handle management means of the library unit stores information on the lock acquisition status of the child handle in the handle list in association with the child handle,
The library part is
When the lock acquisition request for the predetermined file or directory managed by the file system is received from the application unit together with the child handle, information on the lock acquisition status of the received child handle is stored in the handle list. If it is not stored, the lock acquisition request of the child handle is transmitted to the server device together with the identification information of the parent handle. When the server side receives a response indicating that the lock acquisition status information of the child handle has been registered, the lock acquisition status information indicated in the received response is changed to the lock acquisition status information of the child handle. Lock control management means for registering in the handle list as information,
The client device according to claim 1, wherein the client device is a device.
ファイルおよびディレクトリを管理するファイルシステムを備えるサーバ装置と、前記ファイルシステムが管理するファイルまたはディレクトリを、親ハンドルに従属する子ハンドルを用いて操作するアプリケーション部を備えるクライアント装置とを備えるコンピュータシステムにおける前記サーバ装置であって、
前記クライアント装置とのセッションにより、前記アプリケーション部から、前記ファイルシステム上のファイルまたはディレクトリの操作に対応する前記親ハンドルの作成を要求するハンドル作成依頼を受信し、前記親ハンドルを生成し、生成した前記親ハンドルを当該クライアント装置に返却し、当該クライアント装置のアプリケーション部と生成した前記親ハンドルの識別情報とを関連付けたハンドルリストを生成し、記憶手段に格納しておくハンドル管理手段を備えることを特徴とするサーバ装置。
A computer system comprising: a server device comprising a file system for managing files and directories; and a client device comprising an application unit for operating a file or directory managed by the file system using a child handle subordinate to a parent handle. A server device,
Received a handle creation request for requesting creation of the parent handle corresponding to the operation of the file or directory on the file system from the application unit through a session with the client device, and generated and generated the parent handle A handle management unit that returns the parent handle to the client device, generates a handle list that associates the application unit of the client device with the generated identification information of the parent handle, and stores the handle list in a storage unit; A server device as a feature.
前記セッションにより、前記アプリケーション部から、前記ファイルシステムで管理されたファイルの内容を取得することを要求するファイル取得依頼を、当該アプリケーション部と前記ファイルに対応した前記親ハンドルと共に受信し、当該ファイルの内容を当該クライアント装置に返却し、前記ハンドルリストにて、返却した前記ファイルの内容が当該クライアント装置にキャッシュされていることを示すキャッシュ状態情報を、前記受信した親ハンドルの識別情報と関連付けて登録するキャッシュ管理手段をさらに備えることを特徴とする請求項6に記載のサーバ装置。  Through the session, a file acquisition request for acquiring the contents of the file managed by the file system is received from the application unit together with the parent handle corresponding to the application unit and the file, and the file Return the content to the client device, and register the cache status information indicating that the content of the returned file is cached in the client device in the handle list in association with the received identification information of the parent handle. The server apparatus according to claim 6, further comprising: a cache management unit that performs processing. 前記セッションにより、前記アプリケーション部から、当該サーバ装置で管理するファイルおよびディレクトリの少なくとも1つの状態の変化を示すイベントが発生した場合にイベント発生通知を受け取るためのイベント監視登録依頼および前記親ハンドルの識別情報を、監視するイベント種別とイベント発生通知時の処理を示すコールバック処理の情報と共に受信したときに、前記ハンドルリストにて、受信した前記コールバック処理の情報を前記親ハンドルの識別情報と関連付けて登録し、
前記イベントが発生したことを検知したときに、当該発生したイベントを通知するために登録されている前記親ハンドルを前記ハンドルリストからすべて抽出し、抽出された前記親ハンドルに基づいて、該当するクライアント装置のアプリケーション部に対してセッションを通じて、当該親ハンドルに関連付けて登録されている前記コールバック処理の情報を送信するイベント管理手段をさらに備える、
ことを特徴とする請求項6または請求項7に記載のサーバ装置。
Event monitoring registration request for receiving an event occurrence notification and identification of the parent handle when an event indicating a change in the state of at least one of files and directories managed by the server device is generated from the application unit by the session When the information is received together with the event type to be monitored and the callback processing information indicating the processing at the time of event occurrence notification, the received callback processing information is associated with the identification information of the parent handle in the handle list. Register,
When it is detected that the event has occurred, all the parent handles registered for notifying the event that has occurred are extracted from the handle list, and the corresponding client is extracted based on the extracted parent handle. Event management means for transmitting the callback process information registered in association with the parent handle through the session to the application unit of the apparatus,
The server device according to claim 6 or 7, wherein
前記イベント管理手段は、
前記コールバック処理の情報として、イベント発生通知時の処理の有無を管理するイベント毎のマスク値の集合であるイベントマスクを前記親ハンドルの識別情報と共に受信したときに、前記ハンドルリストにて、前記受信したイベントマスクを前記親ハンドルの識別情報と関連付けて登録し、
前記イベントが発生したことを検知したときに、前記コールバック処理の情報として、前記親ハンドルの識別情報に関連付けて登録されているイベントマスクを送信することを特徴とする請求項8に記載のサーバ装置。
The event management means includes:
As the callback processing information, when an event mask that is a set of mask values for each event for managing the presence or absence of processing at the time of event occurrence notification is received together with the identification information of the parent handle, in the handle list, Register the received event mask in association with the identification information of the parent handle,
9. The server according to claim 8, wherein when detecting that the event has occurred, an event mask registered in association with the identification information of the parent handle is transmitted as information of the callback processing. apparatus.
前記記憶手段は、前記親ハンドルに従属して前記クライアント装置で生成され前記セッションにおいて有効な子ハンドルの識別情報と、前記セッションにおいて当該サーバ装置に記憶された前記ファイルシステムで管理されたファイルまたはディレクトリに対するロックを前記子ハンドルが取得していることを表す情報との対応関係を示すロック取得リストをさらに記憶し、
前記セッションにより、前記アプリケーション部から、当該アプリケーション部に対応した前記親ハンドルと前記子ハンドルと共に、当該子ハンドルが前記ファイルシステムで管理された所定のファイルまたはディレクトリに対する前記ロックを取得することを要求するロック取得依頼を受信したときに、受信した前記ロック取得依頼にて対象とするファイルまたはディレクトリが別のクライアント装置によってロック取得済みであることを表す情報が前記ロック取得リストに記憶されているか否かを判別し、
当該情報が前記ロック取得リストに記憶されている場合には、前記別のクライアント装置によるロックが解除されるまで、受信した前記子ハンドルをロック待ち行列の記憶手段に登録して管理し、一方、当該情報が前記ロック取得リストに記憶されていない場合には、受信した前記子ハンドルを前記ロック取得リストに登録し、前記判別の結果に応じて、受信した前記子ハンドルのロック取得状況の情報を前記クライアント装置のアプリケーション部に返却するロック管理手段をさらに備える、
ことを特徴とする請求項6乃至請求項9のいずれか一項に記載のサーバ装置。
The storage means includes an identification information of a child handle generated in the client device subordinate to the parent handle and valid in the session, and a file or directory managed by the file system stored in the server device in the session Further storing a lock acquisition list indicating a correspondence relationship with information indicating that the child handle has acquired a lock for
The session requests the application unit to acquire the lock on a predetermined file or directory managed by the file system together with the parent handle and the child handle corresponding to the application unit. Whether or not information indicating that the target file or directory in the received lock acquisition request has been acquired by another client device when the lock acquisition request is received is stored in the lock acquisition list Determine
If the information is stored in the lock acquisition list, the received child handle is registered and managed in the storage means of the lock queue until the lock by the other client device is released, If the information is not stored in the lock acquisition list, the received child handle is registered in the lock acquisition list, and the received information on the lock acquisition status of the child handle is stored according to the determination result. A lock management means for returning to the application unit of the client device;
The server device according to any one of claims 6 to 9, wherein:
請求項1に記載のクライアント装置と、請求項6に記載のサーバ装置とを備えることを特徴とするコンピュータシステム。  A computer system comprising the client device according to claim 1 and the server device according to claim 6. ファイルおよびディレクトリを管理するファイルシステムを備えるサーバ装置と、前記ファイルシステムが管理するファイルまたはディレクトリを、ハンドルを用いて操作するクライアント装置とを備え、前記クライアント装置が、前記ファイルシステムに対する所定操作の実行を要求するアプリケーション部と、前記アプリケーション部による要求を中継して前記ファイルシステムにアクセスするライブラリ部とを有しているコンピュータシステムにおいて前記ファイルシステムにアクセスするファイルシステムアクセス方法であって、
前記クライアント装置の前記ライブラリ部は、
前記アプリケーション部による前記ファイルシステム上のファイルまたはディレクトリの操作に対応する子ハンドルを生成する際に、当該ファイルに対する1以上の前記子ハンドルを集約した親ハンドルがクライアント側ハンドルリストに登録されているか否かを判別する親ハンドル登録判別ステップと、
前記親ハンドルが登録されていない場合に、前記親ハンドルの作成を要求するハンドル作成依頼を前記サーバ装置に送信するハンドル作成依頼送信ステップとを実行し、
前記サーバ装置は、
前記ハンドル作成依頼に基づいて、前記親ハンドルを生成し、生成した前記親ハンドルを当該クライアント装置に返却すると共に、当該クライアント装置の前記アプリケーション部と生成した前記親ハンドルの識別情報とを関連付けたサーバ側ハンドルリストを生成し、記憶手段に格納する親ハンドル生成ステップを実行し、
前記クライアント装置の前記ライブラリ部は、
前記サーバ装置から受信した親ハンドルの識別情報を前記クライアント側ハンドルリストに記憶する親ハンドル情報格納ステップと、
前記親ハンドル登録判別ステップにて前記親ハンドルが登録されている場合、または、前記親ハンドル情報格納ステップにて前記親ハンドルの識別情報を記憶した場合に、当該親ハンドルに従属する子ハンドルを生成し、生成した前記子ハンドルの識別情報と当該親ハンドルの識別情報とを関連付けたハンドルリストを生成し、記憶手段に格納する子ハンドル生成ステップとを実行する、
ことを特徴とするファイルシステムアクセス方法。
A server apparatus including a file system that manages files and directories, and a client apparatus that operates a file or directory managed by the file system using a handle, and the client apparatus executes a predetermined operation on the file system. A file system access method for accessing the file system in a computer system having an application unit for requesting and a library unit for relaying a request by the application unit to access the file system,
The library unit of the client device is
Whether or not a parent handle obtained by aggregating one or more child handles for the file is registered in the client-side handle list when generating a child handle corresponding to a file or directory operation on the file system by the application unit A parent handle registration determination step for determining whether or not
When the parent handle is not registered, a handle creation request transmission step for transmitting a handle creation request for requesting creation of the parent handle to the server device,
The server device
A server that generates the parent handle based on the handle creation request, returns the generated parent handle to the client device, and associates the application unit of the client device with the generated identification information of the parent handle Execute a parent handle generation step of generating a side handle list and storing it in the storage means;
The library unit of the client device is
A parent handle information storing step of storing identification information of the parent handle received from the server device in the client-side handle list;
When the parent handle is registered in the parent handle registration determination step, or when the parent handle identification information is stored in the parent handle information storage step, a child handle subordinate to the parent handle is generated. And generating a handle list in which the generated identification information of the child handle and the identification information of the parent handle are associated with each other, and executing a child handle generation step of storing in the storage unit.
A file system access method characterized by the above.
請求項1乃至請求項5のいずれか一項に記載のクライアント装置を構成する各手段としてコンピュータを機能させるためのクライアントプログラム。  6. A client program for causing a computer to function as each means constituting the client device according to claim 1. 請求項6乃至請求項10のいずれか一項に記載のサーバ装置を構成する各手段としてコンピュータを機能させるためのサーバプログラム。  The server program for functioning a computer as each means which comprises the server apparatus as described in any one of Claims 6 thru | or 10.
JP2009147852A2009-06-222009-06-22 Client device, server device, computer system, file system access method, client program, and server programExpired - Fee RelatedJP5395532B2 (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
JP2009147852AJP5395532B2 (en)2009-06-222009-06-22 Client device, server device, computer system, file system access method, client program, and server program

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
JP2009147852AJP5395532B2 (en)2009-06-222009-06-22 Client device, server device, computer system, file system access method, client program, and server program

Publications (2)

Publication NumberPublication Date
JP2011003147Atrue JP2011003147A (en)2011-01-06
JP5395532B2 JP5395532B2 (en)2014-01-22

Family

ID=43561030

Family Applications (1)

Application NumberTitlePriority DateFiling Date
JP2009147852AExpired - Fee RelatedJP5395532B2 (en)2009-06-222009-06-22 Client device, server device, computer system, file system access method, client program, and server program

Country Status (1)

CountryLink
JP (1)JP5395532B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
KR102593008B1 (en)*2019-08-022023-10-23한국전자통신연구원Method and apparatus for distributed smart factory operation using opc ua

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JPH0816444A (en)*1994-06-241996-01-19Internatl Business Mach Corp <Ibm>Client server computer system, its client computer, server computer and object update method
JP2000137689A (en)*1998-11-042000-05-16Hitachi Ltd Shared data cache processing method, device for executing the same, and medium recording the processing program
JP2003233520A (en)*2002-02-072003-08-22Fujitsu Ltd File control unit for file resources on a network
JP2005018787A (en)*2003-06-252005-01-20Microsoft CorpRegistration and extraction of database table change information usable in invalidating cache entry
JP2007293634A (en)*2006-04-252007-11-08Nec CorpFile sharing method and file sharing system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JPH0816444A (en)*1994-06-241996-01-19Internatl Business Mach Corp <Ibm>Client server computer system, its client computer, server computer and object update method
JP2000137689A (en)*1998-11-042000-05-16Hitachi Ltd Shared data cache processing method, device for executing the same, and medium recording the processing program
JP2003233520A (en)*2002-02-072003-08-22Fujitsu Ltd File control unit for file resources on a network
JP2005018787A (en)*2003-06-252005-01-20Microsoft CorpRegistration and extraction of database table change information usable in invalidating cache entry
JP2007293634A (en)*2006-04-252007-11-08Nec CorpFile sharing method and file sharing system

Also Published As

Publication numberPublication date
JP5395532B2 (en)2014-01-22

Similar Documents

PublicationPublication DateTitle
US11641397B2 (en)File service using a shared file access-rest interface
US10534681B2 (en)Clustered filesystems for mix of trusted and untrusted nodes
JP5695324B2 (en) Method, system, and computer readable recording medium for determining a major group in a split brain situation
US9275058B2 (en)Relocation of metadata server with outstanding DMAPI requests
US9558194B1 (en)Scalable object store
JP3197789B2 (en) Method and system for requesting manipulation of a directory in a distributed file system
JP7389793B2 (en) Methods, devices, and systems for real-time checking of data consistency in distributed heterogeneous storage systems
US20030028514A1 (en)Extended attribute caching in clustered filesystem
JP5541149B2 (en) Snapshot collection program, server, and snapshot collection method
US7366742B1 (en)System and method for distributed discovery and management of frozen images in a storage environment
US20140236913A1 (en)Accelerating Distributed Transactions on Key-Value Stores Through Dynamic Lock Localization
US20170242761A1 (en)Fault tolerant listener registration in the presence of node crashes in a data grid
US20100162035A1 (en)Multipurpose Storage System Based Upon a Distributed Hashing Mechanism with Transactional Support and Failover Capability
WO2018059032A1 (en)Data migration method for virtual node, and virtual node
CN107710164B (en) Disaster Recovery as a Service
US20150213011A1 (en)Method and system for handling lock state information at storage system nodes
US8788474B2 (en)Inode event notification for cluster file systems
US10558373B1 (en)Scalable index store
JP2006503347A (en) Asynchronous messaging over storage area networks
JP5395532B2 (en) Client device, server device, computer system, file system access method, client program, and server program
JP6697101B2 (en) Information processing system
Zhou et al.A tamper-resistant and decentralized service for cloud storage based on layered blockchain
JP6044363B2 (en) Computer, NAS access method and NAS access program

Legal Events

DateCodeTitleDescription
RD02Notification of acceptance of power of attorney

Free format text:JAPANESE INTERMEDIATE CODE: A7422

Effective date:20110819

A621Written request for application examination

Free format text:JAPANESE INTERMEDIATE CODE: A621

Effective date:20110920

RD04Notification of resignation of power of attorney

Free format text:JAPANESE INTERMEDIATE CODE: A7424

Effective date:20130201

A977Report on retrieval

Free format text:JAPANESE INTERMEDIATE CODE: A971007

Effective date:20131002

TRDDDecision of grant or rejection written
A01Written decision to grant a patent or to grant a registration (utility model)

Free format text:JAPANESE INTERMEDIATE CODE: A01

Effective date:20131015

A61First payment of annual fees (during grant procedure)

Free format text:JAPANESE INTERMEDIATE CODE: A61

Effective date:20131018

R150Certificate of patent or registration of utility model

Ref document number:5395532

Country of ref document:JP

Free format text:JAPANESE INTERMEDIATE CODE: R150

Free format text:JAPANESE INTERMEDIATE CODE: R150

S531Written request for registration of change of domicile

Free format text:JAPANESE INTERMEDIATE CODE: R313531

R350Written notification of registration of transfer

Free format text:JAPANESE INTERMEDIATE CODE: R350

LAPSCancellation because of no payment of annual fees

[8]ページ先頭

©2009-2025 Movatter.jp