top | item 22896441

(no title)

dnsbty | 5 years 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.

discuss

order

te_chris|5 years ago

We 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

out_of_protocol|5 years ago

As 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