NIO server framework in Scala