Permalink
Browse files

add readme

  • Loading branch information...
1 parent 4bb699d commit f9c16a66463ba28f43f25baabf41d042c5a440a5 @igrigorik committed Jun 19, 2010
Showing with 31 additions and 4 deletions.
  1. +0 −4 Gemfile
  2. +31 −0 README.md
View
@@ -13,10 +13,6 @@ gem 'em-synchrony', :git => 'git://github.com/igrigorik/em-synchrony.git',
gem 'em-http-request',:git => 'git://github.com/igrigorik/em-http-request.git', :require => 'em-http'
gem 'addressable', :require => 'addressable/uri'
-
-# require 'em-synchrony/em-http'
-
-
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
View
@@ -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

0 comments on commit f9c16a6

Please sign in to comment.