| This is all true, but it also serves to remind us that Rails gives developers so much out of the box, even if you're not aware of it. ActionCable is Rails' WebSockets wrapper library, and it addresses basically every pain point in the post. However, it does so in a way that all Rails developers are using the same battle-tested solution. There's no need for every project to hack together its own proprietary approach. Thundering herds, heartbeat monitoring are both covered. If you need a messaging schema, I strongly recommend that you check out CableReady. It's a powerful library for triggering outcomes on the client. It ships with a large set of operations, but adding custom operations is trivial. https://cableready.stimulusreflex.com/hello-world/ While both ActionCable and CableReady are Rails libraries, other frameworks would score huge wins if they adopted their client libraries. |