Hello, café.

Recently I asked about tcp server libraries [1] and there was only one
answer haskell-scallable-server [2], but in that package there was some
dependencies and server logic that are not good for my task.

So I decided to make a library with skeletons for different types of 
tcp servers and a basic library to make server [3]. 

Now there is only warp based (simplified) tcp server.
Main logic is:
  * handle new connection and start iteratee green thread
  * enumerator (library side) reads socket and send data into enumeratee 
    (application side)
  * enumeratee consumes input and produces server command (now simply output)
    and push it into iteratee (server side)
  * iteratee server side reads command and performs action (now simply output
    command)
It gives application possibility to store state in enumerator.

My questions to community:
  1). can you help to make code better ;) maybe there are some stupid mistakes
  2). is there any ideas what thing can be add to the server to make it reusable

And another thing that I want to add other types of server e.g. single threaded,
with workers pool, or other types. And I want to ask what types of servers
will be effective in haskell.



[1] http://www.haskell.org/pipermail/haskell-cafe/2012-January/098594.html
[2] https://github.com/jamwt/haskell-scalable-server
[3] https://github.com/qnikst/TcpServers

--
Alexander V Vershilov.

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to