[erlang-questions] Misultin EOL

Garrett Smith g@REDACTED
Sat Feb 18 21:14:55 CET 2012

On Sat, Feb 18, 2012 at 5:18 AM, Benoit Chesneau <bchesneau@REDACTED> wrote:
> On Sat, Feb 18, 2012 at 12:05 AM, Andrew Berman <rexxe98@REDACTED> wrote:
>> I think a lot of issues with APIs would be solved if we had something
>> analogous to Java interfaces in Erlang.  Behaviors just don't cut it.  I
>> want something that is a replica of interfaces.  Then all the Erlang guys
>> have to do is create the interface and then people can create whatever
>> implementations they want and I never have to worry about changing my code!
> In python world we have WSGI that define a common spec to interface
> Python application with the web. Defining how server should handle
> requests to and return response from applications. Also defining how
> the requests/responses should be formatted for the apps.
> There are many servers and many libs/frameworks handling the spec.
> Only the code quality, the technical differences and features distinct
> them.  I guess somethng like that could be defined in Erlang with a
> lib reference to test the validaty and validate servers and libs
> behaviour (just like wsgiref in Python). Same exist with Rack in ruby
> world and probably in other language.
> Maybe that something that could be done. It would at least simplify a
> lot the work of apps developers.

WSGI is one of most successful middle layer implementation I've seen for HTTP.

By success, I mean the amount of code written around the spec. For the
most part, the entire Python web ecosystem, which is very rich, was
spawned by this spec.


Some of what's been discussed in this thread (cookies, sessions, etc),
IMO, belongs at a higher level -- which is easily supported with a
good HTTP middleware layer.

FWIW, this exists today in the "mod" API for Erlang's own httpd
server. It's not a standard -- it's horrifyingly complicated -- but it
is representative of a WSGI style middle ware layer.


More information about the erlang-questions mailing list