1
- <img src =" http://38.media.tumblr.com/db32471b7c8870cbb0b2cc173af283bb/tumblr_inline_nm9x9u6u261rw7ney_540.gif " height =" 170 " width =" 100% " />
1
+ <h1 >
2
+ <img align =" left " height =" 60px " src =" guides/images/shards.png " >
3
+ Shards
4
+ </h1 >
2
5
3
- # Shards
4
6
> ### ETS tables on steroids!
5
- > Sharding support for ETS tables out-of-box.
7
+ > Sharding for ETS tables out-of-box.
6
8
7
- [ ![ Build Status] ( https://github.com/cabol/shards/workflows/CI/badge.svg )] ( https://github.com/cabol/shards/actions )
9
+ ![ CI] ( https://github.com/cabol/shards/workflows/CI/badge.svg )
10
+ [ ![ Codecov] ( https://codecov.io/gh/cabol/shards/branch/master/graphs/badge.svg )] ( https://codecov.io/gh/cabol/shards/branch/master/graphs/badge.svg )
8
11
[ ![ Hex Version] ( https://img.shields.io/hexpm/v/shards.svg )] ( https://hex.pm/packages/shards )
9
12
10
-
11
- Why might we need ** Sharding** on ETS tables? Well, the main reason is
12
- to keep the lock contention under control, in order to scale-out ETS tables
13
- (linearly) and support higher levels of concurrency without lock issues;
14
- specially write-locks, which most of the cases might cause significant
15
- performance degradation.
13
+ Why might we need ** Sharding/Partitioning** for the ETS tables? The main reason
14
+ is to keep the lock contention under control enabling ETS tables to scale out
15
+ and support higher levels of concurrency without lock issues; specially
16
+ write-locks, which most of the cases might cause significant performance
17
+ degradation.
16
18
17
19
Therefore, one of the most common and proven strategies to deal with these
18
20
problems is [ Sharding] [ sharding ] or [ Partitioning] [ partitioning ] ; the principle
19
21
is pretty similar to [ DHTs] [ dht ] .
20
22
21
- This is where ** Shards** comes in. ** Shards** is an ** Erlang/Elixir** library
22
- compatible with the current [ ETS API] [ ets_api ] , which implements
23
- [ Sharding] [ sharding ] or [ Partitioning] [ partitioning ] on top of ETS tables,
24
- completely transparent and out-of-box.
25
-
26
- See the [ getting started] [ getting_started ] guide
27
- and the [ online documentation] ( https://hexdocs.pm/shards/ ) .
23
+ This is where [ shards] [ shards ] comes in. [ shards] [ shards ] is an Erlang/Elixir
24
+ library fully compatible with the [ ETS API] [ ets_api ] , but it implements sharding
25
+ or partitioning on top of the ETS tables, completely transparent and out-of-box.
28
26
29
- > [ List of compatible ETS functions] ( https://github.com/cabol/shards/issues/1 )
27
+ See the ** [ getting started] [ getting_started ] ** guide
28
+ and the ** [ online documentation] ( https://hexdocs.pm/shards/ ) ** .
30
29
31
30
[ ets_api ] : http://erlang.org/doc/man/ets.html
32
31
[ sharding ] : https://en.wikipedia.org/wiki/Shard_(database_architecture)
33
32
[ partitioning ] : https://en.wikipedia.org/wiki/Partition_(database)
34
33
[ dht ] : https://en.wikipedia.org/wiki/Distributed_hash_table
35
- [ getting_started ] : https://github.com/cabol/shards/blob/master/guides/getting-started.md
34
+ [ shards ] : https://hexdocs.pm/shards/shards.html
35
+ [ getting_started ] : guides/getting-started.md
36
36
37
37
## Installation
38
38
@@ -42,7 +42,7 @@ In your `rebar.config`:
42
42
43
43
``` erlang
44
44
{deps , [
45
- {shards , " 0.6.1 " }
45
+ {shards , " 0.6.2 " }
46
46
]}.
47
47
```
48
48
@@ -56,27 +56,25 @@ def deps do
56
56
end
57
57
```
58
58
59
- > Check out the [ getting started] [ getting_started ] guide to learn
60
- more about it .
59
+ > For more information and examples, see the [ getting started] [ getting_started ]
60
+ guide .
61
61
62
62
## Important links
63
63
64
- * [ Documentation] ( https://hexdocs.pm/shards ) - Hex Docs.
65
-
66
- * [ Blog Post] ( http://cabol.github.io/posts/2016/04/14/sharding-support-for-ets.html ) -
67
- Transparent and out-of-box sharding support for ETS tables in Erlang/Elixir.
68
-
69
- * [ ExShards] ( https://github.com/cabol/ex_shards ) – Elixir wrapper for
70
- ` shards ` ; with extra and nicer functions.
71
-
72
- * [ Nebulex] ( https://github.com/cabol/nebulex ) – Distributed Caching
73
- framework for Elixir.
64
+ * [ Documentation] ( https://hexdocs.pm/shards ) - Hex Docs.
74
65
75
- * [ KVX ] ( https ://github.com/cabol/kvx ) – Simple Elixir in-memory Key/Value
76
- Store using ` shards ` (default adapter) .
66
+ * [ Blog Post ] ( http ://cabol. github.io/posts/2016/04/14/sharding-support-for-ets.html ) -
67
+ Transparent and out-of-box sharding support for ETS tables in Erlang/Elixir .
77
68
78
- * [ Cacherl] ( https://github.com/ferigis/cacherl ) Distributed Cache
79
- using ` shards ` .
69
+ * Projects using ** shards** :
70
+ * [ ExShards] ( https://github.com/cabol/ex_shards ) – Elixir wrapper for
71
+ ` shards ` ; with extra and nicer functions.
72
+ * [ Nebulex] ( https://github.com/cabol/nebulex ) – Distributed Caching
73
+ framework for Elixir.
74
+ * [ KVX] ( https://github.com/cabol/kvx ) – Simple Elixir in-memory Key/Value
75
+ Store using ` shards ` (default adapter).
76
+ * [ Cacherl] ( https://github.com/ferigis/cacherl ) Distributed Cache
77
+ using ` shards ` .
80
78
81
79
## Testing
82
80
@@ -91,14 +89,29 @@ You can find tests results in `_build/test/logs`, and coverage in
91
89
wrapper on top of ` rebar3 ` , therefore, you can do everything using ` rebar3 `
92
90
directly as well (e.g.: ` rebar3 do ct, cover ` ).
93
91
94
- ## Building Edoc
92
+ ## Generating Edoc
95
93
96
94
```
97
- $ make doc
95
+ $ make docs
98
96
```
99
97
100
- > ** NOTE:** Once you run the previous command, a new folder ` doc ` is created,
101
- and you'll have a pretty nice HTML documentation.
98
+ > ** NOTE:** Once you run the previous command, you will find the generated HTML
99
+ documentation within ` doc ` folder; open ` doc/index.html ` .
100
+
101
+ ## Contributing
102
+
103
+ Contributions to ** shards** are very welcome and appreciated!
104
+
105
+ Use the [ issue tracker] ( https://github.com/cabol/shards/issues ) for bug reports
106
+ or feature requests. Open a [ pull request] ( https://github.com/cabol/shards/pulls )
107
+ when you are ready to contribute.
108
+
109
+ When submitting a pull request you should not update the [ CHANGELOG.md] ( CHANGELOG.md ) ,
110
+ and also make sure you test your changes thoroughly, include unit tests
111
+ alongside new or changed code.
112
+
113
+ Before to submit a PR it is highly recommended to run ` make check ` before and
114
+ ensure all checks run successfully.
102
115
103
116
## Copyright and License
104
117
0 commit comments