Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search Query Implementation and Hash Lookups #5

Open
bridgesign opened this issue Sep 23, 2020 · 0 comments
Open

Search Query Implementation and Hash Lookups #5

bridgesign opened this issue Sep 23, 2020 · 0 comments
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed

Comments

@bridgesign
Copy link
Member

A normal user will search for files using filename. The primary tracking a file is to use the hash of the file. The big problem is that filename can be big and indexing all files on every peer may result in large memory consumption. Moreover, if there are too many search queries with results taking very long to be found, the network will be clogged by these requests. So, currently I am thinking of building a Trie of filenames and each peer keeps a Trie of not only its own files but also maybe its neighbors or maybe second neighbors (this will require requests to neighbors). Also, need to cookup time to time sync requests with various peers. It can be assumed that the graph is a "nice" graph for such of kind of recurrent requests by construction. Folder names also need to be included.

Then second problem is of keeping track of hashes. It will be best to not store all hashes and reduce the number of hashes for files required to be calculated for a query.

@bridgesign bridgesign added documentation Improvements or additions to documentation help wanted Extra attention is needed labels Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant