[Haskell-cafe] Long-running request/response protocol server using enumerator/iterator/iterIO/pipes/conduits/...

2012-06-26 Thread Nicolas Trangez
Hello Cafe, Some time ago I tried to implement a network service using iteratee (or enumerator, can't remember), but gave up in the end. More recently I wanted to create something similar (a similar protocol), but failed again. So I'm looking for some example code or something similar (Google onl

Re: [Haskell-cafe] Long-running request/response protocol server using enumerator/iterator/iterIO/pipes/conduits/...

2012-06-26 Thread Christopher Done
On 26 June 2012 21:22, Nicolas Trangez wrote: > Might sound easy (and actually it's pretty easy in most other languages > I know, including an OCaml implementation), yet I fail to figure out how > to get this done using some enumerator-style library. Well, it's easy in Haskell, too. Just use the

Re: [Haskell-cafe] Long-running request/response protocol server using enumerator/iterator/iterIO/pipes/conduits/...

2012-06-26 Thread Nicolas Trangez
On Tue, 2012-06-26 at 21:32 +0200, Christopher Done wrote: > On 26 June 2012 21:22, Nicolas Trangez wrote: > > Might sound easy (and actually it's pretty easy in most other languages > > I know, including an OCaml implementation), yet I fail to figure out how > > to get this done using some enumer

Re: [Haskell-cafe] Long-running request/response protocol server using enumerator/iterator/iterIO/pipes/conduits/...

2012-06-26 Thread Michael Snoyman
On Tue, Jun 26, 2012 at 10:22 PM, Nicolas Trangez wrote: > Hello Cafe, > > Some time ago I tried to implement a network service using iteratee (or > enumerator, can't remember), but gave up in the end. More recently I > wanted to create something similar (a similar protocol), but failed > again. >

Re: [Haskell-cafe] Long-running request/response protocol server using enumerator/iterator/iterIO/pipes/conduits/...

2012-06-26 Thread Paolo Capriotti
On Tue, Jun 26, 2012 at 8:22 PM, Nicolas Trangez wrote: > Hello Cafe, > > Some time ago I tried to implement a network service using iteratee (or > enumerator, can't remember), but gave up in the end. More recently I > wanted to create something similar (a similar protocol), but failed > again. >

Re: [Haskell-cafe] Long-running request/response protocol server using enumerator/iterator/iterIO/pipes/conduits/...

2012-06-26 Thread Nicolas Trangez
On Tue, 2012-06-26 at 22:39 +0300, Michael Snoyman wrote: > I've run into those kinds of problems in the past as well. In general, > interleaving of data streams can be difficult with enumerator. That's > the reason I added connect-and-resume to conduit. I use the technique > in warp[1], which in f

Re: [Haskell-cafe] Long-running request/response protocol server using enumerator/iterator/iterIO/pipes/conduits/...

2012-06-27 Thread Erik de Castro Lopo
Michael Snoyman wrote: > That's > the reason I added connect-and-resume to conduit. I use the technique > in warp[1], which in fact *does* support multiple request/response > pairs due to connection keep-alive. But the code base isn't the > easiest introduction to the technique. If there's interes

Re: [Haskell-cafe] Long-running request/response protocol server using enumerator/iterator/iterIO/pipes/conduits/...

2012-06-28 Thread Michael Snoyman
On Wed, Jun 27, 2012 at 10:41 AM, Erik de Castro Lopo wrote: > Michael Snoyman wrote: > >> That's >> the reason I added connect-and-resume to conduit. I use the technique >> in warp[1], which in fact *does* support multiple request/response >> pairs due to connection keep-alive. But the code base