CN101539945B - Method for establishing large-scale distributed file system based on P2P - Google Patents

Method for establishing large-scale distributed file system based on P2P Download PDF

Info

Publication number
CN101539945B
CN101539945B CN2009100976516A CN200910097651A CN101539945B CN 101539945 B CN101539945 B CN 101539945B CN 2009100976516 A CN2009100976516 A CN 2009100976516A CN 200910097651 A CN200910097651 A CN 200910097651A CN 101539945 B CN101539945 B CN 101539945B
Authority
CN
China
Prior art keywords
node
virtual group
file
target virtual
message
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.)
Expired - Fee Related
Application number
CN2009100976516A
Other languages
Chinese (zh)
Other versions
CN101539945A (en
Inventor
黄理灿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Sci Tech University ZSTU
Zhejiang University of Science and Technology ZUST
Original Assignee
Zhejiang Sci Tech University ZSTU
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Sci Tech University ZSTU filed Critical Zhejiang Sci Tech University ZSTU
Priority to CN2009100976516A priority Critical patent/CN101539945B/en
Publication of CN101539945A publication Critical patent/CN101539945A/en
Application granted granted Critical
Publication of CN101539945B publication Critical patent/CN101539945B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to a method for establishing a large-scale distributed file system based on P2P, comprising the following steps of: step of establishing global directory, step of establishing new files and step of file open; wherein the step of establishing global directory comprises the detailed steps of: establishing global directory and deleting global directory; wherein the step of establishing new files comprises the detailed steps of: establishing new files and deleting new files. Compared with the prior art, the method has the following beneficial effects that the method adopts a multifold converging virtual tree structural network and a random cache non-structural network to establish a P2P overlay network; the file designation adopts a mode of adding local directory in global directory; and a computer adds multifold virtual tree structural P2P overlay network according to the global directory thereof. The method has the advantages of simply and transparently connecting all the computers of the Internet into vast distributed file storage.

Description

A kind of method of setting up based on the large-scale distributed file system of P2P
Technical field
The present invention relates to the method for a kind of foundation based on the large-scale distributed file system of P2P.
Background technology
Today, Internet more and more becomes the pith of people's life.The most computers technology is transferred to the Internet platform.File system is the important ingredient of all distributed systems.Large-scale distributed file system is extremely important.This large-scale distributed file system couples together all computing machines and forms storage of flood tide virtual file and transparent virtual file operation.
At present, more existing distributed file system hadoop, openAFS, the Google file system of Google company and the IgorFs etc. that utilizes the P2P technology.Yet above system can't couple together all Computer Storage to simple transparent.
Summary of the invention
Technical matters to be solved by this invention is the method for a kind of foundation based on the large-scale distributed file system of P2P, adopt the virtual tree type structured network of many times of fusions and the non-structural network of random cache to make up the P2P overlay network, file designation adopts global dictionary to add the mode of local directory, and computing machine adds many times the structurized P2P overlay network of virtual tree type according to its global dictionary.
In order to solve the problems of the technologies described above, the present invention by the following technical solutions:
A kind of method of setting up based on the large-scale distributed file system of P2P comprises the step that makes up global dictionary, the step that makes up new file, the step of File Open, it is characterized in that wherein making up the global dictionary step and specifically comprises:
11) set up global dictionary:
11a) the network start node is provided with its routing table content, and set up initial global dictionary and relevant virtual group, the routing table content mainly comprises the node entity information, and described entity information comprises node ID and IP address, and wherein node ID is a node computer name @ global dictionary;
11b) node A searches out the virtual group of the shared maximum path of global dictionary therewith by the global dictionary that adds, and adds this virtual group; If this virtual group path is less than the global dictionary that adds, node A creates the overall sub-directory of residual paths;
11c) node of node A in this virtual group sends the adding message that comprises node A entity information, and this node is transmitted this adding message to the every other node of this virtual group;
11d) each node of virtual group is increased to the entity information of node A in the routing table of oneself, simultaneously sends the affirmation message that comprises self node entity information to node A, and node A is increased to the entity information of each node of virtual group in the routing table of oneself;
11e) judge whether it is that existing N node adds the upper strata virtual group in root virtual group or the virtual group, be, then set up the global dictionary step and finish, deny, then find the last layer virtual group as if judged result as if judged result, and repeating step 11c)~11e);
12) deletion global dictionary:
12a) leave Node B and search out the top layer virtual group that oneself adds;
12b) leave Node B and send the leave group message that comprises the Node B entity information to a node of this virtual group; This node is transmitted this leave group message to the every other node of virtual group;
12c) each node of virtual group with the deletion of Node B entity information, sends acknowledge message to leaving Node B simultaneously from the routing table of oneself;
12d) judge whether it is bottom virtual group, be, then delete the global dictionary step and finish, deny, then find down one deck virtual group as if judged result as if judged result, and repeating step 12b)~12d).
The step that wherein makes up new file specifically comprises:
21) set up new file:
21a) user determines the new files name, the filename form: global dictionary @ subscriber computer name/local directory name, the new files name is put into request message, and the global dictionary that parses in the new files name is target virtual group V1;
21b) user node is by searching himself routing table, transmits request message to more near the adjacent node of target virtual group V1;
21c) adjacent node is by searching himself routing table, transmits request message to more near the node of target virtual group V1;
21d) repeating step 21c), until finding target virtual group V1;
21e) target virtual group V1 one node C is to all node broadcasts request messages of target virtual group V1;
The node that subscriber computer name that filename comprised matches 21f) and in the request message is created local directory and file;
22) delete new file:
22a) the definite filename that will delete of user is put into request message with the deleted file name, and the global dictionary that parses in the filename is target virtual group V2;
22b) user node is by searching himself routing table, transmits request message to more near the adjacent node of target virtual group V2;
22c) adjacent node is by searching himself routing table, transmits request message to more near the node of target virtual group V2;
22d) repeating step 22c), until finding target virtual group V2;
22e) target virtual group V2 one node D is to all node broadcasts request messages of target virtual group V2;
Subscriber computer name that filename comprised matches 22f) and in the request message a knot removal local directory and a file.
Wherein the step of File Open specifically comprises:
3a) the definite filename that will open of user, the name that will open file is put into request message, and the global dictionary that parses in the name that opens file is target virtual group V3;
3b) user place node is by searching himself routing table, transmits request message to more near the adjacent node of target virtual group V3;
3c) adjacent node is by searching himself routing table, transmits request message to more near the node of target virtual group V3;
3d) repeating step 3c), until finding target virtual group V3;
3e) target virtual group V3 one node E is to all node broadcasts request messages of target virtual group V3;
The node that computer name that filename comprised matches 3f) and in the request message is created the handle of opening local file, and this handle is turned back to user place node.
It is further comprising the steps of:
4a) user's Remote Open file obtains to open file handle and Archive sit IP address;
4b) user creates and comprises action type and other request of operating message of handle that open file, and sends this message to file place node;
4c) file place node parses action type and the handle that opens file from other operation requests message;
4d) file place node utilizes this handle this file to be carried out the agents document operation of this action type.
The present invention compared with prior art has following beneficial effect: the present invention adopts the virtual tree type structured network of many times of fusions and the non-structural network of random cache to make up the P2P overlay network, file designation adopts global dictionary to add the mode of local directory, and computing machine adds many times the structurized P2P overlay network of virtual tree type according to its global dictionary.The present invention has the advantage that simple transparent ground connects into all computing machines of Internet huge distributed document storage.
Description of drawings
Fig. 1 makes up the process flow diagram of global dictionary for the present invention;
Fig. 2 sets up the process flow diagram of new file for the present invention;
Fig. 3 deletes the process flow diagram of new file for the present invention;
Fig. 4 is the process flow diagram of File Open of the present invention;
Fig. 5 is the process flow diagram of alternative document operation of the present invention.
Embodiment
Relational language:
Global dictionary: be the unique catalogue of the overall situation in the Internet scope.Global dictionary is made up by the computer virtual that all participate in distributed file system.The expression mode of global dictionary adopts the domain name mode, and is consistent with the form of domain name system (DNS).
Node: node is for participating in the computing machine of a plurality of virtual hierarchy groups, and it has routing table.
Node ID (PeerID): for global dictionary adds machine name, presentation format: computer name @ global dictionary, for example: Alice@music.popular.Britney
Node entity (PNE): the node entity indicates node ID (PeerID), IP address etc.
Routing table: form by many node entities.
Gateway role: have the gateway function that route role's node is served as the virtual group of several different levels.
The gateway the superiors (GUL): the position of the superiors' virtual group in virtual tree among the gateway role.
Virtual group: form by node.The upper strata virtual group is made up of the node with gateway role.
N times of virtual group tree: the tree that forms by virtual group.High-rise virtual group is made up of every group of N the node that low layer has the gateway role.Repeat this process, to form virtual tree.
Add message: add the message that ingress sends, must comprise the entity information that adds ingress.
Leave group message: leave the message that node sends, must comprise the entity information that leaves node.
Request message: the message that sends during user's solicit operation.
Referring to Fig. 1, a kind of foundation is based on the method for the large-scale distributed file system of P2P,
Comprise the step that makes up global dictionary, the step that makes up new file, the step of File Open, wherein make up the global dictionary step and specifically comprise:
11) set up global dictionary:
11a) the network start node is provided with its routing table content, and sets up initial global dictionary and relevant virtual group, and the routing table content mainly comprises the node entity information, and entity information comprises node ID and IP address, and wherein node ID is a node computer name @ global dictionary;
11b) node A searches out the virtual group of the shared maximum path of global dictionary therewith by the global dictionary that adds, and adds this virtual group; If this virtual group path is less than the global dictionary that adds, node A creates the overall sub-directory of residual paths;
11c) node of node A in this virtual group sends the adding message that comprises node A entity information, and this node is transmitted this adding message to the every other node of this virtual group;
11d) each node of virtual group is increased to the entity information of node A in the routing table of oneself, simultaneously sends the affirmation message that comprises self node entity information to node A, and node A is increased to the entity information of each node of virtual group in the routing table of oneself;
11e) judge whether it is that existing N node adds the upper strata virtual group in root virtual group or the virtual group, be, then set up the global dictionary step and finish, deny, then find the last layer virtual group as if judged result as if judged result, and repeating step 11c)~11e);
12) deletion global dictionary:
12a) leave Node B and search out the top layer virtual group that oneself adds;
12b) leave Node B and send the leave group message that comprises the Node B entity information to a node of this virtual group; This node is transmitted this leave group message to the every other node of virtual group;
12c) each node of virtual group with the deletion of Node B entity information, sends acknowledge message to leaving Node B simultaneously from the routing table of oneself;
12d) judge whether it is bottom virtual group, be, then delete the global dictionary step and finish, deny, then find down one deck virtual group as if judged result as if judged result, and repeating step 12b)~12d).
Referring to Fig. 2 and Fig. 3, the step that wherein makes up new file specifically comprises:
21) set up new file:
21a) user determines the new files name, the filename form: global dictionary @ subscriber computer name/local directory name (Global-directory " @ " computerName "/" local-directory), global dictionary (Global-directory) adopts domain name representation, for example biology.bioinformatics; Subscriber computer name (computerName), for example alice; The local directory name (local-directory) of node computer, for example/tools/blast.Example: Biology.bioinformatics@alice/tools/blast, the new files name is put into request message with the new files name after determining, and the global dictionary that parses in the new files name is target virtual group V1;
21b) user node is by searching himself routing table, transmits request message to more near the adjacent node of target virtual group V1;
21c) adjacent node is by searching himself routing table, transmits request message to more near the node of target virtual group V1;
21d) repeating step 21c), until finding target virtual group V1;
21e) target virtual group V1 one node C is to all node broadcasts request messages of target virtual group V1;
The node that subscriber computer name that filename comprised matches 21f) and in the request message is created local directory and file;
22) delete new file:
22a) the definite filename that will delete of user is put into request message with the deleted file name, and the global dictionary that parses in the filename is target virtual group V2;
22b) user node is by searching himself routing table, transmits request message to more near the adjacent node of target virtual group V2;
22c) adjacent node is by searching himself routing table, transmits request message to more near the node of target virtual group V2;
22d) repeating step 22c), until finding target virtual group V2;
22e) target virtual group V2 one node D is to all node broadcasts request messages of target virtual group V2;
Subscriber computer name that filename comprised matches 22f) and in the request message a knot removal local directory and a file.
Referring to Fig. 4, wherein the step of File Open specifically comprises:
3a) the definite filename that will open of user, the name that will open file is put into request message, and the global dictionary that parses in the name that opens file is target virtual group V3;
3b) user place node is by searching himself routing table, transmits request message to more near the adjacent node of target virtual group V3;
3c) adjacent node is by searching its routing table, transmits request message to more near the node of target virtual group V3;
3d) repeating step 3c), until finding target virtual group V3;
3e) target virtual group V3 one node E is to all node broadcasts request messages of target virtual group V3;
The node that computer name that filename comprised matches 3f) and in the request message is created the handle of opening local file, and this handle is turned back to user place node.
Alternative document method of operating: if file is a local file, then press the ordinary file method of operating, if remote node is then pressed Fig. 5 method.The alternative document method of operating may further comprise the steps:
4a) user's Remote Open file obtains to open file handle and Archive sit IP address;
4b) user sets up and comprises action type and other request of operating message of handle that open file, and sends this message to file place node;
4c) file place node parses action type and the handle that opens file from other operation requests message;
4d) file place node utilizes this handle this file to be carried out the agents document operation of this action type.
Make up the process of distributed file system below with example in detail:
Make up the distributed file system that the global range computing machine participates in.
Supposing has the user: Xiao Li's global dictionary is LiuHuan.Popular.Music, computer name: XiaoLi, and its node ID is XiaoLi@LiuHuan.Popular.Music.Used computer IP address is 10.20.2.26;
The Lao Wang global dictionary is LiuHuan.Popular.Music, computer name: OldWang, and its node ID is OldWang@LiuHuan.Popular.Music.Used computer IP address is 10.88.5.15;
The Lao Zhang global dictionary is Beethoven.Classic.Music, computer name: OldZhang, and its node ID is OldZhang@Beethoven.Classic.Music.Used computer IP address is 200.10.121.150;
Xiao Zhao's global dictionary is Brittney.Popular.Music, computer name: XiaoZhao, and its node ID is XiaoZhao@Brittney.Popular.Music.Used computer IP address is 150.100.69.112;
Following recording and video company global dictionary is LiuHuan.Popular.Music, computer name: Future, and its node ID is Future@LiuHuan.Popular.Music.Used computer IP address is 26.109.12.123;
Suppose that Lao Wang is set up network the first.Press Fig. 1, the Lao Wang computer is the network start node, its routing table content is set is its node entity (node ID: OldWang@LiuHuan.Popular.Music, IP address: 10.88.5.15); Set up the LiuHuan virtual group, the Popular virtual group on upper strata and Music root virtual group are set up the LiuHuan.Popular.Music global dictionary simultaneously.
Xiao Li adds network.Xiao Li determines that the virtual group that will add is LiuHuan.Popular.Music, and finds a node Lao Wang who adds LiuHuan.Popular.Music by global dictionary LiuHuan.Popular.Music.Xiao Li's node sends the adding message that comprises Xiao Li's entity information (node ID: XiaoLi@LiuHuan.Popular.Music, IP address 10.20.2.26) to the Lao Wang node; The Lao Wang node is transmitted this adding message (so time have only node of Lao Wang itself, so do not transmit) to the every other node of LiuHuan.Popular.Music virtual group; Each node of LiuHuan.Popular.Music (having only node of Lao Wang this moment) is with the entity information (node ID: XiaoLi@LiuHuan.Popular.Music of Xiao Li's node, IP address: 10.20.2.26) be increased in the routing table of oneself, send acknowledge message to Xiao Li's node simultaneously.Xiao Li's node is with each node entity information of virtual group (node ID: OldWang@LiuHuan.Popular.Music, IP address: 10.88.5.15) be increased in the routing table of oneself.Suppose that N is 1, because of existing 1 node adds upper strata virtual group (Lao Wang node), node adds end.
Lao Zhang adds network.Lao Zhang determines that by global dictionary Beethoven.Classic.Music the virtual group that will add is Beethoven.Classic.Music, searches out virtual group--the Music of the shared maximum path of global dictionary therewith, adds this virtual group; Therefore the virtual group path is less than the global dictionary that adds, and the Lao Zhang node is created the overall sub-directory Beethoven.Classic of residual paths and set up the Beethoven of lower floor and the Classic virtual group.The Lao Zhang node sends to the Lao Wang node and adds message (entity information that comprises Lao Zhang); The Lao Wang node is transmitted to the every other node of Music virtual group and is added message (so time have only a node, so do not transmit); Music organizes the entity information (node ID: OldZhang@Beethoven.Classic.Music of each node (Lao Wang) with the Lao Zhang node, IP address: 200.10.121.150) be increased in the routing table of oneself, send acknowledge message (nodal information that comprises self has only nodal information of Lao Wang this moment) to the Lao Zhang node simultaneously.(node ID: OldWang@LiuHuan.Popular.Music, the IP address: 10.88.5.15) be increased in the routing table of oneself, node adds end to the Lao Zhang node with each node entity information of virtual group.
Xiao Zhao adds network.Xiao Zhao determines that by global dictionary Brittney.Popular.Music the virtual group that will add is Brittney.Popular.Music, searches out the virtual group-Popular.Music of the shared maximum path of global dictionary therewith, adds this virtual group; Therefore the virtual group path is less than the global dictionary that adds, and Xiao Zhao's node is created the overall sub-directory Brittney of residual paths and set up the Brittney of lower floor virtual group.Xiao Zhao's node sends to the Lao Wang node and adds message (entity information that comprises Xiao Zhao); The Lao Wang node is transmitted to the every other node of Popular.Music virtual group and is added message (so time have only a node, so do not transmit); Music organizes entity information (node ID: XiaoZhao@Brittney.Popular.Music, the IP address: 150.100.69.11 of each node (Lao Wang) with Xiao Zhao's node
2) be increased in the routing table of oneself, send acknowledge message to Xiao Zhao's node simultaneously.Xiao Zhao's node is with each node entity information of virtual group (node ID: OldWang@LiuHuan.Popular.Music, IP address: 10.88.5.15) be increased in the routing table of oneself, suppose that N is 1, finish.
Following recording and video company adds network.Following recording and video company determines that the virtual group that will add is LiuHuan.Popular.Music, and finds a node Xiao Li who adds the LiuHuan.Popupar.Music virtual group by global dictionary LiuHuan.Popular.Music.Following recording and video company sends to Xiao Li's node and adds message (entity information that comprises following recording and video company); Xiao Li's node is transmitted to the every other node of LiuHuan.Popular.Music virtual group and is added message (transmit to the Lao Wang node this moment); Each node of LiuHuan.Popular.Music virtual group (Xiao Li and Lao Wang) is with entity information (node ID: Future@LiuHuan.Popular.Music, the IP address: 26.109.12.12 of following recording and video company node
3) be increased in the routing table of oneself, send acknowledge message to following recording and video company node simultaneously.Following recording and video company node is with each node entity information (node ID: OldWang@LiuHuan.Popular.Music of virtual group, IP address: 10.88.5.15 and XiaoLi@LiuHuan.Popular.Music, IP address: 10.20.2.26) be increased in the routing table of oneself.Suppose that N is 1, finish.
Xiao Zhao's deviated from network.A) Xiao Zhao's node searches out a node (Lao Wang) of the top layer virtual group (being Popular.Music this moment) that oneself adds.Xiao Zhao's node sends leave group message (entity information that comprises Xiao Zhao) to this (Lao Wang) node; B) this node is transmitted leave group message (at this moment, not having other nodes, so do not transmit) to the every other node of virtual group.C) each node of virtual group (Lao Wang) will leave node Xiao Zhao entity information (node ID: be XiaoZhao@Brittney.Popular.Music from the routing table of oneself, the IP address: 150.100.69.112) deletion sends acknowledge message to leaving node Xiao Zhao simultaneously.Owing to be not bottom virtual group, Virtual Organization points to the virtual group Brittney of lower floor, turns to step B), after the circulation primary, be bottom virtual group, because of the Brittney.Popular.Music virtual group has only Xiao Zhao's node, Brittney overall situation sub-directory is deleted automatically, finishes.
Set up new document method:
If file is a local file, then by common new files method, if remote node is then pressed Fig. 2 method.
Following recording and video company sets up songs/2008/You﹠amp on the Lao Wang node; The Me.wav file.Filename: LiuHuan.Popular.Music@OldWang/songs/2008/You﹠amp; Me.wav, the new files name is put into request message, request message comprises: CreateFile LiuHuan.Popular.Music@OldWang/songs/2008/You﹠amp; Me.wavThe global dictionary that parses in the new files name is a LiuHuan.Popular.Music target virtual group.
Following recording and video company node is by searching its routing table, transmits request message to more near the adjacent node Xiao Li of target virtual group domain name.At this moment, Xiao Li is exactly the node of target virtual group LiuHuan.Popular.Music.Xiao Li's node is to all nodes of target virtual group (comprising Xiao Li and Lao Wang) broadcast request message.All nodes of target virtual group (comprising Lao Wang, Xiao Li) are checked a node establishment local directory and the file that filename comprised in own node ID and the request message subscriber computer name OldWang matches; At this, have only Lao Wang to meet, Lao Wang sets up songs/2008/You﹠amp; The Me.wav local file, and file handle returned to following recording and video company node.
The deleted file method:
If file is a local file, then by common deleted file method, if remote node is then pressed Fig. 3 method.
Songs/2008/You﹠amp deletes in following recording and video company on the Lao Wang node; The Me.wav file.Filename: LiuHuan.Popular.Music@OldWang/songs/2008/You﹠amp; Me.wav, request message comprises: DeleteFile LiuHuan.Popular.Music@OldW Ang/songs/2008/You﹠amp; Me.wav
Following recording and video company node is by searching its routing table, transmits request message to more near the adjacent node Xiao Li of target virtual group domain name.At this moment, Xiao Li is exactly target virtual group LiuHuan, the node of Popular.Music.Xiao Li's node is to all nodes of target virtual group (comprising Xiao Li and Lao Wang) broadcast request message.All nodes of target virtual group (comprising Lao Wang, Xiao Li) are checked the node ID of oneself.The knot removal local directory and the file that match with filename comprised in the request message subscriber computer name OldWang; At this, have only Lao Wang to meet, Lao Wang deletes songs/2008/You﹠amp; The Me.wav local file, and the result returned to following recording and video company node.
The File Open method:
If file is a local file, then by the common method that opens file, if remote node is then pressed Fig. 4 method.
Following recording and video company opens songs/2008/You﹠amp on the Lao Wang node; The Me.wav file.Filename: LiuHuan.Popular.Music@OldWang/songs/2008/You﹠amp; Me.wav, create the request message that opens file and comprise: OpenFile LiuHuan.Popula R.Music@OldWang/songs/2008/You﹠amp; Me.wav
Following recording and video company node is by searching its routing table, transmits request message to more near the adjacent node Xiao Li of target virtual group domain name.At this moment, Xiao Li is exactly the node of target virtual group LiuHuan.Popular.Music.Xiao Li's node is to all nodes of target virtual group (comprising Xiao Li and Lao Wang) broadcast request message.All nodes of target virtual group (comprising Lao Wang, Xiao Li) are checked the node ID of oneself.Create the handle of opening local file with the node that filename comprised in the request message computer name OldWang matches, at this, have only Lao Wang to meet, Lao Wang opens songs/2008/You﹠amp; The Me.wav local file, and the handle that will open file returns to following recording and video company node.
The alternative document method of operating:
If file is a local file, then press the ordinary file method of operating, if remote node is then pressed Fig. 5 method.
Songs/2008/You﹠amp reads in following recording and video company on the Lao Wang node; The Me.wav file.Create alternative document operation requests message, request message format is: OperateFile operatetype global dictionary @ computer name file handle, wherein Operatetype is readfile (reading file), writefile (written document) operation etc.
Following recording and video company node is opened earlier LiuHuan.Popular.Music@OldWang/son Gs/2008/You﹠amp; Me.wavFile.The request message that opens file comprises: OpenFile LiuHuan.Popular.Music@OldWang/songs/2008/You﹠amp; Me.wavFollowing recording and video company node is by searching its routing table, and forwarding inquiries message is to more near the adjacent node Xiao Li of target virtual group domain name.At this moment, Xiao Li is exactly the node of target virtual group LiuHuan.Popular.Music.Xiao Li's node is to all nodes of target virtual group (comprising Xiao Li and Lao Wang) broadcast query message.All nodes of target virtual group (comprising Lao Wang, Xiao Li) are checked the node ID of oneself.Create local directory and file with the node that filename comprised in the request message subscriber computer name OldWang matches; At this, have only Lao Wang to meet, Lao Wang opens songs/2008/You﹠amp; The Me.wav local file, and the handle that will open file returns to following recording and video company node.
Following recording and video company node will be read file operation requests message (comprising OperateFile readfile LiuHuan.Popular.Music@OldWangHandle) sends Wang Jiedian until old.The Lao Wang node parses action type in the request message for reading file operation, and handle is the handle of File Open.The Lao Wang node utilizes this handle that this file is acted on behalf of and reads file operation.

Claims (2)

1. a foundation comprises the step that makes up global dictionary, the step that makes up new file, the step of File Open based on the method for the large-scale distributed file system of P2P, it is characterized in that wherein making up the global dictionary step and specifically comprises:
11) set up global dictionary: 11a) the network start node is provided with its routing table content, and set up initial global dictionary and relevant virtual group, the routing table content mainly comprises the node entity information, described entity information comprises node ID and IP address, and wherein node ID is a node computer name @ global dictionary; 11b) node A searches out the virtual group of the shared maximum path of global dictionary therewith by the global dictionary that adds, and adds this virtual group; If this virtual group path is less than the global dictionary that adds, node A creates the overall sub-directory of residual paths; 11c) node of node A in this virtual group sends the adding message that comprises node A entity information, and this node is transmitted this adding message to the every other node of this virtual group; 11d) each node of virtual group is increased to the entity information of node A in the routing table of oneself, simultaneously sends the affirmation message that comprises self node entity information to node A, and node A is increased to the entity information of each node of virtual group in the routing table of oneself; 11e) judge whether it is that existing N node adds the upper strata virtual group in root virtual group or the virtual group, be, then set up the global dictionary step and finish, deny, then find the last layer virtual group as if judged result as if judged result, and repeating step 11c)~11e);
12) deletion global dictionary: 12a) leave the top layer virtual group that Node B searches out own adding;
12b) leave Node B and send the leave group message that comprises the Node B entity information to a node of this virtual group; This node is transmitted this leave group message to the every other node of virtual group; 12c) each node of virtual group with the deletion of Node B entity information, sends acknowledge message to leaving Node B simultaneously from the routing table of oneself; 12d) judge whether it is bottom virtual group, be, then delete the global dictionary step and finish, deny, then find down one deck virtual group as if judged result as if judged result, and repeating step 12b)~12d);
The step that wherein makes up new file specifically comprises:
21) set up new file: 21a) user determines the new files name, the filename form: global dictionary @ subscriber computer name/local directory name, the new files name is put into request message, and the global dictionary that parses in the new files name is target virtual group V1; 21b) user node is by searching himself routing table, transmits request message to more near the adjacent node of target virtual group V1; 21c) adjacent node is by searching himself routing table, transmits request message to more near the node of target virtual group V1; 21d) repeating step 21c), until finding target virtual group V1; 21e) target virtual group V1 one node C is to all node broadcasts request messages of target virtual group V1; The node that subscriber computer name that filename comprised matches 21f) and in the request message is created local directory and file;
22) delete new file: 22a) the definite filename that will delete of user, the deleted file name is put into request message, the global dictionary that parses in the filename is target virtual group V2; 22b) user node is by searching himself routing table, transmits request message to more near the adjacent node of target virtual group V2; 22c) adjacent node is by searching himself routing table, transmits request message to more near the node of target virtual group V2; 22d) repeating step 22c), until finding target virtual group V2; 22e) target virtual group V2 one node D is to all node broadcasts request messages of target virtual group V2; Subscriber computer name that filename comprised matches 22f) and in the request message a knot removal local directory and a file;
Wherein the step of File Open specifically comprises:
3a) the definite filename that will open of user, the name that will open file is put into request message, and the global dictionary that parses in the name that opens file is target virtual group V3; 3b) user place node is by searching himself routing table, transmits request message to more near the adjacent node of target virtual group V3; 3c) adjacent node is by searching himself routing table, transmits request message to more near the node of target virtual group V3; 3d) repeating step 3c), until finding target virtual group V3; 3e) target virtual group V3 one node E is to all node broadcasts request messages of target virtual group V3; The node that computer name that filename comprised matches 3f) and in the request message is created the handle of opening local file, and this handle is turned back to user place node.
2. a kind of method of setting up based on the large-scale distributed file system of P2P as claimed in claim 1 is characterized in that it also comprises the alternative document method of operating, and the alternative document method of operating may further comprise the steps:
4a) user's Remote Open file obtains to open file handle and Archive sit IP address;
4b) user creates and comprises action type and other request of operating message of handle that open file, and sends this message to file place node;
4c) file place node parses action type and the handle that opens file from other operation requests message;
4d) file place node utilizes this handle this file to be carried out the agents document operation of this action type.
CN2009100976516A 2009-04-16 2009-04-16 Method for establishing large-scale distributed file system based on P2P Expired - Fee Related CN101539945B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100976516A CN101539945B (en) 2009-04-16 2009-04-16 Method for establishing large-scale distributed file system based on P2P

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100976516A CN101539945B (en) 2009-04-16 2009-04-16 Method for establishing large-scale distributed file system based on P2P

Publications (2)

Publication Number Publication Date
CN101539945A CN101539945A (en) 2009-09-23
CN101539945B true CN101539945B (en) 2011-05-18

Family

ID=41123134

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100976516A Expired - Fee Related CN101539945B (en) 2009-04-16 2009-04-16 Method for establishing large-scale distributed file system based on P2P

Country Status (1)

Country Link
CN (1) CN101539945B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102572004A (en) * 2011-08-19 2012-07-11 珠海互翔软件技术有限公司 Method for ensuring website uniqueness in process of providing WEB service by using personal computer

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101087403A (en) * 2007-05-31 2007-12-12 吴彬 Distributed stream media order system based on P2P technology and implementation method for stream media program order

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101087403A (en) * 2007-05-31 2007-12-12 吴彬 Distributed stream media order system based on P2P technology and implementation method for stream media program order

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Lican Huang.A P2P service discovery strategy.《Data Science Journal》.2007,第6卷492-499. *

Also Published As

Publication number Publication date
CN101539945A (en) 2009-09-23

Similar Documents

Publication Publication Date Title
CN101764807B (en) Multisource internet resource device and method based on meta search engine
CN101645926B (en) Operating method of mobile SNS communication system based on address book of mobile phone
CN100433689C (en) An organization method for tree network of control stream in the stream media living broadcast system
CN110704453B (en) Data query method and device, storage medium and electronic equipment
CN103002027B (en) Data-storage system and the method for tree directory structure is realized based on key-value pair system
CN104796326A (en) Group creating method, data loading method and device for enterprise IM
CN101232415B (en) Equity network node visit apparatus, method and system
CN101369267B (en) Fuzzy query method based on internal memory warehouse
CN100407201C (en) Network searching system and realizing method therefor
WO2018036324A1 (en) Smart city information sharing method and device
JP2012502385A (en) Ranking search results based on affinity criteria
WO2013053280A1 (en) Address book maintenance method and group address book management platform
CN101150489A (en) Resource share method based on distributed hash table
US20110029538A1 (en) System for creation of content with correlated geospatial and virtual locations by mobile device users
CN112035420B (en) Data sharing method, sharing device and system
CN101710921A (en) Method and system for updating numbering book of mobile terminal
WO2013010432A1 (en) Method, node and system for data storage and query in peer network
CN105978981A (en) Data backup linear capacity expanding method and system based on public cloud storage account
JP2006101277A (en) Information communications system, node apparatus, and overlay network forming method or the like
CN111400261A (en) Method for rapidly adding or deleting folders by IPFS (Internet protocol file system)
CN101539945B (en) Method for establishing large-scale distributed file system based on P2P
CN106170012A (en) Distributed file system that a kind of facing cloud renders and structure and access method
Tanin et al. An efficient nearest neighbor algorithm for P2P settings
Liu et al. Supporting efficient keyword-based file search in peer-to-peer file sharing systems
TW201109937A (en) Methods and apparatus for updating index information while adding and updating documents in a distributed network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110518

Termination date: 20170416

CF01 Termination of patent right due to non-payment of annual fee