[erlang-questions] Erlang Web Libraries & Frameworks

Garrett Smith g@REDACTED
Wed Aug 10 17:10:00 CEST 2011


On Tue, Aug 9, 2011 at 6:04 PM, Sam Elliott <sam@REDACTED> wrote:
> Hi erlang-questions,
>
> Recently I needed to compare a few Erlang web libraries and frameworks
> for a friend who was writing a simple internal API endpoint. He
> suggested I should publish the rundown for others, and I thought I'd
> also circulate it here. I'm relatively new to Erlang, so I have
> probably missed a few libraries.
>
> I'll try to keep it updated as people send me information, so don't
> hesitate to contact me if i've got something wrong.
>
> The article: http://lenary.co.uk/erlang/2011/08/erlang-web-libraries/

I'm glad to see you included httpd in the list! This is usually left
out of the "usual suspects" of Erlang web libraries/frameworks.

httpd is the only (feature complete) Erlang framework I'm aware of
that uses a traditional "middleware" pattern that lets you chain
arbitrary request handlers together. This lets you add in
functionality at configuration time like auth, aliases, static content
support, whatever-you-like, etc.

If you're familiar with Python's wsgi ecosystem, it's very similar.

The problem I have with it -- apart from the fact that few people use
it and it's a bit crufty -- is that the mod API is very arcane.

To simplify writing httpd mods, I wrote this library:

https://github.com/gar1t/modlib

The advantage of httpd+modlib is that it leverages what's already in
the standard Erlang distribution, which is outstanding, apart from the
minor criticisms above. Its API uses a straight forward functional
model for handling HTTP requests.

Garrett



More information about the erlang-questions mailing list