DEV Community

Nico Roulston for LoadUp

Posted on

We stream video games, should we stream websites?

i-was-told-there-would-be-live-streaming

There has been this rolling ball on a downhill slope of evolution bringing us towards streaming websites. The question is will we actually do it?

If you keep your thumb on what the Rails community is doing you will have seen that they are pushing forwards with the ability to live stream updates to the dom. Rails 7 will officially include HOTWire(HTML, Over, The, Wire) a baked in solution to bring the amount of Javascript you need down to what they lovingly call a sprinkle amount. Rails can't take all the credit, Liveview has been out for awhile, but they just might be the ones to move an industry away from SPA frameworks.

Before Rails brought in Hotwire if you were tenacious enough you could use ActionCable, a baked in rails websocket solution, to create a chat application. Then came the makers, who built the AnyCable, CableReady, and StimulusReflex libraries.

So why has the revolution not begun. Google Stadia streams video games, Pluto streams a multi tenant ecosystem for VR. This is literally pixels being streamed to the client and yet as a web developer community our crud apps aren't able to do the same thing. I really couldn't tell you why the community hasn't done this but I can tell you what we at LoadUp think.

It comes down to the amount of work needed to implement a solution. What is crazy is that somehow we have ended up in a position with SPA's that requires an exponential amount of work and complexity over the webpages of yore. The thing is the User now expects this kind of workflow, and breaking away from user expectations is what influencers are used for. I digress though.

Even taking into account the expected customer experience, it is more work to write an SPA then it is to drop in the aforementioned libraries into a rails build. Here is the kicker; you can't just drop in the libraries. In the working world you already have a functioning app, and most likely it isn't small in size. Getting it integrated is a lot of work, and isn't worth the effort to replace React/Preact/Angular.

The decision is a simple calculation of team size, budget, time, complexity, actual dollars it generates, and code base size. Simple right.

We have high hopes at LoadUp that around the corner Rails will have developed the drop in solution that doesn't require a codebase overhaul. They did with Stimulus, you can insert it just where you needed it in your current project.

As always we would love to hear your thoughts.

P.S. I know I missed out mentioning every library that has pushed this idea of streaming SSR updates, and would love if you put them in the comments. Most likely there are a lot I have not heard of.

Top comments (1)

Collapse
 
janmpeterka profile image
Jan Peterka

You can add Turbo to existing project gradually, as my colleague describes here. We are currently slowly switching to it (mostly with new features and sometimes refactoring), same way we are with Stimulus.