Overview of Erlang Web Servers and Frameworks
This article reviews several Erlang-based web servers and frameworks—including Yaws, Mochiweb, Misultin, Cowboy, httpd, SimpleBridge, webmachine, Nitrogen, Zotonic, and Chicago Boss—highlighting their features, documentation quality, integration with supervision trees, and suitability for building high‑performance HTTP services.
Yaws is an efficient Erlang web server for dynamic pages; it is built from application modules (appmods) that can be replaced by custom APIs. Its documentation is solid and it can be embedded in the supervision‑tree hierarchy, a core Erlang/OTP design principle for reliable systems.
Mochiweb is one of the most widely used Erlang web servers. Its documentation is average, and many of its modules use parameterized modules (abstract modules), a syntax feature that Erlang no longer recommends but that makes Mochiweb easy to embed in other applications.
Misultin supports WebSockets and has a structure similar to Mochiweb. Its wiki provides extensive documentation and excellent examples.
Cowboy resembles Mochiweb but avoids parameterized modules, handling all requests with a single dedicated module. It is considered a complete binary HTTP server designed for high performance and low memory usage, with many examples available on its GitHub repository.
httpd is Erlang’s built‑in web server, part of the inets application. It satisfies most basic needs and uniquely supports WSGI‑ and Rack‑like middleware. However, it uses a fixed callback function and its documentation is sparse; developers often turn to Garrett Smith’s modlib library, which wraps httpd and clarifies its API.
SimpleBridge is an HTTP library adapter that aims to provide a simple, standard interface for Erlang HTTP services. It can wrap various web frameworks, making adjustments easier, but currently it is not considered a fully mature adapter. It supports pipelines for Mochiweb, Inets httpd, Yaws, and Misultin.
webmachine is built on Mochiweb, offering a higher‑level toolbox that abstracts away low‑level syntax details.
Nitrogen provides a functional user‑interface framework. Its documentation (e.g., “Introduction to Nitrogen”) is strong, and each page can introduce a module with optional templates, making API construction straightforward.
Zotonic is a mature CMS that supports WebSockets and Comet, is highly extensible, and includes extensive documentation. Although it is built on webmachine and Nitrogen, developers can define custom internal APIs and it fully supports OAuth.
Chicago Boss is a framework reminiscent of Ruby on Rails, offering many built‑in behaviours that accelerate service development. Writing custom APIs may be more challenging, depending on the task.
Art of Distributed System Architecture Design
Introductions to large-scale distributed system architectures; insights and knowledge sharing on large-scale internet system architecture; front-end web architecture overviews; practical tips and experiences with PHP, JavaScript, Erlang, C/C++ and other languages in large-scale internet system development.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.