Coder Social home page Coder Social logo

dollarshaveclub / talcum Goto Github PK

View Code? Open in Web Editor NEW
8.0 10.0 0.0 79 KB

Talcum allows members of a distributed system to auto-configure themselves ๐Ÿ‘ฅ

License: MIT License

Makefile 1.97% Go 98.03%
golang distributed-systems resque sidekiq workers consul configuration-management

talcum's Introduction

Talcum

Talcum allows members of a distributed system to auto-configure themselves.

Talcum takes in a configuration file that defines all of the available roles and the number of actors that should take on the role. If there are roles available to be filled, an actor will locate a free one and set a lock on it. If all roles are taken, a random one will be chosen. The configuration file can be read in from the Consul KV store or from disk.

Usage

Usage of talcum:
  -app-name string
    	the name of the current application (default "app")
  -config-path string
    	the path to the role configuration file
  -consul-host string
    	the location of Consul (default "localhost:8500")
  -consul-path string
    	the path to the role configuration in Consul
  -datadog
    	statsd is Datadog (dogstatsd) (default true)
  -debug
    	run in debug mode
  -lock-delay duration
    	the delay in between lock attempts
  -metrics-namespace string
    	Datadog metrics namespace (ignored if not using Datadog) (default "talcum")
  -metrics-tags string
    	Metrics tags (comma-delimited, either datadog <key>:<value> or influxdb <key>=<value> (default "production")
  -selection-id string
    	the ID of the current selection (default "1")
  -statsd-addr string
    	statsd (dogstatsd) address (default "0.0.0.0:8125")

Example configuration

[
  {
    "role_name": "role-1",
    "role_definition": "foo,bar,baz",
    "num": 1
  },
  {
    "role_name": "role-2",
    "role_definition": "foo,bar",
    "num": 2
  },
  {
    "role_name": "role-3",
    "role_definition": "alice,bob,mary",
    "num": 3
  }
]

This role configuration file defines that one instance of "role1" should exist, two instances of "role2," etc. All actors involved in the selection process should have the same configuration file.

Example run

$ talcum -config-path examples/example2.json
  role-2
  foo,bar

The selected role definition is written to stdout. The role name is written to stderr.

talcum's People

Contributors

bkeroackdsc avatar davidhuie avatar michael-norris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

talcum's Issues

Separate name from queues

Any interest in separating out the name from the actual queue definitions? To keep it generic maybe "name" and "definition"?

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.