Rails brought building reactive web applications to the next level. Zero JS, no knowledge of WebSockets—just good old Rails! Action Cable and Hotwire make simple things simple. Still, to make complex things possible, we must learn what's under the hood and turn this knowledge into a superpower.
More and more Rails applications adopt real-time features, and it’s not surprising—Action Cable and Hotwire brought development experience to the next level regarding dealing with WebSockets. You need zero knowledge of the underlying tech to start crafting a new masterpiece of web art! However, you will need this knowledge later to deal with ever-sophisticated feature requirements and security and scalability concerns.
The variety of questions that arise when developers work with Rails’ real-time tooling is broad, from “Which delivery guarantees does Action Cable provide?” to “Can I scale my Hotwire application to handle dozens of thousands of concurrent users?”. To answer them, we need to learn our tools first.
In my talk, I will help you better to understand Rails' real-time component—Action Cable. I want to open this black box for you and sort through the internals so you can work with Action Cable efficiently and confidently.
The talk can be split into three major parts: Action Cable abstractions, implementation details, and Hotwire’s Turbo Streams design.
We will peel the layers off the framework step by step during the talk, starting with user-facing features—abstractions (or Ruby APIs). (And from time to time, I want to refer to the history of Action Cable to show the current state and the evolution—you can’t understand today without understanding what came before).
For the talk, I tried to pick the topics which lie at the intersection of hidden/internal and valuable. And I extracted the “usefulness” metrics from my experience helping developers demystify Action Cable.
The ultimate goal of this talk would be upgrading the Rails guides chapter on Action Cable to include all the tiny (but important) details I want to present in the talk.
I’ve been following Action Cable since its very first appearance. I can even say more—the library and its effects on the community greatly impacted my professional and open-source career. Partially because I wanted to improve it, I started contributing to Rails and building my own projects. But mostly because it made building real-time with Ruby and Rails accessible and, eventually, popular. And real-time and Ruby are Top-2 my programming passions.
How and why I came up with the talk idea? I’ve been pondering the idea of writing a comprehensive something (book?) on Action Cable for a while, so I already had some key points in mind. And I saw a tweet-call-out for RailsConf talks on “Rails internals or some Rails hidden features you know about”—that’s how two and two made four.
For the talk, I tried to pick the topics which lie at the intersection of hidden/internal and valuable. And I extracted the “usefulness” metrics from my experience helping developers demystify Action Cable.
The ultimate goal of this talk would be upgrading the Rails guides chapter on Action Cable to include all the tiny (but important) details I want to present in the talk.