Using Browser feature SSE to retrieve changes on a Rails4 application stream
- rails 4.0.0 new
- Add Puma server, witch support Server Sent Events: http://puma.io/
- Allow concurrency on development enviroment
- Add helper to write on stream
- Scaffold a model to use on live test
- Add stream capability to UsersController, using ActionController::Live
- Provide stream, of last user changed, on UsersController and consumes using HTML5 Server Sent Event
- git clone https://github.com/acdesouza/rails-and-server-sent-events.git .
- bundle install
- bundle exec rake db:create db:migrate
- bundle exec rails s
- On Browser 1: User watch stream
- On Browser 2: User watch stream
- On Browser 3: User list
- Redimension browser's windows to make browser visible
- On Browser 3: Create an user
- On Browser 1,2: See they receiving the update