Hey! This is the first issue of Any Cables Monthly. We’re going to share news from the AnyCable ecosystem and other related real-time projects: releases, videos, blog posts, etc.
This first issue is actually a bi-monthly, covering everything happened to the world of cables since the beginning of summer, 2022.
Highlights
"AnyCable Pro turns 1 🍰" survey
Our PRO version celebrated its first anniversary this summer. We prepared a special survey to commemorate this event and ask real-time Rails users which features they would like to see in the future AnyCable releases.
RailsConf 2022: The pitfalls of realtime-ification
RailsConf 2022 videos are out! Check out the Vladimir Dementyev’s talk and discover how to guarantee consistency & tackle personalization w/ realtime-ification in Rails applications.
Videos
AnyCasts: Turbo Streams vs. consistency
This episode is a spin-off to the RailsConf 2022 talk linked above and demonstrates a particular pitfall and the ways to overcome it—consistency.
Articles
Scaling Rails web sockets in Kubernetes with AnyCable
This post describes how to prepare for a storm with Kubernetes, AnyCable and Linkerd.
Multi-tenancy vs. Cables: Introducing Action Cable command callbacks
The blog posts introduces the upcoming Action Cable API—command callbacks, which could be useful, for example, to make connections and channels tenant-aware in a simple, controller-like, way.
Centrifugo v4—a little revolution
Our friends at Centrifugo released the fourth major version of their real-time messaging server. If you never heard of it, it’s a good time to catch-up!
Releases
This release makes it possible to create many channels instances backed by a single subscription. This helps to prevent race conditions in environments, when you cannot fully control subscriptions (such as Hotwire).
This release brings Action Cable command callbacks support to AnyCable and older versions of Rails.
This release opens a new page in the Turbo history: it allows to use custom rendering strategies. Surprisingly (actually, not), there is already a turbo-morph library by Marco Roth.
This release improves GraphQL features by adding graphql-ws protocol support and integration with JWT identification.
Frame of curiosity: stream interceptors
In the RailsConf talk, I mentioned one lesser known Action Cable feature: stream interceptors.
You can provide a callback to the #stream_from (or #stream_for) method which could be used to transform the message right before it’s sent to a particular client. Sounds like a game changer? It could be, but performance could become a bottleneck. And AnyCable have never planned to support this feature—should we change our mind?
Below you can find a quick demo of this feature: