Live data from Hacker News

Elixir/Erlang Hot Swapping Code (2016)

kennyballou.com

31–40 of 119 posts

Re: Elixir/Erlang Hot Swapping Code (2016)

#31
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.

Re: Elixir/Erlang Hot Swapping Code (2016)

#32

Earlier quoted context omitted.

we had this wonderful thing in PHP where you would just save a .php file and bada bing it was LIVE. what happened? :D

They took away our access after one too many outages :yay:

Sounds like what happened with hot upgrade privileges in some erlang shops too.

Re: Elixir/Erlang Hot Swapping Code (2016)

#34

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.

Came here to say this. In Lisp, you can just compile a function, or load a file and it just works. It's not even sold as a hot feature, not the way Erlang sells it. It's just a feature.

I manage a few websites written in Lisp, and updating them is as simple as push code, recompile and it works.

Re: Elixir/Erlang Hot Swapping Code (2016)

#35
post #29
post #28

Earlier quoted context omitted.

Most of those hot fixes are data driven as in database updates. Gameserver just reload the data, the binary itself is not touch. I've never seen a game where they hot reload code inside the gameserver itself, it's usually a downtime or rolling updates.

> Most of those hot fixes are data driven as in database updates. Gameserver just reload the data, the binary itself is not touch. And since the data from the disk/database (whether it's a Lua table, XML structure, JSON object, or a query) is then representend as a low-level data structure, that's essentially what hot reloading is - you deserialize the new data and hot-swap the pointers in the simplest terms. >I've n…

Yes but again it's not hot swapping code as in Erlang, the C++ code is unchanged, they just change some xml somewhere.

By your definition every CRUD app have hot reloading capabilities.

Re: Elixir/Erlang Hot Swapping Code (2016)

#36

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.

Erlang is built for reliability. They're chasing nine nines. Everything about the BEAM is built to emphasize that, the design choices, the documentation, the recommended practices.

Erlang is not very fast, but that's not what it was built for.

Re: Elixir/Erlang Hot Swapping Code (2016)

#37
post #35
post #29

Earlier quoted context omitted.

> Most of those hot fixes are data driven as in database updates. Gameserver just reload the data, the binary itself is not touch. And since the data from the disk/database (whether it's a Lua table, XML structure, JSON object, or a query) is then representend as a low-level data structure, that's essentially what hot reloading is - you deserialize the new data and hot-swap the pointers in the simplest terms. >I've n…

Yes but again it's not hot swapping code as in Erlang, the C++ code is unchanged, they just change some xml somewhere. By your definition every CRUD app have hot reloading capabilities.

> Yes but again it's not hot swapping code as in Erlang, the C++ code is unchanged, they just change some xml somewhere.

Right, not on the C++ side, but on the Lua side that WoW uses - you load the new gameplay code that pulls the new data, and override the globals with new functions.

Re: Elixir/Erlang Hot Swapping Code (2016)

#38
post #4

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.

I am shocked at the idea of anyone implying that Erlang is "unreliable"... it's entire reason for existence was to step up the game on reliability.

I heard the quote that some 50% of the mobile traffic is handled by erlang. Somehow the other 50% seems to be doing just fine (except the usual shitshow on the inside that sofware is everywhere all the time).

Re: Elixir/Erlang Hot Swapping Code (2016)

#39
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.

Re: Elixir/Erlang Hot Swapping Code (2016)

#40
post #4

Earlier quoted context omitted.

I am shocked at the idea of anyone implying that Erlang is "unreliable"... it's entire reason for existence was to step up the game on reliability.

I agree. I don't know much about Erlang but what I've heard seems to indicate it's used for high-uptime systems that handle errors well.

I suspect the causality is reversed. When you have a good designed telecom system, then spmething shaped as erlang happens to be a good tool to create to implement it. The tool than keeps you committed to the design choices you made by being restrictive enough.
Post reply on HN