Posterous
Chris is using Posterous to post everything online. Shouldn't you?
Proicon_thumb
 

Voodoo Tiki God

I am Zero Cool

« Back to blog

Building An Erlang Application

Yesterday, September 27th, 2008, the Northern Virginia Languages (NoVALang) Group held our big erlang:out event in which we spent a standard work day (9:00am - 5:30pm) working in small groups on Erlang projects. We learned an awful lot about working with Erlang including some of the pitfalls and problems that will infest your first couple projects. I wanted to write them down since Erlang seems to have a news article on hacker news every day. When you think about starting down the path of developing an Erlang project, it can admittedly be a bit daunting. Even if you have read cover to cover the entire Pragmatic Programmers book, you are left thinking how do I start more than how to push forward. There is a lot of room in the Erlang world for utilities and tools that can help on this step, here are a couple ideas that we ran into as possible projects that would help out tremendously:

  • A project structure generator that would create the appropriate and necessary OTP application directory structure and a standard makefile/emakefile/rakefile for the developer. 
  • A lot of tutorials for what seem to be great projects of Faxien, the RubyGems of Erlang, and Sinan, and better (but complex and convoluted) build system for OTP. I personally spent a lot of time trying to unravel the value versus process of the systems, which should have been used to build my app. Oh look a shiny object!
  • A better project/concept modeling method for Erlang, the box and stick format does not work well with concurrent, message based process. I spent a lot of time trying to remember the process and not the components. I do love the marker on paper modeling that many existing Erlang projects use, but aside for being "cute" they do not convey enough information to be meaningful. 
We actually worked on two different projects during our erlang:out event, one was Dissident, a revolutionary web application system that marries the concurrency of Erlang with the asynchronous callbacks of Javascript, and an IRC system which was practically saying "write me! erlang was made for stuff like me!". We took two completely different approaches, with Dissident I and Dave wanted to package up and make ready for wide distribution so we started with Sinan and the IRC team of Sean and Chris started by reviewing and extending existing code.  I gave up on Sinan by Noon and decided to scrape the entire thing due to lack of tutorials and good documentation. I spent the next couple minutes revising the structure to be something I was more familiar with from the telchat application I built before. Once on that footing, I fought with various cross binding issues with Faxien trying to "help me" but being more of a hinderance in the process. Eventually I got to a point where Dissident was binding on a configured network port and handling requests, but I had yet to build the router. I wasted a lot of time on things that didn't work and want to recommend not using anything extra or new despite how "awesome" it may seem - it will just get in your way. I spent a bit of time last night hacking more on dissident and its now moving smoothly. The IRC team tried to extend several versions of existing code bases, but none seemed to actually get to the point and spent a lot of code to extend behaviors and create new behaviors and so forth. They actually ended up using the aforementioned telchat as a base to extend and grow into a full IRC server.  All in all, the pure Erlang knowledge we had was enough to build an application, but there seems to be a plateau that we haven't overcome after reading the book and watching the screencasts. There are many articles that make it seem easy to create awesome applications, but there is equally a dearth of articles on how to go from idea to app. Some of the aforementioned ideas, either better documents, more automation, or just more articles, will greatly help developers move from introductory level interactions with the system through the erl shell to actually building full applications. I am going to press forward with Erlang because I truly believe in the potential it has, but I am still going to move forward with NoVALang on to the next language. I plan on investigating more of Faxien and Sinan because they will be critical to the Erlang community's growth and adoption. Also check my next post for follow up on getting on hacker news and being a blog troll!

Loading mentions Retweet
 
To leave a comment on this posterous, please login by clicking one of the following.
Posterous-login     twitter