News for hackers. Stuff that matters.
Re:Dynamic Forms with LiveView Streams by vyrotek on Tuesday May 30, 2023 @10:42AM (#36125443)
Is LiveView like ASP.NET Blazor Server?

It seems to look very similar but I didn't see whether LiveView has the "sticky" websocket server requirement like Blazor. With Blazor all of the user's state is in memory on one specific app server. And if a connection is lost the app is completely unresponsive.

It's a great dev experience but I've seen comments about scaling and interaction latency concerns. Seems like it'd be great for intranet corp apps.

Is anyone running either tech as a public facing service?

Re:Dynamic Forms with LiveView Streams by benwilson-512 on Tuesday May 30, 2023 @11:05AM (#36125711)
Hey vryotek, short version: stickiness is not necessary or important. It does use a websocket.

To elaborate a bit, while each LiveView client is indeed associated with a long lived process in the LiveView server, the Phoenix framework provides hooks and other lifecycle management tools to minimize the impact of disconnects from eg blue green server deploys. Most interestingly for example with forms, the "automatic form recovery" does a process where when the reconnect happens it delays re-rendering until the client side has had a chance to send the current form state back to the server and allow it to synchronize.