Print

Developers moving to Erlang for code scaling



Alex Handy
Email
December 26, 2008 —  (Page 1 of 2)
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.”



Related Search Term(s): databases, Erlang, servers, ProcessOne

Pages 1 2 


Share this link: http://sdt.bz/33136
 
Most Read  Latest News  Resources

close
NEXT ARTICLE
Zeichick’s Take: In-memory databases poised for takeoff
The secret of this less costly, more efficient (under certain circumstances) database type is out Read More...
 
 
 




News on Monday  more>>
Android Developer News  more>>
SharePoint Tech Report  more>>
Big Data TechReport  more>>

   
 
 

 


Download Current Issue
MAY 2013 PDF ISSUE

Need Back Issues?
DOWNLOAD HERE

Want to subscribe?