Hi, I was thinking about this a lot and even found myself writing a whole server / framework with native websocket support <https://github.com/boazsegev/anorexic> to see what was possible.
Websockets is far too complicated to to easily utilize in it's present state, since using websockets in Rails applications requires Rack and Middleware knowhow which is not expected from the average Rails developer and isn't common. I propose adding support for native websockets within the Controller class - by defining callback support for the following methods / events: `pre_connect` (before protocol upgrade, for updating cookies and HTTP data), `on_connect` (after protocol upgrade), `on_message(data)`, `on_disconnect`. this also might require adding support for controller class instance communication, assuming each connection has it's own controller instance - this could allow us to broadcast messages and collect information from other connections directly (without pulling on databases or setting up flags)... I've managed an interesting solution within the `broadcast` and `collect` methods in my experimental framework. If anyone thinks this is a good approach, please feel free to contact me about adapting my code (or writing new code) for the Rails 5.0 release. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.