[Haskell-cafe] How to design an network client with user program.

Michael Snoyman michael at snoyman.com
Wed Apr 10 13:10:51 CEST 2013

On Wed, Apr 10, 2013 at 2:08 PM, Alexander V Vershilov <
alexander.vershilov at gmail.com> wrote:

> On 10 April 2013 14:56, Michael Snoyman <michael at snoyman.com> wrote:
>> It doesn't seem like you're trying to perform multiple actions
>> simultaneously. For example, you don't need to be able to read from the
>> server and send data back at the same time. Instead, you'll have a single
>> thread of execution. Am I right?
> Not  exaclty, user code is not only SeverMessage driven but can generate
> messages and works on it's own (time-events, or some external events).
> For example user code may generate random messages even there is no
> message from server, (i.e. wait for some
> timeout and then feed sender with message), or do some long running
> events, (e.g. wait for 5 minutes), in both
> of those cases one threaded pipeline is broken.
Then some kind of TQueue or TChan approach is going to be necessary.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130410/de3ec47c/attachment.htm>

More information about the Haskell-Cafe mailing list