Re: [Haskell-cafe] Web application interface

2010-01-23 Thread Jeremy Shaw
On Jan 23, 2010, at 10:52 AM, Michael Snoyman wrote: Jeremy, What I meant is, if you use a sendfile system call to send raw files from the disk, how does this interact with gzip compression, which clearly cannot be used when using a sendfile call? I ask because you implied there were sign

Re: [Haskell-cafe] Web application interface

2010-01-23 Thread Nicolas Pouillard
On Sat, 23 Jan 2010 18:52:01 +0200, Michael Snoyman wrote: > Jeremy, > > What I meant is, if you use a sendfile system call to send raw files from > the disk, how does this interact with gzip compression, which clearly cannot > be used when using a sendfile call? I ask because you implied there w

Re: [Haskell-cafe] Web application interface

2010-01-23 Thread Michael Snoyman
Jeremy, What I meant is, if you use a sendfile system call to send raw files from the disk, how does this interact with gzip compression, which clearly cannot be used when using a sendfile call? I ask because you implied there were significant performance gains from using sendfile. Michael On Fr

Re: [Haskell-cafe] Web application interface

2010-01-22 Thread Jeremy Shaw
Hello, In happstack, there is a Writer monad which holds a list of filters which will be applied to the Response before sending it out. One of these filters is the gzip filter. The compression filters are defined here: http://patch-tag.com/r/mae/happstack/snapshot/current/content/pretty/ha

Re: [Haskell-cafe] Web application interface

2010-01-21 Thread Michael Snoyman
Hey Jeremy, I was just wondering: how does Happstack deal with gzip encoding when it uses sendfile? I can think of a few ways (cache gziped versions to the disk), but was wondering if you'd already come up with a good solution. I'm trying to keep all these things in mind when designing WAI. Thank

Re: [Haskell-cafe] Web application interface

2010-01-16 Thread Michael Snoyman
Absolutely; the goals I have are minimal dependencies and no warnings for compilation ;). On Sat, Jan 16, 2010 at 9:35 PM, Nicolas Pouillard < nicolas.pouill...@gmail.com> wrote: > Excerpts from Michael Snoyman's message of Wed Jan 13 15:46:12 +0100 2010: > > Hi, > > > > I recently read (again) t

Re: [Haskell-cafe] Web application interface

2010-01-16 Thread Nicolas Pouillard
Excerpts from Michael Snoyman's message of Wed Jan 13 15:46:12 +0100 2010: > Hi, > > I recently read (again) the wiki page on a web application interface[1] for > Haskell. It seems like this basically works out to Hack[2], but using an > enumerator instead of lazy bytestring in the response type.

Re: [Haskell-cafe] Web application interface

2010-01-15 Thread Nicolas Pouillard
Excerpts from Michael Snoyman's message of Thu Jan 14 17:32:26 +0100 2010: > On Thu, Jan 14, 2010 at 5:42 PM, Jeremy Shaw wrote: > [...] > > I wonder if the 'Response' portion of WAI should support all three > > currently used methods: > > - lazy I/O > > - Enumerator > > - sendFile > > [...] >

Re: [Haskell-cafe] Web application interface

2010-01-14 Thread Michael Snoyman
On Thu, Jan 14, 2010 at 5:42 PM, Jeremy Shaw wrote: > Hello, > > Happstack is currently bundled with it's own lazy I/O based HTTP backend. > Ideally, we would like to split that out, and allow happstack to be used > with that backend, hyena, or other options. > > A primary using for using hyena w

Re: [Haskell-cafe] Web application interface

2010-01-14 Thread Jeremy Shaw
Hello, Happstack is currently bundled with it's own lazy I/O based HTTP backend. Ideally, we would like to split that out, and allow happstack to be used with that backend, hyena, or other options. A primary using for using hyena would be for the benefits of predictability and constant sp

Re: [Haskell-cafe] Web application interface

2010-01-14 Thread Michael Snoyman
On Thu, Jan 14, 2010 at 1:58 PM, Alberto G. Corona wrote: > > > 2010/1/14 Michael Snoyman > >> >> >> On Thu, Jan 14, 2010 at 1:20 PM, Alberto G. Corona >> wrote: >> >>> >>> >>> 2010/1/14 Michael Snoyman >>> >>> Well, for one thing, you'd need to use lazy IO to achieve your goal,

Re: [Haskell-cafe] Web application interface

2010-01-14 Thread Michael Snoyman
On Thu, Jan 14, 2010 at 1:20 PM, Alberto G. Corona wrote: > > > 2010/1/14 Michael Snoyman > > >> >> 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

Re: [Haskell-cafe] Web application interface

2010-01-14 Thread Alberto G. Corona
2010/1/14 Michael Snoyman > > > 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 determini

Re: [Haskell-cafe] Web application interface

2010-01-14 Thread Michael Snoyman
On Thu, Jan 14, 2010 at 12:50 PM, Alberto G. Corona wrote: > > > 2010/1/14 Jinjing Wang > > >> >> 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

Re: [Haskell-cafe] Web application interface

2010-01-14 Thread Alberto G. Corona
2010/1/14 Jinjing Wang > > > 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 i

Re: [Haskell-cafe] Web application interface

2010-01-14 Thread Pasqualino "Titto" Assini
Hi Michael, no, the message was not meant to be off-list, that was just me pressing the wrong button :-) Regarding happstack, I do not believe that there is a contrast with your effort, the core of happstack is in its persistency mechanism not in its http interface so I think it would be great to

Re: [Haskell-cafe] Web application interface

2010-01-14 Thread Nicolas Pouillard
Excerpts from Jinjing Wang's message of Thu Jan 14 01:28:31 +0100 2010: | The hyena backend is essentially just a translator between hack and | wai, i failed to finished it since I can't understand iteratee | (seriously) and eventually got distracted ... If I have well understood you miss a funct

Re: [Haskell-cafe] Web application interface

2010-01-13 Thread Jinjing Wang
The hyena backend is essentially just a translator between hack and wai, i failed to finished it since I can't understand iteratee (seriously) and eventually got distracted ... What hyena tries to solve can't be realized in hack, so there's not too much reason for a backend anyway. Hyena is espe