Erlang web-frameworks

It is always difficult to find out what web framework will suite your needs in a project. As for the Erlang, there is several rapid-deveoping frameworks at the moment:

  • Erlangweb – the one we really liked, as it beign developed by very professioinal team of Erlang consulting. You can learn a lot of things supported by erlang from their sources.
  • ErlyWeb
  • Nitrogen
  • BeepBeep
  • Some others that were out of my attention

Today I’ll start with features of ErlangWeb
This Framework is in constant development, current version is 1.4. It contains several interesting features:

  • Really easy to install (contain precompiled Yaws server and other necessary libraries)
  • Easy to create release of your application, including necessary erlang libraries in a rel file, so it helps you to make updates of your system in accordance with OTP principles, and thus it helps to non-experienced programmers to understand how to build platform that will be able to be updatable on the fly
  • Support of several web-servers. At the moment support Inets and Yaws web server. It is support MochiWeb as well through the EWGI mechanism. Easy to switch to another web-server in configuration.
  • MVC support. Model could be created from the .hrl files, in semi-automated mode it will create a structure in Mnesia distributed database.
  • Controllers are erlang modules, easy to maintain.
  • Impressive scalability! Frontend and backend are separated. Frontend supposed to be stateless, and thus support horizontal scalability.Frontend provides cache storage and renders HTML templates.
  • The backend server keeps track of the frontend servers health – it monitors the other nodes and when something goes wrong (a node is down/connection is lost) it starts pinging the given frontend. When the situation is recovered, it registers to that node once again.
  • Support of mnesia, or CouchDB. Easy switch in configuration between these two databases.
  • Choice of WPart or ErlyDTL (Erlang implementation of Django Template Library) templates for front-end.
  • Provides Meta-programming by using annotations.
  • Cross-framework logger. Meaning you can maintain your logs in one place. Very helpfull for the clustered application.
  • Framework contains helpful scripts that allow you to easily connect to necessary part of the clustered system

All the above features helps to build fast, robust, hot-code replacable system.
I’ll continue to overview Erlang web frameworks and their advantages and disadvantages.
Links: – documentation of erlangweb