[erlang-questions] Embedded vs Interactive - Why embedded?

zxq9 <>
Thu Mar 10 03:32:24 CET 2016

Hi, Ryan.

On Wednesday 09 March 2016 08:45:23 Ryan Stewart wrote:
> # The Question
> Why should we run embedded mode in production? It seems that's the unspoken
> law for production systems, but why? Is there some performance overhead
> running in interactive mode? I've read about Code Loading Strategy in the
> System Principles User's Guide:
> http://erlang.org/doc/system_principles/system_principles.html#id56789
> I've also read about the mode differences in the code server:
> http://erlang.org/doc/man/code.html
> I don't see anything in any of the stdlib/OTP docs about *why* you would
> choose embedded vs interactive mode. I'm leaning heavily toward using
> interactive mode everywhere, dev through production, because it's so much
> simpler and easy to understand. Someone please talk me out of it if that's
> a terribly Bad Idea.

I've often wondered this myself. It is amazing and wonderful that Erlang is
able to deal so smoothly with the embedded case and even provides a huge
set of built in tools for getting systems running that way and manipulating
them -- but very few of us non-telecom folks are deploying to telephone

I've written an entire system around dealing with Erlang code as signed
source bundles from a repo and dealing with the runtime as a more ordinary
language runtime which pulls and builds needed modules/version as necessary
within a given environment context (somewhat like Python's virtualenv). I
used this mostly for deploying client side code and keeping it up to date
without the hassle of building releases everywhere or making the users
themselves deal with constant "There's an upgrade! Install it or people
will think you have cooties!" messages (which they will disregard anyway).

This was easier for new coders (coming from backgrounds where this is the
norm), small business system administrators (who are used to maintaining
runtime compliance with a given set of software they have to use), and
users (who are used to this sort of "I click it and things happen" utility).

But it is clearly heresy to do this, so I tend to not mention it much.
I've even wondered if I should have been embarrassed to have committed
such sacrilege.

The original version of this system is still in production, but behind
closed doors (>.<). It was a bit of a monolith anyway (grew into its own
in an, um, "organic" way as I added to it). I intend to reincarnate it
as a set of smallish utilities, but haven't yet had the time, and as far
as I can tell there is just about zero interest in the community for
anything but releases, so just haven't put much effort there.

In the back of my mind I have always wondered: "This isn't so hard... why
isn't this considered normal?" And after experiencing no problems in
production I always wondered if I had just lucked out dodged some
horrible situation too foul to document by sheer chance -- or if this
really is indeed not a big deal and our obsession with releases is just
part of the tribal tradition.

So... why?


More information about the erlang-questions mailing list