[erlang-questions] Misultin EOL

Tim Watson watson.timothy@REDACTED
Sat Feb 18 14:03:25 CET 2012


On 18 February 2012 11:30, José Valim <jose.valim@REDACTED> wrote:
>
> Something that gets this right though is servlet API from Java with the
> concept of generators, filters and etc. Streaming works fine as you can, at
> any point, push data into the socket and filters/generators are wrapped by
> this API.
>

+1. The Java Servlet API is excellent. Filter chains provide a simple
and consistent approach to request wrapping, and Servlets provide just
the right low level API for interacting with the request and/or
response, allowing you to get to the socket API underneath if you need
to. Good frameworks can be built on top of this easily.

I also like that you configure filters/servlets using exactly the same
XML configuration regardless of the web server you're running in.
Obviously I'd prefer it if it wasn't XML, but the consistency is the
thing. YAWS uses config files in this way (e.g., for setting up
appmods) and I wish all the web server frameworks did the same, or at
least the whatever common API was available would support the notion.

> Every time I see a Erlang or a Node.js framework based on top of Rack/WSGI a
> part of me dies because the ability of streaming and asynchronously pushing
> stuff down the socket is one of the best features you would have in such
> frameworks.
>
> PS: I am one of the core members of Rails by far the biggest framework that
> relies on Rack. We tried to add streaming on Rails 3.1 which made very clear
> all the shortcomings of the Rack API. We will eventually work on a Rack 2.0
> that is more inspired by the Servlet API.
>

JDBC and the Servlet API are both exemplary parts of the Java world.
In fairness to the .NET crowd, the ADO.NET and IIS centric web APIs
(HttpHandler and HttpModule) do it almost exactly the same way.



More information about the erlang-questions mailing list