iodine 0.7.60 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.clang-format +15 -0
- data/.rspec +1 -0
- data/.yardopts +1 -3
- data/CHANGELOG.md +132 -12
- data/Gemfile +5 -7
- data/LICENSE.txt +1 -1
- data/README.md +147 -671
- data/Rakefile +9 -16
- data/examples/chatroom.nru +9 -0
- data/examples/client +74 -0
- data/examples/config-hello.nru +9 -0
- data/examples/config-hello.ru +11 -0
- data/examples/config-hijack.ru +13 -0
- data/examples/config-shootout.ru +43 -0
- data/examples/config.nru +120 -0
- data/examples/config.rb +37 -0
- data/examples/config.ru +42 -53
- data/examples/fake +24 -0
- data/examples/hello_neorack +137 -0
- data/examples/routes.nru +29 -0
- data/examples/routes.ru +42 -0
- data/exe/iodine +218 -258
- data/ext/iodine/extconf.rb +27 -100
- data/ext/iodine/fio-stl.h +128336 -0
- data/ext/iodine/fio-stl.md +26396 -0
- data/ext/iodine/iodine.c +213 -1393
- data/ext/iodine/iodine.h +250 -55
- data/ext/iodine/iodine_arg_helper.h +329 -0
- data/ext/iodine/iodine_caller.h +234 -25
- data/ext/iodine/iodine_cli.h +434 -0
- data/ext/iodine/iodine_compression.h +312 -0
- data/ext/iodine/iodine_connection.h +3484 -34
- data/ext/iodine/iodine_core.h +363 -0
- data/ext/iodine/iodine_crypto.h +1441 -0
- data/ext/iodine/iodine_defer.h +225 -4
- data/ext/iodine/iodine_json.h +738 -4
- data/ext/iodine/iodine_listener.h +263 -0
- data/ext/iodine/iodine_log.h +297 -0
- data/ext/iodine/iodine_minimap.h +543 -0
- data/ext/iodine/iodine_mustache.h +461 -4
- data/ext/iodine/iodine_pubsub_eng.h +729 -0
- data/ext/iodine/iodine_pubsub_history.h +547 -0
- data/ext/iodine/iodine_pubsub_msg.h +228 -0
- data/ext/iodine/iodine_redis.h +322 -0
- data/ext/iodine/iodine_store.h +418 -16
- data/ext/iodine/iodine_threads.h +279 -0
- data/ext/iodine/iodine_tls.h +515 -6
- data/ext/iodine/iodine_utils.h +923 -0
- data/iodine.gemspec +37 -42
- data/lib/iodine/benchmark.rb +1690 -0
- data/lib/iodine/documentation.rb +3085 -0
- data/lib/iodine/version.rb +17 -1
- data/lib/iodine.rb +54 -255
- data/logo.svg +36 -0
- data/mustache.md +55 -0
- data/sig/iodine.rbs +4 -0
- metadata +58 -184
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -40
- data/.github/workflows/ruby.yml +0 -42
- data/.gitignore +0 -21
- data/LIMITS.md +0 -41
- data/SPEC-PubSub-Draft.md +0 -159
- data/SPEC-WebSocket-Draft.md +0 -239
- data/bin/console +0 -22
- data/bin/info.md +0 -353
- data/bin/mustache_bench.rb +0 -100
- data/bin/poc/Gemfile.lock +0 -23
- data/bin/poc/README.md +0 -37
- data/bin/poc/config.ru +0 -66
- data/bin/poc/gemfile +0 -1
- data/bin/poc/www/index.html +0 -57
- data/examples/async_task.ru +0 -92
- data/examples/bates/README.md +0 -3
- data/examples/bates/config.ru +0 -342
- data/examples/bates/david+bold.pdf +0 -0
- data/examples/bates/public/drop-pdf.png +0 -0
- data/examples/bates/public/index.html +0 -600
- data/examples/echo.ru +0 -59
- data/examples/etag.ru +0 -16
- data/examples/hello.ru +0 -29
- data/examples/pubsub_engine.ru +0 -81
- data/examples/rack3.ru +0 -12
- data/examples/redis.ru +0 -70
- data/examples/shootout.ru +0 -73
- data/examples/sub-protocols.ru +0 -90
- data/examples/tcp_client.rb +0 -66
- data/examples/x-sendfile.ru +0 -14
- data/ext/iodine/fio.c +0 -11995
- data/ext/iodine/fio.h +0 -6371
- data/ext/iodine/fio_cli.c +0 -431
- data/ext/iodine/fio_cli.h +0 -189
- data/ext/iodine/fio_json_parser.h +0 -688
- data/ext/iodine/fio_siphash.c +0 -157
- data/ext/iodine/fio_siphash.h +0 -37
- data/ext/iodine/fio_tls.h +0 -129
- data/ext/iodine/fio_tls_missing.c +0 -649
- data/ext/iodine/fio_tls_openssl.c +0 -1106
- data/ext/iodine/fio_tmpfile.h +0 -50
- data/ext/iodine/fiobj.h +0 -44
- data/ext/iodine/fiobj4fio.h +0 -21
- data/ext/iodine/fiobj_ary.c +0 -333
- data/ext/iodine/fiobj_ary.h +0 -139
- data/ext/iodine/fiobj_data.c +0 -1187
- data/ext/iodine/fiobj_data.h +0 -167
- data/ext/iodine/fiobj_hash.c +0 -409
- data/ext/iodine/fiobj_hash.h +0 -176
- data/ext/iodine/fiobj_json.c +0 -622
- data/ext/iodine/fiobj_json.h +0 -68
- data/ext/iodine/fiobj_mem.h +0 -71
- data/ext/iodine/fiobj_mustache.c +0 -317
- data/ext/iodine/fiobj_mustache.h +0 -62
- data/ext/iodine/fiobj_numbers.c +0 -344
- data/ext/iodine/fiobj_numbers.h +0 -127
- data/ext/iodine/fiobj_str.c +0 -433
- data/ext/iodine/fiobj_str.h +0 -172
- data/ext/iodine/fiobject.c +0 -620
- data/ext/iodine/fiobject.h +0 -655
- data/ext/iodine/hpack.h +0 -1923
- data/ext/iodine/http.c +0 -2743
- data/ext/iodine/http.h +0 -1002
- data/ext/iodine/http1.c +0 -910
- data/ext/iodine/http1.h +0 -29
- data/ext/iodine/http1_parser.h +0 -878
- data/ext/iodine/http_internal.c +0 -1279
- data/ext/iodine/http_internal.h +0 -237
- data/ext/iodine/http_mime_parser.h +0 -350
- data/ext/iodine/iodine_caller.c +0 -230
- data/ext/iodine/iodine_connection.c +0 -941
- data/ext/iodine/iodine_defer.c +0 -420
- data/ext/iodine/iodine_fiobj2rb.h +0 -120
- data/ext/iodine/iodine_helpers.c +0 -282
- data/ext/iodine/iodine_helpers.h +0 -12
- data/ext/iodine/iodine_http.c +0 -1181
- data/ext/iodine/iodine_http.h +0 -23
- data/ext/iodine/iodine_json.c +0 -302
- data/ext/iodine/iodine_mustache.c +0 -567
- data/ext/iodine/iodine_pubsub.c +0 -580
- data/ext/iodine/iodine_pubsub.h +0 -26
- data/ext/iodine/iodine_rack_io.c +0 -273
- data/ext/iodine/iodine_rack_io.h +0 -20
- data/ext/iodine/iodine_store.c +0 -148
- data/ext/iodine/iodine_tcp.c +0 -346
- data/ext/iodine/iodine_tcp.h +0 -13
- data/ext/iodine/iodine_tls.c +0 -261
- data/ext/iodine/mustache_parser.h +0 -1546
- data/ext/iodine/redis_engine.c +0 -957
- data/ext/iodine/redis_engine.h +0 -79
- data/ext/iodine/resp_parser.h +0 -317
- data/ext/iodine/websocket_parser.h +0 -506
- data/ext/iodine/websockets.c +0 -743
- data/ext/iodine/websockets.h +0 -185
- data/lib/iodine/connection.rb +0 -61
- data/lib/iodine/json.rb +0 -42
- data/lib/iodine/mustache.rb +0 -113
- data/lib/iodine/pubsub.rb +0 -55
- data/lib/iodine/rack_utils.rb +0 -43
- data/lib/iodine/tls.rb +0 -16
- data/lib/rack/handler/iodine.rb +0 -33
- data/logo.png +0 -0
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: iodine
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Boaz Segev
|
|
@@ -10,270 +10,144 @@ cert_chain: []
|
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
|
-
name: rake
|
|
13
|
+
name: rake-compiler
|
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: '
|
|
18
|
+
version: '1'
|
|
19
19
|
- - "<"
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: '
|
|
21
|
+
version: '2.0'
|
|
22
22
|
type: :development
|
|
23
23
|
prerelease: false
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
25
|
requirements:
|
|
26
26
|
- - ">="
|
|
27
27
|
- !ruby/object:Gem::Version
|
|
28
|
-
version: '
|
|
28
|
+
version: '1'
|
|
29
29
|
- - "<"
|
|
30
30
|
- !ruby/object:Gem::Version
|
|
31
|
-
version: '
|
|
31
|
+
version: '2.0'
|
|
32
32
|
- !ruby/object:Gem::Dependency
|
|
33
|
-
name:
|
|
33
|
+
name: rake
|
|
34
34
|
requirement: !ruby/object:Gem::Requirement
|
|
35
35
|
requirements:
|
|
36
|
-
- - "
|
|
37
|
-
- !ruby/object:Gem::Version
|
|
38
|
-
version: '5'
|
|
39
|
-
- - "<"
|
|
36
|
+
- - "~>"
|
|
40
37
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: '
|
|
38
|
+
version: '13.0'
|
|
42
39
|
type: :development
|
|
43
40
|
prerelease: false
|
|
44
41
|
version_requirements: !ruby/object:Gem::Requirement
|
|
45
42
|
requirements:
|
|
46
|
-
- - "
|
|
43
|
+
- - "~>"
|
|
47
44
|
- !ruby/object:Gem::Version
|
|
48
|
-
version: '
|
|
49
|
-
- - "<"
|
|
50
|
-
- !ruby/object:Gem::Version
|
|
51
|
-
version: '6.0'
|
|
45
|
+
version: '13.0'
|
|
52
46
|
- !ruby/object:Gem::Dependency
|
|
53
47
|
name: rspec
|
|
54
48
|
requirement: !ruby/object:Gem::Requirement
|
|
55
49
|
requirements:
|
|
56
|
-
- - "
|
|
57
|
-
- !ruby/object:Gem::Version
|
|
58
|
-
version: 3.9.0
|
|
59
|
-
- - "<"
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: '4.0'
|
|
62
|
-
type: :development
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - ">="
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: 3.9.0
|
|
69
|
-
- - "<"
|
|
70
|
-
- !ruby/object:Gem::Version
|
|
71
|
-
version: '4.0'
|
|
72
|
-
- !ruby/object:Gem::Dependency
|
|
73
|
-
name: spec
|
|
74
|
-
requirement: !ruby/object:Gem::Requirement
|
|
75
|
-
requirements:
|
|
76
|
-
- - ">="
|
|
77
|
-
- !ruby/object:Gem::Version
|
|
78
|
-
version: 5.3.0
|
|
79
|
-
- - "<"
|
|
50
|
+
- - "~>"
|
|
80
51
|
- !ruby/object:Gem::Version
|
|
81
|
-
version: '
|
|
52
|
+
version: '3.0'
|
|
82
53
|
type: :development
|
|
83
54
|
prerelease: false
|
|
84
55
|
version_requirements: !ruby/object:Gem::Requirement
|
|
85
56
|
requirements:
|
|
86
|
-
- - "
|
|
87
|
-
- !ruby/object:Gem::Version
|
|
88
|
-
version: 5.3.0
|
|
89
|
-
- - "<"
|
|
90
|
-
- !ruby/object:Gem::Version
|
|
91
|
-
version: '6.0'
|
|
92
|
-
- !ruby/object:Gem::Dependency
|
|
93
|
-
name: rake-compiler
|
|
94
|
-
requirement: !ruby/object:Gem::Requirement
|
|
95
|
-
requirements:
|
|
96
|
-
- - ">="
|
|
57
|
+
- - "~>"
|
|
97
58
|
- !ruby/object:Gem::Version
|
|
98
|
-
version: '
|
|
99
|
-
- - "<"
|
|
100
|
-
- !ruby/object:Gem::Version
|
|
101
|
-
version: '2.0'
|
|
102
|
-
type: :development
|
|
103
|
-
prerelease: false
|
|
104
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
105
|
-
requirements:
|
|
106
|
-
- - ">="
|
|
107
|
-
- !ruby/object:Gem::Version
|
|
108
|
-
version: '1'
|
|
109
|
-
- - "<"
|
|
110
|
-
- !ruby/object:Gem::Version
|
|
111
|
-
version: '2.0'
|
|
59
|
+
version: '3.0'
|
|
112
60
|
description: A fast HTTP / Websocket Server with built-in Pub/Sub support (with or
|
|
113
|
-
without Redis), static file support and many
|
|
114
|
-
MRI on Linux / BSD / macOS / Windows
|
|
61
|
+
without a RESP3 database such as Valkey or Redis), static file support and many
|
|
62
|
+
other features, optimized for Ruby MRI on Linux / BSD / macOS / Windows
|
|
115
63
|
email:
|
|
116
|
-
- bo@
|
|
64
|
+
- bo@bowild.com
|
|
117
65
|
executables:
|
|
118
66
|
- iodine
|
|
119
67
|
extensions:
|
|
120
68
|
- ext/iodine/extconf.rb
|
|
121
69
|
extra_rdoc_files: []
|
|
122
70
|
files:
|
|
123
|
-
- ".
|
|
124
|
-
- ".github/workflows/ruby.yml"
|
|
125
|
-
- ".gitignore"
|
|
71
|
+
- ".clang-format"
|
|
126
72
|
- ".rspec"
|
|
127
73
|
- ".yardopts"
|
|
128
74
|
- CHANGELOG.md
|
|
129
75
|
- Gemfile
|
|
130
76
|
- LICENSE.txt
|
|
131
|
-
- LIMITS.md
|
|
132
77
|
- README.md
|
|
133
78
|
- Rakefile
|
|
134
79
|
- SECURITY.md
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
-
|
|
143
|
-
- bin/poc/gemfile
|
|
144
|
-
- bin/poc/www/index.html
|
|
145
|
-
- examples/async_task.ru
|
|
146
|
-
- examples/bates/README.md
|
|
147
|
-
- examples/bates/config.ru
|
|
148
|
-
- examples/bates/david+bold.pdf
|
|
149
|
-
- examples/bates/public/drop-pdf.png
|
|
150
|
-
- examples/bates/public/index.html
|
|
80
|
+
- examples/chatroom.nru
|
|
81
|
+
- examples/client
|
|
82
|
+
- examples/config-hello.nru
|
|
83
|
+
- examples/config-hello.ru
|
|
84
|
+
- examples/config-hijack.ru
|
|
85
|
+
- examples/config-shootout.ru
|
|
86
|
+
- examples/config.nru
|
|
87
|
+
- examples/config.rb
|
|
151
88
|
- examples/config.ru
|
|
152
|
-
- examples/
|
|
153
|
-
- examples/
|
|
154
|
-
- examples/
|
|
155
|
-
- examples/
|
|
156
|
-
- examples/rack3.ru
|
|
157
|
-
- examples/redis.ru
|
|
158
|
-
- examples/shootout.ru
|
|
159
|
-
- examples/sub-protocols.ru
|
|
160
|
-
- examples/tcp_client.rb
|
|
161
|
-
- examples/x-sendfile.ru
|
|
89
|
+
- examples/fake
|
|
90
|
+
- examples/hello_neorack
|
|
91
|
+
- examples/routes.nru
|
|
92
|
+
- examples/routes.ru
|
|
162
93
|
- exe/iodine
|
|
163
94
|
- ext/iodine/extconf.rb
|
|
164
|
-
- ext/iodine/fio.
|
|
165
|
-
- ext/iodine/fio.
|
|
166
|
-
- ext/iodine/fio_cli.c
|
|
167
|
-
- ext/iodine/fio_cli.h
|
|
168
|
-
- ext/iodine/fio_json_parser.h
|
|
169
|
-
- ext/iodine/fio_siphash.c
|
|
170
|
-
- ext/iodine/fio_siphash.h
|
|
171
|
-
- ext/iodine/fio_tls.h
|
|
172
|
-
- ext/iodine/fio_tls_missing.c
|
|
173
|
-
- ext/iodine/fio_tls_openssl.c
|
|
174
|
-
- ext/iodine/fio_tmpfile.h
|
|
175
|
-
- ext/iodine/fiobj.h
|
|
176
|
-
- ext/iodine/fiobj4fio.h
|
|
177
|
-
- ext/iodine/fiobj_ary.c
|
|
178
|
-
- ext/iodine/fiobj_ary.h
|
|
179
|
-
- ext/iodine/fiobj_data.c
|
|
180
|
-
- ext/iodine/fiobj_data.h
|
|
181
|
-
- ext/iodine/fiobj_hash.c
|
|
182
|
-
- ext/iodine/fiobj_hash.h
|
|
183
|
-
- ext/iodine/fiobj_json.c
|
|
184
|
-
- ext/iodine/fiobj_json.h
|
|
185
|
-
- ext/iodine/fiobj_mem.h
|
|
186
|
-
- ext/iodine/fiobj_mustache.c
|
|
187
|
-
- ext/iodine/fiobj_mustache.h
|
|
188
|
-
- ext/iodine/fiobj_numbers.c
|
|
189
|
-
- ext/iodine/fiobj_numbers.h
|
|
190
|
-
- ext/iodine/fiobj_str.c
|
|
191
|
-
- ext/iodine/fiobj_str.h
|
|
192
|
-
- ext/iodine/fiobject.c
|
|
193
|
-
- ext/iodine/fiobject.h
|
|
194
|
-
- ext/iodine/hpack.h
|
|
195
|
-
- ext/iodine/http.c
|
|
196
|
-
- ext/iodine/http.h
|
|
197
|
-
- ext/iodine/http1.c
|
|
198
|
-
- ext/iodine/http1.h
|
|
199
|
-
- ext/iodine/http1_parser.h
|
|
200
|
-
- ext/iodine/http_internal.c
|
|
201
|
-
- ext/iodine/http_internal.h
|
|
202
|
-
- ext/iodine/http_mime_parser.h
|
|
95
|
+
- ext/iodine/fio-stl.h
|
|
96
|
+
- ext/iodine/fio-stl.md
|
|
203
97
|
- ext/iodine/iodine.c
|
|
204
98
|
- ext/iodine/iodine.h
|
|
205
|
-
- ext/iodine/
|
|
99
|
+
- ext/iodine/iodine_arg_helper.h
|
|
206
100
|
- ext/iodine/iodine_caller.h
|
|
207
|
-
- ext/iodine/
|
|
101
|
+
- ext/iodine/iodine_cli.h
|
|
102
|
+
- ext/iodine/iodine_compression.h
|
|
208
103
|
- ext/iodine/iodine_connection.h
|
|
209
|
-
- ext/iodine/
|
|
104
|
+
- ext/iodine/iodine_core.h
|
|
105
|
+
- ext/iodine/iodine_crypto.h
|
|
210
106
|
- ext/iodine/iodine_defer.h
|
|
211
|
-
- ext/iodine/iodine_fiobj2rb.h
|
|
212
|
-
- ext/iodine/iodine_helpers.c
|
|
213
|
-
- ext/iodine/iodine_helpers.h
|
|
214
|
-
- ext/iodine/iodine_http.c
|
|
215
|
-
- ext/iodine/iodine_http.h
|
|
216
|
-
- ext/iodine/iodine_json.c
|
|
217
107
|
- ext/iodine/iodine_json.h
|
|
218
|
-
- ext/iodine/
|
|
108
|
+
- ext/iodine/iodine_listener.h
|
|
109
|
+
- ext/iodine/iodine_log.h
|
|
110
|
+
- ext/iodine/iodine_minimap.h
|
|
219
111
|
- ext/iodine/iodine_mustache.h
|
|
220
|
-
- ext/iodine/
|
|
221
|
-
- ext/iodine/
|
|
222
|
-
- ext/iodine/
|
|
223
|
-
- ext/iodine/
|
|
224
|
-
- ext/iodine/iodine_store.c
|
|
112
|
+
- ext/iodine/iodine_pubsub_eng.h
|
|
113
|
+
- ext/iodine/iodine_pubsub_history.h
|
|
114
|
+
- ext/iodine/iodine_pubsub_msg.h
|
|
115
|
+
- ext/iodine/iodine_redis.h
|
|
225
116
|
- ext/iodine/iodine_store.h
|
|
226
|
-
- ext/iodine/
|
|
227
|
-
- ext/iodine/iodine_tcp.h
|
|
228
|
-
- ext/iodine/iodine_tls.c
|
|
117
|
+
- ext/iodine/iodine_threads.h
|
|
229
118
|
- ext/iodine/iodine_tls.h
|
|
230
|
-
- ext/iodine/
|
|
231
|
-
- ext/iodine/redis_engine.c
|
|
232
|
-
- ext/iodine/redis_engine.h
|
|
233
|
-
- ext/iodine/resp_parser.h
|
|
234
|
-
- ext/iodine/websocket_parser.h
|
|
235
|
-
- ext/iodine/websockets.c
|
|
236
|
-
- ext/iodine/websockets.h
|
|
119
|
+
- ext/iodine/iodine_utils.h
|
|
237
120
|
- iodine.gemspec
|
|
238
121
|
- lib/iodine.rb
|
|
239
|
-
- lib/iodine/
|
|
240
|
-
- lib/iodine/
|
|
241
|
-
- lib/iodine/mustache.rb
|
|
242
|
-
- lib/iodine/pubsub.rb
|
|
243
|
-
- lib/iodine/rack_utils.rb
|
|
244
|
-
- lib/iodine/tls.rb
|
|
122
|
+
- lib/iodine/benchmark.rb
|
|
123
|
+
- lib/iodine/documentation.rb
|
|
245
124
|
- lib/iodine/version.rb
|
|
246
|
-
-
|
|
247
|
-
-
|
|
125
|
+
- logo.svg
|
|
126
|
+
- mustache.md
|
|
127
|
+
- sig/iodine.rbs
|
|
248
128
|
homepage: https://github.com/boazsegev/iodine
|
|
249
129
|
licenses:
|
|
250
130
|
- MIT
|
|
251
131
|
metadata:
|
|
252
132
|
allowed_push_host: https://rubygems.org
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
133
|
+
homepage_uri: https://github.com/boazsegev/iodine
|
|
134
|
+
source_code_uri: https://github.com/boazsegev/iodine
|
|
135
|
+
changelog_uri: https://github.com/boazsegev/iodine/blob/master/CHANGELOG.md
|
|
136
|
+
post_install_message: Thank you for installing Iodine 0.8.0.
|
|
256
137
|
rdoc_options: []
|
|
257
138
|
require_paths:
|
|
258
139
|
- lib
|
|
259
|
-
- ext
|
|
260
140
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
261
141
|
requirements:
|
|
262
142
|
- - ">="
|
|
263
143
|
- !ruby/object:Gem::Version
|
|
264
|
-
version:
|
|
144
|
+
version: 3.2.0
|
|
265
145
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
266
146
|
requirements:
|
|
267
147
|
- - ">="
|
|
268
148
|
- !ruby/object:Gem::Version
|
|
269
149
|
version: '0'
|
|
270
|
-
requirements:
|
|
271
|
-
- 'A Unix based system: Linux / macOS / BSD.'
|
|
272
|
-
- An updated C compiler.
|
|
273
|
-
- Ruby >= 2.3.8 (Ruby EOL).
|
|
274
|
-
- Ruby >= 2.5.0 recommended.
|
|
275
|
-
- TLS requires OpenSSL >= 1.1.0.
|
|
276
|
-
- Or Windows with Ruby >= 3.0.0 build with MingW and MingW as compiler.
|
|
150
|
+
requirements: []
|
|
277
151
|
rubygems_version: 4.0.3
|
|
278
152
|
specification_version: 4
|
|
279
153
|
summary: iodine - a fast HTTP / Websocket Server with Pub/Sub support, optimized for
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Bug report
|
|
3
|
-
about: Create a report to help us improve
|
|
4
|
-
title: ''
|
|
5
|
-
labels: ''
|
|
6
|
-
assignees: ''
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
### System Information
|
|
11
|
-
|
|
12
|
-
- **OS**: [e.g. macOS 10.15.4]
|
|
13
|
-
- **Ruby**: [e.g. 2.7.0]
|
|
14
|
-
- **Version**: [e.g. 0.7.38]
|
|
15
|
-
- **OpenSSL**: [OpenSSL 1.1.1f 20 Mar 2020]
|
|
16
|
-
|
|
17
|
-
### Description
|
|
18
|
-
|
|
19
|
-
A clear and concise description of what the bug is.
|
|
20
|
-
|
|
21
|
-
### Rack App to Reproduce
|
|
22
|
-
|
|
23
|
-
```ruby
|
|
24
|
-
APP = proc {|env| [200, {}, ["Hello World"]] }
|
|
25
|
-
run APP
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
### Testing code
|
|
29
|
-
|
|
30
|
-
```sh
|
|
31
|
-
curl http://localhost:3000/
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### Expected behavior
|
|
35
|
-
|
|
36
|
-
A clear and concise description of what you expected to happen.
|
|
37
|
-
|
|
38
|
-
### Actual behavior
|
|
39
|
-
|
|
40
|
-
A clear and concise description of what actually happened.
|
data/.github/workflows/ruby.yml
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# This workflow uses actions that are not certified by GitHub.
|
|
2
|
-
# They are provided by a third-party and are governed by
|
|
3
|
-
# separate terms of service, privacy policy, and support documentation.
|
|
4
|
-
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
|
5
|
-
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
|
6
|
-
|
|
7
|
-
name: Building iodine
|
|
8
|
-
|
|
9
|
-
on:
|
|
10
|
-
push:
|
|
11
|
-
branches: [ "master" ]
|
|
12
|
-
pull_request:
|
|
13
|
-
branches: [ "master" ]
|
|
14
|
-
|
|
15
|
-
permissions:
|
|
16
|
-
contents: read
|
|
17
|
-
|
|
18
|
-
jobs:
|
|
19
|
-
test:
|
|
20
|
-
strategy:
|
|
21
|
-
fail-fast: false
|
|
22
|
-
matrix:
|
|
23
|
-
ruby-version: ['2.3', '2.7', '3.0', '3.1', '3.2']
|
|
24
|
-
os: [ubuntu-latest, macos-latest] # , windows-latest
|
|
25
|
-
runs-on: ${{ matrix.os }}
|
|
26
|
-
steps:
|
|
27
|
-
- uses: actions/checkout@v3
|
|
28
|
-
- name: Set up Ruby # see https://github.com/ruby/setup-ruby#versioning)
|
|
29
|
-
uses: ruby/setup-ruby@v1
|
|
30
|
-
with:
|
|
31
|
-
ruby-version: ${{ matrix.ruby-version }}
|
|
32
|
-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
|
33
|
-
- name: Build and Test Iodine
|
|
34
|
-
run: |
|
|
35
|
-
echo CFLAGS = $CFLAGS
|
|
36
|
-
echo cflags = $cflags
|
|
37
|
-
echo HOME = $HOME
|
|
38
|
-
ruby -e 'puts Gem.default_dir'
|
|
39
|
-
bundle exec rake install
|
|
40
|
-
# env VERBOSE=1 bundle exec rspec --format documentation
|
|
41
|
-
# - name: Run tests
|
|
42
|
-
# run: bundle exec rake
|
data/.gitignore
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/.bundle/
|
|
2
|
-
/.yardoc
|
|
3
|
-
/Gemfile.lock
|
|
4
|
-
/_yardoc/
|
|
5
|
-
/coverage/
|
|
6
|
-
/doc/
|
|
7
|
-
/pkg/
|
|
8
|
-
/spec/reports/
|
|
9
|
-
/tmp/
|
|
10
|
-
/old_stuff/
|
|
11
|
-
*.bundle
|
|
12
|
-
*.so
|
|
13
|
-
*.gem
|
|
14
|
-
/ai-*
|
|
15
|
-
|
|
16
|
-
.ruby-version
|
|
17
|
-
.clang_complete
|
|
18
|
-
|
|
19
|
-
.DS_Store
|
|
20
|
-
spec/examples.txt
|
|
21
|
-
spec/log
|
data/LIMITS.md
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# Iodine limits and settings
|
|
2
|
-
|
|
3
|
-
I will, at some point, document these... here's the key points:
|
|
4
|
-
|
|
5
|
-
## SSL/TLS
|
|
6
|
-
|
|
7
|
-
* TLS support requires OpenSSL 1.1.0 and above. On Heroku, this requires `heroku-18`.
|
|
8
|
-
|
|
9
|
-
* Iodine supports TLS 1.2 and above (depending on the OpenSSL version used).
|
|
10
|
-
|
|
11
|
-
## HTTP limits
|
|
12
|
-
|
|
13
|
-
* Uploads are adjustable and limited to ~50Mib by default.
|
|
14
|
-
|
|
15
|
-
* HTTP connection timeout (keep-alive) is adjustable and set to ~60 seconds by default.
|
|
16
|
-
|
|
17
|
-
* HTTP total header size is adjustable and limited to ~32Kib by default.
|
|
18
|
-
|
|
19
|
-
* HTTP header line length size is limited to a hard-coded limit of 8Kb.
|
|
20
|
-
|
|
21
|
-
* HTTP headers count is limited to a hard-coded limit of 128 headers.
|
|
22
|
-
|
|
23
|
-
## Websocket
|
|
24
|
-
|
|
25
|
-
* Incoming Websocket message size limits are adjustable and limited to ~250Kib by default.
|
|
26
|
-
|
|
27
|
-
## EventSource / SSE
|
|
28
|
-
|
|
29
|
-
* Iodine will automatically attempt to send a `ping` event instead of disconnecting the connection. The ping interval is the same as the HTTP connection timeout interval.
|
|
30
|
-
|
|
31
|
-
## Pub/Sub
|
|
32
|
-
|
|
33
|
-
* Channel names are binary safe and unlimited in length. However, name lengths effect performance.
|
|
34
|
-
|
|
35
|
-
**Do NOT allow clients to dictate the channel name**, as they might use extremely long names and cause resource starvation.
|
|
36
|
-
|
|
37
|
-
* Pub/sub is limited to the process cluster. To use pub/sub with an external service (such as Redis) an "Engine" is required (see YARD documentation).
|
|
38
|
-
|
|
39
|
-
* Pub/sub pattern matching supports only the Redis pattern matching approach. This makes patterns significantly more expensive and exact matches simpler and faster.
|
|
40
|
-
|
|
41
|
-
It's recommended to prefer exact channel/stream name matching when possible.
|
data/SPEC-PubSub-Draft.md
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
# Ruby pub/sub API Specification Draft
|
|
2
|
-
|
|
3
|
-
### Draft State
|
|
4
|
-
|
|
5
|
-
This draft is under discussion and will be implemented by iodine starting with the 0.8.x versions.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Purpose
|
|
10
|
-
|
|
11
|
-
This document details a Rack specification extension for publish/subscribe (pub/sub) modules that can extend WebSocket / EventSource Rack servers.
|
|
12
|
-
|
|
13
|
-
The purpose of this specification is:
|
|
14
|
-
|
|
15
|
-
1. To keep separation of concerns by avoiding inter-process-communication logic (IPC) in the application code base.
|
|
16
|
-
|
|
17
|
-
This is important since IPC is often implemented using pipes / sockets, which could introduce network and IO concerns into the application code.
|
|
18
|
-
|
|
19
|
-
2. To specify a common publish/subscribe (pub/sub) API for servers and pub/sub modules, allowing applications to easily switch between conforming implementations and servers.
|
|
20
|
-
|
|
21
|
-
Since pub/sub design is idiomatic to WebSocket and EventSource approaches, as well as other reactive programming techniques, it is better if applications aren't locked in to a specific server / implementation.
|
|
22
|
-
|
|
23
|
-
3. To provide common considerations and guidelines for pub/sub implementors to consider when implementing their pub/sub modules.
|
|
24
|
-
|
|
25
|
-
Some concerns are common for pub/sub implementors, such as integrating third party message brokers (Redis, RabbitMQ, Cassandra)
|
|
26
|
-
|
|
27
|
-
## Pub/Sub Instance Methods
|
|
28
|
-
|
|
29
|
-
Conforming pub/sub implementations **MUST** implement the following pub/sub instance methods:
|
|
30
|
-
|
|
31
|
-
* `pubsub?` **MUST** return the pub/sub API version as an integer number. Currently, set to `0` (development version).
|
|
32
|
-
|
|
33
|
-
* `subscribe(to, is_pattern = false) { |from, message| optional_block }` where:
|
|
34
|
-
|
|
35
|
-
* `to` is a named **channel** (or **pattern**).
|
|
36
|
-
|
|
37
|
-
The implementation **MAY** support pattern matching for named channels (`to`). The pattern matching algorithm used, if any, **SHOULD** be documented.
|
|
38
|
-
|
|
39
|
-
If the implementation does **NOT** support pattern matching and `is_pattern` is truthful, the implementation **MUST** raise and exception.
|
|
40
|
-
|
|
41
|
-
`to` **SHOULD** be a String, but implementations **MAY** support Symbols as aliases to Strings (in which case `:my_channel` is the same `'my_channel'`).
|
|
42
|
-
|
|
43
|
-
* `block` is optional and accepts (if provided) two arguments (`from` which is equal to `to` and `message` which contains the data's content).
|
|
44
|
-
|
|
45
|
-
`block` (if provided) **MUST** be called when a publication was received by the named channel.
|
|
46
|
-
|
|
47
|
-
If no `block` is provided:
|
|
48
|
-
|
|
49
|
-
* If the pub/sub instance is an extended WebSocket / EventSource (SSE) `client` object (see the WebSocket / EventSource extension draft) data should be directly sent to the `client`.
|
|
50
|
-
|
|
51
|
-
* If the pub/sub isn't linked with a `client` / connection, an exception **MUST** be raised.
|
|
52
|
-
|
|
53
|
-
If a subscription to `to` already exists for the same pub/sub instance, it should be *replaced* by the new subscription (the old subscription should be canceled / unsubscribed).
|
|
54
|
-
|
|
55
|
-
If the pub/sub instance is an extended WebSocket / EventSource (SSE) `client` object (see the WebSocket / EventSource extension draft), the subscription **MUST** be closed automatically when the connection is closed (when `on_close` is called).
|
|
56
|
-
|
|
57
|
-
Otherwise, the subscription **MUST** be closed automatically when the pub/sub object goes out of scope and is garbage collected (if this ever happens).
|
|
58
|
-
|
|
59
|
-
The `subscribe` method **MUST** return `nil` on a known failure (i.e., when the connection is already closed), or any truthful value on success.
|
|
60
|
-
|
|
61
|
-
* `unsubscribe(from, is_pattern = false)` should cancel a subscription to the `from` named channel / pattern.
|
|
62
|
-
|
|
63
|
-
* `publish(to, message, engine = nil)` where:
|
|
64
|
-
|
|
65
|
-
* `to` is a named channel, same as detailed in `subscribe`.
|
|
66
|
-
|
|
67
|
-
Implementations **MAY** support pattern based publishing. This **SHOULD** be documented as well as how patterns are detected (as opposed to named channels). Note that pattern publishing isn't supported by common backends (such as Redis) and introduces complex privacy and security concerns.
|
|
68
|
-
|
|
69
|
-
* `message` a String containing the data to be published.
|
|
70
|
-
|
|
71
|
-
If `message` is NOT a String, the implementation **MAY** convert the data silently to JSON. Otherwise, the implementation **MUST** raise an exception.
|
|
72
|
-
|
|
73
|
-
`message` encoding (binary / UTZ-8) **MAY** be altered during publication, but any change **MUST** result in valid encoding.
|
|
74
|
-
|
|
75
|
-
* `engine` routes the publish method to the specified pub/sub Engine (see later on). If none is specified, the default engine should be used. If `false` is specified, the message **MUST** be forwarded to all subscribed clients on the **same process**.
|
|
76
|
-
|
|
77
|
-
The `publish` method **MUST** return `true` if a publication was scheduled (not necessarily performed). If it's already known that the publication would fail, the method should return `false`.
|
|
78
|
-
|
|
79
|
-
An implementation **MUST** call the relevant PubSubEngine's `publish` method after performing any internal book keeping logic. If `engine` is `nil`, the default PubSubEngine should be called. If `engine` is `false`, the implementation **MUST** forward the published message to the actual clients (if any).
|
|
80
|
-
|
|
81
|
-
A global alias for this method (allowing it to be accessed from outside active connections) **MAY** be defined as `Rack::PubSub.publish`.
|
|
82
|
-
|
|
83
|
-
## Integrating a Pub/Sub module into a WebSocket / EventSource (SSE) `client` object
|
|
84
|
-
|
|
85
|
-
A conforming pub/sub module **MUST** be designed so that it can be integrated into WebSocket / EventSource (SSE) `client` objects be `include`-ing their class.
|
|
86
|
-
|
|
87
|
-
This **MUST** result in a behavior where subscriptions are destroyed / canceled once the `client` object state changes to "closed" - i.e., either when the `on_close` callback is called, or the first time the method `client.open?` returns `false`.
|
|
88
|
-
|
|
89
|
-
The idiomatic way to add a pub/sub module to a `client`'s class is:
|
|
90
|
-
|
|
91
|
-
```ruby
|
|
92
|
-
client.class.prepend MyPubSubModule unless client.pubsub?
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
The pub/sub module **MUST** expect and support this behavior.
|
|
96
|
-
|
|
97
|
-
**Note**: the use of `prepend` (rather than `include`) is chosen so that it's possible to override the `client`'s instance method of `pubsub?`.
|
|
98
|
-
|
|
99
|
-
## Connecting to External Backends (pub/sub Engines)
|
|
100
|
-
|
|
101
|
-
It is common for scaling applications to require an external message broker backend such as Redis, RabbitMQ, etc'. The following requirements set a common interface for such "engine" implementation and integration.
|
|
102
|
-
|
|
103
|
-
Pub/sub implementations **MUST** implement the following module / class methods in one of their public classes / modules (iodine implements these under `Iodine::PubSub`):
|
|
104
|
-
|
|
105
|
-
* `attach(engine)` where `engine` is a `PubSubEngine` object, as described in this specification.
|
|
106
|
-
|
|
107
|
-
When a pub/sub engine is attached, the implementation **MUST** inform the engine of any existing or future subscriptions.
|
|
108
|
-
|
|
109
|
-
The implementation **MUST** call the engine's `subscribe` callback for each existing (and future) subscription.
|
|
110
|
-
|
|
111
|
-
The implementation **MUST** allow multiple "engines" to be attached when multiple calls to `attach` are made.
|
|
112
|
-
|
|
113
|
-
* `detach(engine)` where `engine` is a PubSubEngine object as described in this specification.
|
|
114
|
-
|
|
115
|
-
The implementation **MUST** remove the engine from the attached engine list. The opposite of `attach`.
|
|
116
|
-
|
|
117
|
-
* `default=(engine)` sets a default pub/sub engine, where `engine` is a PubSubEngine object as described in this specification.
|
|
118
|
-
|
|
119
|
-
Implementations **MUST** forward any `publish` method calls to the default pub/sub engine, unless an `engine` is specified in arguments passes to the `publish` method.
|
|
120
|
-
|
|
121
|
-
* `default` returns the current default pub/sub engine, where the engine is a PubSubEngine object as described in this specification.
|
|
122
|
-
|
|
123
|
-
* `reset(engine)` where `engine` is a PubSubEngine object as described in this specification.
|
|
124
|
-
|
|
125
|
-
Implementations **MUST** behave as if the engine was newly registered and (re)inform the engine of any existing subscriptions by calling engine's `subscribe` callback for each existing subscription.
|
|
126
|
-
|
|
127
|
-
A `PubSubEngine` instance object **MUST** implement the following methods:
|
|
128
|
-
|
|
129
|
-
* `subscribe(to, is_pattern = false)` this method informs the engine that a subscription to the specified channel / pattern exists for the calling the process. It **MUST ONLY** be called **once** for all existing and future subscriptions to that channel within the process.
|
|
130
|
-
|
|
131
|
-
The method **MUST** return `true` if a subscription was scheduled (or performed) or `false` if the subscription is known to fail.
|
|
132
|
-
|
|
133
|
-
This method will be called by the pub/sub implementation (for each registered engine). The engine **MAY** assume that the method would never be called directly by an application / client.
|
|
134
|
-
|
|
135
|
-
This method **MUST NOT** raise an exception.
|
|
136
|
-
|
|
137
|
-
* `unsubscribe(from, is_pattern = false)` this method informs an engine that there are no more subscriptions to the named channel / pattern for the calling process.
|
|
138
|
-
|
|
139
|
-
The method's semantics are similar to `subscribe` only is performs the opposite action.
|
|
140
|
-
|
|
141
|
-
This method **MUST NOT** raise an exception.
|
|
142
|
-
|
|
143
|
-
This method will be called by the pub/sub implementation (for each registered engine). The engine **MAY** assume that the method would never be called directly by an application / client.
|
|
144
|
-
|
|
145
|
-
* `publish(channel, message)` where both `channel` is either a Symbol or a String (both being equivalent) and `message` **MUST** be a String.
|
|
146
|
-
|
|
147
|
-
This method will be called by the server when a message is published using the engine.
|
|
148
|
-
|
|
149
|
-
This method will be called by the pub/sub implementation (for each registered engine).
|
|
150
|
-
|
|
151
|
-
The engine **MUST** assume that the method **MAY** be called directly by an application / client.
|
|
152
|
-
|
|
153
|
-
In order for a PubSubEngine instance object to publish messages to all subscribed clients on a particular process, it **SHOULD** call the implementation's global `publish` method with the engine set to `false`.
|
|
154
|
-
|
|
155
|
-
i.e., if the implementation's global `publish` method is in a class called `Iodine`:
|
|
156
|
-
|
|
157
|
-
```ruby
|
|
158
|
-
Iodine.publish channel, message, false
|
|
159
|
-
```
|