GithubHelp home page GithubHelp logo

cmpe273-lab3's Introduction

cmpe273-lab3

The goal of this lab is to learn how consistent hashing works by implementing a proof of concept (POC) client-side sharding, aka consistent hash ring.

Steps

The baseline code has two modules--client and server--and you can be running three server instances (A, B, and C) and one client that talks to the servers. You won’t be making any changes to the server module, but all consistent hashing implementation should be on the client side only. Run the baseline code first to understand how GET and PUT to the distributed cache work before sharding the data. All the data should be distributed across: A: http://localhost:3000 B: http://localhost:3001 C: http://localhost:3002

  1. Implement node (cache server) lookup using consistent hashing in the client module.
  2. Call the consistent hash interface from step 1 to get bucket number.
  3. From the client, PUT this below sequence of key-value pairs into the three cache servers and check each server at http://localhost:300{0|1|2}/cache/ to make sure data is sharded across three servers. ● {Key => Value} ● 1 => a ● 2 => b ● 3 => c ● 4 => d ● 5 => e ● 6 => f ● 7 => g ● 8 => h ● 9 => i ● 10 => j
  4. Finally, retrieve all keys, 1 to 10, via GET(x) and print out their values to the console.

cmpe273-lab3's People

Contributors

sindhukashyap 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.