This document introduces websocket-rails, a gem for building real-time web applications using websockets in Ruby on Rails. It allows asynchronous full-duplex communication by using websockets instead of traditional HTTP requests. The gem maps websocket events to controller actions, and controllers can then trigger events that are broadcast to clients. This enables features like pushing new data to only interested clients in real-time. Code examples demonstrate setting up websocket-rails, defining event mappings and controllers, and binding to events from the client-side.
Related topics: