nutcracker 0.4.0.16 → 0.4.1.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +3 -3
  3. data/ext/nutcracker/ChangeLog +33 -8
  4. data/ext/nutcracker/Makefile.in +34 -21
  5. data/ext/nutcracker/README.md +61 -26
  6. data/ext/nutcracker/aclocal.m4 +34 -31
  7. data/ext/nutcracker/autom4te.cache/output.0 +1875 -1330
  8. data/ext/nutcracker/autom4te.cache/output.1 +1875 -1330
  9. data/ext/nutcracker/autom4te.cache/requests +232 -451
  10. data/ext/nutcracker/autom4te.cache/traces.0 +2256 -2129
  11. data/ext/nutcracker/autom4te.cache/traces.1 +73 -59
  12. data/ext/nutcracker/config.h.in +1 -2
  13. data/ext/nutcracker/config.h.in~ +333 -0
  14. data/ext/nutcracker/config/compile +1 -1
  15. data/ext/nutcracker/config/config.guess +13 -160
  16. data/ext/nutcracker/config/config.sub +25 -11
  17. data/ext/nutcracker/config/depcomp +1 -1
  18. data/ext/nutcracker/config/install-sh +170 -196
  19. data/ext/nutcracker/config/ltmain.sh +3509 -2018
  20. data/ext/nutcracker/config/missing +1 -1
  21. data/ext/nutcracker/configure +1874 -1329
  22. data/ext/nutcracker/configure.ac +3 -2
  23. data/ext/nutcracker/contrib/Makefile.in +18 -5
  24. data/ext/nutcracker/contrib/yaml-0.1.4/LICENSE +19 -0
  25. data/ext/nutcracker/contrib/yaml-0.1.4/Makefile.am +20 -0
  26. data/ext/nutcracker/contrib/yaml-0.1.4/Makefile.in +832 -0
  27. data/ext/nutcracker/contrib/yaml-0.1.4/README +27 -0
  28. data/ext/nutcracker/contrib/yaml-0.1.4/aclocal.m4 +1157 -0
  29. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/output.0 +13342 -0
  30. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/output.1 +14611 -0
  31. data/ext/nutcracker/{autom4te.cache → contrib/yaml-0.1.4/autom4te.cache}/output.2 +3465 -8761
  32. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/requests +516 -0
  33. data/ext/nutcracker/{autom4te.cache/traces.2 → contrib/yaml-0.1.4/autom4te.cache/traces.0} +662 -698
  34. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/traces.1 +577 -0
  35. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/traces.2 +2721 -0
  36. data/ext/nutcracker/contrib/yaml-0.1.4/config.h.in +79 -0
  37. data/ext/nutcracker/contrib/yaml-0.1.4/config.h.in~ +80 -0
  38. data/ext/nutcracker/contrib/yaml-0.1.4/config/compile +347 -0
  39. data/ext/nutcracker/contrib/yaml-0.1.4/config/config.guess +1421 -0
  40. data/ext/nutcracker/contrib/yaml-0.1.4/config/config.sub +1807 -0
  41. data/ext/nutcracker/contrib/yaml-0.1.4/config/depcomp +791 -0
  42. data/ext/nutcracker/contrib/yaml-0.1.4/config/install-sh +501 -0
  43. data/ext/nutcracker/contrib/yaml-0.1.4/config/ltmain.sh +11147 -0
  44. data/ext/nutcracker/contrib/yaml-0.1.4/config/missing +215 -0
  45. data/ext/nutcracker/contrib/yaml-0.1.4/config/test-driver +148 -0
  46. data/ext/nutcracker/contrib/yaml-0.1.4/configure +14611 -0
  47. data/ext/nutcracker/contrib/yaml-0.1.4/configure.ac +75 -0
  48. data/ext/nutcracker/contrib/yaml-0.1.4/doc/doxygen.cfg +222 -0
  49. data/ext/nutcracker/contrib/yaml-0.1.4/include/yaml.h +1971 -0
  50. data/ext/nutcracker/contrib/yaml-0.1.4/m4/libtool.m4 +8369 -0
  51. data/ext/nutcracker/contrib/yaml-0.1.4/m4/ltoptions.m4 +437 -0
  52. data/ext/nutcracker/contrib/yaml-0.1.4/m4/ltsugar.m4 +124 -0
  53. data/ext/nutcracker/contrib/yaml-0.1.4/m4/ltversion.m4 +23 -0
  54. data/ext/nutcracker/contrib/yaml-0.1.4/m4/lt~obsolete.m4 +99 -0
  55. data/ext/nutcracker/contrib/yaml-0.1.4/src/Makefile.am +4 -0
  56. data/ext/nutcracker/contrib/yaml-0.1.4/src/Makefile.in +600 -0
  57. data/ext/nutcracker/contrib/yaml-0.1.4/src/api.c +1392 -0
  58. data/ext/nutcracker/contrib/yaml-0.1.4/src/dumper.c +394 -0
  59. data/ext/nutcracker/contrib/yaml-0.1.4/src/emitter.c +2329 -0
  60. data/ext/nutcracker/contrib/yaml-0.1.4/src/loader.c +432 -0
  61. data/ext/nutcracker/contrib/yaml-0.1.4/src/parser.c +1374 -0
  62. data/ext/nutcracker/contrib/yaml-0.1.4/src/reader.c +465 -0
  63. data/ext/nutcracker/contrib/yaml-0.1.4/src/scanner.c +3570 -0
  64. data/ext/nutcracker/contrib/yaml-0.1.4/src/writer.c +141 -0
  65. data/ext/nutcracker/contrib/yaml-0.1.4/src/yaml_private.h +640 -0
  66. data/ext/nutcracker/contrib/yaml-0.1.4/tests/Makefile.am +8 -0
  67. data/ext/nutcracker/contrib/yaml-0.1.4/tests/Makefile.in +1083 -0
  68. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor-alt.c +800 -0
  69. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor.c +1130 -0
  70. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter-alt.c +217 -0
  71. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter.c +202 -0
  72. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-dumper.c +311 -0
  73. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-emitter.c +327 -0
  74. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-loader.c +63 -0
  75. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-parser.c +63 -0
  76. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-scanner.c +63 -0
  77. data/ext/nutcracker/contrib/yaml-0.1.4/tests/test-reader.c +354 -0
  78. data/ext/nutcracker/contrib/yaml-0.1.4/tests/test-version.c +29 -0
  79. data/ext/nutcracker/m4/libtool.m4 +1474 -1087
  80. data/ext/nutcracker/m4/ltoptions.m4 +90 -37
  81. data/ext/nutcracker/m4/ltsugar.m4 +4 -3
  82. data/ext/nutcracker/m4/ltversion.m4 +6 -6
  83. data/ext/nutcracker/m4/lt~obsolete.m4 +4 -3
  84. data/ext/nutcracker/man/nutcracker.8 +1 -1
  85. data/ext/nutcracker/notes/memcache.md +162 -0
  86. data/ext/nutcracker/notes/recommendation.md +10 -5
  87. data/ext/nutcracker/notes/redis.md +23 -9
  88. data/ext/nutcracker/scripts/nutcracker.init +10 -0
  89. data/ext/nutcracker/scripts/nutcracker.init.debian +83 -0
  90. data/ext/nutcracker/scripts/nutcracker.spec +36 -2
  91. data/ext/nutcracker/scripts/redis-check.sh +4 -0
  92. data/ext/nutcracker/src/Makefile.am +6 -1
  93. data/ext/nutcracker/src/Makefile.in +26 -12
  94. data/ext/nutcracker/src/event/Makefile.in +19 -6
  95. data/ext/nutcracker/src/hashkit/Makefile.in +19 -6
  96. data/ext/nutcracker/src/hashkit/nc_jenkins.c +1 -1
  97. data/ext/nutcracker/src/hashkit/nc_ketama.c +3 -3
  98. data/ext/nutcracker/src/nc.c +1 -1
  99. data/ext/nutcracker/src/nc_conf.c +67 -19
  100. data/ext/nutcracker/src/nc_conf.h +9 -4
  101. data/ext/nutcracker/src/nc_connection.c +35 -2
  102. data/ext/nutcracker/src/nc_connection.h +53 -47
  103. data/ext/nutcracker/src/nc_core.c +8 -1
  104. data/ext/nutcracker/src/nc_message.c +23 -7
  105. data/ext/nutcracker/src/nc_message.h +24 -1
  106. data/ext/nutcracker/src/nc_proxy.c +14 -3
  107. data/ext/nutcracker/src/nc_rbtree.c +1 -5
  108. data/ext/nutcracker/src/nc_request.c +58 -10
  109. data/ext/nutcracker/src/nc_response.c +27 -4
  110. data/ext/nutcracker/src/nc_server.c +33 -5
  111. data/ext/nutcracker/src/nc_server.h +10 -9
  112. data/ext/nutcracker/src/nc_string.h +17 -0
  113. data/ext/nutcracker/src/nc_util.c +5 -1
  114. data/ext/nutcracker/src/proto/Makefile.in +19 -6
  115. data/ext/nutcracker/src/proto/nc_memcache.c +76 -12
  116. data/ext/nutcracker/src/proto/nc_proto.h +9 -0
  117. data/ext/nutcracker/src/proto/nc_redis.c +400 -18
  118. data/lib/nutcracker.rb +1 -1
  119. data/lib/nutcracker/version.rb +1 -1
  120. metadata +61 -6
  121. data/ext/nutcracker/notes/memcache.txt +0 -123
data/lib/nutcracker.rb CHANGED
@@ -103,7 +103,7 @@ module Nutcracker
103
103
  next
104
104
  end
105
105
 
106
- next unless redis? cluster_name # skip memcached clusters
106
+ #next unless redis? cluster_name # skip memcached clusters
107
107
 
108
108
  aliases = node_aliases cluster_name
109
109
  cluster = { nodes: [], name: cluster_name }
@@ -1,3 +1,3 @@
1
1
  module Nutcracker
2
- VERSION = "0.4.0.16"
2
+ VERSION = "0.4.1.18"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nutcracker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0.16
4
+ version: 0.4.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eran Barak Levi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-25 00:00:00.000000000 Z
11
+ date: 2015-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -72,15 +72,14 @@ files:
72
72
  - ext/nutcracker/aclocal.m4
73
73
  - ext/nutcracker/autom4te.cache/output.0
74
74
  - ext/nutcracker/autom4te.cache/output.1
75
- - ext/nutcracker/autom4te.cache/output.2
76
75
  - ext/nutcracker/autom4te.cache/requests
77
76
  - ext/nutcracker/autom4te.cache/traces.0
78
77
  - ext/nutcracker/autom4te.cache/traces.1
79
- - ext/nutcracker/autom4te.cache/traces.2
80
78
  - ext/nutcracker/conf/nutcracker.leaf.yml
81
79
  - ext/nutcracker/conf/nutcracker.root.yml
82
80
  - ext/nutcracker/conf/nutcracker.yml
83
81
  - ext/nutcracker/config.h.in
82
+ - ext/nutcracker/config.h.in~
84
83
  - ext/nutcracker/config/compile
85
84
  - ext/nutcracker/config/config.guess
86
85
  - ext/nutcracker/config/config.sub
@@ -93,6 +92,61 @@ files:
93
92
  - ext/nutcracker/contrib/Makefile.am
94
93
  - ext/nutcracker/contrib/Makefile.in
95
94
  - ext/nutcracker/contrib/yaml-0.1.4.tar.gz
95
+ - ext/nutcracker/contrib/yaml-0.1.4/LICENSE
96
+ - ext/nutcracker/contrib/yaml-0.1.4/Makefile.am
97
+ - ext/nutcracker/contrib/yaml-0.1.4/Makefile.in
98
+ - ext/nutcracker/contrib/yaml-0.1.4/README
99
+ - ext/nutcracker/contrib/yaml-0.1.4/aclocal.m4
100
+ - ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/output.0
101
+ - ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/output.1
102
+ - ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/output.2
103
+ - ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/requests
104
+ - ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/traces.0
105
+ - ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/traces.1
106
+ - ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/traces.2
107
+ - ext/nutcracker/contrib/yaml-0.1.4/config.h.in
108
+ - ext/nutcracker/contrib/yaml-0.1.4/config.h.in~
109
+ - ext/nutcracker/contrib/yaml-0.1.4/config/compile
110
+ - ext/nutcracker/contrib/yaml-0.1.4/config/config.guess
111
+ - ext/nutcracker/contrib/yaml-0.1.4/config/config.sub
112
+ - ext/nutcracker/contrib/yaml-0.1.4/config/depcomp
113
+ - ext/nutcracker/contrib/yaml-0.1.4/config/install-sh
114
+ - ext/nutcracker/contrib/yaml-0.1.4/config/ltmain.sh
115
+ - ext/nutcracker/contrib/yaml-0.1.4/config/missing
116
+ - ext/nutcracker/contrib/yaml-0.1.4/config/test-driver
117
+ - ext/nutcracker/contrib/yaml-0.1.4/configure
118
+ - ext/nutcracker/contrib/yaml-0.1.4/configure.ac
119
+ - ext/nutcracker/contrib/yaml-0.1.4/doc/doxygen.cfg
120
+ - ext/nutcracker/contrib/yaml-0.1.4/include/yaml.h
121
+ - ext/nutcracker/contrib/yaml-0.1.4/m4/libtool.m4
122
+ - ext/nutcracker/contrib/yaml-0.1.4/m4/ltoptions.m4
123
+ - ext/nutcracker/contrib/yaml-0.1.4/m4/ltsugar.m4
124
+ - ext/nutcracker/contrib/yaml-0.1.4/m4/ltversion.m4
125
+ - ext/nutcracker/contrib/yaml-0.1.4/m4/lt~obsolete.m4
126
+ - ext/nutcracker/contrib/yaml-0.1.4/src/Makefile.am
127
+ - ext/nutcracker/contrib/yaml-0.1.4/src/Makefile.in
128
+ - ext/nutcracker/contrib/yaml-0.1.4/src/api.c
129
+ - ext/nutcracker/contrib/yaml-0.1.4/src/dumper.c
130
+ - ext/nutcracker/contrib/yaml-0.1.4/src/emitter.c
131
+ - ext/nutcracker/contrib/yaml-0.1.4/src/loader.c
132
+ - ext/nutcracker/contrib/yaml-0.1.4/src/parser.c
133
+ - ext/nutcracker/contrib/yaml-0.1.4/src/reader.c
134
+ - ext/nutcracker/contrib/yaml-0.1.4/src/scanner.c
135
+ - ext/nutcracker/contrib/yaml-0.1.4/src/writer.c
136
+ - ext/nutcracker/contrib/yaml-0.1.4/src/yaml_private.h
137
+ - ext/nutcracker/contrib/yaml-0.1.4/tests/Makefile.am
138
+ - ext/nutcracker/contrib/yaml-0.1.4/tests/Makefile.in
139
+ - ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor-alt.c
140
+ - ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor.c
141
+ - ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter-alt.c
142
+ - ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter.c
143
+ - ext/nutcracker/contrib/yaml-0.1.4/tests/run-dumper.c
144
+ - ext/nutcracker/contrib/yaml-0.1.4/tests/run-emitter.c
145
+ - ext/nutcracker/contrib/yaml-0.1.4/tests/run-loader.c
146
+ - ext/nutcracker/contrib/yaml-0.1.4/tests/run-parser.c
147
+ - ext/nutcracker/contrib/yaml-0.1.4/tests/run-scanner.c
148
+ - ext/nutcracker/contrib/yaml-0.1.4/tests/test-reader.c
149
+ - ext/nutcracker/contrib/yaml-0.1.4/tests/test-version.c
96
150
  - ext/nutcracker/extconf.rb
97
151
  - ext/nutcracker/m4/libtool.m4
98
152
  - ext/nutcracker/m4/ltoptions.m4
@@ -103,13 +157,14 @@ files:
103
157
  - ext/nutcracker/notes/c-styleguide.txt
104
158
  - ext/nutcracker/notes/debug.txt
105
159
  - ext/nutcracker/notes/kqueue.pdf
106
- - ext/nutcracker/notes/memcache.txt
160
+ - ext/nutcracker/notes/memcache.md
107
161
  - ext/nutcracker/notes/recommendation.md
108
162
  - ext/nutcracker/notes/redis.md
109
163
  - ext/nutcracker/notes/socket.txt
110
164
  - ext/nutcracker/scripts/benchmark-mget.py
111
165
  - ext/nutcracker/scripts/multi_get.sh
112
166
  - ext/nutcracker/scripts/nutcracker.init
167
+ - ext/nutcracker/scripts/nutcracker.init.debian
113
168
  - ext/nutcracker/scripts/nutcracker.spec
114
169
  - ext/nutcracker/scripts/pipelined_read.sh
115
170
  - ext/nutcracker/scripts/pipelined_write.sh
@@ -198,7 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
253
  version: '0'
199
254
  requirements: []
200
255
  rubyforge_project: ruby-nutcracker
201
- rubygems_version: 2.2.2
256
+ rubygems_version: 2.4.6
202
257
  signing_key:
203
258
  specification_version: 4
204
259
  summary: Gem wrapper for Twitter's Nutcracker
@@ -1,123 +0,0 @@
1
- - ascii:
2
-
3
- - Storage Commands (set, add, replace, append, prepend, cas):
4
-
5
- set <key> <flags> <expiry> <datalen> [noreply]\r\n<data>\r\n
6
- add <key> <flags> <expiry> <datalen> [noreply]\r\n<data>\r\n
7
- replace <key> <flags> <expiry> <datalen> [noreply]\r\n<data>\r\n
8
- append <key> <flags> <expiry> <datalen> [noreply]\r\n<data>\r\n
9
- prepend <key> <flags> <expiry> <datalen> [noreply]\r\n<data>\r\n
10
-
11
- cas <key> <flags> <expiry> <datalen> <cas> [noreply]\r\n<data>\r\n
12
-
13
- where,
14
- <flags> - uint32_t : data specific client side flags
15
- <expiry> - uint32_t : expiration time (in seconds)
16
- <datalen> - uint32_t : size of the data (in bytes)
17
- <data> - uint8_t[]: data block
18
- <cas> - uint64_t
19
-
20
- - Retrival Commands (get, gets):
21
-
22
- get <key>\r\n
23
- get <key> [<key>]+\r\n
24
-
25
- gets <key>\r\n
26
- gets <key> [<key>]+\r\n
27
-
28
- - Delete Command (delete):
29
-
30
- delete <key> [noreply]\r\n
31
-
32
- - Arithmetic Commands (incr, decr):
33
-
34
- incr <key> <value> [noreply]\r\n
35
- decr <key> <value> [noreply]\r\n
36
-
37
- where,
38
- <value> - uint64_t
39
-
40
- - Misc Commands (quit)
41
-
42
- quit\r\n
43
- flush_all [<delay>] [noreply]\r\n
44
- version\r\n
45
- verbosity <num> [noreply]\r\n
46
-
47
- - Statistics Commands
48
-
49
- stats\r\n
50
- stats <args>\r\n
51
-
52
- - Error Responses:
53
-
54
- ERROR\r\n
55
- CLIENT_ERROR [error]\r\n
56
- SERVER_ERROR [error]\r\n
57
-
58
- where,
59
- ERROR means client sent a non-existent command name
60
- CLIENT_ERROR means that command sent by the client does not conform to the protocol
61
- SERVER_ERROR means that there was an error on the server side that made processing of the command impossible
62
-
63
- - Storage Command Responses:
64
-
65
- STORED\r\n
66
- NOT_STORED\r\n
67
- EXISTS\r\n
68
- NOT_FOUND\r\n
69
-
70
- where,
71
- STORED indicates success.
72
- NOT_STORED indicates the data was not stored because condition for an add or replace wasn't met.
73
- EXISTS indicates that the item you are trying to store with a cas has been modified since you last fetched it.
74
- NOT_FOUND indicates that the item you are trying to store with a cas does not exist.
75
-
76
- - Delete Command Response:
77
-
78
- NOT_FOUND\r\n
79
- DELETED\r\n
80
-
81
- - Retrival Responses:
82
-
83
- END\r\n
84
- VALUE <key> <flags> <datalen> [<cas>]\r\n<data>\r\nEND\r\n
85
- VALUE <key> <flags> <datalen> [<cas>]\r\n<data>\r\n[VALUE <key> <flags> <datalen> [<cas>]\r\n<data>]+\r\nEND\r\n
86
-
87
- - Arithmetic Responses:
88
-
89
- NOT_FOUND\r\n
90
- <value>\r\n
91
-
92
- where,
93
- <value> - uint64_t : new key value after incr or decr operation
94
-
95
- - Statistics Response
96
- [STAT <name> <value>\r\n]+END\r\n
97
-
98
- - Misc Response
99
-
100
- OK\r\n
101
- VERSION <version>\r\n
102
-
103
- - Notes:
104
- - set always creates mapping irrespective of whether it is present on not.
105
- - add, adds only if the mapping is not present
106
- - replace, only replaces if the mapping is present
107
- - append and prepend command ignore flags and expiry values
108
- - noreply instructs the server to not send the reply even if there is an error.
109
- - decr of 0 is 0, while incr of UINT64_MAX is 0
110
- - maximum length of the key is 250 characters
111
- - expiry of 0 means that item never expires, though it could be evicted from the cache
112
- - non-zero expiry is either unix time (# seconds since 01/01/1970) or,
113
- offset in seconds from the current time (< 60 x 60 x 24 x 30 seconds = 30 days)
114
- - expiry time is with respect to the server (not client)
115
- - <datalen> can be zero and when it is, the <data> block is empty.
116
-
117
- - Thoughts:
118
- - ascii protocol is easier to debug - think using strace or tcpdump to see
119
- protocol on the wire, Or using telnet or netcat or socat to build memcache
120
- requests and responses
121
- http://stackoverflow.com/questions/2525188/are-binary-protocols-dead
122
-
123
- - http://news.ycombinator.com/item?id=1712788