Giter VIP home page Giter VIP logo

tapestry_algorithm's Introduction

Tapestry Algorithm

Project compiled by

Akash Jajoo
Niraj Chowdhary

Steps to execute

  1. Extract Tapestry_Algorithm to you local machine
  2. Go to Project 3/tapestry folder via command prompt
  3. Type mix run proj3.exs arg1 arg2 Here, arg1 is the number of nodes involved arg2 Number of request per node.
    Output: Maximum number of hops taken to find the requested file.

Tapestry algorithm

  1. Here every node in the network has their own 16 bit long identifier
  2. Each node maintains a finger table which is the key value pair, just like hash map, that points to the neighbours it knows about.
  3. Neighbour is selected on basis of prefix matching, whichever has the longest prefix matching is chosen as the next node to hop to.
  4. The above proecess continues until desired object is found and it takes O(logn) time.

Output:

Annotation-2020-01-24-215737.png

The above screenshot demonstrates the working output of 100 and 1000 nodes handling 2 requests and 4 request per node respectively. For 100 nodes the maximum no. of hops is 2 to find an object and for 1000 nodes it is 4.

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.