Proudly present my new plugins for Ruby on Rails! This is based on my previous post on Juggernaut and ActiveMQ Ajax Web Demo. ( More details include tutorial coming! Meanwhile, please try the example
)
DESCRIPTION
AjaxMessaging, or a11g, is a plugin to provide real time messaging for Ruby on Rails.
ABOUT
- Author: Francis, Chong
- E-Mail Address: francis at reality dot hk
- License: MIT
- Website: http://code.google.com/p/ajaxmessaging/
- Blog: http://www.reality.hk (Chinese Only)
DETAILS
Using AjaxMessaging, Rails view can receive real time update from back-end Messaging Oriented Middleware (MOM).
What Happens:
- Client open a AJAX connection to Rails
- Rails connect to MOM using STOMP, listening for specific channels, if there are incoming messages, they are sent to client.
- If no message for a short period (~30s), the ajax connection return and client try again.
Features:
- Message sent to client at realtime
- Only regular HTTP connection is required. No socket server, no hacks on HTTP Pushing. Therefore, most firewall and browser supports it.
- Subscription to multiple channels. Message can sent to either user or channels.
- Integrated plugin, simple helper functions.
Requirements:
- Rails 1.2+
- json gem (gem install json)
- stomp gem (gem install stomp)
- Mongrel (gem install mongrel), you must use mongrel as web server as AjaxMessaging use Mongrel custom HttpHandler
- MOM supports STOMP, e.g. ActiveMQ
INSTALLATION
- Enter following command in your project:
script/plugin install http://ajaxmessaging.googlecode.com/svn/trunk/plugins/ajaxmessagingEdit config file:
config/mongrel_conf.ymlStart your MOM server. If you are using ActiveMQ, go to AMQ directory and enter following command:
./bin/activemqStart rails by enter following command:
mongrel_rails start -C config/mongrel_conf.yml
EXAMPLES
You may get an example project at:
svn checkout http://ajaxmessaging.googlecode.com/svn/trunk/examples/ajaxmessaging-examples ajaxmessaging-examples

介绍了一个为Ruby on Rails提供实时消息传递的插件AjaxMessaging。该插件通过STOMP协议连接到消息中间件如ActiveMQ,并将消息实时推送到客户端。
378

被折叠的 条评论
为什么被折叠?



