[erlang-questions] Erlang newbie questions
Fri Oct 21 23:22:49 CEST 2011
I had similar questions initially. However, you really should consider
"Erlang" to _be_ your OS. If Erlang crashes, it's as bad as if the OS kernel
crashes, which is as bad as if the hardware fails.
The nice thing with this is that, if your code crashes, things like sockets
can still survive. Similarly, even if your gen_server crashes, you get a
well-defined place to clean up your code if you want -- it's nothing as bad
as trying to do cleanup in SEGV signal handlers in C; instead it's a
well-defined part of the library!
The reason Erlang can give you these nice things is that it's isolated,
immutable, and based on a VM. The cost is, well, that it's isolated, you pay
copying overhead for immutable data, and some execution overhead of the VM.
Americans might object: there is no way we would sacrifice our living
standards for the benefit of people in the rest of the world. Nevertheless,
whether we get there willingly or not, we shall soon have lower consumption
rates, because our present rates are unsustainable.
On Mon, Oct 17, 2011 at 2:14 PM, Gerry Weaver <> wrote:
> Hello All,
> I am new to Erlang and I'm trying to make the case to continue learning
> this language. I have read all of the books available and seen several
> presentations on the language. I am interested in Erlang primarily for the
> distributed and fault tolerant features it offers. However, I have some
> reservations about how useful this really is. For example, if you have a
> network server and the listener process fails, how do you recover? It seems
> that the fault tolerance is only applicable in the VM context. This is, in
> my mind equivalent to any other application process. If I have a network
> server written in C, I can have a watchdog process to kill and/or restart it
> in the event of failure. The C based approach actually seems more robust. In
> this scenario, how would one restart the Erlang VM? It has been my
> experience that network servers most often fail due to OS or hardware limits
> rather than
> bugs in the code (at least for thoroughly tested production ready code).
> When you factor in the amount of baggage that comes with Erlang, or any
> other VM based language, it's difficult to justify. Now there is also the
> rapid development aspect, but I'm finding that at least for now, the time
> savings is being eaten up by looking for documentation. I understand that
> this situation will improve over time, but the various posts I've seen from
> folks with more experience seem to indicate that this will take quite a
> while. I like the language (except the , ; . thing). You can do some pretty
> cool things with it, but when I got over that initial gee whiz, I had some
> trouble seeing a real world production use case. I'm not trying to be
> critical, I just figure I must have missed something along the way. Any
> perspectives or advice on this would be greatly appreciated.
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions