JP2015197810A - Server device, information processing method and program - Google Patents
Server device, information processing method and program Download PDFInfo
- Publication number
- JP2015197810A JP2015197810A JP2014075668A JP2014075668A JP2015197810A JP 2015197810 A JP2015197810 A JP 2015197810A JP 2014075668 A JP2014075668 A JP 2014075668A JP 2014075668 A JP2014075668 A JP 2014075668A JP 2015197810 A JP2015197810 A JP 2015197810A
- Authority
- JP
- Japan
- Prior art keywords
- folder
- deletion
- instruction
- access
- received
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本発明は、サーバー装置、情報処理方法及びプログラムに関する。 The present invention relates to a server device, an information processing method, and a program.
従来、電子ファイルを管理するファイル管理の仕組みとして、ファイルの整理・管理をフォルダやディレクトリと呼ばれる階層構造(ツリー構造)で行う仕組みが用いられている。このような仕組みにおいて、フォルダ内に多くのファイルが含まれているフォルダをファイル管理システム上から削除する場合、処理時間がかかるという問題がある。処理時間がかかる理由として、削除しようとしているフォルダ内のファイルを別の処理が操作している場合、そのファイルが排他的にロックされているため、処理の終了を待って削除を行う必要があるためである。この対策として、特許文献1のように、ロックされているファイルは削除順番を最後にするという処理を繰り返して時間の短縮を行うものがある。 Conventionally, as a file management mechanism for managing electronic files, a mechanism for organizing and managing files in a hierarchical structure (tree structure) called a folder or directory is used. In such a mechanism, there is a problem that processing time is required when a folder containing many files is deleted from the file management system. The reason for the processing time is that if another process is operating the file in the folder you are trying to delete, it must be deleted after the process is completed because the file is locked exclusively. Because. As a countermeasure, there is a technique such as Patent Document 1 that shortens the time by repeating the process of ending the deletion order of locked files.
一方、近年Web技術の発展に伴い1つのWebサービスのみで完結するのではなく、複数のWebサービスが連携して機能を提供するシステム連携が行われている。複数のWebサービスの連携を簡易化するために、WebサービスではRepresentational State Transfer(REST)と呼ばれる簡易なHTTPインタフェースを採用したシステムが増えている。このRESTを用いたWebサービスでは単一の呼び出し単位で必要な全ての情報を含み、Webサービスを提供するWebサーバーはそのセッション状態を記憶しない(状態管理を行わない)という特徴がある。 On the other hand, with the development of Web technology in recent years, system cooperation in which a plurality of Web services provide functions in cooperation with each other is performed instead of being completed with only one Web service. In order to simplify the cooperation of a plurality of Web services, an increasing number of Web services employ a simple HTTP interface called Representational State Transfer (REST). The Web service using the REST includes all necessary information in a single call unit, and the Web server that provides the Web service has a feature that the session state is not stored (state management is not performed).
しかしながら、RESTを用いたWebサービスをファイル管理システムで提供する場合、次のような問題がある。フォルダの削除をWebサービスからの1回の呼び出しで行えるようにした場合を想定する。特許文献のように処理できるものから処理を行ったとしてもWebサービスを呼び出す側はファイルをロックしている他処理の処理時間やロックを行っている他処理の数の予測はできないため、予めそのフォルダの削除時間の予測をすることができない。そのため、Webサービスを呼び出す側は通信のタイムアウト時間の設定が難しいという問題がある。その対策として、ファイル管理システム側が処理の受け付けを行うWebサービスの呼び出しと、処理結果を応答するWebサービスの呼び出しと、を別に提供する方法もある。しかし、結果としてWebサービスを呼び出す側は結果を知るために、短時間で終わるはずの少量のファイルのフォルダ削除であったとしても、削除処理の依頼と複数回の結果取得とを別々に行うことになる。その結果、Webサービスを呼び出す側の処理が複雑になる。 However, when a Web service using REST is provided by a file management system, there are the following problems. Assume that the folder can be deleted by a single call from the Web service. Even if processing is performed from what can be processed as in patent literature, the side that calls the Web service cannot predict the processing time of other processing that locks the file or the number of other processing that locks, so that Unable to predict folder deletion time. For this reason, there is a problem that it is difficult for the side calling the Web service to set the communication timeout time. As a countermeasure, there is a method in which the file management system side separately provides a web service call for accepting processing and a web service call for responding to the processing result. However, as a result, in order to know the result, the caller of the Web service must perform the deletion processing request and obtain the results multiple times separately, even if it is a folder deletion of a small amount of files that should end in a short time. become. As a result, the processing on the side that calls the Web service becomes complicated.
そこで、本発明は、フォルダ階層構造によるファイル管理を行うサーバー装置であって、フォルダの削除の指示を受信する受信手段と、前記受信手段によりフォルダの削除の指示が受信された場合、前記削除の指示を受け取ったフォルダの最下層のフォルダへのアクセスを制限し、前記最下層のフォルダへのアクセスの制限が成功した場合は、前記最下層のフォルダの削除を実行し、前記最下層のフォルダの削除が成功した場合、次の最下層のフォルダへのアクセスを制限し、前記最下層のフォルダへのアクセスの制限が成功しなかった場合は、前記最下層のフォルダの削除は実行せず、次の最下層のフォルダへの処理を繰り返し、前記削除の指示を受け取ったフォルダの削除処理を実行する削除手段と、を有する。 Accordingly, the present invention provides a server device that performs file management based on a folder hierarchical structure, and includes a receiving unit that receives a folder deletion instruction, and a folder deletion instruction when the reception unit receives a folder deletion instruction. The access to the lowermost folder of the folder that has received the instruction is restricted, and when the access to the lowermost folder is successfully restricted, the lowermost folder is deleted, and the lowermost folder is deleted. If the deletion is successful, the access to the next lowest folder is restricted. If the access restriction to the lowest folder is not successful, the deletion of the lowest folder is not executed, and the next Delete means for repeatedly executing the process of deleting the folder in the lowest layer and executing the delete process of the folder that has received the delete instruction.
本発明によれば、Webサービスを呼び出す側の処理を複雑にせずにフォルダの削除処理を行うことができる。 According to the present invention, it is possible to delete a folder without complicating the processing on the side that calls the Web service.
以下、本発明の実施形態について図面に基づいて説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
<第1の実施形態>
第1の実施形態について説明する。実施形態では、文書管理システムの例にフォルダ削除を行う処理を説明する。
<First Embodiment>
A first embodiment will be described. In the embodiment, a process for deleting a folder will be described as an example of a document management system.
(システム構成)
図1は、文書管理システムのシステム構成の一例を示す図である。図1に示すように、文書管理システムは、ストレージサーバー110と、文書管理Webサーバー120と、PC端末130と、を含む。ストレージサーバー110と、文書管理Webサーバー120と、PC端末130と、はLAN100を介して接続されている。
ストレージサーバー110は、文書管理Webサーバー120からのHTTPプロトコルによる指示でファイルやフォルダを管理するためのバックエンドサーバーであり、フォルダ階層構造によるファイル管理を行う。文書管理Webサーバー120は、電子文書の管理のためのユーザーインタフェースを構成するためのHTMLやJavaScript(登録商標)をPC端末130に対して提供するためのフロントエンドサーバーである。また、文書管理Webサーバー120は、PC端末130からの要求を元に文書のデータをファイルとして読み書きする際には、ストレージサーバー110の提供するWebサービスを利用してファイルの入出力を行う。つまり、ストレージサーバー110は、ファイル管理システムの一例である。文書管理Webサーバー120は、ファイル管理システムに係るWebサービスを呼び出す側の一例である。PC端末130は、システムを利用するユーザーが、文書を作成したり、文書を閲覧したりするための端末装置である。本実施形態では、PC端末130は、文書管理Webサーバー120と通信するWebブラウザーをアプリケーションとして実行しているものとする。但し、本実施形態におけるシステムにおいては、これらの構成機器の数に限られることはない。また、ネットワーク構成に関してもLANではなくインターネット環境でもよい。
(System configuration)
FIG. 1 is a diagram illustrating an example of a system configuration of a document management system. As shown in FIG. 1, the document management system includes a
The
(ハードウェア構成)
図2は、ストレージサーバー110のハードウェア構成の一例を示す図である。
図2に示される様に、ストレージサーバー110内では、CPU201、RAM202、ROM203、入力装置204、ネットワークI/F205、HDD206、表示装置207がシステムバス208を介して互いに通信可能に接続されている。
ROM203或いはHDD206には、オペレーティングシステムやアプリケーション等のプログラムが格納されている。CPU201は、中央処理装置であり、前記プログラムを必要に応じてROM203或いはHDD206からRAM202上へ読み出して実行する。このことで、ストレージサーバー110のソフトウェア構成及び後述するフローチャートの処理が実現される。また、CPU201は、ネットワークI/F205を介して接続されているネットワーク上の他の装置との通信も制御する。
また、文書管理Webサーバー120、PC端末130もストレージサーバー110と同様のハードウェア構成を有する。即ち、各装置のCPUが各装置のHDD等に記憶されているプログラムに基づいて処理を実行することによって各装置の機能が実現される。
(Hardware configuration)
FIG. 2 is a diagram illustrating an example of a hardware configuration of the
As shown in FIG. 2, in the
The
The document management Web server 120 and the
(ソフトウェア構成)
図3は、ストレージサーバー110のソフトウェア構成の一例を示す図である。
WEBサービス部301は、文書管理Webサーバー120からのHTTP要求を受け取り、処理結果を応答する。
ビジネスロジック部302は、ファイル操作に関する処理を制御すると共に、後述するフォルダ削除の処理を制御する。
非同期処理部303は、文書管理Webサーバー120からの要求・応答処理とは別に、制御処理を行うための処理部である。非同期処理部303は、定期的にデータベース部304に問い合わせを行い、処理すべき操作があればビジネスロジック部302に処理を行うための指示を行う。
データベース部304は、SQLにより制御が可能なリレーショナルデータベースを実現するための処理部である。本実施形態ではデータベース部304は、後述のテーブルを用いてファイルやフォルダ等のデータを管理する。
(Software configuration)
FIG. 3 is a diagram illustrating an example of a software configuration of the
The
The
The
The
(テーブル構成)
次に本実施形態において、フォルダとファイルとがどのようにデータベース部304内に管理されているかを説明する。
本実施形態のストレージサーバー110は、フォルダを階層化してツリーを構成しており、フォルダにはフォルダとファイルとをそれぞれ0個以上含むことができるように管理している。なお、特定のファイルやフォルダから見て上位階層のフォルダを親フォルダ、特定のフォルダから見て下位階層のフォルダを子フォルダと呼ぶ。また、ファイルやフォルダは文字列からなる名前を有しており、ストレージサーバー110が提供するWebサービスでは、その名前を用いてファイルやフォルダを指定することができる。
(Table structure)
Next, how folders and files are managed in the
The
図4は、データベース部304に保存されているフォルダデータのテーブルの一例を示す図である。列401から列405まではテーブルのカラムを示す。
フォルダID401の列は、ストレージサーバー110が管理しているフォルダをデータベース内で一意に識別するIDを示す。
親フォルダID402の列は、そのフォルダの上位階層のフォルダである親フォルダのフォルダIDを示す。親フォルダIDが空の場合はそのフォルダが最上位階層であるルートフォルダであることを示す。
フォルダパス403の列は、そのフォルダの名前であるフォルダ名をルートフォルダからの階層でつなげた絶対パスを示す。なお本実施形態では階層間の区切りを'/'のセパレータ文字で表現している。
サイズ404の列は、そのフォルダの直下に含まれるファイルのサイズの合計を示している。サイズ404の列の値は、後述のファイルデータのテーブルの中から、親フォルダIDがこのフォルダIDと一致するレコードを取得し、そのファイルサイズの合計をとったものと同じ値になる。文書管理Webサーバー120からフォルダのサイズを参照される度にストレージサーバー110が、ファイルサイズの計算を行うとパフォーマンスに影響が出る。そのため、ストレージサーバー110は、文書の登録や削除時にファイルのサイズの合計値を計算し、フォルダのレコードに保存しておくものとする。
更新日時405の列は、このフォルダ直下のフォルダやファイルが追加・削除された日時を示している。
行406〜行410は、フォルダデータの具体例である。行406は、フォルダ名が「FolA」であるルートフォルダを表現している。行407と行409とは、それぞれ「FolA」の子フォルダである「FolB」と「FolD」とを表現している。また行408は、「FolB」の子フォルダ「FolC」を表現している。また行410は「FolD」の子フォルダ「FolE」を表現している。
FIG. 4 is a diagram illustrating an example of a folder data table stored in the
The column of the
The column of
The column of the
The column of
The column of update date and
図5は、データベース部304に保存されているファイルデータのテーブルの一例を示す図である。列501から列505まではテーブルのカラムを示す。
ファイルID501の列は、ストレージサーバー110が管理しているファイルをデータベース内で一意に識別するIDを示す。
親フォルダID502の列は、そのファイルの親フォルダのフォルダIDを示す。CPU201は、このフォルダIDを持つフォルダテーブルのレコードを参照することにより、そのファイルがどのフォルダに含まれるのかが分かる。
ファイル名503の列は、そのファイルの名前を示す。
サイズ504の列は、そのファイルのサイズを示している。
更新日時505の列は、このファイルが追加・更新された日時を示している。
ファイルデータ506の列は、ファイルのバイナリデータを示している。
行507〜行511は、ファイルデータの具体例である。行507は、フォルダ「FolB」を親フォルダに持つファイル「FileA」を示している。その他も同様である。
FIG. 5 is a diagram illustrating an example of a file data table stored in the
The column of the
The
The column of the
The column of
The column of update date and
A column of the
図6は、削除中フォルダ管理テーブルの一例を示す図である。削除中フォルダ管理テーブルは、レコードとして削除処理中のフォルダを登録するものである。
削除中フォルダパス601の列は、フォルダ削除を実行中のフォルダパスを示している。なお、テーブルの設定として、列601の値は他のレコードと同じ値は入らないような指定がされている。そのため、2つのレコードに同じフォルダパスを設定することはできない。
開始日時602の列は、フォルダ削除が開始された時刻を示している。
行603と行604とは、レコードの具体例である。図6の例では「FolA」と「FolQ」の子フォルダ「FolR」との削除処理が実行中であることを示している。
ビジネスロジック部302は、ファイルの追加・更新・削除、フォルダの追加の際にこのテーブルを確認する。確認の結果、対象の上位フォルダや自身が登録されている場合、ビジネスロジック部302は、上位フォルダが削除中であるため、対象のファイル、フォルダが削除される可能性があると判断する。ビジネスロジック部302が可能性があると判断を行った場合、WEBサービス部301は、文書管理Webサーバー120に対して、HTTPのステータスコード「503」(サーバーやサービスが利用できないことを示すエラーを意味する)を応答する。
FIG. 6 is a diagram illustrating an example of the deleting folder management table. The deleting folder management table registers a folder being deleted as a record.
The column of the deleting
The column of the start date /
The
(フォルダ削除処理)
次に、本実施形態におけるフォルダ削除の情報処理について説明する。
まずシステムのユーザーが、PC端末130のWebブラウザーを用いて、文書管理Webサーバー120が提供するWebUIを表示させ、そのWebUIを用いてフォルダの削除処理を指示する。それを契機にして文書管理Webサーバー120は、ストレージサーバー110のWebサービスを呼び出す。本実施形態では文書管理Webサーバー120は、「http://{ストレージサーバー110のホスト名}/SS/Folder/FolA」のURLに対して、HTTPの「DELETE」メソッドを呼び出す。このことで文書管理Webサーバー120は、「FolA」の絶対パスのフォルダを削除することをストレージサーバー110に指示するものとする。なお「SS」はストレージサーバーのファイル管理アプリケーションであることを識別するための情報である。また、URL中の「Folder」はフォルダに関する処理であることを識別するための情報である。
文書管理Webサーバー120から呼び出されると、ストレージサーバー110のCPU201は、フォルダ削除処理を実行する。まず、WEBサービス部301は、受信したHTTPプロトコルによる通信を解析し、フォルダの削除指示であればビジネスロジック部302のフォルダ削除処理を呼び出す。
(Folder deletion process)
Next, folder deletion information processing according to the present embodiment will be described.
First, a user of the system uses a Web browser of the
When called from the document management Web server 120, the
図7は、ビジネスロジック部302が実行するフォルダ削除処理の一例を示すフローチャートである。
ステップS701では、ビジネスロジック部302は、フォルダ削除処理の開始時間を取得する。例えば、ビジネスロジック部302は、フォルダ削除処理が呼び出されたことを契機として、ストレージサーバー110のタイマー等より時間を取得し、フォルダ削除処理の開始時間とする。
ステップS702では、ビジネスロジック部302は、データベース部304に問い合わせて、フォルダテーブルからフォルダパスが削除対象のフォルダパスに一致するレコードを特定し、前記レコードからフォルダIDを取得する。
ステップS703では、ビジネスロジック部302は、削除中フォルダ管理テーブルに削除対象のフォルダパスを追加(又は記録)する。より具体的に説明すると、ビジネスロジック部302は、フォルダパスを追加する前に、削除中フォルダ管理テーブルに対象のフォルダパスの上位フォルダのフォルダパスが登録されていないか確認する。例えば、削除対象が「FolA/FolB/FolC」であれば、ビジネスロジック部302は、「FolA/FolB」と「FolA」とが削除中フォルダ管理テーブルに登録されていないことを確認する。登録されていれば上位フォルダが削除中であるため、ビジネスロジック部302は、レコード登録失敗と判断する。また前述のように、ビジネスロジック部302は、既にレコードに同じフォルダパスのものがある場合は登録できない。この場合、ビジネスロジック部302は、削除対象のフォルダが削除中であるためレコード登録失敗と判断する。ビジネスロジック部302は、登録失敗と判断した場合はステップS709に遷移し、そうでなければステップS704に遷移する。
FIG. 7 is a flowchart illustrating an example of folder deletion processing executed by the
In step S701, the
In step S702, the
In step S703, the
ステップS704では、ビジネスロジック部302は、削除対象フォルダとそこに含まれている子フォルダと子文書とを削除するための再帰処理を呼び出す。そして、ビジネスロジック部302は、再帰処理の結果として、削除成功、削除失敗を受け取る。再帰処理については後述する図8を用いて説明する。再帰処理の呼び出し時に、ビジネスロジック部302は、ステップS701で取得した処理開始時間とステップS702で取得したフォルダIDとを渡す。後述するように、再帰処理ではこの処理開始時間から、予め決められた時間以内に応答が返ってくるようになっている。
ステップS705では、ビジネスロジック部302は、ステップS703で登録した削除中フォルダ管理テーブルのレコードを削除する。
ステップS706では、ビジネスロジック部302は、ステップS704の結果を判断し、削除対象フォルダの削除が成功している場合は、ステップS707に遷移し、そうでなければステップS710に遷移する。
ステップS707では、ビジネスロジック部302は、削除対象フォルダの親フォルダの更新日時を更新する非同期処理のための情報をデータベース部304に登録する。より具体的に説明すると、ビジネスロジック部302は、非同期処理部303が参照するデータベース部304のテーブルに親フォルダのレコード更新のために必要な情報(フォルダパスと更新時刻と)を登録する。前述のように非同期処理部303は、定期的にデータベース部304を監視しており、登録された情報に基づき、親フォルダのレコード更新をフォルダの削除処理とは非同期に実行する。
In step S <b> 704, the
In step S705, the
In step S706, the
In step S707, the
ステップS708の処理は、フォルダの削除が成功した場合の処理である。ステップS708では、ビジネスロジック部302は、WEBサービス部301に削除成功を応答する。そしてWEBサービス部301は、呼び出し元の文書管理Webサーバー120にHTTPステータスコード「200」(成功を意味する)を応答する。
ステップS709の処理は、並行して動作しているフォルダ削除処理と重複した場合の処理である。ステップS709では、ビジネスロジック部302は、WEBサービス部301に一時的過負荷であることを応答する。そしてWEBサービス部301は、呼び出し元(要求元)の文書管理Webサーバー120にHTTPステータスコード「503」(サーバーやサービスが利用できないことを示すエラーを意味する)を応答する。
ステップS710の処理は、フォルダ削除処理中に他処理との重複によりフォルダを削除できなかった場合の処理である。ステップS710では、ビジネスロジック部302は、WEBサービス部301に処理が衝突したことを応答する。そしてWEBサービス部301は呼び出し元の文書管理Webサーバー120にHTTPステータスコード「409」(リソースの現在の状態と衝突するために完了できなかったエラーを意味する)を応答する。
The process in step S708 is a process when the deletion of the folder is successful. In step S <b> 708, the
The process of step S709 is a process when it overlaps with the folder deletion process operating in parallel. In step S709, the
The processing in step S710 is processing when the folder cannot be deleted during the folder deletion processing due to duplication with other processing. In step S710, the
図8は、ビジネスロジック部302が実行するフォルダ削除処理の内部で呼び出される再帰処理の一例を示すフローチャートである。
再帰処理は呼び出されるときに、開始時間と対象のフォルダIDとが渡される。
ステップS801では、ビジネスロジック部302は、フォルダテーブルから、親フォルダIDが再帰処理呼び出し時に渡されたフォルダIDと一致するフォルダレコード一覧を取得する。
ステップS802では、ビジネスロジック部302は、ステップS803の処理を、ステップS801で取得したフォルダレコードの数、又は現在時刻と開始時間との差が予め決められたタイムアウト時間以上になるまで繰り返す。
ステップS803では、ビジネスロジック部302は、図8の再帰処理を再帰的に呼び出す。このときビジネスロジック部302は、まだ削除処理を呼び出していない子フォルダのIDと開始時間とを渡して再帰処理を呼び出す。
FIG. 8 is a flowchart showing an example of recursion processing called inside the folder deletion processing executed by the
When the recursive process is called, the start time and the target folder ID are passed.
In step S801, the
In step S802, the
In step S803, the
ステップS804では、ビジネスロジック部302は、現在時刻と開始時刻との差の残り時間からロック待ち時間を決定する。ビジネスロジック部302は、残り時間に応じて段階的にロック待ち時間を決定する。例えば、ビジネスロジック部302は、残り時間が1分以上であれば10秒、1分以下かつ30秒以上であれば2秒、15秒以下であれば0秒のように残り時間が少なければロック待ち時間を短く決定する。
ステップS805では、ビジネスロジック部302は、フォルダテーブルの処理対象のフォルダIDのレコードをロック(他からのアクセスを制限(アクセス制限))する。このときビジネスロジック部302は、ロック待ち時間をステップS804で決定した時間とする。ビジネスロジック部302は、ロックが成功した場合はステップS806に遷移し、ロック対象がテーブルにない場合又はロック待ち時間が経過してタイムアウトした場合はステップS814に遷移する。
ステップS806では、ビジネスロジック部302は、ファイルテーブルから、親フォルダIDが再帰処理呼び出し時に渡されたフォルダIDと一致するファイルレコード一覧を取得する。
In step S804, the
In step S805, the
In step S806, the
ステップS807では、ビジネスロジック部302は、ステップS808〜ステップS810を、ステップS806で取得したファイルレコードの数、又は現在時刻と開始時間との差が予め決められたタイムアウト時間以上になるまで繰り返す。
ステップS808では、ビジネスロジック部302は、ステップS804と同様に現在時刻と開始時刻との差の残り時間からロック待ち時間を計算する。
ステップS809では、ビジネスロジック部302は、ファイルテーブルの処理対象のファイルIDのレコードをロックする。このとき、ビジネスロジック部302は、ロック待ち時間はステップS808で決定した時間とする。ビジネスロジック部302は、ロックが成功した場合はステップS810に遷移し、ロック対象がテーブルにない場合又はロック待ち時間が経過してタイムアウトした場合はステップS807の繰り返しの処理に戻る。
ステップS810では、ビジネスロジック部302は、ステップS809でロックしたファイルレコードの削除を行う。そしてビジネスロジック部302は、ステップS807の繰り返しの処理に戻る。
In step S807, the
In step S808, the
In step S809, the
In step S810, the
ステップS811では、ビジネスロジック部302は、ステップS801及びステップS806と同様に子フォルダ及び子ファイルの一覧の取得を行い、子フォルダ及び子ファイルの削除が全てできているかを判別する。ビジネスロジック部302は、再帰処理呼び出し時に渡されたフォルダIDを親フォルダIDにするフォルダやファイルが存在しない場合はステップS812に遷移し、そうでなければステップS814に遷移する。
ステップS812では、ビジネスロジック部302は、フォルダテーブルから再帰処理呼び出し時に渡されたフォルダIDのレコードを削除する。
ステップS813では、ビジネスロジック部302は、データベース部304に対してコミット処理を行う。このコミット処理によりこの再帰処理で行った変更が確定する。
ステップS814の処理は、ステップS805でフォルダのロックができなかった場合又はステップS811でフォルダ内に子フォルダ又は子ファイルが残っている場合の処理である。ステップS814では、ビジネスロジック部302は、この再帰処理において1つ以上の子フォルダ又は子ファイルの削除が成功したかどうかを判別する。ビジネスロジック部302は、1つ以上の子フォルダ又は子ファイルを削除した場合は、ステップS815に遷移し、そうでなければステップS813に遷移する。
ステップS815の処理は、1つ以上の子フォルダ又は子ファイルを削除したが削除対象フォルダ自身は削除できない場合であり、削除対象フォルダの更新日時を変更する必要がある場合の処理である。ステップS815では、ビジネスロジック部302は、ステップS707と同様に、削除対象フォルダの更新日時を更新する非同期処理のための情報をデータベース部304に登録する。削除対象フォルダの更新日時は、削除対象フォルダの属性情報の一例である。
In step S811, the
In step S812, the
In step S813, the
The processing in step S814 is processing when the folder cannot be locked in step S805, or when a child folder or child file remains in the folder in step S811. In step S814, the
The process in step S815 is a process when one or more child folders or files are deleted but the deletion target folder itself cannot be deleted, and the update date and time of the deletion target folder needs to be changed. In step S815, the
以上が、本実施形態におけるフォルダ削除処理である。この処理により最下層のフォルダから整合性を保った形でロックを行い、他の処理と重複してロックできない場合にはその部分はフォルダ削除を行わないという機能を実現できる。例えば、図4及び図5の例であれば、図7及び図8の処理により、最初に408のレコードで示される「FolC」が削除対象になり「FolC」、「FileA」の順にロックが行われ、「FileA」、「FolC」の順に削除され、処理がいったん確定する。そして「FolB」の削除処理が行われる。但し「FileA」のロックがタイムアウトした場合は「FileA」及び「FolC」の削除は行われない。また、「FolB」の削除処理が時間以内に終わらなければそのあとに処理されるはずだった「FolD」以下の削除処理は行われず、呼び出し元に応答が送られる。
このようにロック待ちで時間がかかった場合には、削除処理をスキップするので、ストレージサーバー110は、文書管理Webサーバー120との通信のタイムアウトを防ぐこともできる。また、処理開始時間からの経過時間によって子フォルダ等の削除処理自体のスキップをすることになり、通信のタイムアウトを防ぐこともできる。
また図6の削除中フォルダ管理テーブルを用いて、フォルダ削除中の子フォルダに対する処理の受け付けを一時的に拒否することにより、処理の重複の発生確率を下げることができる。
The above is the folder deletion process in the present embodiment. By this processing, it is possible to realize a function of performing locking from the lowermost folder in a consistent manner, and not performing folder deletion in the case where locking cannot be performed redundantly with other processing. For example, in the example of FIGS. 4 and 5, “FolC” indicated by the
In this way, when it takes a long time to wait for the lock, the deletion process is skipped, so that the
In addition, by using the deletion folder management table in FIG. 6 to temporarily reject the acceptance of a process for a child folder whose folder is being deleted, the probability of duplication of processes can be lowered.
ストレージサーバー110が以上のフォルダ削除機能を有することにより、文書管理Webサーバー120はストレージサーバー110に対して簡単なHTTPプロトコルによる呼び出しをするだけでよい。そしてその応答に応じて、削除できたかどうかを知ることができる。その結果、文書管理Webサーバー120は複数回リトライを行うか、又は削除を継続するかどうかをPC端末130との問い合わせにより決定すればよいことになる。
本実施形態によれば、ファイル管理システムにおいて状態管理を用いずに、クライアント側のタイムアウト時間内に処理できるところまで、整合性を保った形でフォルダ削除する、フォルダ削除処理を提供することができる。
Since the
According to the present embodiment, it is possible to provide a folder deletion process in which a folder is deleted in a consistent manner up to the point where processing can be performed within the time-out time on the client side without using state management in the file management system. .
<その他の実施形態>
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読み出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
<Other embodiments>
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
以上、上述した各実施形態によれば、一定の時間内に処理できるところまで、ファイル管理システムの整合性を保ってフォルダ削除処理を行うことができるファイル管理システムを提供することができる。これにより、文書管理Webサーバー120はフォルダ削除結果に応じて再び処理を行うかを判断して処理を継続することができ、文書管理Webサーバー120の処理が簡単になる。
よって、Webサービスを呼び出す側の処理を複雑にせずにフォルダの削除処理を行うことができる。
As described above, according to each of the above-described embodiments, it is possible to provide a file management system capable of performing folder deletion processing while maintaining the consistency of the file management system up to the point where processing can be performed within a certain time. As a result, the document management Web server 120 can determine whether to perform the process again according to the folder deletion result, and can continue the process, thereby simplifying the process of the document management Web server 120.
Therefore, the folder deletion process can be performed without complicating the process on the side that calls the Web service.
Claims (8)
フォルダの削除の指示を受信する受信手段と、
前記受信手段によりフォルダの削除の指示が受信された場合、前記削除の指示を受け取ったフォルダの最下層のフォルダへのアクセスを制限し、前記最下層のフォルダへのアクセスの制限が成功した場合は、前記最下層のフォルダの削除を実行し、前記最下層のフォルダの削除が成功した場合、次の最下層のフォルダへのアクセスを制限し、前記最下層のフォルダへのアクセスの制限が成功しなかった場合は、前記最下層のフォルダの削除は実行せず、次の最下層のフォルダへの処理を繰り返し、前記削除の指示を受け取ったフォルダの削除の処理を実行する削除手段と、
を有するサーバー装置。 A server device that performs file management with a folder hierarchy,
Receiving means for receiving an instruction to delete the folder;
When an instruction to delete a folder is received by the receiving unit, if access to the lowermost folder of the folder that received the deletion instruction is restricted, and access restriction to the lowermost folder is successful, If the deletion of the lowest layer folder is successful and the deletion of the lowest layer folder is successful, the access to the next lowest layer folder is restricted and the access to the lowest layer folder is successfully restricted. If there is not, delete the lowermost folder, do not execute the deletion, repeat the process to the next lowest folder, the deletion means for executing the deletion process of the folder that received the deletion instruction,
Server device having
前記削除手段は、前記受信手段によりフォルダの削除の指示が受信された場合、前記削除の指示を受け取ったフォルダの上位階層のフォルダの情報が前記記録手段により記録されているか否かを確認し、前記削除の指示を受け取ったフォルダの上位階層のフォルダの情報が前記記録手段により記録されていた場合、前記フォルダの削除の指示を要求してきた要求元に一時的に処理できない旨を応答する請求項1乃至5何れか1項記載のサーバー装置。 It further has a recording means for recording information on the folder to be deleted,
The deletion means, when an instruction to delete a folder is received by the receiving means, confirms whether or not the information of the folder in the upper hierarchy of the folder that received the deletion instruction is recorded by the recording means, A response that the request source requesting the deletion instruction of the folder cannot be temporarily processed when information on a folder in a higher hierarchy of the folder that has received the deletion instruction is recorded by the recording unit. The server device according to any one of 1 to 5.
フォルダの削除の指示を受信する受信ステップと、
前記受信ステップによりフォルダの削除の指示が受信された場合、前記削除の指示を受け取ったフォルダの最下層のフォルダへのアクセスを制限し、前記最下層のフォルダへのアクセスの制限が成功した場合は、前記最下層のフォルダの削除を実行し、前記最下層のフォルダの削除が成功した場合、次の最下層のフォルダへのアクセスを制限し、前記最下層のフォルダへのアクセスの制限が成功しなかった場合は、前記最下層のフォルダの削除は実行せず、次の最下層のフォルダへの処理を繰り返し、前記削除の指示を受け取ったフォルダの削除の処理を実行する削除ステップと、
を含む情報処理方法。 An information processing method executed by a server device that performs file management by a folder hierarchical structure,
A receiving step for receiving an instruction to delete the folder;
When an instruction to delete a folder is received by the receiving step, if access to the lowermost folder of the folder that received the deletion instruction is restricted, and access to the lowermost folder is successfully restricted, If the deletion of the lowest layer folder is successful and the deletion of the lowest layer folder is successful, the access to the next lowest layer folder is restricted and the access to the lowest layer folder is successfully restricted. If not, deleting the lowermost folder is not executed, the process of repeating the process to the next lowest folder, and deleting the folder that received the deletion instruction,
An information processing method including:
フォルダの削除の指示を受信する受信ステップと、
前記受信ステップによりフォルダの削除の指示が受信された場合、前記削除の指示を受け取ったフォルダの最下層のフォルダへのアクセスを制限し、前記最下層のフォルダへのアクセスの制限が成功した場合は、前記最下層のフォルダの削除を実行し、前記最下層のフォルダの削除が成功した場合、次の最下層のフォルダへのアクセスを制限し、前記最下層のフォルダへのアクセスの制限が成功しなかった場合は、前記最下層のフォルダの削除は実行せず、次の最下層のフォルダへの処理を繰り返し、前記削除の指示を受け取ったフォルダの削除の処理を実行する削除ステップと、
を実行させるためのプログラム。 On a computer that manages files using a folder hierarchy,
A receiving step for receiving an instruction to delete the folder;
When an instruction to delete a folder is received by the receiving step, if access to the lowermost folder of the folder that received the deletion instruction is restricted, and access to the lowermost folder is successfully restricted, If the deletion of the lowest layer folder is successful and the deletion of the lowest layer folder is successful, the access to the next lowest layer folder is restricted and the access to the lowest layer folder is successfully restricted. If not, deleting the lowermost folder is not executed, the process of repeating the process to the next lowest folder, and deleting the folder that received the deletion instruction,
A program for running
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014075668A JP2015197810A (en) | 2014-04-01 | 2014-04-01 | Server device, information processing method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014075668A JP2015197810A (en) | 2014-04-01 | 2014-04-01 | Server device, information processing method and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2015197810A true JP2015197810A (en) | 2015-11-09 |
Family
ID=54547445
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014075668A Pending JP2015197810A (en) | 2014-04-01 | 2014-04-01 | Server device, information processing method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2015197810A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017211816A (en) * | 2016-05-25 | 2017-11-30 | ヤフー株式会社 | Storage system and method of writing file |
CN112052105A (en) * | 2020-09-04 | 2020-12-08 | 京东数字科技控股股份有限公司 | Interface calling method and device, electronic equipment and computer readable medium |
US12001574B2 (en) | 2020-12-21 | 2024-06-04 | Dropbox, Inc. | Evaluating an access control list from permission statements |
US12019599B2 (en) | 2022-05-26 | 2024-06-25 | Dropbox, Inc. | Data model and data service for content management system |
-
2014
- 2014-04-01 JP JP2014075668A patent/JP2015197810A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017211816A (en) * | 2016-05-25 | 2017-11-30 | ヤフー株式会社 | Storage system and method of writing file |
US10175907B2 (en) | 2016-05-25 | 2019-01-08 | Yahoo Japan Corporation | Storage device, file writing method, and non-transitory computer readable storage medium |
CN112052105A (en) * | 2020-09-04 | 2020-12-08 | 京东数字科技控股股份有限公司 | Interface calling method and device, electronic equipment and computer readable medium |
US12001574B2 (en) | 2020-12-21 | 2024-06-04 | Dropbox, Inc. | Evaluating an access control list from permission statements |
US12019599B2 (en) | 2022-05-26 | 2024-06-25 | Dropbox, Inc. | Data model and data service for content management system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7065958B2 (en) | Gradual client synchronization | |
US20220043830A1 (en) | Versioned hierarchical data structures in a distributed data store | |
US11573938B2 (en) | Systems and methods for indexing source code in a search engine | |
AU2015259419B2 (en) | File service using a shared file access-REST interface | |
US10423342B1 (en) | Scaling events for hosting hierarchical data structures | |
US8250102B2 (en) | Remote storage and management of binary object data | |
JP5023715B2 (en) | Information processing system, information processing apparatus, and program | |
US20080243847A1 (en) | Separating central locking services from distributed data fulfillment services in a storage system | |
WO2013038489A1 (en) | Computer system, management method for client computer, and storage medium | |
US11900083B2 (en) | Systems and methods for indexing source code in a search engine | |
JP6196389B2 (en) | Distributed disaster recovery file synchronization server system | |
JP2015197810A (en) | Server device, information processing method and program | |
JP4971717B2 (en) | Directory distributed storage device and data processing request transfer program | |
TWI571754B (en) | Method for performing file synchronization control, and associated apparatus | |
CN107526530B (en) | Data processing method and device | |
CN101930451B (en) | For storing the method and apparatus of at least one inquiry data element of efficiently searching | |
US20220083516A1 (en) | Information processing apparatus, information processing method, and storage medium | |
JP6083210B2 (en) | Authentication information management system, authentication information management method, authentication information management program, and search system | |
JP4405493B2 (en) | Structured document management system and program | |
JP2007264986A (en) | Information processor, information processing method and program | |
JP2009193512A (en) | Session execution device, session execution program, and recording medium |