rails/rails — pull request #9695 by dahakawang (2013-03-13 03:43:24+00:00)
Title: Add the MessageBus feature

hi everyone,

MessageBus is a mechanism to push messages from rails server to browser under development mode.

By default, MessageBus will detect your rails application's file system changes(thanks to @wangjohn ) and notify your browser the changes(using SSE). This will make you a happier develpment life since you do not need to refresh browser manually \^_^/.

MessageBus is a generic solution for message pushing from rails server(and rails console) to browser, you can push any data to the browser. Since your data will be passed through a DRb server, your arbitrary data must follow the requirements of the DRb server.

## usage
require [this Gem](https://github.com/dahakawang/messagebus) to enable the MessageBus in your rails project and you will instantly get file system change notification ability. and you can also send message from you code.

at present the sse feature is in progress(nearly completed), so the message will be print the message in console (if you specify a debug flag)

## preview
![preview](https://f.cloud.github.com/assets/2820550/252254/efb9c758-8b8f-11e2-860c-58b15454b7c2.jpg)

the right up is rails app, it received the notification of the file system changes and a message from rails console.