• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

General Erlang questions to book authors

 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, I have never used Erlang , but I once heard that erlang was used to write facebook's chat system.

So it got me curious enough to come over here to ask some questions in general.

my functional programming experience is limited only upto Haskell and scala currently.

So I would like to ask a few noobie questions

Since Erlang was intended for telecom operations software , why is there a push currently to use as a web backend development tool?
How does Erlang's performance compares to Current tools/languages used for web backend development ?
How can Erlang be source interpreted and also compile to bytecode for a VM and also compile to native assembly? Which one is better for what purpose?
Please briefly talk about hotswapping of code in the above context. how is done for say a natively compiled binary of Erlang code?

Lastly , any examples of open source production usage for Erlang other than the telecom domain?

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Erlang has demonstrated leadership
positions with several Open Source middleware products. This seems to be its strength.

Zotonic, the Erlang CMS (a truly superior CMS, I have personal experience with this):
http://zotonic.com/

ejabberd (the leading Jabber server):
http://www.ejabberd.im/

RabbitMQ (the leading AMQP solution):
http://www.rabbitmq.com/

Basho Riak (the leading eventually consistent Key-Value store):
https://wiki.basho.com/display/RIAK/Who+is+Using+Riak

Apache CouchDB (the leading document database):
http://couchdb.apache.org/

Gemini Mobile's Hibari (transactional Key-Value store):
http://www.geminimobile.com/technologies/technologiesDB.html

YAWS (out scales Apache):
http://yaws.hyber.org/

There are many other excellent Open Source players in the Erlang community that have driven commercial success for companies. It has a very solid track record for delivering both in closed and open source deployments.
 
Rohan kanade
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rohan kanade wrote:
Since Erlang was intended for telecom operations software , why is there a push currently to use as a web backend development tool?

How does Erlang's performance compares to Current tools/languages used for web backend development ?

How can Erlang be source interpreted and also compile to bytecode for a VM and also compile to native assembly? Which one is better for what purpose?

Please briefly talk about hotswapping of code in the above context. how is done for say a natively compiled binary of Erlang code?




thanks for the answer about production usage. but,
Can you shed light on some the above questions too ? especially about the hotswapping question.
 
Alain O'Dea
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Since Erlang was intended for telecom operations software , why is there a push currently to use as a web backend development tool?


This is directly related to Erlang's concurrent I/O handling. It handles very high connection loads more efficiently with respect to memory and CPU usage than typical server systems like Servlets and Apache.

How does Erlang's performance compares to Current tools/languages used for web backend development ?


Erlang's is not competitive on computational performance, but a web back-end typically depends more on I/O than computation.

How can Erlang be source interpreted and also compile to bytecode for a VM and also compile to native assembly? Which one is better for what purpose?


I have only ever used the bytecode mode of compilation for production use. It performs well beyond my expectations. I don't think native compilation makes a compelling difference for web back-end usage.

Please briefly talk about hotswapping of code in the above context. how is done for say a natively compiled binary of Erlang code?


I do not know how natively compiled Erlang modules get hotswapped. In bytecode hotswapping new module code can be run by calling the function through the module rather than making a local function call. The difference is hot_module:function() instead of function(). If new code for the module hot_module is available it simply runs. The new code needs to be loaded into BEAM, but many servers (like Zotonic) do this automatically when they see new versions of the bytecode in the code path.
 
author
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rohan kanade wrote:Since Erlang was intended for telecom operations software , why is there a push currently to use as a web backend development tool?
How does Erlang's performance compares to Current tools/languages used for web backend development ?
How can Erlang be source interpreted and also compile to bytecode for a VM and also compile to native assembly? Which one is better for what purpose?
Please briefly talk about hotswapping of code in the above context. how is done for say a natively compiled binary of Erlang code?

Lastly , any examples of open source production usage for Erlang other than the telecom domain?



Alain has already helped answer some of these questions quite well. For the question about Erlang as a telecom systems language, first read my answer at https://coderanch.com/t/517451/threads/java/Erlang-OTP. These language properties simply make Erlang a good choice as a backend for most kinds of network servers, including web servers.

About performance: Erlang was never designed mainly for computational speed, but the BEAM emulator is surprisingly fast, and native code is even faster. See the [email protected] mailing list archive for many interesting discussions about optimizing Erlang programs.

Regarding bytecode compilation (the default), interpretation (done in the interactive shell), and native-compilation (optional), this is no different from what any other modern language does, including Java. Erlang currently doesn't do just-in-time native compilation, but there is nothing that prevents this either. For the time being, the user has to decide if it's worth it to compile to native code: it can make debugging harder, and many typical Erlang applications are more I/O intensive than CPU intensive, so they would gain nothing in any case. However, native compilation of certain CPU-heavy modules might speed up that part of the code enough so that you don't need to write a separate C driver, and that would make it worthwhile.

The details of hot swapping code, native or bytecode interpreted, are too complicated to discuss here. You might like to look at some papers from the High-Performance Erlang research group: http://www.it.uu.se/research/group/hipe/publications.shtml
 
Rohan kanade
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot for the detailed answers , I will definitely be using Erlang for some of my hobby projects to get a feel of it.
 
Alain O'Dea
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't hesitate to ask questions on erlang-questions. To join the list visit the Erlang FAQ for instructions:
http://erlang.org/faq.html
 
If you settle for what they are giving you, you deserve what you get. Fight for this tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic