by hukl on 4/22/12, 7:39 PM with 70 comments
by silentbicycle on 4/23/12, 12:21 AM
Also, Erlang tries to address many failure cases that other languages/platforms do not; this isn't free. It's often a good trade-off (making systems resilient after the fact can be quite an undertaking), but worth noting.
by ZephyrP on 4/22/12, 11:39 PM
Superficially, Erlang is Actor Model for functionalists. I could go on about the various advantages this model provides, but as other posters have so eruditely pointed out, MPI provides the same abstract framework for dealing with the problems that actors are intended to solve.
I'm not a professional erlang developer, but I've based and written a new NoSQL database thats intended to store billions of records in Erlang, altogether clocking in at less than 1000 lines of code, and after this experience, I can safely say that I will never try to build distributed apps, save some niche cases, in another language (even Haskell).
Here's what stands out about Erlang to me, in contract to comparable options.
Firstly, HiPE and BEAM may be the most advanced virtual machine systems in the world. People working with JVM will claim this an exaggeration, but in terms of reliability and speed, my experience with HiPE is unmatched.
Secondly, and perhaps more importantly, OTP.
Open Telephony Platform is the single best collected library for dealing with various problems that I have ever seen. The Generics (gen_server, gen_fsm, etc.) are a quick, fast and easy solution to problems and edge cases that would bog down even the best MPI developer. For example, dealing with internal state as a finite state machine is not new, but it's not nearly as popular as it should be, perhaps to this end it's apt to say that Erlang does for parallelism and distribution what Ruby on Rails did for web development -- It forces you to make intelligent decisions.
The systems responsible for controlling emergency services, global telecom infrastructure, many large MMOs, and countless other applications are Erlang. If you trust 911, you can trust Erlang.
I could go on, Hot code loading while old processes still depend on usable code? Built in failover? Function takeover? Automatic workload offloading? Good luck if it's not Erlang.
by boothead on 4/23/12, 6:47 AM
Haskell appears to have many of the required ingredients: Cheap multi threading, immutability and the Cloud Haskell[1] framework, with the added benefits of speed and the awesome type system.
I currently use eventlet and ZeroMQ in python to emulate a similar (and probably crappier) style of writing message passing concurrency apps. With the addition of protocol buffers this type of architecture is easily applicable to a multi language set up. I'd be very interested to see what others are doing.
Has anyone who's used erlang tried playing with Haskell in the same role?
by revertts on 4/22/12, 10:38 PM
1. server loads the data from S3 on start (sessions are sticky to a particular server)
2. user data gets mutated on that server for the lifetime of the session
3. the data gets written back to S3 on session end
How are failures handled in 2? If a box goes down, do you not only lose the open connections but also any data that has been changed in that session? If these are game sessions it seems like they'll be long-lived; do you periodically dump back to S3?
by Scorponok on 4/22/12, 9:43 PM
by luriel on 4/22/12, 10:02 PM
by namidark on 4/22/12, 8:42 PM
by halayli on 4/22/12, 11:32 PM
by nirvana on 4/23/12, 10:28 AM
Stop that, right now. You're supposed to be hackers. New technology isn't supposed to scare you this much.
Erlang doesn't use the C style syntax. BIG WHOOP. Yeah, it looks "weird" at first but don't be scared off by it.
You can't get the fault tolerance (and consequential scalability) of erlang in any other language/platform. Period. Full Stop. It simply doesn't exist.
Yeah, theoretically, one could build it with some low level language like C. You whipping up crappy C++ code using an "actor" library is not the same thing, by a long shot.
So, unless you want to spend 20 years reinventing the wheel, why not just use the wheel. Yeah, I know its round and you're used to square.
I promise you that you'll really enjoy the much smoother ride.
Don't be a blub programmer. Learning erlang takes you about 2 weeks. The syntax is perfectly fathomable once you put in those two weeks.
But be serious about it. Do a chapter each night from the armstrong book.
This really is one of those languages that separates the hackers from the hacks. Not because its difficult, but because the hackers are not scared of it, while the hacks are.
Seriously. Stop rationalizing.
by andyl on 4/22/12, 9:59 PM