Sphere Partners

Quick Analysis of Erlang web frameworks in Modern Era

Date Published

Reading time

2 min
Quick Analysis of Erlang web frameworks in Modern Era
In this article

Erlang is a programming language that appeared in 1986. Originally it was designed to be used in telecom applications development but nowadays it is used in different spheres like instant messaging, ecommerce, computer telephony, banking. Erlang is effective when the system has to be soft, real-time, scalable with high availability. Concurrency, distribution and fault tolerance is supported by Erlang's runtime system. There is a set of Erlang libraries called OTP. OTP includes a distributed database, tools for debugging and release handling.

Erlang can be used to build web applications with the help of frameworks. There are four actively maintained frameworks: ChicagoBoss, N2O, Nitrogen, Zotonic and Erlang Web which is no longer maintained.

ChicagoBoss

ChicagoBoss was expired by Rails and designed to handle big traffic amounts without performance issues. It is event-driven, has a data model and provides a view/controller model for both web and emails. It has a framework for adding functional tests. I/O is fully asynchronous and it prevents the application of being slow because of unrelated requests that can take a lot of time to process. ChicagoBoss supports all main databases like MySql, PostgreSQL, MongoDb, and Riak. ChicagoBoss server after start provides a lot of useful services like URL router, session storage, message queue, email server.

N2O

N2O is an Erlang framework that uses WebSocket protocol. Its main features are binary page construction, binary data transfer, transmission of events using WebSocket and work within Cowboy processes. N2O has built-in support of DSL and HTML templates. JavaScript control elements can be added and rendered inline with DSL. Benchmark of existing web frameworks that were built using functional languages shows that Cowboy is the winner. The chart shows the performance of raw HTTP for functional and C-based languages with concurrent primitives.

Nitrogen

Nitrogen has an event-driven model. This model is built on Erlang pattern matching. This framework gives a possibility to tag elements with Erlang terms, and then use Erlang functions as event handlers. Nitrogen has one-way data binding. Web page sections are built asynchronously using WebSockets. Custom elements and actions can be packed and re-used in different projects as Nitrogen Plugins. It is important to note that it has a testing framework.

Zotonic

Zotonic is a Content Management System. It is event-driven and supports MVC model. It has Comet and WebSockets support and a templating system similar to Django. The database to work with is PostgreSQL. The system can be easily extended with user models.

Erlang with its web frameworks can be used for web applications that have to be scaled, event-driven, asynchronous, non-blocking, reliable, real-time, distributed applications. It shows great performance results for message passing systems and is highly secure.

More to read

How to Choose an AI Software Development Company (And What to Watch Out For) — hero image
Consulting & Advisory,  Tech Executive Advisory,  Data & AI,  IT Strategy Consulting,  Software Development,  ChatGPT,  Trends

Not all AI software development companies are equal. Learn what separates firms that truly build with AI from those that just use the word. Includes real questions to ask and red flags to avoid.

Exploring the Integration of AI in Software Development: A Full-Stack Developer's Perspective
Software Development,  Data & AI,  ChatGPT

Dive into Sphere's full-stack developer journey with AI – from tackling code with GitHub Copilot to unleashing problem-solving insights with ChatGPT. Explore the potential of AI in software development projects: which tools are truly handy, how many hours can you save, and what's the next big thing? Pavel Korchak shares his insights.

We'd love to hear from you!

Please provide your contact details, and our team will get back to you promptly.