7 ms·
I'm fairly new when it comes to working with Erlang. We've developed an application we use internally for essentially doing distributed, fault-tolerant timers.
by mxavier 15y ago
I'm fairly new when it comes to working with Erlang. We've developed an application we use internally for essentially doing distributed, fault-tolerant timers.
I, however, would caution against some of the platitudes you use about it being the future of concurrency. I also think it is kind of silly to imply that a coder isn't "worth their salt" if they aren't learning Erlang. It isn't a panacea. If you read some modern Erlang guides like Learn You Some Erlang, for example, you'll note that a responsible advocate of Erlang will caution against drinking too much kool-aid. Erlang, for example, is admitted as being a poor choice for lots of string manipulation because of the way strings are implemented in the language. I believe that same guide mentions that it may not be the best choice for heavy number crunching.
Developers worth their salt will not just hear the word concurrency and start writing everything in Erlang. It is much better to consider the problem and ensure that the problem domain matches Erlang's particular strengths.
I also want to mention that in my experience, Erlang applications are pure hell to deploy for people who don't have years of OTP deployment under their belts. So much of having a manageable Erlang app depends on the developers being well versed in a lot of subtle, and very easy to get wrong conventions. We actually ended up needing to start a support contract with Erlang Solutions themselves to help us demystify getting a sane deployment process going for our app. This was an expensive endeavor. Yes, it was primarily because we were new to the language, but it also had a lot to do with a lack of community documentation/discussion about deployment procedures. I won't even get into the joy of trying to decipher Erlang's famously cryptic crash reports/stack traces.
tl;dr: Erlang isn't concurrency pixie dust. A developer isn't a failure if they aren't currently learning it, nor are they a success if they just decide to use Erlang for every class of problem. It is an interesting language to work with and solves certain problems very well, others not so well.
- luriel 15y agoI think Erlang is great, and have been a big fan for a long time, but as you say, it has its limitations and it is nice to have a quite different alternative with Go for concurrent systems. > Erlang, for example, is admitted as being a poor choice for lots of string manipulation because of the way strings are implemented in the language. I believe that same guide mentions that it may not be the best choice for heavy number crunching. This are two areas where Go has a big advantage over Erlang while providing an equivalent (although slightly different and more CSP-ish) concurrency model. > I also want to mention that in my experience, Erlang applications are pure hell to deploy for people who don't have years of OTP deployment under their belts. So much of having a manageable Erlang app depends on the developers being well versed in a lot of subtle, and very easy to get wrong conventions. Another big contrasts with Go, where you just build a static binary, copy it to any target systems, and run it.
- nivertech 15y agoErlang isn't good fit for every concurrent/parallel application, you may read more about it in my answer on Quora: http://www.quora.com/Under-what-conditions-needs-would-Erlang-be-the-most-appropriate-language-to-build-a-product-service http://www.quora.com/Under-what-conditions-needs-would-Erlan... I disagree with Erlang "deployment hell". The full OTP deployment process is too heavy for anything non Telecom or Embedded. But for regular Internet applications, you just creating self-containing tar.gz file with OTP release using "rebar generate". Then you upgrade your cluster in round-robin manner. There are some open-source tools to automate this process. But it's easy to use any Fabric-style tool or just your own bash/ssh scripts.
- nirvana 15y agoIf you're not using erlang because you don't like its string manipulation capabilities, then you're being foolish. If performance is critical, you can do the string manipulation in C and plug it into erlang fine. If you're trying to do concurrency in most other languages, then you've probably made a foolish decision, unless those languages are also message passing actor model. Claiming that deploying erlang is pure hell is FUD, or an example of how you're doing it wrong and really shouldn't be commenting on erlang.
- runT1ME 15y agoI'm not convinced the Actor model is a concurrency silver bullet. I'm using it in Scala, and you still have race conditions and potential deadlocks to worry about. It helps to 'segregate' your application so it's easier to reason about what data could be a race sometimes, but for me it just made multithreaded applications a little less hard, not easy.
- jerf 15y agoThe way I like to put it is that it takes concurrency from an exponential problem that no human can actually solve, to a polynomial one. It isn't a magic bullet, because nothing can truly fully abstract away concurrency, but at least it's in the class of sane answers. This is grounded in the arguments about how many paths through your program there are; with conventional threading, it's exponential since at any time any thread may reach out and twiddle with something another thread has. Things that isolate threads confine interactions to just their communication points, which is more polynomial than exponential. You can still get yourself in trouble, but at least you don't start out in trouble.
- Retric 15y agoA secret of rock solid concurrency is communication, but there are many sane concurrency models. Consider people are already fast efficient safe sane code over hundreds of cores on GPU's which looks nothing like Erlang. Still, when you actually start to care that your concurrent code is accurate not just FAST you need to validate your calculations and Erlang does little to help you there. So sure it's better than C, but turn up the memory errors and it still falls down hard.