searches by infohash

pull/4/head
Zlatin Balevsky 2018-07-06 19:28:28 +01:00
parent 4dd8a1bbe6
commit 576bb7e6a4
2 changed files with 7 additions and 2 deletions

View File

@ -18,6 +18,8 @@ In the LimeWire flavor of Gnutella, ultrapeers had 32 slots for leaf connections
Search requests originating from a leaf or locally at the ultrapeer get forwarded to all neighboring ultrapeers. Search requests arriving from an ultrapeer connection get forwarded only to those ultrapeer that have a keyword hit in their published Bloom filters. This simplifies the Gnutella model because instead of numeric ttl value a simple boolean can be used. Due to the higher fan-out factor this should result in similar search horizon. Search requests originating from a leaf or locally at the ultrapeer get forwarded to all neighboring ultrapeers. Search requests arriving from an ultrapeer connection get forwarded only to those ultrapeer that have a keyword hit in their published Bloom filters. This simplifies the Gnutella model because instead of numeric ttl value a simple boolean can be used. Due to the higher fan-out factor this should result in similar search horizon.
Because the search depth is capped, there will be no dynamic querying, and searches by hash are permitted.
## Content indexing ## Content indexing
In Gnutella leafs upload Bloom filters of the keywords describing the files they are sharing to ultrapeers. Then, when a search query arrives at an ultrapeer if the hash of that query matches a bloom filter uploaded by a given leaf, the query is forwarded to that leaf. In Gnutella leafs upload Bloom filters of the keywords describing the files they are sharing to ultrapeers. Then, when a search query arrives at an ultrapeer if the hash of that query matches a bloom filter uploaded by a given leaf, the query is forwarded to that leaf.

View File

@ -75,7 +75,7 @@ Sent when the leaf wants to find the addresses of more ultrapeers to connect to.
#### "Search" #### "Search"
Sent by a leaf when performing a search. Contains the reply-to b64 destination for signed I2P datagrams. Sent by a leaf or ultrapeer when performing a search. Contains the reply-to b64 destination for signed I2P datagrams.
``` ```
{ {
@ -83,11 +83,14 @@ Sent by a leaf when performing a search. Contains the reply-to b64 destination
version: 1, version: 1,
uuid: "asdf-1234..." uuid: "asdf-1234..."
firstHop: false, firstHop: false,
keywords : "great speeches" keywords : "great speeches",
infohash: "asdfasdf...",
replyTo : "asdfasf...b64" replyTo : "asdfasf...b64"
} }
``` ```
A search can contain either a list of keyword or the infohash if the user is looking for a specific file. If both are present, the infohash takes precedence and the keywords are ignored.
### Ultrapeer to leaf ### Ultrapeer to leaf
The "Search" message is also sent from an ultrapeer to a leaf. The "Search" message is also sent from an ultrapeer to a leaf.