Utilizing Real Time Technologies in Ruby Web Applications

This research paper is focused on usage of Real Time Technologies specifically with Ruby web applications. Websockets protocol is the most commonly used technology for real time features development, but it is not perfect for all web applications and has its own issues. The study is focusing on comparison of Websockets protocol, Server-Sent Events and Long Polling technique, revealing their pros and cons, and comparing ActionCable, AnyCable, MessageBus libraries for implementing real-time features in Ruby applications. Due to the web framework's stateless nature, long lived connections are blocking web server threads available for regular request-response flow. This is the case for all web servers which are using thread per request model. The study explains how to avoid web server threads blocking in Rack based applications using Rack Hijacking API and what advantages can be obtained when using Long Polling or Server-Sent Events over HTTP/2 protocol instead of using Websockets protocol.