Most Read Latest News Blog Resources

Developers moving to Erlang for code scaling




December 26, 2008 — 
There's no denying that writing scalable code is difficult. When the processors involved are multiplying by the day, some tactics become inevitable, such as using locks and setting up message queues between systems.

At the fringes of the scalability world, Erlang is being lauded as a programming-level solution to the problem. But even for its proponents, there's no denying the language's lack of penetration.

Originally created in 1987 by Ericsson, a Swedish telecommunications company, Erlang was designed to build fault-tolerant, concurrent applications. In some ways it is similar to Smalltalk in that everything is a message.

Damien Katz won the Erlanger of the Year award for 2008. He's the creator of CouchDB, a Lotus Notes-style document database written in Erlang. He said that he rewrote six months' worth of C++ into Erlang over a month and a half. “It is actually very close to Smalltalk, I think, in terms of the original goals of Smalltalk. But Erlang hides its state within a process, and Smalltalk hides it in an object,” said Katz.

Katz came to the language for its concurrency, which allows for cheaper scalability, he said. He had worked with threads and locks in C++ for many years prior to learning Erlang in 2007.

“Instead of having these threads which live in the same process and can see the same global data, Erlang has what're called processes. There are little virtual processes, and they all live inside the Erlang virtual machine,” said Katz.

“They can't see each other. All they can do is send messages. They can send asynchronous messages, and that's how you do all of your concurrency. Instead of global data, where you modify it and read it and set a global lock, you send it a message and say, 'Give me a value for foo,' or you might send a message like, 'Increment the bar value.' You have these processes, and they are self-contained, they have their own memory, and they can die. It's a very different programming model than the traditional threads model.”

Looking for popularity
Mickaël Rémond, CEO of ProcessOne, said that Erlang's place is on the server. His company, based in Paris, builds scalable instant messaging systems for enterprises using Erlang.

“Erlang is generally used for all types of server applications. This is the domain where it shines,” said Rémond. “The more complex the server application, the better.”

Rémond said that he sees the language rising in use around the world, not just in Europe. “Hosted services is an area where the language you use does not matter, because no one knows about it. Lots of big names in the Internet industry like Amazon and Yahoo are now using Erlang. We are only at the beginning of the trend,” said Rémond.

Jeffery Hammond, research analyst at Forrester Research, isn't so sure. Hammond said Erlang is “still niche, but I'm seeing it pop up more in the cloud world than anywhere else. For now I'd call it an interesting dynamic language that bears watching. The concurrency features are reputed to be useful when programming in a 'scale-out' model.”

Hammond also pointed out that in TIOBE Software index of programming language popularity, Erlang sits in 29th place, behind Ada, COBOL and Fortran.

In practice, Katz said Erlang actually feels like Lisp. “It doesn't have all the power of Lisp. It's similar in that it's all very list-based types of stuff, and you're constantly enumerating over lists,” said Katz.

Katz said that the biggest reason for Erlang's lack of popularity is its syntax. “The syntax is very frustrating. That's one of the things that's going to hamper Erlang's popularity. The syntax is just very different from C-type languages,” said Katz.

“It's its own unique syntax, and it's not a very good one. I really think the syntax could be a lot better. It fundamentally needs reworking before it can become popular. It's not a critical flaw in Erlang. If you're a good coder, you'll adapt to it quickly. But it is a flaw in terms of its popularity."


Related Search Term(s): databasesErlangserversProcessOne


Share this link: http://www.sdtimes.com/link/33136
 

Add comment


Name*
Email*  
Country     


  • Comment
  • Preview
Loading



 
 
 
 
News on Monday
more>>
SharePoint Tech Report
more>>


   

 
 
Download Current Issue
ISSUE 3/15/2010 PDF

Need Back Issues?
DOWNLOAD HERE

Receive the print Edition?


 
blogs tab
Google Code turns 5
Google Code Turns 5, and adds a Paxos Algorithm to make the system more stable and reliable.
03/17/2010 11:16 AM EST

Test your Visual Studio 2010 know-how
Microsoft is offering free beta certification exams for Visual Studio 2010.
03/17/2010 11:08 AM EST

Microsoft lifts the hood on IE9
Microsoft is previewing IE9.
03/16/2010 01:10 PM EST

 

Events calendar tab
3/22/2010 to 3/25/2010
Santa Clara, Calif.
The Eclipse Foundation

4/12/2010 to 4/14/2010
Las Vegas
Penton Media

4/12/2010 to 4/15/2010
Santa Clara, Calif.
O'Reilly Media

4/19/2010
New York City
Flagg Management

4/25/2010 to 4/28/2010
Overland Park, Kans.
IIUG