

With LiveView, forget what you're used to in HTTP.Įach instance of a user seeing a LiveView is backed by a stateful Elixir process supervised inside an Erlang VM instance. The server will bail out by throwing a 500, but remains stable and responds to requests, and you still have your state in the cookie. What happens in HTTP when an unhandled server exception occurs in data processing? HTTP is stateless, so there's not much to worry about. Well, technically there is not even such a thing as a connection in HTTP. What happens in HTTP when the connection's down? Ditto. You have your cookies on the browser side of things. What happens in HTTP when the server's down? HTTP is stateless, so there's not much to worry about. You pass and mutate cookies back and forth between the browser and the server to create an illusion of state, storing a set of data - a session. Server-side statefulness, which is Phoenix LiveView's major selling point, can also be seen as its major weakness, creating several challenges to resolve.
Elixir phoenix liveview full#
While this is true, let's think about what can go wrong with full reliance on Phoenix LiveView's proposed approach. We were keen to point out that Phoenix LiveView can be treated as an alternative to reactive UI frameworks such as React or Vue. but there it is, the long-awaited next part of our LiveView tutorial! Psst! Don't forget to subscribe to our newsletter as there's still more to come. It's been a while since we added Phoenix PubSub and user authentication with Pow to our Phoenix LiveView-based instant messaging app.
