Skip to content

thejchap/scale

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Scale

Go implementation of Chord - DHT protocol

Local Development

Setup

Have Go installed, all that stuff

BloomRPC is helpful to test RPC calls

brew cask install bloomrpc

Workflow

  • make - run linting and tests
  • make serve - start grpc server
  • make serve.silent if you don't want to watch 1 billion RPC calls zoom by
  • make trace - start the trace server (defaults to port 5000)
  • PORT=<port number> JOIN=<node to join ip> WEB=<port number> make serve
  • make trace.codegen - generate protobuf code for the trace server
  • make scale.codegen - generate protobuf code for the scale server

Internode communication is on port 3000 by default. GraphQL API is on port 8000 by default. Useful GraphQL queries:

query {
  get(key: "hello") {
    value
    trace {
      addr
      functionCall
      duration
    }
  }
  metadata {
    node {
      id
      addr
      fingerTable
      predecessor {
        id
        addr
      }
      successor {
        id
        addr
      }
    }
  }
}

mutation {
  set(key: "hello", value: "world") {
    count
    trace {
      addr
      functionCall
      duration
    }
  }
}

Resources

Releases

No releases published

Packages

No packages published

Languages

  • Go 98.4%
  • Other 1.6%