Showing posts with label Erlang. Show all posts
Showing posts with label Erlang. Show all posts

Monday, May 25, 2009

Erlang -- let's get it on!

Messed around with Erlang for like the sum total of 2 hours over a year ago. But have decided recently that I'm going to sit down and little by little work towards learning it. It just seems like a great complement on the back end with Ruby, especially with items like CouchDB bubbling up. It's also fun and mind bending exercise to learn new syntax, along with a different language. Erlang is very different than imperative languages. Looking forward to the journey, while continuing to progress deeper into Ruby, JavaScript, REST, TDD, Rails...

So I'm working my way through this book: Programming Erlang: Software for a Concurrent World http://pragprog.com/titles/jaerlang/programming-erlang

mark_holton ~$ sudo port install erlang
---> Fetching gawk
---> Attempting to fetch gawk-3.1.6.tar.bz2 from http://mirrors.kernel.org/gnu/gawk
---> Verifying checksum(s) for gawk
---> Extracting gawk
---> Configuring gawk
---> Building gawk
---> Staging gawk into destroot
---> Installing gawk @3.1.6_0
---> Activating gawk @3.1.6_0
---> Cleaning gawk
---> Fetching tcl
---> Attempting to fetch tcl8.5.6-src.tar.gz from http://superb-west.dl.sourceforge.net/tcl
---> Verifying checksum(s) for tcl
---> Extracting tcl
---> Configuring tcl
---> Building tcl
---> Staging tcl into destroot
---> Installing tcl @8.5.6_0
---> Activating tcl @8.5.6_0
---> Cleaning tcl
---> Fetching tk
---> Attempting to fetch tk8.5.6-src.tar.gz from http://superb-west.dl.sourceforge.net/tcl
---> Verifying checksum(s) for tk
---> Extracting tk
---> Configuring tk
---> Building tk
---> Staging tk into destroot
---> Installing tk @8.5.6_0
---> Activating tk @8.5.6_0
---> Cleaning tk
---> Fetching erlang
---> Attempting to fetch otp_src_R12B-5.tar.gz from http://distfiles.macports.org/erlang
---> Attempting to fetch otp_doc_man_R12B-5.tar.gz from http://distfiles.macports.org/erlang
---> Attempting to fetch otp_doc_html_R12B-5.tar.gz from http://distfiles.macports.org/erlang
---> Verifying checksum(s) for erlang
---> Extracting erlang
---> Applying patches to erlang
---> Configuring erlang
---> Building erlang

Friday, December 28, 2007

Erlyweb, Erlang, Comet

Been doing a cursory look at Erlang and Erlyweb for a few mos off and on, keeping track of it via a variety of RSS feeds, articles in the community, toying around with it, etc.

Have come to the interim conclusion at present that I don't think Erlang-based Erlyweb will ever be a replacement for Rails, or Django, etc. Building MVC web apps quickly and robustly for the large chunk of market share will be an area where Java, Rails, PHP, ASP, Django et al dominate. Then most will take the steps to scale up from there if need be.

But it will definitely fill the gap for creating highly available web sites or services. Especially in the realm of Comet (or server side 'push' instead of polling) apps, where data gets instantly pushed to clients when the data is available on the server. Reason being is that Comet requires long lasting connections between the client and server to lazily push out data as that data becomes available… so having 80,000 connections with Erlang is not a big deal. It would be a very big deal with Apache. The other is database connection pooling and fast access to db's

...the Erlyweb/ Erlang sweet spot seems to me to be where multiple connections demonstrate a big performance boost, or boost in ease of implementation. So Comet is a good example b/c you benefit from all those connections. Same with Twitter, or Amazon’s SimpleDB. Also the database pooling examples given in Yariv's presentation is very intriguing. All of those make sense, or where background concurrency gives you a needed architectural boost. But many classes of less complex apps, a large percentage of web applications in fact, you can write those in a shorter time, for E.g., with Rails TDD, and it has no need for the concurrency on the backend that Erlyweb provides via Erlang...

Erlyweb and Erlang seems to be possibly an up and coming 'right tool for the job' when it comes to high availability real time data pushing. Something to keep an eye on.

Here are some links to whet the Erlang appetite of anyone interested... also a couple Comet links:

http://www.bayfp.org/blog/2007/12/25/yariv-sadan-on-erlyweb-video-and-slides/
http://en.wikipedia.org/wiki/Erlang_(programming_language)
http://erlyweb.org/
http://en.wikipedia.org/wiki/Comet_(programming)
http://www.irishdev.com/NewsArticle.aspx?id=2166
http://alex.dojotoolkit.org/?p=545