Date | Commit message (Collapse) |
|
This release adds preliminary Rev support for network
concurrency under Ruby 1.8 and Ruby 1.9. There are caveats to
this model and reading the RDoc for Rainbows::Rev is
recommended.
Rainbows::AppPool Rack middleware is now available to limit
application concurrency on a per-process basis independently of
network concurrency. See the RDoc for this class for further
details.
Per-client timeouts have been removed, see
http://mid.gmane.org/20091013062602.GA13128@dcvr.yhbt.net
for the reasoning.
Rack environment changes:
* "rack.multithread" is now only true for models with "Thread"
in their name. Enabling thread-safe (but not reentrant) code
may actually be harmful for Revactor.
* "rainbows.model" is now exposed so the application can easily
figure out which network concurrency model is in use.
Bugfixes include better shutdown and error handling for all
existing models, OpenBSD compatibility for the per-process
heartbeat (same as found in unicorn v0.93.3).
Eric Wong (53):
add SIGNALS doc to RDoc
SIGNALS: add Rainbows!-specific notes
doc: better "Rainbows!" RDoc examples and linkage
tests: generate random_blob once for all tests
tests: move trash files to their own trash/ directory
t0000: basic test includes keepalive + pipelining
tests: simplify temporary file management
tests: add dbgcat() utility method
fchmod heartbeat flips between 0/1
tests: add revactor pipelining/keepalive test
thread_spawn: trap EAGAIN on accept_nonblock
thread_spawn: more robust loop
thread_spawn: non-blocking accept() shouldn't EINTR
tests: enable pipefail shell option if possible
README for test suite
tests: TEST_OPTS => SH_TEST_OPTS
tests: update TRACER examples in makefile
tests: create a bad exit code by default
thread_spawn: clean up nuking of timed-out threads
factor out common listen loop error handling
graceful exit on trap TypeError from IO.select
expand and share init_worker_process
revactor: break on EBADF in the accepting actors
revactor: cleanups and remove redundancy
No need to be halving timeout, already done for us
revactor: graceful death of keepalive clients
revactor: continue fchmod beat in graceful exit
cleanup thread models, threads no longer time out
revactor: fix graceful shutdown timeouts
Fix graceful shutdowns for threaded models
SIGINT/SIGTERM shuts down instantly in workers
tests: check for common exceptions with "Error"
DEPLOY: update with notes on DoS potential
tests: add reopen logs test for revactor
vs Unicorn: use diagrams for concurrency models
vs Unicorn: fix wording to be consistent with diagrams
vs Unicorn: fix copy+paste errors and grammar fail
README: alter reply conventions for the mailing list
preliminary Rev support
local.mk.sample: use ksh93 as default $(SHELL)
rack.multithread is only true for Thread* models
Rev: general module documentation + caveats
Rev: fix error handling for parser errors
t3003: set executable bit
documentation updates (mostly on network models)
rack: expose "rainbows.model" in Rack environment
tests: enforce rack.multithread and rainbows.model
README: update URLs
README: update with Rev model caveats
Add Rainbows::AppPool Rack middleware
t4003: chmod +x
local.mk.sample: use rev 0.3.1 instead
README: link to AppPool and extra note about Rev model
|
|
|
|
rev 0.3.1 was just released tonight, lets use it
since it squelches annoying warning messages.
|
|
oops
|
|
|
|
|
|
|
|
Help ensure apps get the correct Rack environment to make
choices (if any) with.
|
|
This allows applications to determine which concurrency model
they're running under and possibly make adjustments accordingly.
The standard "rack.multithread" isn't enough for some
applications to determine what to do, especially when reentrancy
is required/recommended.
|
|
|
|
all test files should have the executable bit set
|
|
We should try to send 400s back to the client if possible.
|
|
|
|
Enabling thread-safe or thread-aware code paths in applications
may even be dangerous in some cases and cause deadlocks in code
that otherwise does not expect threads. This is especially true
of the Revactor case where being a "drop-in" replacement for IO
routines is dangerous if a mutex is held while an Actor performs
a "blocking" I/O operation.
Basically start to assume that anybody writing an app using
Rev or Revactor already takes Rev/Revactor concurrency into
account and won't need the rack.multithread flag set to do
special things.
|
|
It's faster than bash and the newer versions I have fixed a bug
where the all-important pipefail option got dropped in
subshells.
|
|
There is no TeeInput (streaming request body) support, yet,
as that does not seem fun nor easy to do (or even possible
without using Threads or Fibers or something to save/restore
the stack...)
|
|
Mailman is now configured to munge Reply-To: to point back to
the mailing list. This might make things easier for folks
on low traffic mailing lists like ours.
|
|
|
|
|
|
A picture is worth a thousand words, even in ASCII art.
|
|
Just in case Rev/Revactor does weird things when faced
with signals.
|
|
|
|
And fix existing tests that use "grep -v" since that
is almost always true...
|
|
Just like in Unicorn...
|
|
They were completely broken in the refactoring :x
|
|
|
|
The process-based heartbeat continues, but we no longer time
threads out just because a client is idle for any reason (for
now).
|
|
Avoid overloading the "alive" variable here and wakeup less
frequently as well to do the fchmod.
|
|
We'll finish processing the current request and
set the "Connection: close" header if possible.
|
|
In Unicorn by HttpServer#init_worker_process
|
|
|
|
Once our listeners get closed, we're as good as
dead so we should exit to avoid spinning.
|
|
This can be common across everything
|
|
Avoid potential race conditions with signal handlers, this makes
exits cleaner since the LISTENERS array will get map!-ed to nils
in the :QUIT signal handler.
|
|
It'll be easier to maintain a common language for logging
and debugging.
|
|
We log thread destruction times now and also make a best-effort
to avoid race conditions on threads that just finished.
|
|
In case the test doesn't complete and somehow
doesn't write the exit code, we always want to
start with one.
|
|
|
|
These variables are only for shells in tests
|
|
|
|
pipefail is extremely useful for detecting bad exits _anywhere_
in pipelines, not just the last command. Combined with
"set -e", pipefail leads to very unforgiving scripts that
bail out at the first sign of error, exactly what we want
in tests.
|
|
Something is probably wrong with the OS if it does,
so make sure it gets logged and hopefully reported.
|
|
Bad stuff happens, even in our own code because sometimes
we don't know what we're doing. So log it so we'll know to
fix it and let life go on...
|
|
EAGAIN is common on accept_nonblock with multiple processes
sharing the same listen descriptors.
oops :x
|
|
Revactor model uses a different process_client method
than our Thread* models.
|
|
This is for compatibility with OpenBSD as reported
by Jeremy Evans for Unicorn.
|
|
Useful for prefixing individual lines of a temporary
file while catting it to stdout. This helps make tests
easier to write and test.
|
|
Since we rely heavily on temporary files in tests, make
sure management of them is easy and reliable.
|
|
|
|
Avoid cluttering the directory we write tests in
|