[Haskell-cafe] Re: Haskell not ready for Foo [was: Re: Hypothetical
Haskell job in New York]
spam at scientician.net
Thu Jan 8 16:37:55 EST 2009
Manlio Perillo wrote:
> John Goerzen ha scritto:
>> On Thu, Jan 08, 2009 at 10:36:32AM -0700, John A. De Goes wrote:
>> On the other hand, I see nothing in Haskell that would prevent its use
>> for any of your purposes. There are numerous high-level web
>> infrastructures already. Perhaps they are more or less suited to your
>> needs, but that's a library issue, not a language issue.
> The question is not about Haskell language.
> I think that Haskell is far better than Erlang, and in fact I'm studying
> Haskell and not Erlang; and one of the reason I choosed Haskell is for
> its support to concurrency.
> The problem, IMHO, is with the availability of solid, production ready
> servers implemented in Haskell, that can be used as case study.
> The major web framework in Haskell is HAppS, if I'm correct, and yet in
> the HAppS code I see some things that make me worry about the robustess
> of the code.
Indeed. I've been looking for a Haskell HTTP server implementation that
can actually handle file serving using strictly limited memory (for a
simple UPnP server, as of yet unreleased) and that also doesn't leak
handles like a sieve, but I haven't found anything yet. I don't know,
maybe my hackage-foo is lacking. In the end I just rolled my own
implementation using the HTTP package for parsing requests and doing all
the socket I/O myself using low-level primitives. It seemed to be the
only way to guarantee reasonable resource usage while serving
multi-gigabyte files to fickle HTTP clients that like to drop
Don't get me wrong -- the socket support is pretty decent, but there are
also some weird idiosyncrasies, for example requiring that the PortNum
is specified in network byte order and lacking a function to convert
host->network byte order (hton).
Oleg's Iteratee does look very interesting though. Maybe I'll have a go
at trying to use his ideas in my UPnP server.
More information about the Haskell-Cafe