[Haskell-cafe] Web application interface

Michael Snoyman michael at snoyman.com
Thu Jan 14 05:58:27 EST 2010


On Thu, Jan 14, 2010 at 12:50 PM, Alberto G. Corona <agocorona at gmail.com>wrote:

>
>
> 2010/1/14 Jinjing Wang <nfjinjing at gmail.com>
>
>
>>
>> Hyena is especially tuned for streaming and that's exactly what hack
>> can't do (in practice).
>>
>
> Isn't possible to stream an (almost) infinite bytestring trough hack?. I
> ever trough that the laziness of haskell is a great advantage in Web
> applications. This is very important because the size of the block
> transferred vary widely. In my applications I don´t care whether I have to
> stream a hello world page or a video.  The first block of my application
> goes trough the internet as soon as my  procedure start without concern
> about if the processing is composed of a complicated chain of steps or not.
> And with no especial coding; Neither my web server interface nor my user
> responsiveness requirements force me to code iterations everywhere in my
> code.  I know the chuncked mode in web server but I think that just this
> mode of web streaming is the right mode for serving lazy haskell
> applications.
>
>  My question is why whatever performance advantage the iteratee may have,
> can not be coded under the clean interface of a lazy bytestring or whatever
> lazy stream.
>

Well, for one thing, you'd need to use lazy IO to achieve your goal, which
has some safety issues. As things get more and more complex, the
requirements of lazy IO will continue to grow. This also has implications
for number of open file handles and deterministic space usage. Given the
fact that a lazy bytestring and easily be converted to an enumerator, I
think it makes sense to start a new package using this approach.

As a side point, would anyone be interested in having a central location for
web-specific Haskell development discussions? I know we have the mailing
list, but it's never used. I'm thinking more of a place to post articles and
links to packages. In particular, I think it would be great to have a site
with multiple sections (model, view, controller, authentication,
authorization, etc) and articles, forums and packages specific for each.
Also a great place to post what the community is missing.

Michael


>> http://github.com/nfjinjing/hack-handler-hyena
>>
>>
>> --
>> jinjing
>>
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100114/c4eeda1b/attachment.html


More information about the Haskell-Cafe mailing list