Re: [Haskell-cafe] Conduit and pipelined protocol processing using a threadpool

2012-11-28 Thread Nicolas Trangez
On Wed, 2012-11-28 at 09:17 +0200, Michael Snoyman wrote: > > > > On Tue, Nov 27, 2012 at 7:25 PM, Nicolas Trangez > wrote: > Michael, > > On Tue, 2012-11-27 at 17:14 +0200, Michael Snoyman wrote: > > I think the stm-conduit package[1] may be helpful for this >

Re: [Haskell-cafe] Conduit and pipelined protocol processing using a threadpool

2012-11-27 Thread Michael Snoyman
On Tue, Nov 27, 2012 at 7:25 PM, Nicolas Trangez wrote: > Michael, > > On Tue, 2012-11-27 at 17:14 +0200, Michael Snoyman wrote: > > I think the stm-conduit package[1] may be helpful for this use case. > > Each time you get a new command, you can fork a thread and give it the > > TBMChan to write

Re: [Haskell-cafe] Conduit and pipelined protocol processing using a threadpool

2012-11-27 Thread Nicolas Trangez
Michael, On Tue, 2012-11-27 at 17:14 +0200, Michael Snoyman wrote: > I think the stm-conduit package[1] may be helpful for this use case. > Each time you get a new command, you can fork a thread and give it the > TBMChan to write to, and you can use sourceTBMChan to get a source to > send to the c

Re: [Haskell-cafe] Conduit and pipelined protocol processing using a threadpool

2012-11-27 Thread Michael Snoyman
I think the stm-conduit package[1] may be helpful for this use case. Each time you get a new command, you can fork a thread and give it the TBMChan to write to, and you can use sourceTBMChan to get a source to send to the client. Michael [1] http://hackage.haskell.org/package/stm-conduit On Tue

[Haskell-cafe] Conduit and pipelined protocol processing using a threadpool

2012-11-27 Thread Nicolas Trangez
All, I've written a library to implement servers for some protocol using Conduit (I'll announce more details later). The protocol supports pipelining, i.e. a client can send a 'command' which contains some opaque 'handle' chosen by the client, the server processes this command, then returns some