News for hackers. Stuff that matters.
Re:Matestack – Reactive UIs in pure Ruby by Lio on Sunday November 22, 2020 @03:42AM (#25175964)
I’m actually quite bullish about Rails for the fitst time in a while due to StimulusRelex[1].

It’s a similar approach to Elixir’s Liveview and provides reactive, diff’d partial updates streamed over a websocket.

This seems a very “now” approach to building webapps.

1. https://docs.stimulusreflex.com/

Re:Matestack – Reactive UIs in pure Ruby by joelbluminator on Sunday November 22, 2020 @04:57AM (#25176255)
> streamed over a websocket

That's my problem with this approach, I wonder what the penalty is (performance and complexity wise) for going that route. What is it using for websockets btw, Action Cable?

Re:Matestack – Reactive UIs in pure Ruby by ksec on Monday November 23, 2020 @02:35AM (#25184389)
>What is it using for websockets btw, Action Cable?

And that is a problem because by default Action Cable isn't scalable. You cant get it work by 100 - 200 connection and response time are very slow at 50ms+ and a lot higher at 95th percentile. AnyCable helps a lot but this is another pieces of complexity added to the system.

Not a problem for Elixir and BEAM when they are sort of built for these type of workload.

Although I am waiting for all the Fibre, Async and Ractor addition to Ruby 3 and see how they add fit in.

Re:Matestack – Reactive UIs in pure Ruby by joelbluminator on Monday November 23, 2020 @04:36AM (#25185054)
> AnyCable helps a lot but this is another pieces of complexity added to the system.

What is the added complexity? I honestly never used all this stuff.

Re:Matestack – Reactive UIs in pure Ruby by te_chris on Sunday November 22, 2020 @03:48AM (#25175989)
Cool that people are doing a live view type thing in Rails, but it introduces a lot more complexity without the BEAM
Re:Matestack – Reactive UIs in pure Ruby by maxthegeek1 on Sunday November 22, 2020 @02:22PM (#25180199)
Neither Elixir Liveview nor StimulusReflex are really viable longterm, especially for mobile web.

The idea of chattily streaming UI changes over the network doesn't work out for mobile web, where networks are frequently unreliable if not totally inaccessible.

Re:Matestack – Reactive UIs in pure Ruby by ksec on Monday November 23, 2020 @02:23AM (#25184317)
If the Network is unreliable how is that any different to failing to updating / reloading a page?

Or you are referring to Web Apps that work offline?

Re:Matestack – Reactive UIs in pure Ruby by maxthegeek1 on Monday November 23, 2020 @10:14AM (#25187547)
Yes I'm referring to mobile web apps that either work offline, or don't severely impact their UX in the presence of a slow or unreliable network.

Many native mobile apps have these properties, and if mobile web apps want to compete they will have to as well.

In practice, that means generally minimizing network traffic, being smart about caching data, and providing soft failure modes.

Neither Liveview nor StimulusReflex are well suited to this problem space.