3 ms·
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 Blaz
by vyrotek 3y ago
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?
- benwilson-512 3y agoHey 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.