Code Monkey home page Code Monkey logo

shards's Introduction

Shards

ETS tables on steroids!

Sharding support for ETS tables out-of-box.

Build Status

Why might we need Sharding on ETS tables? Well, the main reason is to keep the lock contention under control, in order to scale-out ETS tables (linearly) and support higher levels of concurrency without lock issues; specially write-locks, which most of the cases might cause significant performance degradation.

Therefore, one of the most common and proven strategies to deal with these problems is Sharding or Partitioning; the principle is pretty similar to DHTs.

This is where Shards comes in. Shards is an Erlang/Elixir library compatible with the current ETS API, which implements Sharding or Partitioning on top of ETS tables, completely transparent and out-of-box.

See the getting started guide and the online documentation.

List of compatible ETS functions

Installation

Erlang

In your rebar.config:

{deps, [
  {shards, "0.6.0"}
]}.

Elixir

In your mix.exs:

def deps do
  [{:shards, "~> 0.6"}]
end

Check out the getting started guide to learn more about it.

Important links

  • Documentation - Hex Docs.

  • Blog Post - Transparent and out-of-box sharding support for ETS tables in Erlang/Elixir.

  • ExShards – Elixir wrapper for shards; with extra and nicer functions.

  • Nebulex – Distributed Caching framework for Elixir.

  • KVX – Simple Elixir in-memory Key/Value Store using shards (default adapter).

  • Cacherl Distributed Cache using shards.

Testing

$ make test

You can find tests results in _build/test/logs, and coverage in _build/test/cover.

NOTE: shards comes with a helper Makefile, but it is just a simple wrapper on top of rebar3, therefore, you can do everything using rebar3 directly as well (e.g.: rebar3 do ct, cover).

Building Edoc

$ make doc

NOTE: Once you run the previous command, a new folder doc is created, and you'll have a pretty nice HTML documentation.

Copyright and License

Copyright (c) 2016 Carlos Andres Bolaños R.A.

Shards source code is licensed under the MIT License.

shards's People

Contributors

cabol avatar casidiablo avatar

Watchers

Pedro Marques da Silva 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.