rainbows 0.94.0 → 0.95.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.
Files changed (84) hide show
  1. data/.document +1 -0
  2. data/.manifest +18 -0
  3. data/ChangeLog +394 -226
  4. data/GIT-VERSION-FILE +1 -1
  5. data/GIT-VERSION-GEN +1 -1
  6. data/GNUmakefile +6 -4
  7. data/NEWS +18 -0
  8. data/README +13 -5
  9. data/Static_Files +71 -0
  10. data/TODO +12 -0
  11. data/Test_Suite +1 -1
  12. data/bin/rainbows +1 -4
  13. data/lib/rainbows/actor_spawn.rb +1 -1
  14. data/lib/rainbows/app_pool.rb +1 -1
  15. data/lib/rainbows/base.rb +79 -89
  16. data/lib/rainbows/byte_slice.rb +17 -0
  17. data/lib/rainbows/configurator.rb +46 -0
  18. data/lib/rainbows/const.rb +2 -2
  19. data/lib/rainbows/dev_fd_response.rb +52 -44
  20. data/lib/rainbows/error.rb +1 -0
  21. data/lib/rainbows/ev_core.rb +3 -2
  22. data/lib/rainbows/event_machine.rb +26 -24
  23. data/lib/rainbows/fiber/base.rb +30 -40
  24. data/lib/rainbows/fiber/body.rb +34 -0
  25. data/lib/rainbows/fiber/io.rb +28 -8
  26. data/lib/rainbows/fiber/queue.rb +1 -0
  27. data/lib/rainbows/fiber/rev.rb +4 -2
  28. data/lib/rainbows/fiber.rb +1 -0
  29. data/lib/rainbows/fiber_pool.rb +2 -2
  30. data/lib/rainbows/fiber_spawn.rb +2 -2
  31. data/lib/rainbows/http_response.rb +20 -31
  32. data/lib/rainbows/http_server.rb +3 -4
  33. data/lib/rainbows/max_body.rb +1 -0
  34. data/lib/rainbows/never_block/event_machine.rb +2 -0
  35. data/lib/rainbows/never_block.rb +5 -4
  36. data/lib/rainbows/queue_pool.rb +1 -0
  37. data/lib/rainbows/response/body.rb +119 -0
  38. data/lib/rainbows/response.rb +43 -0
  39. data/lib/rainbows/rev/client.rb +79 -9
  40. data/lib/rainbows/rev/core.rb +4 -0
  41. data/lib/rainbows/rev/deferred_response.rb +1 -44
  42. data/lib/rainbows/rev/heartbeat.rb +1 -0
  43. data/lib/rainbows/rev/master.rb +1 -0
  44. data/lib/rainbows/rev/sendfile.rb +26 -0
  45. data/lib/rainbows/rev/thread.rb +2 -1
  46. data/lib/rainbows/rev.rb +2 -0
  47. data/lib/rainbows/rev_fiber_spawn.rb +3 -1
  48. data/lib/rainbows/rev_thread_pool.rb +7 -5
  49. data/lib/rainbows/rev_thread_spawn.rb +2 -2
  50. data/lib/rainbows/revactor.rb +146 -146
  51. data/lib/rainbows/sendfile.rb +10 -21
  52. data/lib/rainbows/server_token.rb +39 -0
  53. data/lib/rainbows/stream_file.rb +14 -0
  54. data/lib/rainbows/tee_input.rb +1 -0
  55. data/lib/rainbows/thread_pool.rb +12 -7
  56. data/lib/rainbows/thread_spawn.rb +2 -3
  57. data/lib/rainbows/writer_thread_pool.rb +13 -7
  58. data/lib/rainbows/writer_thread_spawn.rb +12 -9
  59. data/lib/rainbows.rb +16 -45
  60. data/rainbows.gemspec +8 -8
  61. data/t/.gitignore +1 -1
  62. data/t/GNUmakefile +26 -16
  63. data/t/README +1 -1
  64. data/t/async-response-no-autochunk.ru +0 -1
  65. data/t/async-response.ru +0 -1
  66. data/t/cramp/rainsocket.ru +26 -0
  67. data/t/fork-sleep.ru +0 -1
  68. data/t/my-tap-lib.sh +3 -2
  69. data/t/simple-http_ActorSpawn.ru +9 -0
  70. data/t/t0009-broken-app.sh +1 -1
  71. data/t/t0009.ru +0 -1
  72. data/t/t0011-close-on-exec-set.sh +1 -1
  73. data/t/t0015-working_directory.sh +56 -0
  74. data/t/t0016-onenine-encoding-is-tricky.sh +28 -0
  75. data/t/t0016.rb +15 -0
  76. data/t/t0020-large-sendfile-response.sh +141 -0
  77. data/t/t0300-async_sinatra.sh +0 -6
  78. data/t/t0501-cramp-rainsocket.sh +38 -0
  79. data/t/t9001-sendfile-to-path.sh +5 -4
  80. data/t/t9002-server-token.sh +37 -0
  81. data/t/t9002.ru +4 -0
  82. data/t/test-lib.sh +1 -1
  83. data/t/test_isolate.rb +14 -11
  84. metadata +87 -18
data/ChangeLog CHANGED
@@ -1,392 +1,560 @@
1
- ChangeLog from git://git.bogomips.org/rainbows.git (v0.92.0..v0.94.0)
1
+ ChangeLog from git://git.bogomips.org/rainbows.git (v0.94.0..v0.95.0)
2
2
 
3
- commit 6ada0eb9916bbcebbcf2af843c1f5fb11904caee
3
+ commit 5308c68e7e5b9d464f9f8c4252beff2d964bca1b
4
4
  Author: Eric Wong <normalperson@yhbt.net>
5
- Date: Fri Jun 4 08:24:33 2010 +0000
5
+ Date: Sat Jul 10 06:13:21 2010 +0000
6
6
 
7
- Rainbows! 0.94.0 - one eight ate my homework!
7
+ Rainbows! 0.95.0 - sendfile() support!
8
8
 
9
- This release fixes corrupted large response bodies for Ruby 1.8
10
- users with the WriterThreadSpawn and WriterThreadPool models
11
- introduced in 0.93.0. This bug did not affect Ruby 1.9 users
12
- nor the users of any older concurrency models.
9
+ In addition to the 1.9-only IO.copy_stream, the new sendfile
10
+ 1.0.0 gem may optionally be used with most concurrency models
11
+ (even under 1.8).
13
12
 
14
- There is also a strange new Rainbows::Sendfile middleware. It
15
- is used to negate the effect of Rack::Contrib::Sendfile, if that
16
- makes sense. See the RDoc or
17
- http://rainbows.rubyforge.org/Rainbows/Sendfile.html for all the
18
- gory details.
13
+ See http://rainbows.rubyforge.org/Static_Files.html for more info
19
14
 
20
- Finally, the RDoc for our test suite is on the website:
15
+ Other changes:
21
16
 
22
- http://rainbows.rubyforge.org/Test_Suite.html
17
+ * 1.9 encoding bugfix for (Rev)FiberSpawn and FiberPool
18
+ * fixed potential rack.input corruption with Revactor
19
+ * ThreadPool graceful shutdown no longer blocks until timeout
20
+ * optional ServerToken middleware for to display Server: header
21
+ * Dependencies bumped to Rack 1.1+ and Unicorn 1.1.0+
22
+ * numerous internal cleanups, small bugfixes and speedups
23
+ * more concise website oriented at users
24
+
25
+ commit d3b97d1114e2d23a9231fe889cd5bf6927d451ba
26
+ Author: Eric Wong <normalperson@yhbt.net>
27
+ Date: Sat Jul 10 08:04:48 2010 +0000
28
+
29
+ doc: avoid documenting internals on RDoc website
23
30
 
24
- I wrote this document back when the project started but
25
- completely forgot to tell RDoc about it. Personally, this
26
- test suite is one of my favorite parts of the project.
31
+ Since we suck at building websites, we just rely on RDoc as a
32
+ website builder. And since Rainbows! is an application server
33
+ (and not a programming library), our internal API should be of
34
+ little interest to end users.
35
+
36
+ Anybody interested in Rainbows! (or any other project) internals
37
+ should be reading the source.
27
38
 
28
- commit 761b4a346865267c3fef79a62b9bebcbf6277319
39
+ commit 9838b614621bbbff27a91166406d833be85adbbd
29
40
  Author: Eric Wong <normalperson@yhbt.net>
30
- Date: Fri Jun 4 07:48:08 2010 +0000
41
+ Date: Sat Jul 10 07:26:33 2010 +0000
31
42
 
32
- sendfile: update RDoc for this middleware.
43
+ doc: Static_Files documentation
44
+
45
+ Some folks may be interested in setting up Rainbows!
46
+ as a static file server.
33
47
 
34
- commit 8ac80b06424350fd6088c1363661a12620040ae8
48
+ commit 59f10a6dcf895b728bbc34546aebdb8bf25a1b0b
35
49
  Author: Eric Wong <normalperson@yhbt.net>
36
- Date: Fri Jun 4 07:11:47 2010 +0000
50
+ Date: Fri Jul 9 08:45:03 2010 +0000
37
51
 
38
- doc: update test suite README and link with RDoc
52
+ event_machine: rename response_write => em_write_response
39
53
 
40
- Apparently this document was completely forgotten over the
41
- course of development and never properly put on the website.
54
+ For consistency with rev_write_response (and the existing
55
+ "write_response").
56
+
57
+ commit e1c10949271a9cd3cbad86d05ce0436f2e79bc65
58
+ Author: Eric Wong <normalperson@yhbt.net>
59
+ Date: Fri Jul 9 08:30:15 2010 +0000
60
+
61
+ http_response: allow Cramp 0.11 to send proper WS headers
42
62
 
43
- The test suite is one of my favorite parts of Rainbows! and
44
- allows us to test the server as real clients would hit it.
63
+ Cramp needs to override our normal header sending for
64
+ (old) WebSockets connections.
45
65
 
46
- commit 9dd7e943707608d9c98240b33c859d3c09fac577
66
+ commit 9abb447a573751b87e26ce35f4f05d58290f4c41
47
67
  Author: Eric Wong <normalperson@yhbt.net>
48
- Date: Fri Jun 4 06:54:52 2010 +0000
68
+ Date: Thu Jul 8 23:21:18 2010 +0000
49
69
 
50
- cleanup makefiles, move publish_doc into main
70
+ restore Rainbows::HttpResponse.write for Cramp
51
71
 
52
- Since the docs for this project are hosted on Rubyforge.org
53
- (currently Apache), it can't use the nginx "gzip_static on"
54
- configuration I normally use on on *.bogomips.org.
72
+ Cramp monkey patches Rainbows internals for WebSockets
73
+ support and we forgot about it. Add a new integration
74
+ test to ensure this continues to work in the future
75
+ (and force us to update the test for newer Cramp).
76
+
77
+ commit 235985c6c4b37ed9a170c38052db3ef0772b1527
78
+ Author: Eric Wong <normalperson@yhbt.net>
79
+ Date: Thu Jul 8 19:26:33 2010 +0000
80
+
81
+ dev: bump isolate dependency to 2.1.0
82
+
83
+ commit 90933787f1a3cf5b8e2d0497b56a9541e2e492ad
84
+ Author: Eric Wong <normalperson@yhbt.net>
85
+ Date: Thu Jul 8 09:33:21 2010 +0000
86
+
87
+ TODO: documentation needs work, so document it :P
88
+
89
+ commit 772c7a486583630627f5de58aef82423487592e4
90
+ Author: Eric Wong <normalperson@yhbt.net>
91
+ Date: Thu Jul 8 09:29:18 2010 +0000
92
+
93
+ bump TCP_DEFER_ACCEPT default value
55
94
 
56
- I never used the irb/sh wrappers in local.mk, either, and
57
- the isolate bits have all been moved inside t/
95
+ Unicorn 1.1.0 lets us change this default, and we need it higher
96
+ to avoid wasting workers against stupidly (or maliciously) slow
97
+ clients.
98
+
99
+ commit b07c3e00b390eebde32c762fd17ab387490c7552
100
+ Author: Eric Wong <normalperson@yhbt.net>
101
+ Date: Thu Jul 8 09:25:18 2010 +0000
58
102
 
59
- commit 93842bb5ef9e5da1d750e41614a99024dc7a0399
103
+ bump unicorn dependencies
104
+
105
+ commit 13baf8bd44683a376b79c01c3abbaa71e5b86a71
60
106
  Author: Eric Wong <normalperson@yhbt.net>
61
- Date: Fri Jun 4 06:36:28 2010 +0000
107
+ Date: Wed Jul 7 08:30:22 2010 +0000
62
108
 
63
- tests: make -C $MODEL.tNNNN-foo.sh work again out-of-the box
109
+ stream_file: split this out from rev/sendfile
64
110
 
65
- It was missing dependencies on the first run
111
+ Other concurrency models will eventually be able to use it, too.
66
112
 
67
- commit f66c59d7b259e5784c9da87df1a6f1dbca160577
113
+ commit 9ce364b079efdb3bcef504a84e2460a9b2b4b9ad
68
114
  Author: Eric Wong <normalperson@yhbt.net>
69
- Date: Fri Jun 4 01:25:29 2010 +0000
115
+ Date: Tue Jul 6 10:33:01 2010 +0000
70
116
 
71
- tests: cleanup isolate usage
117
+ byte_slice: String#[range] is faster than String#slice!(range)
72
118
 
73
- We don't need tmp/ in our top level directory
119
+ rb_str_slice_bang() allocates a new string internally and calls
120
+ rb_str_aref_m() AND rb_str_aset_m(), too. String#[] just
121
+ calls rb_str_aref_m() directly, so it's a much quicker code
122
+ path. Also, "[]" methods dispatch faster under 1.9, too.
74
123
 
75
- commit e7690caedf80a1af2b6145d1b8f108ea42ee9a29
124
+ commit 9ab356d3969779d7f8f4be6579bfa7570c703f21
76
125
  Author: Eric Wong <normalperson@yhbt.net>
77
- Date: Fri Jun 4 00:34:01 2010 +0000
126
+ Date: Tue Jul 6 10:19:27 2010 +0000
127
+
128
+ doc: update TODO
78
129
 
79
- tests: disable async_sinatra test for Ruby 1.9.2
130
+ commit d2f240d7ea11738ba889668a669ffb7845d06e7b
131
+ Author: Eric Wong <normalperson@yhbt.net>
132
+ Date: Tue Jul 6 09:58:40 2010 +0000
133
+
134
+ fix string slicing under 1.9 after short writes
80
135
 
81
- Sinatra 0.9.4 does not appear to be compatible with
82
- Ruby 1.9.2...
136
+ Fortunately this only affects the hardly-used FiberSpawn and
137
+ FiberPool concurrency models, and also unreleased revisions of
138
+ Rev. 1.9 encoding is tricky to handle right when doing I/O in
139
+ Ruby...
83
140
 
84
- commit 8e9144341c6169abd2fa6ec20343e3152534b38b
141
+ commit 0283928fca45a012b31662b30b49990dac2aae18
85
142
  Author: Eric Wong <normalperson@yhbt.net>
86
- Date: Fri Jun 4 00:32:47 2010 +0000
143
+ Date: Tue Jul 6 08:53:54 2010 +0000
87
144
 
88
- local.mk.sample: add a hint for TMPDIR
145
+ rev/client: more aggressive non-blocking write
89
146
 
90
- It makes tests run significantly faster on a beefy box.
147
+ non-blocking write() may cause kernel buffers to be allocated
148
+ behind the scenes, so retry the write() even if it's short
149
+ because it may succeed the next time around.
91
150
 
92
- commit 7ca6682fac2a30a69834b46a678ec956db4a45e9
151
+ commit 8b65858a864aa0ecfa24ccf8f910c36af0ec1ad6
93
152
  Author: Eric Wong <normalperson@yhbt.net>
94
- Date: Fri Jun 4 00:21:58 2010 +0000
153
+ Date: Tue Jul 6 04:01:30 2010 +0000
95
154
 
96
- local.mk.sample: update for running 1.9.2 (preview3) tests
155
+ cleanup error handling for aborted downloads
97
156
 
98
- Now that 1.9.2 preview3 is available and usable, it'll
99
- be added to the list of Rubies we run and officially
100
- support.
157
+ We shouldn't ever spew errors to the stderr/logger
158
+ on client disconnects (ECONNRESET/EPIPE/etc...).
101
159
 
102
- commit 50f764fcbc0ef84fd0589d16179fed637d817b19
160
+ commit d0a1fcaf25b10ff1d6894d50fa981f56169195f3
103
161
  Author: Eric Wong <normalperson@yhbt.net>
104
- Date: Fri Jun 4 00:20:59 2010 +0000
162
+ Date: Tue Jul 6 02:05:01 2010 +0000
105
163
 
106
- Rakefile: explain ourselves when Isolating
164
+ rev: avoid unnecessary seeking when using sendfile
107
165
 
108
- Yes there's a reason for everything we do :>
166
+ There's no need to ever change the underlying offset of a file
167
+ descriptor when using sendfile(), so don't. This allows us to
168
+ avoid contention in the kernel/filesystem and eventually reuse
169
+ the same filesystem file descriptor for serving multiple
170
+ requests.
109
171
 
110
- commit e93d93d7deb29b09dd68abfddd8a34cec8fed9b3
172
+ commit 70ad994ae8a854477e45c877cd0e9dda41389f86
111
173
  Author: Eric Wong <normalperson@yhbt.net>
112
- Date: Fri Jun 4 00:16:51 2010 +0000
174
+ Date: Mon Jul 5 08:07:03 2010 +0000
113
175
 
114
- test-lib: set NO_PROXY to counter http_proxy
176
+ rev: properly enable post-fork sendfile() usage
115
177
 
116
- Some testers (like myself) use http_proxy when isolating
117
- gems to avoid wasting bandwidth, but we don't proxy requests
118
- to localhost.
178
+ We need to load sendfile-using parts after the
179
+ "sendfile" library is loaded.
119
180
 
120
- commit 6d62a7de86369e046e6f6b221153d867df11e74c
181
+ commit 39b178cdebe275cbc8ce19cf269bea7cd15ff4ca
121
182
  Author: Eric Wong <normalperson@yhbt.net>
122
- Date: Thu Jun 3 17:15:18 2010 -0700
183
+ Date: Sun Jul 4 22:16:52 2010 +0000
123
184
 
124
- depend on Isolate ~> 2.0.2 for development
185
+ refactor response body handling for sendfile(2)
186
+
187
+ This hopefully allows the "sendfile" gem to be required
188
+ anywhere in the Rainbows!/Unicorn config file, and not
189
+ have to be required via RUBYOPT or the '-r' command-line
190
+ switch.
125
191
 
126
- It's useful given all the Gems we support but don't have hard
127
- installation dependencies on.
192
+ We also modularize HttpResponse and avoids singleton methods
193
+ in the response path. This (hopefully) makes it easier for
194
+ individual concurrency models to share code and override
195
+ individual methods.
128
196
 
129
- commit cf122e941e10c2812b7ba5e75c053a28950ddcb6
197
+ commit 75f5aa9a0d6b37a94afbea3121fc2c16e70a2b1d
130
198
  Author: Eric Wong <normalperson@yhbt.net>
131
- Date: Thu Jun 3 15:23:01 2010 -0700
199
+ Date: Sun Jul 4 22:15:18 2010 +0000
132
200
 
133
- add Rainbows::Sendfile middleware
201
+ rev/client: s/sendfile/rev_sendfile/
134
202
 
135
- This lets most concurrency models understand and process
136
- X-Sendfile efficiently with IO.copy_stream under Ruby 1.9.
137
- EventMachine can take advantage of this middleware under
138
- both Ruby 1.8 and Ruby 1.9.
203
+ Avoid confusing people with an overloaded method name
139
204
 
140
- commit 5a0a190253434d3eef5332d979d56f3e16e876bd
205
+ commit a5dc800d2e4b3a86466a03f45f64b97d29e4b11e
141
206
  Author: Eric Wong <normalperson@yhbt.net>
142
- Date: Thu Jun 3 14:55:37 2010 -0700
207
+ Date: Sun Jul 4 08:13:24 2010 +0000
143
208
 
144
- writer_thread_*: fix static file response under 1.8
209
+ revactor: properly zero buffer on zero reads
145
210
 
146
- While these models are designed to work with IO.copy_stream
147
- under Ruby 1.9, it should be possible to run them under Ruby
148
- 1.8 without returning corrupt responses. The large file
149
- response test is beefed up to compare SHA1 checksums of
150
- the served file, not just sizes.
211
+ While we're at it, fix a comment, too.
151
212
 
152
- commit b6e354116d4da5c7c6de59f87ab5815f21e202ed
213
+ commit e867a6d1a612baf7975b14f9bffa14ea8b05f35c
153
214
  Author: Eric Wong <normalperson@yhbt.net>
154
- Date: Thu Jun 3 07:52:34 2010 +0000
215
+ Date: Sun Jul 4 07:40:58 2010 +0000
155
216
 
156
- test-lib: remove ancient wait_for_pid() function
217
+ thread_pool: force threads to wakeup on shutdown
157
218
 
158
- It hasn't been used since the first month of development
159
- when we started using FIFOs
219
+ We may use a blocking accept() loop if there is
220
+ only a single listener. In that case threads may
221
+ not be able to exit if a SIGQUIT is received, so
222
+ force them to run when joining.
160
223
 
161
- commit c3e22e4c2ad11785b5355a98355fd31d709976d5
224
+ commit 7e3de7a12629423e911dae8955e7cc2035d6c401
162
225
  Author: Eric Wong <normalperson@yhbt.net>
163
- Date: Fri May 28 04:03:32 2010 +0000
226
+ Date: Wed Jun 30 09:15:20 2010 +0000
164
227
 
165
- Rainbows! 0.93.0 - MOAR!!!1
228
+ rev: add sendfile support
166
229
 
167
- In our race to have more concurrency options than real sites
168
- using this server, we've added two new and fully supported
169
- concurrency models: WriterThreadSpawn and WriterThreadPool
230
+ This should improve performance for static file responses.
231
+
232
+ commit 280c6816ac4ebbfae8298871e125376d30ef5679
233
+ Author: Eric Wong <normalperson@yhbt.net>
234
+ Date: Wed Jun 30 08:13:07 2010 +0000
235
+
236
+ dev_fd_response: avoid redeclaring Rainbows module
170
237
 
171
- They're both designed to for serving large static files and work
172
- best with IO.copy_stream (sendfile!) under Ruby 1.9. They may
173
- also be used to dynamically generate long running, streaming
174
- responses after headers are sent (use "proxy_buffering off" with
175
- nginx).
238
+ slowly cleaning up the generated RDoc
239
+
240
+ commit 7495e0503f22f3cb89efcc3ae382f6544a6582e1
241
+ Author: Eric Wong <normalperson@yhbt.net>
242
+ Date: Wed Jun 30 08:06:06 2010 +0000
243
+
244
+ deferred_response: remove needless include
245
+
246
+ commit c305d5efcd177d6516c7f0dd4f441b2605bdcdaa
247
+ Author: Eric Wong <normalperson@yhbt.net>
248
+ Date: Mon Jun 28 09:02:34 2010 +0000
249
+
250
+ TODO: extra item for byte-range responses
251
+
252
+ commit 8175a52c67fb9dfc9c04a7b0597b680699f43deb
253
+ Author: Eric Wong <normalperson@yhbt.net>
254
+ Date: Mon Jun 28 08:06:32 2010 +0000
255
+
256
+ add preliminary sendfile (1.0.0) gem support
176
257
 
177
- Unlike most concurrency options in Rainbows!, these are designed
178
- to run behind nginx (or haproxy if you don't support POST/PUT
179
- requests) and are vulnerable to slow client denial of service
180
- attacks.
258
+ This still needs work and lots of cleanup, but the basics are
259
+ there. The sendfile 1.0.0 RubyGem is now safe to use under MRI
260
+ 1.8, and is superior to current (1.9.2-preview3) versions of
261
+ IO.copy_stream for static files in that it supports more
262
+ platforms and doesn't truncate large files on 32-bit platforms.
263
+
264
+ commit 86e9c7013308d77def5fe41b52a35dea60c7361c
265
+ Author: Eric Wong <normalperson@yhbt.net>
266
+ Date: Mon Jun 28 06:29:54 2010 +0000
267
+
268
+ fiber/base: reuse process_client logic in base
181
269
 
182
- I floated the idea of doing something along these lines back in
183
- the early days of Unicorn, but deemed it too dangerous for some
184
- applications. But nothing is too dangerous for Rainbows! So
185
- here they are now for your experimentation.
270
+ This fleshes out Rainbows::Fiber::IO with a few
271
+ more methods for people using it.
272
+
273
+ commit b75ad975856a681fe96651592b2bb24cc044fd50
274
+ Author: Eric Wong <normalperson@yhbt.net>
275
+ Date: Mon Jun 28 05:20:17 2010 +0000
276
+
277
+ (style) prefer "until" instead of "while !"
278
+
279
+ commit eaf6cca3e1d38b7307c65c257b080041e65fd215
280
+ Author: Eric Wong <normalperson@yhbt.net>
281
+ Date: Mon Jun 28 05:14:23 2010 +0000
282
+
283
+ revactor: constant/namespace cleanups
186
284
 
187
- commit f1cb1ce4e76ca13c9eb0bf8cfb4a51bd9f5a58c1
285
+ commit 5cde25e2fb6f7de9143a40da5bad4b91b582fcab
188
286
  Author: Eric Wong <normalperson@yhbt.net>
189
- Date: Sat May 29 04:20:25 2010 +0000
287
+ Date: Mon Jun 28 00:30:34 2010 +0000
190
288
 
191
- WriterThreadSpawn: fix stupid local variable error
289
+ base: constant/namespace cleanup
192
290
 
193
- commit 93fc16377eca1a1d5103fd91a576ff6c469f4ab1
291
+ commit 63d95ac64949a642596946b2b44b2d0bb7b9fefb
194
292
  Author: Eric Wong <normalperson@yhbt.net>
195
- Date: Fri May 28 03:58:22 2010 +0000
293
+ Date: Sun Jun 27 23:58:00 2010 +0000
196
294
 
197
- doc: update comparison
295
+ http_response: make this a module, not a class
198
296
 
199
- I still have a hard time keeping track of what's capable of
200
- what.
297
+ No point in using a class here, there's no object
298
+
299
+ commit 8756eac8c0e993caa6f704e27985405f6c9dfa7d
300
+ Author: Eric Wong <normalperson@yhbt.net>
301
+ Date: Sun Jun 27 23:51:55 2010 +0000
302
+
303
+ http_response: (nitpick) simplify conditional logic
201
304
 
202
- commit 49c45c6ea09464862779b09ad7f22c30977a2060
305
+ commit 43745f26e201655f98351684e1d357cbd8c15b05
203
306
  Author: Eric Wong <normalperson@yhbt.net>
204
- Date: Fri May 28 03:42:15 2010 +0000
307
+ Date: Sun Jun 27 23:36:51 2010 +0000
205
308
 
206
- tests: t0005: fudge the file malloc limit a bit
309
+ http_response: cleanup documentation
207
310
 
208
- it's hard to make this test reliable, but try to
209
- add a small fudge factor based on the MRI default
210
- GC malloc limit.
311
+ No point in documenting our internals and overwhelming
312
+ users.
211
313
 
212
- commit 86d5209d0ebdd597ffa19bff5f227ca10ba383c6
314
+ commit 4442a5f7d517645957d5a78911fec48010d3e6c7
213
315
  Author: Eric Wong <normalperson@yhbt.net>
214
- Date: Fri May 28 03:07:37 2010 +0000
316
+ Date: Thu Jun 24 06:48:54 2010 +0000
215
317
 
216
- dev: isolate: bump cramp to 0.11
318
+ sendfile: update docs for Rack::Sendfile
319
+
320
+ Rack::Contrib::Sendfile moved into Rack in December 2009.
217
321
 
218
- commit 371f05992110616412c57a26fb6688dc2111c65d
322
+ commit 23551fb5241630e1c8d1ea3788defb4b5bcbe832
219
323
  Author: Eric Wong <normalperson@yhbt.net>
220
- Date: Wed May 26 22:50:15 2010 +0000
324
+ Date: Mon Jun 21 08:03:01 2010 +0000
221
325
 
222
- writer_thread_spawn: worker_connections limits thread spawned
326
+ add Rainbows::Configurator module
223
327
 
224
- This should be logical, since we keep the connection alive
225
- when writing in our writer threads.
328
+ Make it easier to link to the Rainbows! configuration
329
+ documentation without anchors. This also reduces the
330
+ amount of code we spew into Unicorn::Configurator.
226
331
 
227
- commit 904526129a2377306a735c73b26699583b3b99c5
332
+ commit c9a573e669e62e824f8e3cf37cd94162cd7a4170
228
333
  Author: Eric Wong <normalperson@yhbt.net>
229
- Date: Wed May 26 22:49:49 2010 +0000
334
+ Date: Mon Jun 21 07:15:40 2010 +0000
230
335
 
231
- thread_spawn: document why we sleep instead of Thread.pass
336
+ tests: enable ActorSpawn test for rbx
232
337
 
233
- commit 4ccaf0a931a0731d1dca2710b86864075eb511a1
338
+ commit 4a132122eb4f931fa721a4ff5d2204486c0c3579
234
339
  Author: Eric Wong <normalperson@yhbt.net>
235
- Date: Wed May 26 22:36:39 2010 +0000
340
+ Date: Mon Jun 21 07:15:22 2010 +0000
236
341
 
237
- writer_thread_pool: update documentation for new defaults
342
+ rev: documentation update for #write method
238
343
 
239
- commit 58661617ab802010ecbc45ce3afbca1d63cb9189
344
+ commit f64a6781cbfbde40e4be6334520b1ff06a5e5626
240
345
  Author: Eric Wong <normalperson@yhbt.net>
241
- Date: Wed May 26 22:20:57 2010 +0000
346
+ Date: Mon Jun 21 05:54:06 2010 +0000
242
347
 
243
- add WriterThreadSpawn concurrency model
348
+ dev_fd_response: disable under Rubinius for now
349
+
350
+ We can't use it effectively in Rubinius yet, and it's
351
+ broken due to the issue described in:
352
+ http://github.com/evanphx/rubinius/issues/379
244
353
 
245
- commit c6ecda097af9cc559b2d38b01ae23daf733b3786
354
+ commit a4a3fbb761e5ae4f36e9dd84ad933c6df63975ba
246
355
  Author: Eric Wong <normalperson@yhbt.net>
247
- Date: Wed May 26 22:20:03 2010 +0000
356
+ Date: Mon Jun 21 05:48:45 2010 +0000
248
357
 
249
- gemspec: bump Unicorn dependency
358
+ dev_fd_response: cleanup and reorganization
250
359
 
251
- no major internal changes until 2.0.0+
360
+ There's no need to #dup the middleware object, just use
361
+ a custom Rainbows::DevFdResponse::Body object.
362
+
363
+ commit f2b75a59b54ec93e7fe0031d79127e2ed960725b
364
+ Author: Eric Wong <normalperson@yhbt.net>
365
+ Date: Mon Jun 21 04:38:17 2010 +0000
366
+
367
+ test_isolate: bump unicorn dependency
252
368
 
253
- commit b37fa6ad928fb2b5dc55126c5ad4caa55ee3193b
369
+ commit 212f60d37fdfe684dbaed047391b4276a30d200b
254
370
  Author: Eric Wong <normalperson@yhbt.net>
255
- Date: Wed May 26 21:32:13 2010 +0000
371
+ Date: Mon Jun 21 03:24:06 2010 +0000
256
372
 
257
- writer_thread_pool: remove single thread optimization
373
+ test: no need for IO#sync=true in async-response tests
258
374
 
259
- It's not worth the trouble and testability since having
260
- a single thread tends to bottleneck if there's a bad
261
- client.
375
+ We only read from the IO pipe and never write to it
262
376
 
263
- commit f741974675c066b245e781c0c248b1395188334b
377
+ commit 5470d0688ec610861241408790d22b583e211ac5
264
378
  Author: Eric Wong <normalperson@yhbt.net>
265
- Date: Sat May 22 22:47:34 2010 +0000
379
+ Date: Mon Jun 21 03:11:29 2010 +0000
266
380
 
267
- tests: ignore trash/ directory entirely
381
+ tests: avoid embedded command-line switches in tests
268
382
 
269
- This allows it to be a symlink to /dev/shm or similar
383
+ They're ugly and potentially non-portable to other servers.
384
+ They also make Unicorn + Rubinius unhappy, which makes us
385
+ unhappy as well.
270
386
 
271
- commit e948380c2a28f12e7210130bc83fb0ae0e6fcac9
387
+ commit 51b2d65b081b0e802acdd25295e04889bbccaddc
272
388
  Author: Eric Wong <normalperson@yhbt.net>
273
- Date: Thu May 20 14:22:08 2010 -0700
389
+ Date: Mon Jun 21 03:00:30 2010 +0000
274
390
 
275
- tests: chunked client_body_max_size fails with old curl
391
+ rev: restore Ruby 1.8.6 compatibility
392
+
393
+ commit 82c93e28e743480d59c81406a3aaad3b6ba4269f
394
+ Author: Eric Wong <normalperson@yhbt.net>
395
+ Date: Mon Jun 21 02:47:31 2010 +0000
396
+
397
+ bump async_sinatra test dependencies
276
398
 
277
- curl < 7.18.0 did not check for errors when doing chunked
278
- uploads. Unfortunately some distros are slow moving and
279
- bundle ancient versions of curl.
399
+ Everything should be working under Ruby 1.9.2(-preview3) now.
280
400
 
281
- commit bfe34128aed4ec696bb939c19e86a742297af830
401
+ commit 679a4b4673f66a299322facfe2acb8776bf61c00
282
402
  Author: Eric Wong <normalperson@yhbt.net>
283
- Date: Thu May 20 11:48:28 2010 -0700
403
+ Date: Fri Jun 18 09:44:57 2010 +0000
284
404
 
285
- local.mk.sample: fix isolate 2.0.0 path :x
405
+ rev: cleanup write method
406
+
407
+ I was originally experimenting with setsockopt to increase the
408
+ kernel buffer sizes in a loop, but the benefits were negligible
409
+ at best.
286
410
 
287
- commit ac92728df5a673076e3fedd1436cef7c24e534b5
411
+ commit e5bd756d0a8ab73cab16facbd6f1b2275f6dfa21
288
412
  Author: Eric Wong <normalperson@yhbt.net>
289
- Date: Thu May 20 03:40:49 2010 -0700
413
+ Date: Fri Jun 18 08:59:01 2010 +0000
290
414
 
291
- tests: t0004: beef up test for kills
415
+ rev: avoid extraneous data copy for small responses
292
416
 
293
- since we don't set maximum time boundaries, just rely on
294
- the logs to properly log the dead processes.
417
+ For small responses that can fit inside a kernel socket
418
+ buffer, copying that data into an IO::Buffer object is
419
+ a waste of precious memory bandwidth.
295
420
 
296
- commit d1b2756e6a5b7b9e1c47861f230ec9effe6ca382
421
+ commit b290a65eb735aa89bb071e27f8421cc864c78e8c
297
422
  Author: Eric Wong <normalperson@yhbt.net>
298
- Date: Thu May 20 03:27:06 2010 -0700
423
+ Date: Fri Jun 18 08:10:55 2010 +0000
299
424
 
300
- tests: t0004: disable upper limit check
425
+ fiber/{base,io}: use arrays instead of hashes for r/w accounting
301
426
 
302
- since we've already waited for time to elapse, there's no
303
- point in watching the upper limit here
427
+ This gives a tiny performance improvement to the FiberSpawn and
428
+ FiberPool concurrency models.
304
429
 
305
- commit 94307f744608ad6fd4f8d0ab57d23cf405917b15
430
+ commit b5a24fdbf928b675e478987393212651ef5909d6
306
431
  Author: Eric Wong <normalperson@yhbt.net>
307
- Date: Thu May 20 03:06:41 2010 -0700
432
+ Date: Fri Jun 18 08:10:00 2010 +0000
308
433
 
309
- tests: t0005: minimize writes
434
+ fiber/base: more accurate sleep timeout
310
435
 
311
- This test can cause a lot of I/O, especially when
312
- run in parallel. Just rely on the fixed rsha1 code
313
- to compute the SHA1 of the response.
436
+ Not that many people will actually call Rainbows.sleep
437
+ outside of tests...
314
438
 
315
- commit abc207b2918606867094f2820bab58223e99aac4
439
+ commit fd1ec829c8c941143c8ae70b18e51838bc51da73
316
440
  Author: Eric Wong <normalperson@yhbt.net>
317
- Date: Thu May 20 03:05:36 2010 -0700
441
+ Date: Fri Jun 18 06:47:52 2010 +0000
318
442
 
319
- tests: fix sha1sum usage
443
+ avoid needless HeaderHash#to_hash calls
320
444
 
321
- non-random_blob arguments weren't being taken into account
322
- correctly :x
445
+ HeaderHash objects can only be used as headers without
446
+ violating Rack::Lint in Rack 1.1.0 or later.
323
447
 
324
- commit 9d17cc820044e797a12146730dc260e60302022a
448
+ commit ed9f3e90939cfa9efcc6e5e9382f1e1f40c49834
325
449
  Author: Eric Wong <normalperson@yhbt.net>
326
- Date: Thu May 20 02:53:22 2010 -0700
450
+ Date: Fri Jun 18 06:41:58 2010 +0000
327
451
 
328
- tests: t0005 - disable concurrency for this test
452
+ prefer Array#[] lookup to Array#first/Array#last
329
453
 
330
- slow test runners can buffer us and bloat memory usage
331
- unpredictably when tests are run under load
454
+ Array#[] lookups are slightly faster under both rbx and 1.9,
455
+ and easier to read.
332
456
 
333
- commit 6048147422f99f654b8a400575c58d39351c4699
457
+ commit 0e4014888f4f7f17d45c96677d672a538c6e6d94
334
458
  Author: Eric Wong <normalperson@yhbt.net>
335
- Date: Wed May 19 20:15:15 2010 -0700
459
+ Date: Wed Jun 16 09:53:32 2010 +0000
336
460
 
337
- tests: t0007: robustness fix
461
+ test_isolate: fix ruby engine usage
338
462
 
339
- On busy sytems, this timing-sensitive test is likely to fail,
340
- so give it some extra slack
463
+ Oops, looks like 1.9.1 exports the RUBY_ENGINE constant.
341
464
 
342
- commit d266f4da075b4b972ee97589ac58ce1d08022f84
465
+ commit 0a3e9cacd7ca2feb91bae23b0c678d5e986f866f
343
466
  Author: Eric Wong <normalperson@yhbt.net>
344
- Date: Tue May 18 14:07:54 2010 -0700
467
+ Date: Fri Jun 11 08:47:41 2010 +0000
345
468
 
346
- doc: FAQ: clarify Rails support
469
+ update test infrastructure to support Rubinius
470
+
471
+ Rubinius still has a few issues that prevent 100% support,
472
+ but it basically works if log rotation or USR2 upgrades aren't
473
+ required. Tickets for all known issues for Rubinius have
474
+ been filed on the project's issue tracker.
475
+
476
+ * rbx does not support -i/-p yet, so rely on MRI for that
477
+ * "io/nonblock" is missing
478
+ * avoiding any optional Gems for now (EM, Rev, etc..)
479
+
480
+ commit 37687e027233072582c28bdd1530047a40ef7869
481
+ Author: Eric Wong <normalperson@yhbt.net>
482
+ Date: Fri Jun 11 02:27:49 2010 +0000
483
+
484
+ alt working_directory test from Unicorn
485
+
486
+ commit aa402ca5c52ccf836d03e08a82c5a8392fca8f15
487
+ Author: Eric Wong <normalperson@yhbt.net>
488
+ Date: Fri Jun 11 02:24:00 2010 +0000
489
+
490
+ rely on Unicorn 0.991.0 for tests
491
+
492
+ commit 0c08b142544e717ece5865869e14ead670f64eec
493
+ Author: Eric Wong <normalperson@yhbt.net>
494
+ Date: Thu Jun 10 18:27:19 2010 -0700
495
+
496
+ bin/rainbows: sync up with latest Unicorn
497
+
498
+ This will allow us to be working_directory-aware as
499
+ far as config.ru goes.
347
500
 
348
- commit 48313f442f53dfdb4ba24bbb12fc91f5c47a24ec
501
+ commit cf47d3e51d7b0aecdda8b0f27631161977900a47
349
502
  Author: Eric Wong <normalperson@yhbt.net>
350
- Date: Mon May 17 11:36:56 2010 -0700
503
+ Date: Thu Jun 10 18:22:25 2010 -0700
351
504
 
352
- WriterThreadPool: default concurrency to 20 pools
505
+ add Rainbows::ServerToken middleware
353
506
 
354
- Idle threads are cheap enough and having responses
355
- queued up with a single slow client on a large response
356
- is bad.
507
+ Some folks can now show off their Rainbows! installation
357
508
 
358
- commit 2260d56329b036bcce7eb69831d3e480334d283c
509
+ commit b73218100032ead24360d33361fefa914074f30a
359
510
  Author: Eric Wong <normalperson@yhbt.net>
360
- Date: Fri May 14 18:12:51 2010 -0700
511
+ Date: Thu Jun 10 18:21:26 2010 -0700
361
512
 
362
- add WriterThreadPool concurrency model
513
+ my-tap-lib: fix race condition in verbose mode
363
514
 
364
- This is based on an idea I originally had for Unicorn but never
365
- implemented in Unicorn since the benefits were unproven and the
366
- risks were too high.
515
+ Don't try to redirect until we know our FIFO consumers are
516
+ ready for us. This only seems to happen with bash and not
517
+ ksh...
518
+
519
+ commit d0a0883eaaeec37800ca5cd07647b7b66a00c453 in Unicorn
367
520
 
368
- commit 01ee5327c018f64fa4b6aa767c0328c56f699170
521
+ commit d65fb5896d4c9d019b31834c131b5fb0306ba10e
369
522
  Author: Eric Wong <normalperson@yhbt.net>
370
- Date: Fri May 14 15:52:58 2010 -0700
523
+ Date: Wed Jun 9 21:44:43 2010 +0000
371
524
 
372
- add Rainbows::QueuePool helper
525
+ http_server: use super instead of alias_method
373
526
 
374
- It'll be useful later on for a variety of things!
527
+ duh!
375
528
 
376
- commit 5f854e876ba55180936ebfc82002df9bd882a4ae
529
+ commit 3b4fa90bee97d2346644db004c37db5cb29cd9cf
377
530
  Author: Eric Wong <normalperson@yhbt.net>
378
- Date: Fri May 14 15:52:17 2010 -0700
531
+ Date: Tue Jun 8 09:52:27 2010 +0000
379
532
 
380
- test: do not let async-response run with Base
533
+ gemspec: bump unicorn dependency to 0.990.0
381
534
 
382
- commit 67662fe0714cbcc89d732d4a04df975b0de2ca36
535
+ commit 6565060915266f053b5eb1c29a1cfbf825d430b0
383
536
  Author: Eric Wong <normalperson@yhbt.net>
384
- Date: Fri May 14 14:18:36 2010 -0700
537
+ Date: Mon Jun 7 11:30:36 2010 -0700
385
538
 
386
- update isolate config for Isolate 2.0.0
539
+ README: update with Zbatery info
387
540
 
388
- commit 65d5e99ee231624c66a26b70296a659d551c0266
541
+ commit e812eb864f88d88bb5e6bfdba617b03db2f07bfe
389
542
  Author: Eric Wong <normalperson@yhbt.net>
390
- Date: Thu May 6 22:22:56 2010 -0700
543
+ Date: Sun Jun 6 02:33:22 2010 +0000
544
+
545
+ tests: t9001: avoid needless filesystem activity
391
546
 
392
- dev: isolate: bump unicorn dependency
547
+ commit b1315983056f91467b336aeb426759debc006a4e
548
+ Author: Eric Wong <normalperson@yhbt.net>
549
+ Date: Sun Jun 6 02:14:58 2010 +0000
550
+
551
+ centralize body => IO conversion logic
552
+
553
+ Since EventMachine and Rev shared the same logic for optimizing
554
+ and avoiding extra file opens for IO/File-ish response bodies,
555
+ so centralize that.
556
+
557
+ For Ruby 1.9 users, we've also enabled this logic so ThreadPool,
558
+ ThreadSpawn, WriterThreadPool, and WriterThreadSpawn can take
559
+ advantage of Rainbows::DevFdResponse-generated bodies while
560
+ proxying sockets.