senyor-seymour-butts / SemanticP2P

0 stars 0 forks source link

Search Algorithm #4

Open senyor-seymour-butts opened 8 years ago

senyor-seymour-butts commented 8 years ago

How do we populate a query response when queried? The value of R is yet to be determined. *Step 1 is the most important part of this whole algorithm. It's what sets it apart from other numeric search algorithms.

1). If you are following a link, query all other peers you know have the same page you are currently on. The go to step 2 if there are not enough peers to satisfy R. 2). Search along the query string until you: 3a). Successfully find node at end of string. 4a). Collect contents and peers list for that domain

3b). Have no valid child nodes to traverse 4b). Recursively search all child nodes for at least R peers

5). If there are not at least R peers in the list, go back up one level and continue with 2b. 6). Return all data and peers in a response object.