5 ms·
With Erlang releases (compiled code with the Erlang runtime included) you can do hot code swapping to change the code while it’s still running. And iirc I beli
by dnsbty 6y ago
With Erlang releases (compiled code with the Erlang runtime included) you can do hot code swapping to change the code while it’s still running.
And iirc I believe LiveView will have all the state necessary client-side to be able to reconstruct the session when reconnecting the socket. I’m not near my development machine to make sure on that one though.
- out_of_protocol 6y agoAs far as i know it doesn't work this way (session restoration) as of now. Something could be done but requires a lot of effort
- te_chris 6y agoWe store our sessions in Redis and don't do hot code swapping but deploys do still mostly just work and live channels normally reconnect without any noticeable downtime. We run everything on GKE so a deploy is just rolling container swaps. Liveview is built on top of channels, so worth reading up about them: https://hexdocs.pm/phoenix/channels.html https://hexdocs.pm/phoenix/channels.html