Implement Scala version of communication server.