GithubHelp home page GithubHelp logo

nandajavarma / p2p-network Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pearsearch/p2p-network

0.0 2.0 0.0 117 KB

The P2P network for PeARS

License: GNU General Public License v3.0

Python 100.00%

p2p-network's Introduction

p2p-network

The P2P network for PeARS

Setup PeARS by checking out to the indexer branch

Make sure you install all requirements from requirements.txt and that you have openvectors.db populated using the script uncompress_db

Build the pear profile using the code browser_history_indexer.py

python browser_history_indexer.py

Run the DHT

Clone the p2p-network code from the master branch

Start the DHT by running the following:

python dht.py 4000

This runs a standalone DHT node in your local machine in the port 4000. If you know the IP of another node that has a DHT running, then you can do the following to make the nodes identify each other:

python dht.py 4000 <Known node IP> <Known node port>

Try searching from your local history

Once the above steps are done, open up your browser and go to locahost:5000. Do try to search for something from your local index and hope for the best. :-)

Notes

The issues that need loving:

  1. There is no way of telling the indexer what to index now. We end up getting a lot of pages like mail home etc. indexed which is not relevant. I have to fix this.
  2. The DHT hashing is not really efficient. It randomly picks buckets, although there is a hash function that picks the node.
  3. A lot of testing to do. I haven't yet tested DHT across several machines. I tested it all using docker and all the containers communicated using internal IP. I am not even sure if it works properly if DHT setup across different nodes are connected.

p2p-network's People

Contributors

nandajavarma avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.