5 ms·
The title is confusing! It should have been "Do messages get lost during code reloading in erlang?" In a prod env, how do you make sure that different versions
by blankverse 13y ago
The title is confusing! It should have been "Do messages get lost during code reloading in erlang?"
In a prod env, how do you make sure that different versions of your code coexist peacefully?
- strmpnk 13y agoRelated to other comments, there are some mechanisms that ensure that two versions of all code can remain active (if you chose) in Erlang. No extra effort is required. In terms of correctness, I'm not aware of any work that does type checking or serious analysis across version upgrades. Even Erlang's dialyzer will only check each version in isolation. So in practice this means you either test the upgrades with things like continuous integration or even manually, OR do so in very careful and small steps that are easy to reason about locally (very useful for critical applications that can't spare downtime).
- banachtarski 13y agoYou can have multiple sets of instructions for the same function but indicate that only one should be active. This makes it easy to rollback a deploy for example. Also, when you do a live upgrade, there must be at least two versions exposed to the VM at one point before the switch occurs. Easy hot code reloading is one of the great benefits from CSP.