Distributed file management method and program therefor

In a management information generating step, management information of disks opened by a plurality of peers connected through a network is generated. In an access request step, another peer which opens a disk is selected from the management information, and a file is requested to be stored or read. In an access execution step, the file is stored or read in response to the storage request or the read request from the other peer.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a distributed file management method for performing distributed management of files between computers connected in a peer-to-peer manner and a program therefor and, more particularly, to a distributed file management method in which computers use open disk resources on a network to perform distributed management of files and a method therefor.

2. Description of the Related Arts

In recent years, most of computers are connected to networks, and resources such as files and printers are popularly shared by the computers connected through the networks.

The resource sharing by using a network is expanded to disks serving as CPU resources of computers connected through the network. A user has a sufficient free area on her/his disk opens the disk on the network to make it possible to use the disk by other users. For example, a dedicated folder is formed to open a disk on a network, the folder is shared, and the access type of the folder is set as a full access type to make it possible to use the folder for an access of another computer connected to the network.

However, at the present, in order to use the resources of another computer by a user, the user herself/himself must designate a location of the resources. For example, when a user of a computer intends to use a free disk of another computer, the user does not know a disk of a specific computer to be used. The user must actually access a computer connected to the network to search the disk, and the user takes heavy labor and long time to use the free disk. When large-capacity data is shared through a network, a cache technique is important. In a conventional cache technique, cache data is managed and stored in only a specific server. For this reason, cache performance is determined by the server, and a large cache considerably increases cost. For this reason, it is difficult to cope with the large cache.

SUMMARY OF THE INVENTION

According to the present invention, there is provided a distributed file management method which efficiently uses disk resources of a plurality of computers connected in a peer-to-peer manner through a network to manage files and a program therefor.

According to the present invention, there is provided a distributed file management method which uses disk resources of a plurality of computers connected in a peer-to-peer manner through a network to realize a large cache at a low price and a program therefor.

The distributed file management method according to the present invention is realized as a process of a plurality of computers (to be referred as “peers” hereinafter) connected in a peer-to-peer manner through a network. A distributed file management method according to the present invention applied to the peers connected through the network including:

the management information generating step of generating management information of disks opened by the plurality of peers connected through the network;

the access request step of selecting another peer which opens a disk from the management information to request a file to be stored or read; and

the access execution step of executing the storage of the file or the read of the file in response to the storage respect or the read request from the other peer. For this reason, when the distributed file management method according to the present invention, more specifically, when a program for realizing the method is started, management information of disk resources opened by the plurality of peers connected through the network is automatically generated, and a user can efficiently perform distributed use of files by arbitrarily selecting a peer to be used from a resource list or the like.

In this case, management information of the opened disk includes open disk management information representing the address of a peer and the capacity of a free disk and distributed file management information representing a peer for storing a file. For this reason, a user can recognize an available disk on a network from the open disk management information, can recognize a specific peer in which a specific file is stored from the distributed file management information, and can easily manage the files.

In the management information generating step according to the present invention, management information of a disk opened to a registry server connected through the network is registered. In this case, in the access request step, another peer is selected from the management information of the registry server to request storage or read of a file. In this manner, the management information of the disk sources opened onto the network is efficiently unified by the registry server, and the registry server handles only the management information and does not store a file. For this reason, the distributed file management information can be realized with a small capacity and a small load at a low cost.

As another aspect of the present invention, in the management information generating step, management information of a disk opened to an access from another peer is answered, and all the other peers are accessed to acquire management information of the opened disk. This step does not require a registry server. Broadcast on a sub-net or the like is used, so that the peers have the management information of the disk opened onto the network. In the management generating step executed when the registry server is not necessary, a copy of the generated management information is stored in a specific peer to make it possible to restore the management information when the management information is lost. For example, as a destination to which the management information is copied, an unused terminal is generally allocated. Even though a peer which opens disk resources is disordered, the management information is acquired from the destination after the disordered peer is recovered, and the use of distributed files can be restarted.

In the access request step, when a file is stored in another file, the file is encoded and requested to be stored. When this encoding is performed, even though the file is separately stored in another peer, the file can be accessed by only an authenticated user. Even though the file is stored in the other peer, the security of the file is assured. In the access request step, when a file is stored in another file, after the file is divided into partial files, the partial files are respectively encoded and requested to be stored in other peers. The file is divided into pieces, and the pieces are encoded and stored in different peers, so that security can be made more strong.

In the distributed file management method according to the present invention further includes the file moving step of moving stored files in another peer to still another peer at once when disclosure of a disk is stopped. For example, a terminal which has been used as a peer is wasted, stored distributed files are moved to another terminal at once, and files stored in another peer are assured. The distributed file management method according to the present invention further includes the cache process step of, when the resources are downloaded, acquiring information of a peer which caches the resources from the cache management information (cache directory) of a registry server connected through the network, requesting the peer the information of which is acquired to download a file, and acquiring the cached resources. In the cache process step, when the information of the peer which caches resources from the cache management information cannot be acquired, after a peer which provides the resources is requested to download a file, and the information of the peer which caches the resources is registered in the cache management information. For this reason, the resources which are downloaded once are cached by a peer of the network. Only the cache management information of the resources are managed by a registry server, and cache data are separately stored in peers which open disk resources on the network. For this reason, the cache can be easily increased at a low cost by distributed cache obtained by opening the disk resources of the peers. The distributed file management method according to the present invention further includes the site searching step of analyzing a log of a cache access to the cache management information to automatically extract a site to be used.

According to the present invention, a program which is executed by peers connected in a peer-to-peer manner through a network. This program causes a computer serving as peers to execute:

the management information generating step of generating management information of disks opened by the plurality of peers connected through the network;

the access request step of selecting another peer which opens a disk from the management information to request a file to be stored or read; and

the step of storing or reading the file in response to the storage request or the read request from the other peer. The details of the program are essentially the same as those of the distributed file management method.

The above and other objects, features, and advantages of the present invention will become more apparent from the following details description with reference to the drawings.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1is a diagram for explaining a-peer-to-peer type network configuration to which a distributed file management process according to the present invention is applied. Peers10-1,10-2, and10-3are always connected to each other through a network12such as the internet. A peer sharing program which realize a distributed file management process according to the present invention is installed in each of the peers. A registry server14is connected through the network12. The registry server14stores management data required for distributed file management in the peers10-1to10-3at once. The peers10-1to10-3and the registry server14are computers each of which comprises a hardware configuration shown inFIG. 2.

A RAM28, a hard disk controller30, a floppy disk driver (software)32, a CD-ROM driver (software)34, a mouse controller36, a keyboard controller38, a display controller40, and a communication board42are connected to a bus26of a CPU24in the computer inFIG. 2. The hard disk controller30is connected to the hard disk drive44and loads an application program for realizing the distributed file management process according to the present invention. The hard disk controller30reads the distributed file management process from a hard disk drive44when a peer is started to develop the distributed file management process on the RAM28. The distributed file management process is executed by the CPU24. A floppy disk driver (hardware)46is connected to the floppy disk driver (software)32, so that data can be read from or written in a floppy disk. A CD drive (hardware)48is connected to the CD-ROM driver (software)34, so that data or a program which is recorded on a CD can be loaded. The mouse controller36transmits an input operation of a mouse50to the CPU24. The keyboard controller38transmits an input operation of a keyboard52to the CPU24. The display controller40performs display on a display unit54. The communication board42performs communication with another peer through a communication line55and the network12inFIG. 1.

FIG. 3is a block diagram of a function configuration obtained when the distributed file management process according to the present invention is applied to the peer-to-peer type network configuration inFIG. 1. The peers10-1,10-2, and10-3-comprise logical disks16-1,16-2, and16-3serving as CPU resources, respectively. In a distributed file management process according to the present invention, the peers10-1to10-3allow the network12to use free areas of their disks16-1to16-3, so that files can be stored by another peer. In this manner, since a peer opens its own disk to store a file of another peer in the disk, peer sharing programs20-1,20-2, and20-3are set in the peers10-1to10-3, respectively. A peer management program22is installed in the registry server14, an open disk management table56and a distributed file management table58stored in a disk18are managed. In the open disk management table56, management information related to the logical disks16-1,16-2, and16-3opened by the peers10-1to10-3is stored. In the distributed file management table58, management information of distributed files obtained such that the peers10-1to10-3store files in an open disk of another peer is stored. When the peers10-1to10-3are connected to the network12, copies of the open disk management table56and the distributed file management table58stored in the registry server14are generated and updated as open disk management tables56-1,56-2, and56-3and distributed file management tables58-1,58-2, and58-3in the peers10-1to10-3, respectively.

FIG. 4is a diagram for explaining the open disk management table56stored in the registry server14inFIG. 3. In the open disk management table56, a peer name, an IP address, the capacity of a disk opened by the peer, and a free area of the disk at the present time are registered. For this reason, when a file is to be stored in another peer, an open state of a disk opened by the other peer can be recognized with reference to the open disk management table56. A peer in which a file is to be stored is selected by designation of a user or automatically selected, and the file can be stored by acquiring the IP address of the selected peer.

FIG. 5is a diagram for explaining the distributed file management table58stored in the registry server14inFIG. 3. The distributed file management table58registers the name of a peer which is to be stored in relation to a file name. For this reason, when the peer reads or rewrites a file which is stored once, the peer acquires the name of a peer in which a file is to be stored with reference to the distributed file management table58by a target file name. The peer acquires an IP address from a peer name with reference to the open disk management table56inFIG. 4and can access the peer in which a file is to be stored. In the distributed file management table58inFIG. 5, distributed files stored in a plurality of peers are registered in the table at once. However, another table structure, distributed file management tables may be separately formed for peers, respectively.

FIG. 6is a flow chart of basic procedures of a distributed file management process performed by the peer sharing programs20-1,20-2, and20-3arranged in the peers10-1to10-3inFIG. 3. In the distributed file management process, a management information generating process is performed in step S1. In the management information generating process, for example, when the peer10-1inFIG. 3is connected to the network12, the peer10-1sets a user name, an IP address, and the capacity of a disk opened by the peer10-1for the registry server14. Thereafter, as management information of disks opened by the other peers10-2and10-3connected through the network12managed by the registry server14, the open disk management table56-1and the distributed file management table58-1which are copies of the open disk management table56and the distributed file management table58are acquired and generated. Subsequently, when a file is stored or read in the peer10-1itself in step S2, the control flow shifts to step S3to select another peer which opens a disk from the open disk management table56-1and the distributed file management table58-1and to execute an access request process of requesting storage of a file and read of the file. By the access request process, a file can be stored in a disk opened by the selected peer, or a file which has been stored can be read. Subsequently, request of another peer is checked in step S4. When a request is received from another peer, the control flow shifts to step S5, an access corresponding to a storage request of a file or a read request of a file from the other peer is executed. While the processes for the distributed file management in steps S2to S5are executed, when the disclosure of the disk must be stopped due to disorder of the peer or the like in step S6, the control flow shifts to step S7. At this time, the file moving process of moving distributed files of another peer stored in the disk16-1to still another peer.

FIG. 7is a flow chart showing the distributed file management process inFIG. 6as a process of a peer sharing program, i.e., a sharing process in details. The peer sharing process inFIG. 7will be described below while the peer10-1inFIG. 3is exemplified. When the sharing program20-1is started in the peer10-1, a user name, e.g., “PC1” and an IP address “aaa. aaa. aaa” are set in step S1. In step S2, a capacity of the disk16-1to be opened is set. For example, when it is assumed that the capacity of the disk16-1of the peer10-1is 30 GB, 10 GB which is ⅓ the capacity is set as an open disk capacity. In step S3, connection to the network12is performed in step S3. In this manner, the user name, the IP address, and the open disk capacity set in steps S1and S2are noticed to the registry server14. Therefore, the peer management program22of the registry server14registers the peer name “PC1”, the IP address “aaa. aaa. aaa”, and the open disk capacity of 10 GB in the open disk management table56inFIG. 5with respect to the peer10-1connected to the network12. At the first, the disk free area of the peer10-1is equal to the open disk capacity, i.e., 10 GB. In step S4, the open disk management table56and the distributed file management table58at the present are acquired from the registry server14, and the open disk management table56-1and the distributed file management table58-1which have been held as the copies of the open disk management table56and the distributed file management table58are updated. As a matter of course, in the first network connection, the copies of the open disk management table56and the distributed file management table58serve as the open disk management table56-1and the distributed file management table58-1. By the steps S1to S4, the peer10-1establishes available state of the open disks of the other peers10-2and10-3connected through the network12. When file formation, edition, and the like of the user by the peer10-1are finished in step S5to determine file storage, a file storing process is executed in step S6. When an open file which requires a file stored in another peer is determined in step S7, a file opening process is executed in step S8. When the file is accessed from the external peers10-2,10-3, and the like in step S9, the file is stored or read in step S10. In the distributed file management process according to the present invention, it is supposed that the peers10-1,10-2,10-3, . . . which open disks to the network12are always connected to the network12. When the peers10-1,10-2,10-3, . . . are disconnected from the network12, the distributed files cannot be accessed by the other peers. For this reason, in this case, the disk disclosure is stopped. When the stop of the disk disclosure is determined in step S11, after the distributed files stored in the peer10-1at this time are moved to another peer at once, the peer10-1is disconnected from the network. In this manner, the peer sharing process is completed.

FIG. 8is a flow chart showing the details of a file storing process performed by the peer10-1in step S6inFIG. 7. When the peer10-1stores a file in another peer which discloses a disk to the network12, in step S1, a list of disclosed peers which open disks is displayed on the basis of the open disk management table56-1having the contents inFIG. 5. A user designates a peer in which a file is to be stored in step S2with reference to the displayed list. Subsequently, it is checked in step S3whether a folder for storage exists or not. When the folder does not exist, a new folder is formed in step S4. It is checked in step S5whether the file name of a stored file exists or not. When the file has no file name, a file name is set in step S6. When a file is designated to be stored in step S7, in step S8, the file is transferred to another peer by using the IP address of the designated peer in step S2and stored in the peer. In step S9, the open disk management table56-1is updated. If no storage designation exists in step S7, cancel designation is checked in step S10. If the cancel designation exists, the file storage process is ended.

In the file storing process inFIG. 8, a user designates a peer in which a file is to be stored in step S2with reference to the disclosed peer list displayed in step S1. However, the peer in which a file is to be stored may be automatically designated. For example, with reference to the open disk management table56-1having the contents inFIG. 4, a peer having the largest disk free area is designated as a peer in which a file is to be stored to store a file. In the process of automatically designating another peer to store a file, the peer sharing program conceals the correspondence to the disk of another peer from a user. It appears from the user that a huge disk exists in the network itself. In this manner, the user can manage a large storage area existing on the network without managing the peer name (computer name) of the peer in which a file is to be stored. More specifically, by storing a file by the peer sharing program performed by the open disk management table56as shown inFIG. 4, a user can imaginarily use the network itself as if one disk.

FIG. 9is a flow chart showing the details of the file opening process in step S8inFIGS. 7 and 8. In this file opening process, a user targets a file stored in another peer to select a folder in step S1. When the user selects a file in step S2, the user acquires the IP address of a peer in which a file is to be stored with reference to the distributed file management table58-1of the peer10-1and accesses the peer in which a file is to be stored, so that the user can acquire a designated file from the disk in which a file is to be stored in step S4.

FIG. 10is a flow chart of another embodiment of a file storing process in step S6inFIG. 7. In this embodiment of the file storing process, when another peer is designated to store a file in step S8, the file is encoded with a secret key. The file is transferred to the designated peer and stored in the peer in step S9. The other processes are the same as those inFIG. 8. In this manner, when the file stored in another peer is encoded with the secret key, a file of a specific user stored in the peer in which a file is to be stored cannot be seen by another user, and the security of distributed files can be achieved.

FIG. 11is a flow chart of a file opening process when a file is encoded with a secret key and stored. This file opening process is basically the same as that inFIG. 9except that the encoded file is decoded with the secret key in step S5after the encoded file is acquired from the peer in which a file is to be stored in step S4.

FIG. 12is a flow chart of still another embodiment of the file storing process in step S6inFIG. 7. This file storing process has the following characteristic feature. That is, a file to be stored in another peer is divided into a plurality of partial files in step S8, the partial files are encoded with secret keys in step S9, and the partial files are transferred to different designated peers and stored in the peers in step S9. The other processes are the same as those inFIG. 8. In this manner, a file to be stored in another peer is divided into a plurality of partial files, the partial files are encoded with secret keys, respectively, and the encoded partial files are stored in different designated peers. Therefore, the security of distributed files can be made more strong.

FIG. 13is a flow chart of a file opening process corresponding to the file storing process inFIG. 12. This file opening process is basically the same as that inFIG. 9. The file opening process corresponds to the storing process of encoding partial files with secret keys to store the partial files in different peers inFIG. 11. In this process, the IP addresses of peers in which the partial files are to be stored are acquired from the distributed file management table in step S3, and the encoded partial files are acquired from the peers in which the files are stored in step S4. The encoded partial files are decoded by secret keys in step S5, and the decoded partial files are synthesized to recover the file in step S6.

FIG. 14is a block diagram of a function configuration in still another embodiment of the present invention. This embodiment is characterized in that the registry server14according to the embodiment inFIG. 3is not required. As described above, since a file is shared by a network without requiring a registry server, peers10-1,10-2, and10-3are connected to the same sub-network64. The peers10-1to10-3connected to the sub-network64use a broadcast function, i.e., a 1-to-n communication function of a UDP (User Datagram Protocol) held by the sub-network64to make batch management of management information related to an open disk by a registry server unnecessary. In the peers10-1to10-3connected to the sub-network64, peer sharing programs20-1,20-2, and20-3are arranged, respectively. The peers10-1to10-3comprise open disk management tables66-1to66-3and distributed file management tables68-1to68-3, respectively. A distributed file management system using the sub-network64is basically constituted by the peers10-1to10-3. However, in this embodiment, a dummy peer60is further arranged. The dummy peer60is a computer which is always connected to the sub-network64but which is not generally used. For example, by mirroring of the open disk management table66-1and the distributed file management table68-1held by the peer10-1, an open disk management table66-11and a distributed file management table68-11which are copies of the open disk management table66-1and the distributed file management table68-1are held. By the mirroring of management information related to an open disk by the dummy peer60, a file can be recovered by using the management information mirrored in the dummy peer60even if the peer10-1is disconnected from the sub-network64due to disorder or the like to stop disk disclosure.

FIG. 15is a diagram for explaining the open disk management table66-1arranged in the peer10-1inFIG. 14. In the open disk management table66-1, a peer name, an IP address, and a disk free area are registered. The contents of the open disk management table66-1are generated by the following method. That is, by using a broadcast function obtained by an UDP when the peer10-1is connected to the sub-network64, a user accesses the other peers10-2,10-3, . . . to acquire the IP addresses of the peers and opened disk free areas. The contents of the open disk management table66-1in the peer10-1are the same as that in the other peer10-2or10-03. In the operation of the distributed file management process, the peers10-2and10-3access other peers by the broadcast function of the UDP at predetermined time intervals to acquire the latest disk free areas.

FIG. 16is a diagram for explaining the distributed file management table68-1stored in the peer10-1inFIG. 14. In the distributed file management table68-1, the name of a peer in which a file is to be stored is registered in relation to a file name. The distributed file management table68-1has table contents inherent to the peer10-1. In the distributed file management tables68-2and68-3of the other peers10-2and10-3, the names of peers in which files are to be stored are registered in relation to file names stored in the peers of the respective data.

FIG. 17is a flow chart of a peer sharing process executed by the peer sharing programs20-1to20-3in the embodiment inFIG. 14. The peer sharing process is different from the peer sharing process inFIG. 7in the embodiment inFIG. 3in the following point. That is, when setting of a user name and an IP address and setting of free disk area are completed when the peer sharing program is started, a peer is connected to the sub-network64in step S3, and the peer acquires a disk free space from another peer by the broadcast function of the UDP in step S4to update the open disk management table. The steps subsequent to step S5are basically the same as those inFIG. 7.

FIG. 18shows another embodiment of a distributed file management process according to the present invention. This embodiment is characterized in that disk areas opened by peers are used as cache areas for resources downloaded from a web of the Internet. Peers10-1to10-3are connected through a network12, and a registry server14for batch management of the peers10-1to10-3is connected to the network12. The peers10-1to10-3comprise peer sharing programs20-1,20-2, and20-3, respectively. The peer sharing programs20-1,20-2, and20-3have download functions by resources obtained by a web or an FTP (file transfer protocol), and can download resources of a web or an FTP by using a URL. In a disk18of the registry server14, an open disk management table56and a distributed file management table58which realizes the same distributed file management process as that of the embodiment inFIG. 3are arranged. In contrast to this, the copies of the open disk management table56and the distributed file management table58are set to the peers10-1to10-3. However, these operations are omitted in this embodiment. In the disk18of the registry server14, a cache directory70functioning as a cache management table is arranged. Furthermore, a cache log72is set in the disk18.

FIG. 19is a diagram for explaining the cache directory70stored in the registry server14. The cache directory70, the IP address and the name of a peer in which a URL and resources downloaded by designating the URL are stored in a disk are registered.

FIG. 20is a flow chart of a peer cache process executed by the peer sharing programs20-1to20-3set in the peers10-1to10-3inFIG. 18. The peer cache process will be described below with reference to the peer10-1. When a user of the peer10-1designates a URL and downloads a program from the web site of the URL, the sharing program20-1starts a peer cache process, designates a URL given by the user in step S1, and requests the registry server14to download resources. In response to the download request made by designating a URL from the peer10-1, the registry server14refers to the cache directory70of the disk18and returns the contents of directory registration related to the designated URL to the peer10-1as a cache response. For this reason, the peer10-1receives the cache response from the registry server in step S2and checks the presence/absence of a cache hit with respect to the response contents in step S3. At this time, when the designated URL is not registered in the cache directory70, the program of the URL is not cached on the disk of another peer. For this reason, In step S4, the peer10-1directly accesses the web site by the URL to download real data. The download data is stored in a cache area of the disk16-1in step S5. Furthermore, the URL, the peer IP address, and the peer name are registered in the cache directory70of the registry server14in step S6. On the other hand, with respect to the cache response from the registry server14in step S3, for example, the URL designated in step S1is “www. zzz. zzz”. When it is determined that the download data of the URL designated with reference to the cache directory70inFIG. 19is cached in a peer PC3, the peer10-1receives the cache response in step S2, and a cache hit is established in step S3. In this case, a URL is designated for the peer10-3of the peer name “PC3” having the IP address “ccc. ccc. ccc” acquired from the registry server14in step S7to request the peer10-3to download data. The peer10-3which receives the download request from the peer10-1reads download data of the designated URL stored in the logical disk16-3to transfer the download data to the peer10-1serving as a source. In step S8, the peer10-1substantially downloads the resources of the designated URL from the peer10-3. In this manner, in the peers10-1to10-3connected through the network12, once the resources obtained by the web of the designated URL, the FTP, and the like are downloaded, the download data is cached on the disk of a peer which downloads the resource for the first time. In the second and subsequent download operations, a download request to the registry server14, and a peer which caches the data is recognized to download data from another peer. For this reason, a large-capacity caching system in which loads are distributed on a network can be structured. In the registry server14of the disk18, a cache log72for the distributed cache system obtained by the peers10-1to10-3structured on the network12is generated. When the cache log72is analyzed, web sites can be ranked. Furthermore, when users who access the same site are grouped, various applications (e.g., users which have similar orientations can be recognized) of the cache log72can be expected.

According to the present invention as described above, disk resources of peers constituted by a plurality of computers connected in a peer-to-peer manner through a network are efficiently used, and distributed management of files can be achieved. Since management information of disk resources opened by the plurality of peers connected to the network is automatically generated, a user can efficiently perform distributed management such that a disk resource to be used is arbitrarily selected to store a file on the network.

Data is downloaded in a specific peer by using disk resources of peers realized by a plurality of computers connected in a peer-to-peer manner through a network, or the resources are cached by a peer connected to the network, and batch management of only cache information of the peer is performed. For this reason, a large-capacity cache system can be easily structured on the network at a low cost by distributed caches obtained by the disk resources of the peers.

The present invention includes appropriate modifications which do not deteriorate the objects and advantages of the invention. Furthermore, the present invention is not limited to the numerical values described in the embodiments.