The present invention relates to a file-sharing system and a method for managing files, and a program. For example, the invention relates to processing performed when, during check-in processing of a file, a check-out request for the same file is issued.
Using a file-sharing system allows a plurality of users to edit and update files from document management software or file version management software. Such a file-sharing system places a write lock on a file in order to prevent a plurality of users from simultaneously updating the same file (see
In
Such a conventional file-sharing system is based on the assumption that it is executed over a LAN with a band as wide as 100 Mbps, for example. Thus, the time in which other users must wait for a read-locked file while the file is checked in has not been a big problem except under special circumstances such as when the access is concentrated or when the file size is too large.
PTL 1: JP Patent Publication (Kokai) No. 7-28679 A (1995)
However, when files are shared over a narrow-bandwidth network typified by the
Internet, the wait time for a user who requests for check-out of a file, in particular, has become longer. Such a problem will be described in more detail with reference to a sequence figure (
Further, with regard to files that are shared with file-sharing systems, there have been an increasing number of files that are megabytes to gigabytes in size for use in CAD, CAM, large-scale source code, or virtual machines, in addition to conventional files that are several kilobytes in size for use in offices. With the increased size of the files, the wait time also tends to become longer. The present invention has been made in view of the foregoing circumstances, and provides a technique that allows files to be transferred in response to a check-out request for a file even when check-in processing of the same file, which would require a long transmission time, is being executed.
According to the present invention, in order to solve the aforementioned problem, a target file to be checked in is divided into a plurality of divided files, and a server that requests for check-in of the target file is configured to transfer the plurality of divided files, together with metadata thereon, to a center. Then, the divided files are transferred to a server that requests for check-out of the file, based on the metadata.
That is, in the file-sharing system in accordance with the present invention, a first computer (a computer 101 at a site A), when executing file-write reserving processing (check-in processing), divides a target file to be transferred to the center into a plurality of divided files, and transmits the plurality of divided files to the center. A third computer (a computer 121 at the center) receives the plurality of divided files for storage therein. A second computer (a computer 111 at a site B), when executing file reading processing (check-out processing) of the target file during the execution of the file-write reserving processing, acquires available divided files from among the plurality of divided files, and combines the acquired divided files to generate the target file.
The first computer generates a plurality of pieces of metadata for identifying each of the plurality of divided files and appropriately combining the plurality of divided files, and transmits the plurality of pieces of metadata to the third computer at the center before transmitting the plurality of divided files. The second computer, before acquiring the divided files, acquires the plurality of pieces of metadata, and, based on the metadata, acquires corresponding divided files.
Further, the second computer, in executing the file reading processing of the target file, determines from which server (an acquisition target server) including the first computer (the server (the computer 101) at the site A) and the third computer (the computer 121 at the center) the plurality of divided files are to be acquired, and, based on the plurality of pieces of metadata, requests the acquisition target server to transmit the plurality of divided files. In this case, the second computer checks the line conditions of the network and determines, based on the check result, a server with the best line conditions to be the acquisition target server. The line conditions of the network can be checked using any one of the network response comparison processing, network hop count comparison processing, and load comparison processing for the computer at each server.
The file-sharing system may further include, separately from the third computer (the computer 121 at the center), an auxiliary central server (a computer 131 at a center B) for storing files. In such a case, the third computer (121) transmits copies of the plurality of divided files to the auxiliary central server. The second computer acquires the plurality of pieces of metadata from the third computer, but acquires divided files corresponding to the acquired plurality of pieces of metadata from the auxiliary central server.
The second computer, upon request for access to part of the target file from an application, identifies a divided file that is needed to be the access based on the metadata, and acquires the identified divided file from the third computer. At this time, the third computer, if the identified divided file has not been received yet from the first server, acquires the relevant divided file from the first computer and then transmits the acquired divided file to the second computer.
Further features of the present invention will become apparent from the following best mode for carrying out the invention and the accompanying drawings.
According to the present invention, files can be efficiently transferred in response to a check-out request for a file even when the file is being checked in.
Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. It should be noted that this embodiment only illustrates examples for implementing the present invention and thus is not to be construed as limiting the technical scope of the present invention. Structures that are common throughout the drawings will be assigned the same reference numerals.
(1) The First Embodiment
In order to archive check-out processing of a file that is being checked in, metadata is prepared for a target file to be checked in (divided files), and the divided files are transferred in accordance with the metadata during the check-out processing.
Each center includes a computer 121, a router 141, and a LAN (Local Area Network) 142. Examples of wide area networks include, but are not limited to, networks that can use protocols such as IP (Internet Protocol), ATM (Asynchronous Transfer Mode), Ethernet (Registered Trademark), and frame relay. The router connects the LAN to the wide area network to perform communication when communication with external computers is necessary. The router also performs, upon receiving a communication request from the wide area network, data transfer with the computer within the center. Examples of routers include, but are not limited to, those that can use protocols such as IP, ATM, and Ethernet (registered trademark).
The LAN has a function of establishing communication between the router and the computer. Examples of LANs include, but are not limited to, those that can use protocols such as IP, ATM, and Ethernet (registered trademark).
The computer 121 at the center 120 includes an MC (Network Interface Card) 125 that communicates with the LAN, a CPU (Central Processing Unit) 123, memory (Mem) 124, and a disk 122. It is assumed that the sizes of a router, a LAN, and a computer used at each site are substantially equal to or smaller than those at the center. Although the devices such as the router 104, the LAN 103, or the computer 101 may differ in size from those at the center, there are no functional differences between such devices. The computer also includes a keyboard that can be operated by an operator and a display. Accordingly, an operator can operate files through the computer.
The computers 101 and 111 at the sites respectively have installed thereon file agents 105 and 115 that are configured to transmit and receive files in response to check-in and check-out requests. The computer 120 at the center has installed thereon a file manager (File Mgr) 126 that is configured to transmit and receive files in response to a check-in or check-out request and store the files in a repository 128 provided within the disk 122. Each computer has installed thereon an execution environment such as a typical operating system (OS) that operates to archive the file agent or the file manager. However, detailed description of such an operating system will be omitted as it is not directly related to the present invention.
Each computer with the file agent installed thereon prepares a local file system, which is provided by the OS installed on the computer, and also prepares a temporary area (/tmp) 106 or 116 on the local file system to temporarily store divided files obtained from a file 107 for transfer of the files. The computer with the file manager installed thereon prepares a temporary area (/tmp) 127 for temporary storage of files and a repository 128 for long-term storage of files that are stored in execution of check-in processing, and also prepares user management information 129, based on which the presence/absence of access from (an)other computer(s) is determined. The overview of the check-in/check-out processing in accordance with this embodiment will be described with reference to a sequence figure of
The file manager 126 in the computer 121 receives the divided files transmitted from the computer 101 and stores them into the temporary area (/tmp) 127. Then, the file manager 126 combines the received divided files and stores them into the repository area (/opt) 128.
The file agent 115 in the computer 111 receives the divided files transmitted from the computer 121 and stores them into the temporary area (/tmp)116. Then, the file agent 115 combines the divided files and stores them as a file into a check-out directory area (in this embodiment, /opt).
For the metadata file name 601 of the metadata 600, a file name “met” is used as the extension of the divided-file name. The original file name 602 indicates the name of a file before divided. For the sequence number 603, the number of each divided file generated by the file agent 105 as described below is used. For the divided-file name 604, a file name composed of the file name and the sequence number is used. It should be noted that the metadata file name 601 and the divided-file name 604 shown herein are only examples of this embodiment. Thus, such names can be decided by different methods as long as they can help to identify the file transmission order and the files.
Sequence 701: The file agent 105 at the site A 100, based on a file stored in the check-in directory area (/opt), generates divided files and metadata thereon in the temporary area (/tmp) 106 (which corresponds to the processing (1) in
Sequence 702: The file agent 105 informs the file manager 126 at the center 120 of the check-in request together with the file name.
Sequence 703: The file manager 126 generates a target file to be checked in in the repository (/opt) 128. At this time, the file manager 126 acquires a write lock to prevent (an)other server(s) from simultaneously writing data to the file.
Sequence 704: The file manager 126 acknowledges (ACK) the receipt of the request by returning a response to the file agent 105 of the computer 101. Sequence 705: The file agent 105 at the site A sequentially reads metadata on the divided files to be transmitted, and transmits all of the metadata to the file manager 126 at the center 120 (which corresponds to the processing (2) in
Sequence 706: The file agent 105 reads the divided files to be transmitted in the order of the sequence number, and transmits them to the file manager 126 at the center 120 (which corresponds to the processing (3) in
Sequence 707: The file manager 126 stores the divided files that have been transmitted into the temporary area (/tmp) 127. Then, the file manager 126, upon completion of the reception of the divide files, checks the sequence number described in the metadata on each divided file, and appends the divided files to the file stored in the repository (/opt) 128 in accordance with the sequence numbers (which corresponds to the processing of (4) in
Sequence 708: After sequences 706 and 707 are repeated, the file manager 126 checks from the last sequence number 607 of the metadata that all of the divided files have been transmitted, and then releases the write lock.
Sequence 709: The file manager 126 informs the file agent 105 at the site A of the completion of the file transmission.
Next, the sequence processing performed between the computer at the site B 110 and the computer 121 at the center when an operator of the site B 110 checks out the file (which is the target file to be checked in) via the computer 111 will be described.
Sequence 711: The file agent 115 of the computer 111 at the site B 110 informs the file manager 126 of the computer 121 at the center of the file name of the target file to be checked out.
Sequence 712: The file manager 126 transmits all metadata (metadata on all divided files) to the file agent 115 at the site B 110 (which corresponds to the processing (6) in
Sequence 713: The file agent 115, based on the received metadata, requests for the divided files to the file manager 126 at the center 120.
Sequence 714: The file manager 126 at the center 120 transmits the divided files to the file agent 115 at the site B 110 (which corresponds to the processing (7) in
Sequence 715: The file agent 115 stores the divided files that have been transmitted into the temporary area 116, and appends, upon completion of the transmission of the divided files, the divided files to the target file to be checked out (which corresponds to the processing (8) in
Sequence 716: The file agent 115 at the site B 110 repeats sequence 713 through sequence 715, and, upon checking from the last sequence number 607 of the metadata that all of the divided files have been acquired, informs the file manager at the center of the completion of the acquisition of the divided files.
The check-in and check-out sequence processing in accordance with this embodiment is as described above. Dividing a target file into a plurality of divided files and processing them as described above makes it possible to immediately transmit the divided files, which have just been transferred through the check-in processing, to a site that is requesting for check-out of the same target file. Thus, the wait time for a site that requests for check-out can be shortened to the minimum.
Step 801: The file agent 105 acquires the total size of the target file to be checked in (stored in /opt), and initializes the read block number (which corresponds to the current pointer) and the sequence number 603 that are used for generating divided files (sets the both values to #0, for example). In addition, the file agent 105 calculates the last sequence number 607 from the total file size and the size of each divided file (e.g., 64 MB) determined by the system.
Step 802: The file agent 105 generates divided files. At this time, the name determined with reference to
Step 803: The file agent 105 copies data on the target file to be checked in, in the range of from the read block to the divided file size, into each divided file.
Step 804: The file agent 105 generates metadata on each divided file. At this time, the sequence number 603 and the divided-file name 604, which have been previously determined, are used as they are. With regard to the last sequence number, a value obtained by dividing the file size 606 by the size of each divided file is used.
Step 805: The file agent 105 increments the read block number by the size of the divided file, and also increments the sequence number by one.
Step 806: If the file agent 105 determines that the read block number is less than or equal to the number of blocks corresponding to the total file size, the flow proceeds to step 802, and if the file agent 105 determines that the read block number is greater than the number of the blocks corresponding to the total file size, the flow ends.
The check-in processing of the file agent 105 is as described above.
Step 901: The file agent 105 transmits a check-in request for a target file together with the file name thereof to the file manager 126 of the computer 121 at the center 120.
Step 902: The file agent 105 checks if the file manager 126 has acknowledged
(ACK) the receipt of the request. If the answer to step 902 is Yes, the flow proceeds to step 904, and if the answer to step 902 is No, the flow proceeds to step 903.
Step 903: The file agent 105 stops the processing and waits for a predetermined period of time (for example several seconds).
Step 904: The file agent 105 transmits metadata on all divided files to the file manager 126 at the center 120.
Step 905: The file agent 105 reads metadata with the initial sequence number (e.g., the sequence number #0) from the temporary area (Amp) 106.
Step 906: The file agent 105 reads the divided-file name described in the read metadata, and transmits the corresponding divided file to the file manager 126 at the center 120.
Step 907: The file agent 105 checks if the acquired metadata is metadata with the last sequence number. If the answer to step 907 is Yes, the flow ends, and if the answer to step 907 is No, the flow proceeds to step 908.
Step 908: The file agent 105 selects metadata with the next sequence number, and reads it. Then, the file agent 105 transmits a divided file corresponding to the metadata to the center 120 in the same manner as that described above.
The processing of transmitting files by the file agent 105 in executing check-in is as described above.
<Processing Performed at the Center upon Receipt of a Check-In Request>
Step 1001: The file manager 126, upon receiving a check-in request, generates a file in the repository directory 128 based on the received file name. At this time, the file manager 126 also acquires a write lock on the same file.
Step 1002: The file manager 126 returns ACK, which indicates that the computer 121 is prepared to receive divided files, to the file agent 105 of the computer 101 at the site A 100.
Step 1003: The file manager 126 receives metadata on all divided files from the file agent 105 on the computer 101 at the site A 100, and stores it into the temporary area (/tmp) 127.
Step 1004: The file manager 126 reads metadata with the initial sequence number (e.g., #0) on the target file to be checked in.
Step 1005: The file manager 126 determines if a divided file corresponding to the divided-file name 604 described in the metadata resides in the temporary area 127. If the answer to step 1005 is Yes, the flow proceeds to step 1007, and if the answer to step 1005 is No, the flow proceeds to step 1006.
Step 1006: The file manager 126 stops the processing and waits for a predetermined period of time (several seconds).
Step 1007: The file manager 126 reads the divided file corresponding to the acquired metadata.
Step 1008: The file manager 126 appends the read divided file to the file generated in the repository 128.
Step 1009: The file manager 126 determines if the sequence number of the currently read metadata is the last sequence number 607 described in the metadata. If the answer to step 1009 is Yes, the flow proceeds to step 1011, and if the answer to step 1009 is No, the flow proceeds to step 1010.
Step 1010: The file manager 126 reads metadata with the next sequence number.
Step 1011: The file manager 126 refers to the user access information 129 to check for access to the divided file. If the answer to step 1011 is Yes, the flow proceeds to step 1012, and if the answer to step 1011 is No, the flow proceeds to step 1013.
Step 1012: The file manager 126 stops the processing and waits for a predetermined period of time (several seconds).
Step 1013: The file manager 126 deletes the non-accessed metadata (metadata that is not checked out) and the corresponding divided files from the temporary area (/tmp)127.
The processing performed by the file manager 126 upon receipt of a check-in request is as described above.
<Processing of Checking out a File that is Being Checked In>
Step 1101: The file agent 115 generates a target file to be checked out in a check-out directory (/opt).
Step 1102: The file agent 115 transmits a check-out request together with a file name to the file manager 126 of the computer 121 at the center 120.
Step 1103: The file agent 115 receives metadata on all divided files from the file manager 126.
Step 1104: The file agent 115 selects a metadata file with the initial sequence number (in this embodiment, zero).
Step 1105: The file agent 115 acquires a divided file described in the selected metadata from the center 120.
Step 1106: The file agent 115 appends the divided file to the target file to be checked out, and deletes the appended divided file and the corresponding metadata file from the temporary area (/tmp) 116.
Step 1107: The file agent 115 checks for the presence of the next metadata file. If the answer to step S 1107 is Yes, the flow ends, and if the answer to step 1107 is No, the flow proceeds to step 1108.
Step 1108: The file agent 115 reads a metadata file with the next sequence number.
The processing of checking out a file, which is being checked in from a different site, by an operator via the file agent 115 is as described above.
<Processing Performed at the Center upon Receipt of a Check-Out Request>
Step 1201: The file manager 126 at the center 120 stores the server (computer) name as the user access information 129.
Step 1202: The file manager 126 transmits to the file agent 115 at the site B 110 all metadata files for the target file to be checked out.
Step 1203: The file manager 126 determines (checks) if it has received information from the file agent 115 at the site B 110 to the effect that the file agent 115 has received all divided files corresponding to the metadata files (if sequence 716 in
Step 1204: The file manager 126 determines if it has received a request for acquisition of the divided files. If the answer to step 1204 is Yes, the flow proceeds to step 1205, and if not, the flow proceeds to step 1203.
Step 1205: The file manager 126 transmits files (divided files) based on the file names described in the request for acquisition of the divided files.
Step 1206: As the site B 110 has received all divided files, the file manager 126 deletes the server (computer) name from the user management information.
The processing executed by the file manager 126 upon receipt of a check-out instruction from the file agent 115 is as described above.
According to this embodiment, it is possible to check out (transmit) a file that is being checked in, whereby check-out time can be reduced than that of the conventional check-out processing that is performed after the check-in processing.
Further, in execution of the check-out processing, received data can be sequentially read as the received data can be sequentially used. Further, if an application is used that permits received data to be sequentially written, editing becomes also possible.
It should be noted that migration of the divided files from the temporary area 127 to the repository 128 to generate a combined (appended) file can be executed at any of the following timings: (i) collectively executed after the reception of all divided files, (ii) sequentially executed after the reception of each divided file, with each divided file being held in the temporary area 127 until the completion of the reception of all divided files, and (iii) sequentially executed after the reception of each divided file, with the divided files that have been combined (appended) and the metadata being sequentially deleted from the temporary area 127. In the case of (i) and (ii), if a check-out request is received after the generation of the combined file, the combined file is transmitted as the target file to be checked out to the source of the request. If a check-out request is received before the generation of the combined file, it is acceptable as long as the aforementioned processing of transferring divided files is executed as the metadata and all divided files reside in the temporary area 127. Meanwhile, in the case of (iii), if a check-out request is received after some, but not all, of the divided files have been combined, the files that have been combined in the repository 128 and metadata that remains in the temporary area 127 are transmitted together to the source of the request. Then, the computer at a site that is the source of the request (in this embodiment, the computer 111 at the site B 110) acquires the divided files based on the metadata.
As described above, according to the first embodiment, in execution of the check-in processing, a target file to be transferred is divided into a plurality of divided files, and metadata (identification data that can identify each divided file and includes data that allows the divided files to be appropriately combined later at the time of combining the divided files) corresponding to each divided file is produced. Transfer of each divided file is executed based on such metadata. Accordingly, it is possible to reduce the check-in wait time for a user who requests for check-out of a file on a file-sharing system that uses a wide area network (WAN).
In addition, as the temporary area for storing divided files and metadata is provided separately from the repository for storing combined files, management of files that are not yet combined and files that are combined can be carried out easily. Thus, it is possible to respond to check-out requests that occur at various timings.
(2) Second Embodiment
In the second embodiment, in the processing of checking out a file that is being checked in in accordance with the first embodiment, a network that is in the shortest network distance is searched for to execute file transfer, with a view to increasing the data transfer speed. Hereinafter, difference from the first embodiment will mainly be discussed. It should be noted that the physical configuration of this embodiment is similar to that of the first embodiment (
Thus, the processing of the file agent 115 of the computer 111 and the file manager 126 at the center 120 of this embodiment differ from those of the previous embodiment. Further, the network management table 119 is added to the computer 111 at the site B 110.
Sequence 1412: The file manager 126 at the center 120 transmits all metadata to the file agent 115 at the site B 110. At this time, the file manager 126 stores, as the additional items of the metadata, the server name (e.g., xxx.org) of the computer 101 at the site A 100 and the server name (e.g., aaa.org) of the computer 121 at the center as the storage server name 605 in
Sequence 1420: The file agent 115 at the site B 110, based on the item: storage server name 605 of the metadata, executes ping to each server to measure the network line conditions, and creates a network management table such as the one shown in
Sequence 1413: The file agent 115 at the site B 110 creates an URL (e.g., http://xxx.org/tmp/File A-1.div) for enabling access to files in the server selected in sequence 1420, and requests for divided files to the file agent 105 on the computer 101 at the site A.
Sequence 1414: The file agent 105 transmits the divided files to the file agent 115 at the site B 110 via the WAN 130 (which corresponds to the processing (7) in
It should be noted that if any site (server) that has already checked out the relevant file and holds it exists within a short network distance, other than the site A that is executing check-in or the center 120, the relevant file can be received from such site.
<Processing of Checking Out a File that is being Checked In>
Step 1601: The file agent 115 at the site B 110 checks the network line conditions and selects a server (including the center 120) with the shortest response time. In this embodiment, an appropriate server is selected by checking which of the site 100 that is executing check-in and the center 120 is located within the shortest network distance (herein, the shortest response time). Such processing is the same as the processing performed in the aforementioned sequence 1420.
Step 1602: The file agent 115 at the site B 110 acquires from the server selected in step 1601 divided files described in the acquired metadata. Such processing is the same as the processing performed in the aforementioned sequence 1413.
The file agent 105 of the computer 101 at the site A 100 performs, in addition to the functions described in the first embodiment, transmission of divided files in response to a file request (http) from the file manager 126 of the computer 121 at the center 120. In this case, the file agent 115 at the site B 110 requests for access to the divided files stored in the temporary area 106 at the site A 100. In this embodiment, authentication is not executed upon request for files by the file agent 115. However, authentication with https(Hypertext Transfer Protocol over Secure Socket Layer), SSL, (Secure Socket Layer) and the like can be performed for security purposes.
It should be noted that the check-in processing performed by the file agent 105 at the site A 100 and the processing performed by the file manager 126 at the center 120 upon receipt of check-in and check-out requests are the same as the processing described in the first embodiment. However, in the second embodiment, step 1203 to step 1206, in which divided files are transmitted, of the processing in
According to this embodiment, it is possible to achieve, in addition to the advantageous effects of the first embodiment, data transfer from an appropriate computer in accordance with the line conditions and to achieve a reduction in the network bandwidth on the center side by transferring data between the sites.
Further, in the file-sharing system, divided files are received from a server having the original checked-in data. Thus, it is also possible to reduce the network bandwidth of the wide area network used by the file-sharing system because the transfers among servers is distributed, not consolidated.
It should be noted that when check-out requests are issued in parallel from a plurality of sites at different moments in time, for example, computers at all of the sites need not acquire desired divided files from a single server. That is, such desired divided files can be acquired from a computer with the best line conditions which is selected from among a computer that requested for check-in (e.g., the computer at the site A), a computer at the center, and a computer at another site that is executing check-out (e.g., the computer at the site X). Accordingly, load on each server can further be reduced.
(3) Third Embodiment
The third embodiment has, in addition to or separately from the feature of the second embodiment, the following feature: copies of the divided files held on the computer 121 at the center 120 are transferred to and stored into another center (a center B 130), whereby load distribution of the performance of the center 120 is achieved and the transfer time in check-out is reduced. Hereinafter, difference from the second embodiment will mainly be discussed based on the assumption that the aforementioned feature is provided in addition to the feature of the second embodiment. It should be noted that the physical configuration of the file-sharing system is similar to that shown in
Such processing can also be performed while switching the source, from which divided files are acquired, between the center A 120 and the center B 130.
<Processing performed at the Center A upon Receipt of a Check-In Request>
Step 1809: The file manager 126 stores the divided files into the temporary area (/tmp) 137 of the computer 130 through the put processing with http. At this time, the file manager 126 adds a server name (e.g., bbb.org) of the computer (the computer 131 at the center B 130) in which the divided files have been newly stored, as the entry 605 of the served server (the storage server) in the metadata.
Step 1813: The file manager 126 deletes the received metadata files and divided files from the temporary area (/tmp) 127 of the computer 121 in the same manner as in
According to this embodiment, copies of the divided files held by the computer 121 at the center A 120 are stored into another center (the center B 130), whereby it becomes possible to achieve, in addition to the advantageous effects of the second embodiment, a further reduction in the transfer time in check-out. In addition, load for server and network on the center A 120 can be reduced.
It should be noted that even when a configuration such as the one described in the second embodiment is not used, it is still possible to alleviate the load on the network only by storing copies of the divided files, which are stored on the computer 121 at the center A 120, into another center (the center B 130), whereby the advantageous effect that the transfer time in check-out can be reduced is expected to be achieved.
(4) Fourth Embodiment
According to the fourth embodiment, when an application in a host (e.g., the computer 111 at the site B 110) executing check-out processing has accessed a given address of a target file, a divided file that includes the accessed address is preferentially transferred. Hereinafter, difference from the first embodiment will mainly be discussed. It should be noted that the physical configuration of the file-sharing system of this embodiment is similar to that in
A brief summary of the operation of this configuration is as follows: the computer 111 at the site B 110 generates in advance a file 118 that is an empty file (which will be filled with data each time a divided file is acquired), and the file agent 115 monitors access from the application. When the file is accessed, if necessary data (divided files) have not been read in yet and are not stored in the temporary area (/tmp) 116 either, the file agent 115 acquires new files from the computer 121 at the center 120. For example, when a request to access divided files d1, d2, . . . is issued, if the temporary area 116 does not contain such files, the file agent 115 acquires such divided files from the center 120 using a GET command.
It should be noted that the entire complete file is not visible to an operator who uses the application as the application accesses only part of the file. If an application that requires part of a file to be read or written is used, such a request can be met.
<Processing of Checking out a File that is being Checked In>
Step 2101: The file agent 115 generates the file 118 with stored therein “null” data based on the file size of the metadata. Although “null” is used herein as dummy data for the file until divided files acquired are stored therein, other values like zero, other sequential number based on pre-number and so on can also be used.
Step 2102: The file agent 115 copies data on the received divided file into an area determined by the start address BLK 5003 and the end address 5004 of the sequence number in the file-sequence table 5000, within an area of the generated file 118. Then, the file agent 115 deletes the copied divided file and the corresponding metadata from the temporary area 116.
Step 2103: The file agent 115 checks if the currently processed metadata on the target file to be checked out is the last metadata, that is, the file agent 115 checks for the presence of the next metadata file. If the answer to step 2103 is Yes, the flow ends, and if the answer to step 2103 is No, the flow proceeds to step 2104.
Step 2104: The file agent 115 checks if another divided file is being acquired through I/O processing (if “Get file” is executed for another divided file). If the answer to step 2104 is Yes, the flow proceeds to step 2105, and if the answer to step 2104 is No, the flow proceeds to step 1108. Determination of if another divided file is being transmitted can be conducted by checking if step 2205 or step 2206 is being executed.
Step 2105: The file agent 115 enters a standby mode until the completion of the current file transmission. Execution of the present processing takes precedence over the transmission of the next file.
<Processing of I/O Request from the Application>
Step 2201: The file agent 115 calculates the sequence number of the file from the access pointer of the file in the I/O request (I/O access pointer). Such a sequence number is obtained from the quotient of (the BLK number of the file access pointer)/(the size 2006 per sequence).
Step 2202: The file agent 115 refers to a metadata file group in the temporary area 116 to check for the presence of a metadata file with the relevant sequence number. This is because, if the metadata is present, it means that the corresponding divided file has not been received yet, and if the metadata is absent within last sequence number 200, it means that the corresponding divided file has already been received. If the answer to step 2202 is Yes, the flow proceeds to step 2203 based on the assumption that the corresponding divided file has not been received yet, and if the answer to step 2202 is No, the flow proceeds to step 2207 based on the assumption that the corresponding divided file has already been received.
Step 2203: The file agent 115 checks if another divided file is being transmitted through different processing. If the answer to step 2203 is Yes, the flow proceeds to step 2204, and if the answer to step 2203 is No, the flow proceeds to step 2205.
Step 2204: The file agent 115 waits until the completion of the transmission of the currently transmitted file. Execution of the present processing takes precedence over the transmission of the next file.
Step 2205: The file agent 115 reads metadata with the relevant sequence number, and acquires the corresponding divided file from the computer 121 at the center 120.
Step 2206: The file agent 115 copies data on the received divided file into an area determined by the start address BLK 5003 and the end address 5004 of the sequence number in the file-sequence table 5000, within an area of the file 118. Then, the file agent 115 deletes the copied divided file and the corresponding metadata from the temporary area 116.
Step 2207: The file agent 115 accesses the relevant area in response to an I/O request (for read/write processing).
Step 2208: The file agent 115 checks if the sum of the current I/O access pointer and the BLK size per sequence is less than the BLK size requested by the I/O. If the answer to step 2208 is Yes, the flow proceeds to step 2201, and if the answer to step 2208 is No, the flow ends. This is because the desired data of a file may reside across a plurality of divided files in some cases. In such cases, processing for acquiring further necessary divided files is executed.
<Processing Performed at the Center upon Receipt of a File Acquisition Request>
Step 2301: The file manager 126 checks if a requested divided file is stored in the temporary area 127. If the answer to step 2301 is Yes, the flow proceeds to step 2303, and if the answer to step 2301 is No, the flow proceeds to step 2302.
Step 2302: The file manager 126 acquires the requested divided file from a file agent (e.g., the file agent 105) that is executing check-in (GET processing). Such processing corresponds to sequence (3) in
Step 2303: The file manager 126 transmits the requested divided file to a file agent (e.g., the file agent 115) that is the source of the request.
<Processing Performed at the Site on the Check-In Side upon Receipt of a File Acquisition Request>
Step 2401: The file agent 105 checks if another divided file of a file, which is being checked in, is being transmitted. Determination of if another divided file is being transmitted can be conducted by checking if step 908 and step 906 are being executed. If the answer to step 2401 is Yes, the flow proceeds to step 2402, and if the answer to step 2401 is No, the flow proceeds to step 2403.
Step 2402: The file agent 105 enters a standby mode until the completion of the transmission of the currently transmitted another divided file. Execution of the present processing takes precedence over the transmission of the next file.
Step 2403: The file agent 105 transmits the requested divided file to the source of the request (herein, the center 120).
Step 2404: The file agent 105 deletes metadata on the transmitted divided file from the temporary area.
Step 2500: After the transmission of the divided file corresponding to the metadata (step 906), the file agent 105 checks if the divided file is the data with the last sequence number. If the answer to step 2500 is Yes, the flow ends, and if the answer to step 2500 is No, the flow proceeds to step 2501.
Step 2501: The file agent 105 checks if another divided file, which is subjected to GET processing, is being transmitted. Determination of if another divided file is being transmitted can be conducted by checking if step 2403 and step 2404 are being executed. If the answer to step 2501 is Yes, the flow proceeds to step 2502, and if the answer to step 2501 is No, the flow proceeds to step 908.
Step 2502: The file agent 105 enters a standby mode until the completion of the current file transmission. Execution of the present processing takes precedence over the transmission of the next file.
In this embodiment, description has been made of a case in which the present access method is applied to the first embodiment. However, the present access method can also be applied to the second and third embodiments. In such cases, the processing of interrupting file transmission described in this embodiment needs to be performed in the check-in processing of the file agent 105 and the check-out processing of the file agent 115.
According to this embodiment, when an application in a computer that executes check-out requests for access to a given address of a file, a divided file that includes the accessed address can be preferentially transmitted, whereby check-out time seen by an operator can be reduced.
Further, in such a file-sharing system, it becomes possible to edit a file via an application even when the file is being transferred, by devising the transmission order of file data.
(5) Supplement
It should be noted that the present invention can also be realized by a program code of software that implements the function of the embodiments. In such a case, a storage medium having recorded thereon the program code is provided to a system or an apparatus, and a computer (or a CPU or a MPU) in the system or the apparatus reads the program code stored in the storage medium. In this case, the program code itself read from the storage medium implements the function of the aforementioned embodiments, and the program code itself and the storage medium having recorded thereon the program code constitute the present invention. As the storage medium for supplying such a program code, for example, a flexible disk, CD-ROM, DVD-ROM, a hard disk, an optical disc, a magneto-optical disc, a CD-R, a magnetic tape, a non-volatile memory card, ROM, or the like is used.
Further, based on an instruction of the program code, an OS (Operating System) running on the computer or the like may perform some or all of actual processes, and the function of the aforementioned embodiments may be implemented by those processes. Furthermore, after the program code read from the storage medium is written to the memory in the computer, the CPU or the like of the computer may, based on the instruction of the program code, perform some or all of the actual processes, and the function of the aforementioned embodiments may be implemented by those processes.
Moreover, the program code of the software that implements the function of the embodiments may be distributed via a network, and thereby stored in storage means such as the hard disk or the memory in the system or the apparatus, or the storage medium such as a CD-RW or the CD-R, and at the point of use, the computer (or the CPU or the MPU) in the system or the apparatus may read the program code stored in the storage means or the storage medium and execute the program code.
100 Site A
101 Computer (Server) at Site A
102 Operator of Site A
103 LAN at Site A
104 Router at Site A
105 File agent
106 Temporary Area
107 File
110 Site B
111 Computer (Server) at Site B
115 File Agent
116 Temporary Area
120 Center
121 Computer at Center (Central Server)
122 Disk
123 CPU
124 Memory
125 NIC
141 Router
142 LAN
1501 Computer Name
1502 Response Time
1503 Hop Count
1504 Load
5001 File name
5002 Sequence Number
5003 Start Block
5004 End Block
5006 Size per Sequence
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/JP10/02103 | 3/25/2010 | WO | 00 | 4/20/2010 |