[erlang-questions] node.js vs erlang

Miles Fidelman mfidelman@REDACTED
Thu Jun 19 16:12:12 CEST 2014


Mahesh Paolini-Subramanya wrote:
> "Complexity" is a remarkably loaded term - I'm fairly certain that 
> things that are complex for me (Getting anywhere via mass-transit in 
> Tokyo) are pretty trivial for others (e.g., Loic).

Well, let's say "complex" in an engineering context, for starters.

> Whats more, complexity of systems has nothing to do with the 
> complexity of the individual components involved (DNA is a bit of a 
> prime example here).

Precisely.  I'd venture that one gravitates toward Erlang when one is 
building systems and systems-of-systems with lots of distributed, moving 
parts (e.g., a telephone switching fabric).  If one is building a 
single, stand-alone application, I expect Erlang might not be the "best" 
choice.

>
> That said, I would claim that erlang systems are more _comprehensible_ 
> than others.
> Mind you, this does require some mastery of erlang, which is not as 
> much of a chicken-and-egg scenario as you might imagine.
>
>

You know, that's a really good point, that highlights two broader 
issues: conceptual models, and tooling that maps onto conceptual models:

- Sequential code is relatively easy to conceptualize and represent - 
well commented code can suffice as a representation, there are plenty of 
debugging and tracing tools for examining run-time behavior

- Object oriented code lends itself to browsers and inspector - though 
execution flow can get pretty arcane (at one point, I worked on military 
simulators - think game engine - each vehicle was an object, but the 
actual work was done by 4 spaghetti coded threads that each ran 20 time 
a second - very ugly, and what led me to discover Erlang)

- Actor formalism (i.e., Erlang) - very easy to conceptualize for 
applications where things naturally map onto independent processes 
(e.g., the above-mentioned simulator -- tanks and airplanes are a lot 
easier to model as processes than as objects) - but tools for 
visualizing, designing, debugging systems with lots of processes, and 
the interactions among them, are close to non-existent  (a problem for 
Erlang, but also for anyone building highly concurrent, highly 
distributed systems)


-- 
In theory, there is no difference between theory and practice.
In practice, there is.   .... Yogi Berra




More information about the erlang-questions mailing list