GithubHelp home page GithubHelp logo

bign8 / cdn Goto Github PK

View Code? Open in Web Editor NEW
8.0 4.0 8.0 5.81 MB

CDN Cluster implementation

Home Page: https://hub.docker.com/r/bign8/cdn/

Go 59.70% Shell 1.73% Makefile 0.91% CSS 0.29% HTML 0.40% JavaScript 7.90% TeX 29.07%
go docker infrastructure cdn

cdn's Introduction

cdn's People

Contributors

bign8 avatar s22f485 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cdn's Issues

Distributed Hash Tables

After #1 our servers can communicate with each other which means its time to work on getting efficient storage and lookups. As of #1 our servers ask all others if they have stored particular pieces of data; This effort should allow our servers to request a single other server that is more likely to have a particular piece of data. These are noted in the paper below in sections 3 and 4.

DHTs

DHTs are great for minimizing the number of server-to-server requests. There are many ways to implement them so there is quite a bit of flexibility here. I would define a simple hash function that we can configure later based on how large of a ring we will need. Then when we get new server updates in monitorNeighbors we can hash the servers and place them on the ring. Then in checkNeighbors we hash the path and find the neighbor responsible for processing those requests and only ask that neighbor (if it's not us).

// Hash consistently converts a string to a numeric value [0, capacity)
type Hash func(value string, capacity int) int

The simplest hashing function to implement would be and ASCII-based modular addition hashing method. This would work by summing the ASCII values of each character in the value and modding the result by capacity. I'm pretty sure there are other functions in the go standard library, so if you can find them, go ahead and use them.

We will have to do some experimentation to figure out the exact size of our ring that makes our caches as balanced as possible around the ring. I'm guessing 255 would be fine for our case, but will need to test to verify.

Sources:

Hash Function

We have a simplistic hash function, but as an improvement, we might want a more sophisticated one (larger hashspace, handle non-ASCII characters, etc).

Clients Improvement

Go is designed to do things multi-threaded; Write client to simulate large groups of users. This would be similar to requests coming from an ISP w/o caching.

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.