Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Building realtime applications with Rails has become a no-brainer since Action Cable came around. With Hotwire, we don't even need to leave the comfort zone of HTML and controllers to introduce live updates to a Rails app. Realtime-ification in every house! Switching to realtime hides many pitfalls you'd better learn beforehand. How to broadcast personalized data? How not to miss updates during connection losses? Who's online? Does it scale? Let me dig into these problems and demonstrate how to resolve them for Action Cable and Hotwire.
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
In the presentation titled "The Pitfalls of Realtime-ification," Vladimir Dementyev discusses the challenges and intricacies involved in developing real-time applications with Ruby on Rails, particularly focusing on Action Cable and Hotwire. He begins by highlighting the evolution of developing reactive web applications using Rails, emphasizing that modern applications must support real-time functionality without constant user intervention. ### Key Points Discussed: - **Real-Time Web Applications**: Real-time applications differ from traditional request-response models by allowing continuous data flow between the client and server via WebSockets, which can create unforeseen challenges. - **Early Adoption and Tools**: Although Action Cable introduced real-time capabilities to Rails, its adoption was slow initially. The introduction of Hotwire has simplified the process, making it easier to incorporate real-time features using just HTML. - **Common Pitfalls**: Dementyev identifies specific pitfalls in developing real-time applications: - **Personalization Issues**: Broadcasting the same data to multiple clients can lead to inconsistencies in user experiences, especially in scenarios like chat applications. - **Delivery Guarantees**: Action Cable operates on a "fire-and-forget" model, meaning messages may not reliably reach clients, especially in unstable network conditions, leading to potential data loss. - **Concurrency Challenges**: When users connect from multiple devices, maintaining state consistency becomes complicated. Developers must handle synchronization issues carefully. - **Performance Limitations**: As the number of connected clients grows, scalability and performance become critical concerns, requiring optimizations to avoid creating bottlenecks. - **Solutions Provided**: The presentation concludes with possible solutions to these pitfalls, such as implementing improved delivery guarantees, history restoration for missed messages, and leveraging client-side solutions for better data integrity and user experience. Notably, he presents the idea of a custom 'Turbo History Stream' to handle message consistency more effectively. - **Key Takeaway**: Developers are encouraged to embrace the complexities of real-time web applications by understanding underlying mechanics and utilizing available tools like AnyCable for enhanced performance and reliability. Dementyev’s insights serve as an essential guide for Rails developers, urging them to be aware of the intricacies of real-time functionalities to support the creation of robust applications successfully.
Suggest modifications
Cancel