News for hackers. Stuff that matters.
Re:Concurrency Models: Go vs Erlang by gordonguthrie on Wednesday March 27, 2013 @04:52PM (#5451942)
Few quick points

Erlang doesn't have threads - it has processes. Thread's share state, processes don't. The processes are created within the Erlang cluster - they can't be operating system processes because they might be running on a different instance of the operating system.

Try and Catch are actually very rare constructs in Erlang - usually only at the boundaries of the system with the rest of the world. In my 10 years experience there is about 1 try/catch per 20k - 25k lines of production code.

Erlang doesn't handle errors - you let your process crash and let OTP restart it.

The article seriously underestimates the importance of OTP.

An Operating System is a set of libraries that means your unwritten application can do things like write to persistent storage, speak to a network, run in a cronjob, have a GUI, etc, etc...

To have a reliable computer system you need at least 2 computers and OTP is an Application System than runs across multiple physical boxes. This means that your unwritten software can failover if a box dies, recover in the presence of gross errors, cluster up, etc, etc... (Google App Engine is another example of an A/S).

The first cluster we ever deployed was a shambles. We moved a webserver from a London box to a Californian one and its performance went through the floor. Because of a typo we had actually only moved the web bit leaving the database running in London.

Re:Concurrency Models: Go vs Erlang by rdtsc on Wednesday March 27, 2013 @08:50PM (#5452839)
> Thread's share state, processes don't.

Not only that they also have separate heaps -- truly concurrent GC is possible without too much "clever" code.