Son of a batch: lets one request to an endpoint become dozens of concurrent requests to remote sites #4

Open
wants to merge 13 commits into
from

Conversation

Projects
None yet
1 participant
Member

mrflip commented Jun 24, 2012

son_of_a_batch -- lets one request to an endpoint become dozens of concurrent requests to remote sites. Really handy when you want to scatter-gather HTTP calls from a non-concurrent system like rails" .

Note that this branch includes the commits from all the other pending pull requests.

Also included:

  • CORS (Cross-Origin site headers)
  • a little script I made when figuring out how fibers and EM worked, showing the brain-bendy timeline

Philip (flip) Kromer added some commits Jun 23, 2012

Philip (flip) Kromer Made the support files (gemspec, Gemfile, etc) look like goliath's) 4280923
Philip (flip) Kromer Middlewares to do many useful forms of diagnosis and fault injection:
* force_delay       does a 'sleep for x +- y' seconds before responding
* force_drop        drops the connection, before or after its middleware descendents run
* force_fault       raises the requested type of error (eg _fault=404 will bail out of the rpocessing chain, returning a 404 Not Found response
* force_response    forcibly replaces the status, headers or body with what's given in the URL
* handle_exceptions gives you response methods, same that the middleware provides, for your app
* diagnostics recycles info about the request into the output
544e647
Philip (flip) Kromer A statsd agent and plugin, and a middleware to log all response times…
… and durations ot statsd
4be2007
Philip (flip) Kromer middleware to handle CORS (Cross-Origin Resource Sharing) headers, a …
…superior alternative to JSON-p
4115398
Philip (flip) Kromer Walkthrough of the interplay among EM blocks and fibers bf418b7
Philip (flip) Kromer middleware to load white-listed params into the env; another to load …
…static values into the env
8ab4a73
Philip (flip) Kromer reworked injection middlewares to be configured by env, not params (b…
…ack to how it ics api) so that it's actually useful outside test rig
979a103
Philip (flip) Kromer minor tweaks to utility middlewares while landing the last pieces 98cbe31
Philip (flip) Kromer son_of_a_batch -- lets one request to an endpoint become dozens of co…
…ncurrent requests to remote sites. Really handy when you want to scatter-gather HTTP calls from a non-concurrent system like rails
1c2711b
Philip (flip) Kromer force timeout calls its response chain rather than raising an exception.
 it now formulates the response in the timeout condition directly, and calls its middleware predecessor with that error reposnse. This was always the intended behavior, but a too-helpful rescue block was making it skip the remaining middleware chain.
c5e68a5
Philip (flip) Kromer more clearer the documentation was made to be 6ae9674
Philip (flip) Kromer Rakefile does yard & tests too. Dependency list more minimalist.
The rakefile is copied from goliath; it now has tasks for running tests, making yardoc, etc
dcd5181
Philip (flip) Kromer Doc fix d324ac4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment