[erlang-questions] Erlang newbie questions

Kaiduan Xie <>
Tue Oct 18 00:19:28 CEST 2011

For the network server, if the listener process fails, it gets
restarted by the supervisor, listens on the port again, and only THAT
process is restarted. The other part of the server is not restarted.
In C, you will kill the WHOLE server. Also most of the time, the
listener process does little except blocking and accepting connection,
then spawning another process to do the real work, the chance it gets
restarted is remote.

The learning curve is a little bit long, but Erlang/OTP really shines
for network server. I have written a network server in Erlang, it has
1/4 LOC compared with the C version with the same feature set.

On 10/17/11, 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.
> Thanks,
> -G
> _______________________________________________
> erlang-questions mailing list
> http://erlang.org/mailman/listinfo/erlang-questions

Sent from my mobile device

More information about the erlang-questions mailing list