* [ANN] Rainbows! 5.0.0 - Rack HTTP server for the sleepy
@ 2015-11-25 1:04 5% Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2015-11-25 1:04 UTC (permalink / raw)
To: ruby-talk; +Cc: rainbows-public
Rainbows! is an HTTP server for sleepy Rack applications.
While it will be maintained as long as anybody uses it,
use of Rainbows! for new projects is not recommended,
try other servers instead:
http://bogomips.org/rainbows-public/20151020095934.GA19114@dcvr.yhbt.net/
Rainbows! 5.0.0 - maintained as long as anybody uses it!
This release syncs with unicorn 5 and drops some old compatibility
cruft from old releases. Performance should be roughly unchanged
for Ruby 2.2 users while older Rubies (1.9.3 - 2.1) will see
minor, probably unnoticeable performance regressions.
Compatibility:
* The horrible, proprietary (:P) "Status:" response header is
finally gone, saving at least 16 precious bytes in every HTTP
response. This should make it easier to write custom HTTP clients
which are compatible across all HTTP servers. It will hopefully
make migrating between different Rack servers easier for new
projects.
* Ruby 1.8 support removed. Ruby 1.9.3 is currently the earliest
supported version. However, expect minor, likely-unnoticeable
performance regressions if you use Ruby 2.1 or earlier. Going
forward, Rainbows! will favor the latest version (currently 2.2) of
the mainline Ruby implementation, potentially sacrificing
performance on older Rubies.
New features:
* sd_listen_fds(3) emulation added for systemd compatibility.
You may now stop using PID files and other process monitoring
software when using systemd.
* Newly-set TCP socket options are now applied to inherited sockets.
* Dynamic changes in the application to Rack::Utils::HTTP_STATUS
hash is now supported; allowing users to set custom status lines
in Rack to be reflected in unicorn. This feature causes a minor
performance regression, but is made up for Ruby 2.2 users with
other optimizations.
* The monotonic clock is used under Ruby 2.1+, making the
timeout feature immune to system clock changes.
As Rainbows! may be used anonymously without registration, the
project is committed to supporting anonymous and pseudonymous
help requests, contributions and feedback via plain-text mail to:
rainbows-public@bogomips.org
The mail submission port (587) is open to those behind firewalls
and allows access via Tor and anonymous remailers.
Archives are accessible via:
* http://bogomips.org/rainbows-public/
* nntp://news.public-inbox.org/inbox.comp.lang.ruby.rainbows
* nntp://news.gmane.org/gmane.comp.lang.ruby.rainbows.general
and mirrored to various other places, so you do not even need
to use a valid address when posting.
18 changes since Rainbows! 4.7.0
README: remove Zbatery references
http_parser: handle keepalive_requests internally
kill the moronic Status: header
reflect changes in Rack::Utils::HTTP_STATUS_CODES
reduce constant lookup dependencies
http_parser: workaround hijack changes in unicorn 5
http_server: add master_pid attribute
stream_response_epoll: remove hijack_prepare call
bump to unicorn 5.0.1, use monotonic clock
add .gitattributes for Ruby method detection
response: avoid garbage string entirely
tiny bytecode reductions for cold paths
Ruby 1.9.3+-only cleanups
revactor: remove fcntl dependency
response: simplify regexp
t0105: fix test reliability
fix Rainbows.now definition for old Rubies
fix broken constant lookups in unmaintained bits
* http://rainbows.bogomips.org/
* rainbows-public@bogomips.org
* http://bogomips.org/rainbows-public/
* git clone git://bogomips.org/rainbows.git
* http://rainbows.bogomips.org/NEWS.atom.xml
*zzzzzzzz*
^ permalink raw reply [relevance 5%]
* [PATCH] fix broken constant lookups in unmaintained bits
@ 2015-11-24 23:05 7% Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2015-11-24 23:05 UTC (permalink / raw)
To: rainbows-public
In case Revactor starts being maintained again...
(heck, it was probably the reason I started Rainbows! in the first
place...)
Our ReverseProxy stuff was never complete nor marketed;
and probably not worth keeping around at all.
---
lib/rainbows/revactor/client.rb | 2 +-
lib/rainbows/revactor/proxy.rb | 2 +-
lib/rainbows/reverse_proxy/coolio.rb | 6 +++---
lib/rainbows/reverse_proxy/event_machine.rb | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/rainbows/revactor/client.rb b/lib/rainbows/revactor/client.rb
index 5b1e52d..c24b137 100644
--- a/lib/rainbows/revactor/client.rb
+++ b/lib/rainbows/revactor/client.rb
@@ -32,7 +32,7 @@ def timed_read(buf2)
end
def set_input(env, hp)
- env[RACK_INPUT] = 0 == hp.content_length ?
+ env['rack.input'] = 0 == hp.content_length ?
NULL_IO : IC.new(@ts = TeeSocket.new(@client), hp)
end
diff --git a/lib/rainbows/revactor/proxy.rb b/lib/rainbows/revactor/proxy.rb
index 4715981..6bac7d5 100644
--- a/lib/rainbows/revactor/proxy.rb
+++ b/lib/rainbows/revactor/proxy.rb
@@ -22,7 +22,7 @@ def each
# (instead of Errno::EPIPE), so we need to limit the rescue
# to just readpartial and let EOFErrors during yield bubble up
begin
- buf = readpartial(INPUT_SIZE)
+ buf = readpartial(16384)
rescue EOFError
break
end while yield(buf) || true
diff --git a/lib/rainbows/reverse_proxy/coolio.rb b/lib/rainbows/reverse_proxy/coolio.rb
index 2a977e0..86f2b79 100644
--- a/lib/rainbows/reverse_proxy/coolio.rb
+++ b/lib/rainbows/reverse_proxy/coolio.rb
@@ -32,20 +32,20 @@ def on_readable
when :wait_readable
return
when nil
- @env[AsyncCallback].call(@response)
+ @env['async.callback'].call(@response)
return close
end while true # we always read until EAGAIN or EOF
rescue => e
case e
when Errno::ECONNRESET
- @env[AsyncCallback].call(@response)
+ @env['async.callback'].call(@response)
return close
when SystemCallError
else
Unicorn.log_error(@env["rack.logger"], "on_readable", e)
end
- @env[AsyncCallback].call(Rainbows::ReverseProxy::E502)
+ @env['async.callback'].call(Rainbows::ReverseProxy::E502)
close
end
end
diff --git a/lib/rainbows/reverse_proxy/event_machine.rb b/lib/rainbows/reverse_proxy/event_machine.rb
index 8cb382c..d92254d 100644
--- a/lib/rainbows/reverse_proxy/event_machine.rb
+++ b/lib/rainbows/reverse_proxy/event_machine.rb
@@ -30,7 +30,7 @@ def on_write_complete
end
def unbind
- @env[AsyncCallback].call(@response || Rainbows::ReverseProxy::E502)
+ @env['async.callback'].call(@response || Rainbows::ReverseProxy::E502)
end
end
--
EW
^ permalink raw reply related [relevance 7%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2015-11-24 23:05 7% [PATCH] fix broken constant lookups in unmaintained bits Eric Wong
2015-11-25 1:04 5% [ANN] Rainbows! 5.0.0 - Rack HTTP server for the sleepy Eric Wong
Code repositories for project(s) associated with this public inbox
https://yhbt.net/rainbows.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).