{"id":13508902,"url":"https://github.com/cabol/shards","last_synced_at":"2025-04-08T12:09:19.981Z","repository":{"id":49501141,"uuid":"50730794","full_name":"cabol/shards","owner":"cabol","description":"Partitioned ETS tables for Erlang and Elixir","archived":false,"fork":false,"pushed_at":"2024-05-25T11:30:11.000Z","size":2463,"stargazers_count":294,"open_issues_count":4,"forks_count":36,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-01T10:18:04.740Z","etag":null,"topics":["elixir","erlang","ets","partitioning","sharding"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/shards","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cabol.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-30T15:34:43.000Z","updated_at":"2025-01-09T07:02:34.000Z","dependencies_parsed_at":"2022-09-08T01:50:59.937Z","dependency_job_id":"36198dc7-b9bf-4c46-8a37-ec99437f3007","html_url":"https://github.com/cabol/shards","commit_stats":{"total_commits":95,"total_committers":2,"mean_commits":47.5,"dds":"0.010526315789473717","last_synced_commit":"28fa000a5cae7ec6ff2b15c61cbaba6d44114620"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cabol%2Fshards","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cabol%2Fshards/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cabol%2Fshards/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cabol%2Fshards/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cabol","download_url":"https://codeload.github.com/cabol/shards/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247838444,"owners_count":21004580,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","erlang","ets","partitioning","sharding"],"created_at":"2024-08-01T02:01:00.254Z","updated_at":"2025-04-08T12:09:19.960Z","avatar_url":"https://github.com/cabol.png","language":"Erlang","funding_links":[],"categories":["ORM and Datamapping"],"sub_categories":[],"readme":"# Shards\n\u003e ### ETS tables on steroids!\n\u003e Sharding for ETS tables out-of-box.\n\n![CI](https://github.com/cabol/shards/workflows/CI/badge.svg)\n[![Codecov](https://codecov.io/gh/cabol/shards/branch/master/graphs/badge.svg)](https://codecov.io/gh/cabol/shards/branch/master/graphs/badge.svg)\n[![Hex Version](https://img.shields.io/hexpm/v/shards.svg)](https://hex.pm/packages/shards)\n[![Docs](https://img.shields.io/badge/docs-hexpm-blue.svg)](https://hexdocs.pm/shards)\n[![License](https://img.shields.io/hexpm/l/shards.svg)](LICENSE)\n\nWhy might we need **Sharding/Partitioning** for the ETS tables? The main reason\nis to keep the lock contention under control enabling ETS tables to scale out\nand support higher levels of concurrency without lock issues; specially\nwrite-locks, which most of the cases might cause significant performance\ndegradation.\n\nTherefore, one of the most common and proven strategies to deal with these\nproblems is [Sharding][sharding] or [Partitioning][partitioning]; the principle\nis pretty similar to [DHTs][dht].\n\nThis is where [shards][shards] comes in. [Shards][shards] is an Erlang/Elixir\nlibrary fully compatible with the [ETS API][ets_api], but it implements sharding\nor partitioning on top of the ETS tables, completely transparent and out-of-box.\n\nSee the **[getting started][getting_started]** guide\nand the **[online documentation](https://hexdocs.pm/shards/)**.\n\n[ets_api]: http://erlang.org/doc/man/ets.html\n[sharding]: https://en.wikipedia.org/wiki/Shard_(database_architecture)\n[partitioning]: https://en.wikipedia.org/wiki/Partition_(database)\n[dht]: https://en.wikipedia.org/wiki/Distributed_hash_table\n[shards]: https://hexdocs.pm/shards/shards.html\n[getting_started]: https://hexdocs.pm/shards/getting-started.html\n\n## Installation\n\n### Erlang\n\nIn your `rebar.config`:\n\n```erlang\n{deps, [\n  {shards, \"1.1.0\"}\n]}.\n```\n\n### Elixir\n\nIn your `mix.exs`:\n\n```elixir\ndef deps do\n  [{:shards, \"~\u003e 1.1\"}]\nend\n```\n\n\u003e For more information and examples, see the [getting started][getting_started]\n  guide.\n\n## Important links\n\n  * [Blog Post](http://cabol.github.io/posts/2016/04/14/sharding-support-for-ets.html) -\n    Transparent and out-of-box sharding support for ETS tables in Erlang/Elixir.\n\n  * Projects using **shards**:\n    * [shards_dist](https://github.com/cabol/shards_dist) - Distributed version\n      of `shards`. It was moved to a separate repo since `v1.0.0`.\n    * [Nebulex](https://github.com/cabol/nebulex) – Distributed Caching\n      framework for Elixir.\n    * [ExShards](https://github.com/cabol/ex_shards) – Elixir wrapper for\n      `shards`; with extra and nicer functions.\n    * [KVX](https://github.com/cabol/kvx) – Simple Elixir in-memory Key/Value\n      Store using `shards` (default adapter).\n    * [Cacherl](https://github.com/ferigis/cacherl) Distributed Cache\n      using `shards`.\n\n## Testing\n\n```\n$ make test\n```\n\nYou can find tests results in `_build/test/logs`, and coverage in\n`_build/test/cover`.\n\n\u003e **NOTE:** `shards` comes with a helper `Makefile`, but it is just a simple\n  wrapper on top of `rebar3`, therefore, you can do everything using `rebar3`\n  directly as well (e.g.: `rebar3 do ct, cover`).\n\n## Generating Edoc\n\n```\n$ make docs\n```\n\n\u003e **NOTE:** Once you run the previous command, you will find the generated HTML\n  documentation within `doc` folder; open `doc/index.html`.\n\n## Contributing\n\nContributions to **shards** are very welcome and appreciated!\n\nUse the [issue tracker](https://github.com/cabol/shards/issues) for bug reports\nor feature requests. Open a [pull request](https://github.com/cabol/shards/pulls)\nwhen you are ready to contribute.\n\nWhen submitting a pull request you should not update the [CHANGELOG.md](CHANGELOG.md),\nand also make sure you test your changes thoroughly, include unit tests\nalongside new or changed code.\n\nBefore to submit a PR it is highly recommended to run `make check` before and\nensure all checks run successfully.\n\n## Copyright and License\n\nCopyright (c) 2016 Carlos Andres Bolaños R.A.\n\n**Shards** source code is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcabol%2Fshards","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcabol%2Fshards","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcabol%2Fshards/lists"}