Skip to content

P2P search solution using Ruby and a custom routing protocol

License

Notifications You must be signed in to change notification settings

Rob-Conan/PeerSearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PeerSearch

Robert Conan - 09469320

Originally designed as a gem, this is no longer the case. All files are contained inside the lib directory

Usage

Main.rb is the "Test" file and is used to instanciate the project.

To set up the first node in the network on localhost:8767

$ ruby main.rb --boot Command --bootstrap 127.0.0.1:8767

Subsequent nodes can then be defined using

$ ruby main.rb --index Joining2 --bootid Command --port 127.0.0.1:8778 --bootstrap 127.0.0.1:8767

And for a node to request the indexing and searching of indexes on the network

$ ruby main.rb --index Joining --bootid Command --port 127.0.0.1:8777 --bootstrap 127.0.0.1:8767 --send --search WORD

Commands

The commands to run from the command line are as follows

  1. The ID of the Bootstrap node (when it is starting)

--boot []

  1. The IP & Port combination for this individual node (Not needed if Bootstrap node)

--port []

  1. The Bootstrap node IP

--bootstrap []

  1. The Nodes Identifier/Index (Not needed if Bootstrap node)

--index []

  1. The ID of the Bootstrap node (that this node will use to connect too)

--bootid []

  1. A flag to say the Index message should be sent by this node

--send

  1. The search term to search for on the network

--search []

Extras/Notes

The additional command line parameters are used to provide easier debugging then instanciating the project in a single terminal window

The IP:PORT combination is passed through regex to ensure the format of 0-255.0-255.0-255.0-255:0-9999

About

P2P search solution using Ruby and a custom routing protocol

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages