Skip to content

Commit 738c2d2

Browse files
committed
little doc fixes
1 parent 4e52046 commit 738c2d2

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

README.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ A dead simple distributed locking library for Node.js and [etcd](http://github.c
88

99
## What is a distrbuted lock?
1010

11-
A distributed lock is a mechanism that provides serialized flow control on a context that is acted on by more than one process. These processes typically operate on different machines via Service Oriented Architecture. Each process uses an object called a distributed lock to "lock" access to the shared context so that only one process can act on it at a time, thereby ensuring consistency and preventing race conditions.
11+
A distributed lock is a mechanism that provides serialized flow control on a context that is acted on by more than one process. These processes typically operate on different machines via Service Oriented Architecture. Each process uses an object called a distributed lock to "lock" access to the shared context, aliased by a key, so that only one process, each aliased by a node id, can act on it at a time, thereby ensuring consistency and preventing race conditions.
12+
13+
## Why not Redlock?
14+
15+
Redis is great for a lot of things, and we love using it at Jobstart. Caching, keeping processes stateless, and fast access to simply structured data are all cases where Redis shines. However, implementing a distributed lock with Redis via Redlock has several caveats that are unsuitable for many cases. Namely, if you need strong guarantees that a lock will not be acquired by multiple nodes at once even in the event of failure, Redlock isn't a viable option.
1216

1317
## Notes
1418

@@ -193,3 +197,35 @@ foo.on('locked', function () {
193197
//handle locked with string
194198
});
195199
```
200+
201+
## Contributing
202+
203+
Submit a PR. Easy at that!
204+
205+
### Building
206+
207+
```bash
208+
$ make
209+
```
210+
211+
### Linting
212+
213+
```bash
214+
$ make lint
215+
```
216+
217+
### Running unit tests
218+
219+
```bash
220+
$ make unit
221+
```
222+
223+
### Running integration tests
224+
225+
**[Docker Compose](https://docs.docker.com/compose/) is required**
226+
227+
```bash
228+
$ make integration etcd_image_version=v2.2.2
229+
```
230+
231+
You can use whatever version you'd like to test against in the command above.

0 commit comments

Comments
 (0)