Giter Site home page Giter Site logo

patrick-ogrady / hivenet Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 1.05 MB

Autonomous and Decentralized URL Recommender System Based on Useful Originality

License: MIT License

JavaScript 92.68% HTML 6.78% Dockerfile 0.54%
decentralized decentralized-applications recommender-system recommendation-system docker chrome-extension reputation-system chainpoint ipfs nodejs

hivenet's Introduction

HIVENET: Autonomous and Decentralized URL Recommender System Based on Useful Originality

Technical Specification

Introduction

I built HIVENET to fulfill the "Senior Project Requirement" at Stanford University under the supervision of my former professor, David Mazières. HIVENET proposes a design for a decentralized StumbleUpon replacement, provides a simulation environment to test this design, and provides a fully functional implementation of this design.

Full Disclosure: The code in this repository should be considered "pre-alpha" and could still have a number of bugs. If you see an issue, make a pull request!

Install Software

To avoid software packaging issues, I built a Docker image containing a properly configured "agent" (terminology further explained in attached technical specification). This image has been uploaded to the Docker Hub under the name patrickogrady/hivenet. If you haven't yet installed Docker, instructions can be found here: https://docs.docker.com/install/

Running Simulations

To test the underlying algorithms in HIVENET, I created a simulation environment that allows anyone to observe how parameter changes affect HIVENET performance. To simulate HIVENET with the standard parameters please run:

docker run -t -p 3000:3000 -p 4001:4001 -v `pwd`:/var/log/hivenet patrickogrady/hivenet:latest bash -c "npm test"

This command starts a Docker container to run the simulation and starts a web server that provides a GUI view of the simulation that is available at: localhost:3000.

An overview of simulation parameters and assumptions is provided in the technical specification.

To run modified simulations, download this GitHub repo and build a new docker image after you've made changes.

A legend for the meanings of different colors in the following diagram is provided in the technical specification.

Production Parameters

This simulation required a user to have provided 5 units of reputation before considering any recommendations from peers. This sufficiently prevented the spread of suspicious URLs from malicious hosts (viewing suspicious URL indicated by green node color). alt text

Randomly Trying Unrecommended URLs

Inspired by the BitTorrent notion of randomly unchoking peers, this simulation explored the notion of randomly trying observed URLs when no recommendations were available (no URL was deemed safe). This approach led to significant spread of suspicious URL. alt text

Production Parameters (no minimum requirement on reputation units)

This simulation explored the notion of not having a minimum observed reputation before considering peer reputation. This exposed some users to suspicious URLs because there is a chance that a malicious peer could discover a single useful URL, but the probability this single useful rating affects recommendations goes down with the requirement to observe X other useful ratings before considering. alt text

Using HIVENET

This assumes that the Docker image provided earlier is already downloaded.

Add Chrome Extension

To interface with HIVENET, the user can use the API endpoint that the "agent" provides at port 3000 (API reference provided in technical specification) or use the provided Chrome Extension.

To download the Chrome Extension, click here.

Once downloaded, unpack the ZIP file into a new folder (usually this just means clicking on the file on Mac).

Next, navigate to chrome://extensions. Toggle the developer mode tab in the top right of the screen: alt text

In the top lefthand corner of the screen click Load unpacked: alt text

Select the file you just unzipped: alt text

Start Agent

Create a folder that will store all the config files used during execution. (Docker is stateless so any files left in the container at the end of execution are deleted. So, the user must share a volume with the container where all stateful information is stored.)

After cd into this created folder, start the "agent" by running:

docker run -t -p 3000:3000 -p 4001:4001 -v `pwd`:/var/log/hivenet patrickogrady/hivenet:latest bash -c "npm start"

Open the HIVENET Extension and give it a try!: alt text

hivenet's People

Contributors

patrick-ogrady avatar

Watchers

 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.