Coder Social home page Coder Social logo

dns-chord's Introduction

dns-chord

Implementing DNS functionality using chord framework

๐Ÿš€ Problem description

๐Ÿš€ Documentation

๐Ÿš€ Report

System Architecture

Our DNS system builds on top of the Chord protocol, where multiple nodes store DNS records in their storage or local cache. When a user initiates a DNS query, the queried node retrieves the record from its local storage or cache if available. If the record is not present, the system locates the node holding the requested DNS record in the network. If found, that node returns the requested DNS record. Otherwise, a traditional DNS query is performed to obtain the record, which is then inserted into our network for future lookups.

Setup

Local setup

  1. Install Go. If you haven't already, you may install it from here.

  2. Clone the repository

    git clone https://github.com/fauzxan/dns-chord.git
    cd dns-chord
    go mod download
  3. Navigate to the cloned repository

    cd dns-chord
  4. Open a terminal for each node you want in the network.

  5. Build the project and run the dns-chord executable to start a node.

    go build && ./dns-chord
  6. Upon running the command, you will be prompted to input the following information:

    • Your current port number: Enter the port number that you want the Chord node to use. This should be a valid port number (e.g., 3000).

    • Full IP address of the node you're using to join the network:

      • If you are creating a new network, simply press ENTER or RETURN

      • If you are joining an existing network, provide the full IP address of the node you want to connect to.

  7. We also designed a user-friendly interface to interact with the Chord node and gather information about its state, routing, storage, and cache.

    • Press 1 to display the fingertable of the current node.

    • Press 2 to view the successor and predecessor of the current node in the Chord network.

    • Press 5 to query a website using the DNS functionality implemented in the Chord protocol.

    • Press 3 to see the contents stored at the current node. This includes information about the DNS records or any data stored by the node.

    • Press 4 to see the cache - Includes cached results from previous DNS queries.

    • Press m to see the menu

Docker setup

To run docker container, just build docker image using

    docker build --tag dns-chord-node .

Build a docker volume called mydata (This is not needed anymore)

    docker volume create mydata

If successfully built, then run, as well as to bind the volume with the container, run

    docker run -v mydata:/app/data  -it dns-chord-node

Do note that the -it tag is important to enable interactivity and also see colored output. This mounts the "mydata" volume to the "/app/data" path inside the container.

If you kill the container, then to restart it simply run:

docker start -ai <container_name>

You may close the terminal, and the container will still keep running in the background. You can confirm this behaviour via the log output of the container on docker desktop.

dns-chord's People

Contributors

fauzxan avatar rmurarishetti avatar anirhc avatar s4nat avatar 64hann avatar

Stargazers

Keyth M Citizen  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.