Phat
Asynchronous Rails!
Install / Use
/learn @mperham/PhatREADME
Phat
An asynchronous sample Rails app designed to run in thin.
Phat comes pre-configured to use Fiber-enabled asynchronous libraries for maximum scalability: em_postgresql, memcache-client and em-resolv-replace.
Usage
You must be running Ruby 1.9.x.
You'll need to initialize the application's gem bundle:
gem install bundler
bundler install --relock
Now just start the server:
thin -D start
Caveats
The Rails database rake tasks do not use EventMachine. Because of this, em_postgresql will fall back to blocking behavior if EM is not running.
The Rails 2.3.5 database rake tasks hard code the supported list of adapters such that "em_postgresql" is not supported. You will need to edit rails-2.3.5/lib/tasks/databases.rake and change all instances like so:
-
when "postgresql"
-
when /postgresql/
Author
Mike Perham, http://mikeperham.com, http://twitter.com/mperham, mperham AT gmail.com
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
