[erlang-questions] now fares node.js ideas vs. erlang otp ideas?
Jesper Louis Andersen
Thu Sep 22 02:38:23 CEST 2011
On Thu, Sep 22, 2011 at 01:00, Raoul Duke <> wrote:
> i haven't been able to parse all the terminology yet. i always have to
> wonder when somebody has something new like node.js and then there's a
> band-wagon around it, how much is a new syntax for already-existing
In Node.js case, it is a simple result of a number of moons aligning
up. Basically, a number of things evolve, seemingly unrelated:
The Apache webserver and the select() system call is evolved into the
epoll() system call and web servers like nginx or lighttpd. Rather
than a multi-process webserver, like Apache, these run a single web
server process and handle everything in an epoll() loop.
An embedded language for web page manipulation in Netscapes code base
evolves over firefox and mozilla into a more full language. Then
Google gets behind it fully with their Chrome browser and their V8
Event processing frameworks evolve by their use of continuations as a
way to chain up events firing. Up pops frameworks like Eventmachine,
Twisted, Netty, POE and so on.
And then, since the building blocks are there, it is only a matter of
time until someone has the audacity to merge them into one. Each part
ability to use the _same language_ at front and backend respectively.
The event processing and epoll() parts provide the system an ability
to run at quite large scale.
Is it a new thing? Indeed it is. Like when The Prodigy sampled their
way to "Smack my Bitch up":
(The Sheila Chandra part is just beautiful in its own right btw).
The mix of existing technologies provides something new. For one, it
venue unto the server side, with something they already know and love.
And the programming model is not too foreign if you already know some
of the pieces.
It is a very different mix of technologies compared to Erlang, but as
I hint, it is another piece on the Chessboard. It is a stake that
another model can be useful for a set of problems. Erlang substitutes
a lot. The process model is fully preemptive and not cooperative as in
prototypical OO imperative language. The focus is on writing robust
programs in Erlang, an emphasis I have not found any other language
which focus on.
Note there is a subtle difference between robust and correct. A
program is correct if it lives up to the frame of specification. A
program is robust if it survives an event that was not part of the
specification - outside the box :)
And as such, the problems which Erlangs shines at is probably going to
be different compared to the problems where Node.js will be known.
Since the languages are so different in their basic nature, surely the
problems they solve well will also be.
More information about the erlang-questions