Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
base: master
Choose a base branch
from

Conversation

mrflip
Copy link
Member

@mrflip 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 13 commits June 23, 2012 18:26
* 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
…ack to how it ics api) so that it's actually useful outside test rig
…ncurrent requests to remote sites. Really handy when you want to scatter-gather HTTP calls from a non-concurrent system like rails
 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.
The rakefile is copied from goliath; it now has tasks for running tests, making yardoc, etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant