by Volundr on 12/13/2024, 1:12:36 AM
by hauxir on 12/13/2024, 1:24:58 AM
At kosmi.io we use elixir hot swapping for every small patch/bugfix on the backend. This allows us to deploy updates multiple times a day with 0 disruption.
Allows the clients to remain connected and be none the wiser that there was an update at all.
For larger updates we just do hard restarts when in-memory data structures or supervision tree are changed.
by modernerd on 12/13/2024, 10:58:20 AM
Live updating a drone running Erlang in 10ms while it was flying with no application restart and no loss of state impressed me when I saw it in 2021:
https://www.youtube.com/watch?v=XQS9SECCp1I
But I almost never hear Erlang/Elixir/Gleam folks talk about this benefit of the Erlang VM now, even though it seems fairly unique and interesting. Has the community moved away from it? Is it just not that useful?
by GCUMstlyHarmls on 12/13/2024, 3:13:23 AM
This is a talk about a large scale, resilient elixir/erlang deployment in healthcare.
Specifically they talk about running with no down time using hot code reloading here: https://youtu.be/pQ0CvjAJXz4?t=2667 but the whole talk is quite interesting regarding availability.
Warning: the video is quite quiet.
by behnamoh on 12/13/2024, 12:42:42 AM
Lisp has had this features since day 1. But Lisp-like langs like Clojure, Racket, etc. don't have it. This is one of the fundamental features of Common Lisp and I don't know why most other Lisp-wanna-be's don't implement it.
by dszoboszlay on 12/13/2024, 5:28:21 PM
Hot code upgrades on the BEAM are awesome, but they're not a piece of cake. If you're also interested in the challenges of making them production safe, I gave a talk about this topic on CodeBEAM Sto earlier this year:
https://youtu.be/epORYuUKvZ0?si=gkVBgrX2VpBFQAk5
OP talks in the summary about the importance of understanding the process. It's very much true, but you need to understand not only the process your tooling provides, but also what's going on in the background and what hasn't been taken care for you by your tools. I'm afraid these things are rarely understood about hot upgrades, even by experienced Erlang engineers.
by benzible on 12/13/2024, 7:42:06 AM
"hot deploys on fly.io to a planet-wide cluster, in 3 seconds.": https://x.com/chris_mccord/status/1785678249424461897
by apex_sloth on 12/13/2024, 10:50:51 AM
I used to work for a company that wanted zero downtime through Erlang's hot code reload feature. While it absolutely works, it requires immense effort and extra code to handle state upgrades and downgrades.
by gregors on 12/13/2024, 2:18:18 PM
The Big Elixir 2018 - Desmond Bowe - Hot Upgrade Are Not Scary
by robocat on 12/13/2024, 9:27:40 PM
Great discussion 23 days ago on hot code loading:
by epiccoleman on 12/13/2024, 3:24:36 PM
I wonder if this kind of thing could be used to make the Elixir REPL a bit more LISPy. I like iex a good deal, but I often find myself wishing I could just easily eval some code or expression in the editor and have it make its way into the REPL context. (yes, I know you can `r` on a module, but that's pretty clunky compared to something like CIDER).
by anonymousDan on 12/13/2024, 12:27:33 AM
I'm a distributed setup I imagine there could be cases where you want to atomically hot upgrade multiple VMs at the same time. Is this common in practice and if so are there recommended patterns/techniques for doing it?
by melvinroest on 12/13/2024, 1:34:38 PM
Is this like a similar feature in Smalltalk/Pharo and Lisp?
by amelius on 12/13/2024, 12:06:33 AM
Does this hot swapping also work for closures?
by slt2021 on 12/13/2024, 12:17:36 AM
hot reload of code is nothing new nowadays, but people use it only locally during development for REPL like development style.
in actual production, people prefer to operate at the container level + traffic management, and dont touch anything deeper than the container
by alberth on 12/13/2024, 1:13:51 AM
(2016)
by omertoast on 12/13/2024, 12:04:48 AM
i'm so sick of this DevOps bullshit i wonder if there is an alternative language that you can hot swap code and do all the black magic stuff while keeping the reliability and performance like Rust.
by jongjong on 12/13/2024, 9:03:08 AM
Forcing all clients to reload their code at the same time sounds like a bad idea. Allowing different clients to run different incompatible versions of the code at the same time also sounds like a bad idea.
APIs are like database engines; they should rarely change. Making it easy to change them is an anti-pattern.
Engineers don't build bridges with replaceable pillars or skyscrapers with replaceable foundations. When aerospace engineers tried building a plane with replaceable engines, we got Boeing 737 Max...
It's worth noting that distillery is deprecated in favor of mix releases, which don't support relups out of the box, and specifically warn against them due to the complexity involved in writing code to support them correctly.
It's a cool feature that's no doubt amazing for applications that need it, but it brings a fair amount of complexity vs other deployment strategies.