|
1 | 1 | # Radix
|
2 | 2 |
|
3 |
| -[](https://travis-ci.org/mediocregopher/radix) |
4 |
| - |
5 |
| -[][godoc] |
6 |
| -[](https://goreportcard.com/report/github.com/mediocregopher/radix/v3) |
| 3 | +[](https://travis-ci.org/neffos-contrib/radix) |
| 4 | + |
| 5 | +[][godoc] |
| 6 | +[](https://goreportcard.com/report/github.com/neffos-contrib/radix/v3) |
7 | 7 |
|
8 | 8 | Radix is a full-featured [Redis][redis] client for Go. See the [GoDoc][godoc]
|
9 | 9 | for documentation and general usage examples.
|
10 | 10 |
|
11 |
| -This is the third revision of this project, the previous one has been deprecated |
12 |
| -but can be found [here](https://github.com/mediocregopher/radix.v2). |
| 11 | +## neffos-contrib |
13 | 12 |
|
14 |
| -## Features |
15 |
| - |
16 |
| -* Standard print-like API which supports all current and future redis commands. |
17 |
| - |
18 |
| -* Support for using an io.Reader as a command argument and writing responses to |
19 |
| - an io.Writer, as well as marshaling/unmarshaling command arguments from |
20 |
| - structs. |
21 |
| - |
22 |
| -* Connection pooling, which takes advantage of implicit pipelining to reduce |
23 |
| - system calls. |
24 |
| - |
25 |
| -* Helpers for [EVAL][eval], [SCAN][scan], and manual [pipelining][pipelining]. |
26 |
| - |
27 |
| -* Support for [pubsub][pubsub], as well as persistent pubsub wherein if a |
28 |
| - connection is lost a new one transparently replaces it. |
29 |
| - |
30 |
| -* Full support for [sentinel][sentinel] and [cluster][cluster]. |
31 |
| - |
32 |
| -* Nearly all important types are interfaces, allowing for custom implementations |
33 |
| - of nearly anything. |
34 |
| - |
35 |
| -## Installation and Usage |
36 |
| - |
37 |
| -Radix always aims to support the most recent two versions of go, and is likely |
38 |
| -to support others prior to those two. |
39 |
| - |
40 |
| -[Module][module]-aware mode: |
41 |
| - |
42 |
| - go get github.com/mediocregopher/radix/v3 |
43 |
| - // import github.com/mediocregopher/radix/v3 |
44 |
| - |
45 |
| -Legacy GOPATH mode: |
46 |
| - |
47 |
| - go get github.com/mediocregopher/radix |
48 |
| - // import github.com/mediocregopher/radix |
49 |
| - |
50 |
| -## Testing |
51 |
| - |
52 |
| - # requires a redis server running on 127.0.0.1:6379 |
53 |
| - go test github.com/mediocregopher/radix/v3 |
54 |
| - |
55 |
| -## Benchmarks |
56 |
| - |
57 |
| -Thanks to a huge amount of work put in by @nussjustin, and inspiration from the |
58 |
| -[redispipe][redispipe] project and @funny-falcon, radix/v3 is significantly |
59 |
| -faster than most redis drivers, including redigo, for normal parallel workloads, |
60 |
| -and is pretty comparable for serial workloads. |
61 |
| - |
62 |
| -Benchmarks can be run from the bench folder. The following results were obtained |
63 |
| -by running the benchmarks with `-cpu` set to 32 and 64, on a 32 core machine, |
64 |
| -with the redis server on a separate machine. See [this thread][bench_thread] |
65 |
| -for more details. |
66 |
| - |
67 |
| -Some of radix's results are not included below because they use a non-default |
68 |
| -configuration. |
69 |
| - |
70 |
| -[bench_thread]: https://github.com/mediocregopher/radix/issues/67#issuecomment-465060960 |
71 |
| - |
72 |
| - |
73 |
| -``` |
74 |
| -# go get rsc.io/benchstat |
75 |
| -# cd bench |
76 |
| -# go test -v -run=XXX -bench=ParallelGetSet -cpu 32 -cpu 64 -benchmem . >/tmp/radix.stat |
77 |
| -# benchstat radix.stat |
78 |
| -name time/op |
79 |
| -ParallelGetSet/radix/default-32 2.15µs ± 0% <--- The good stuff |
80 |
| -ParallelGetSet/radix/default-64 2.05µs ± 0% <--- The better stuff |
81 |
| -ParallelGetSet/redigo-32 27.9µs ± 0% |
82 |
| -ParallelGetSet/redigo-64 28.5µs ± 0% |
83 |
| -ParallelGetSet/redispipe-32 2.02µs ± 0% |
84 |
| -ParallelGetSet/redispipe-64 1.71µs ± 0% |
85 |
| -
|
86 |
| -name alloc/op |
87 |
| -ParallelGetSet/radix/default-32 72.0B ± 0% |
88 |
| -ParallelGetSet/radix/default-64 84.0B ± 0% |
89 |
| -ParallelGetSet/redigo-32 119B ± 0% |
90 |
| -ParallelGetSet/redigo-64 120B ± 0% |
91 |
| -ParallelGetSet/redispipe-32 168B ± 0% |
92 |
| -ParallelGetSet/redispipe-64 172B ± 0% |
93 |
| -
|
94 |
| -name allocs/op |
95 |
| -ParallelGetSet/radix/default-32 4.00 ± 0% |
96 |
| -ParallelGetSet/radix/default-64 4.00 ± 0% |
97 |
| -ParallelGetSet/redigo-32 6.00 ± 0% |
98 |
| -ParallelGetSet/redigo-64 6.00 ± 0% |
99 |
| -ParallelGetSet/redispipe-32 8.00 ± 0% |
100 |
| -ParallelGetSet/redispipe-64 8.00 ± 0% |
101 |
| -``` |
102 |
| - |
103 |
| -## Copyright and licensing |
104 |
| - |
105 |
| -Unless otherwise noted, the source files are distributed under the *MIT License* |
106 |
| -found in the LICENSE.txt file. |
| 13 | +Contains temporarily fix for: https://github.com/mediocregopher/radix/issues/184. The import path of [neffos/stackexchange/redis](https://github.com/kataras/neffos/blob/master/stackexchange/redis/stackexchange_redis.go) didn't change, instead we use the [replace directive](https://github.com/golang/go/wiki/Modules#when-should-i-use-the-replace-directive) of the [go.mod](https://github.com/kataras/neffos/blob/master/go.mod#L5) file. |
107 | 14 |
|
108 | 15 | [redis]: http://redis.io
|
109 |
| -[godoc]: https://godoc.org/github.com/mediocregopher/radix |
110 |
| -[eval]: https://redis.io/commands/eval |
111 |
| -[scan]: https://redis.io/commands/scan |
112 |
| -[pipelining]: https://redis.io/topics/pipelining |
113 |
| -[pubsub]: https://redis.io/topics/pubsub |
114 |
| -[sentinel]: http://redis.io/topics/sentinel |
115 |
| -[cluster]: http://redis.io/topics/cluster-spec |
116 |
| -[module]: https://github.com/golang/go/wiki/Modules |
117 |
| -[redispipe]: https://github.com/joomcode/redispipe |
| 16 | +[godoc]: https://godoc.org/github.com/neffos-contrib/radix |
0 commit comments