-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Async Rails 3 stack demo | ||
|
||
Simple async demo stack with Rails 3 + EventMachine and Fibers. | ||
|
||
* Hit localhost:3000/widgets to do a 1s async mysql query | ||
* Hit localhost:3000/widgets/http to make an HTTP call back to /widgets - recursive! :-) | ||
|
||
Requirements: | ||
|
||
* Ruby 1.9.x | ||
* Async app server (thin) | ||
* Rails 3 | ||
|
||
Environment setup: | ||
|
||
* rvm install 1.9.2-preview3 | ||
* rvm use 1.9.2-preview3%rails3 | ||
* gem install rails3 --pre | ||
|
||
Starting up Rails: | ||
|
||
* bundle install | ||
* thin -D start | ||
|
||
Test: | ||
|
||
ab -c 5 -n 10 http://127.0.0.1:3000/widgets/http | ||
|
||
Concurrency Level: 5 | ||
Time taken for tests: 2.740 seconds | ||
Complete requests: 10 |