Check Socko out on GitHub

SOCKO WEB SERVER

Socko Features

Intended for Scala and Akka developers

Socko enables you to expose your Akka actors as HTTP or WebSocket endpoints.

It uses a routing DSL like Unfiltered and Play2 Mini. Route by HTTP method, host, path and querystring. Here’s an example.

Socko includes a StaticFileProcessor Akka actor that serves static files. We use this to serve our HTML5 application files.

We did consider using an existing Scala web servers. Here’s why they did not suit our needs: * Play2, Lift, Xitrum, Sweet - we do not need a server based web application framework. * Play2-mini - a bit too heavyweight as of version 1 because it pulls in all of Play. * Spray, Unfiltered - we want WebSocket support; would like future support for SPDY and perhaps STOMP. * Scalatra - we do not want to have to use a servlet container.

NOTE

We are not saying that any of the above great frameworks are in anyway bad.

What we are saying is they did not exactly fit the requirements of our mashupbots project. With our existing knowledge of Netty, we thought it was quicker for us to build Socko than to modify/enhance an existing project to suite our needs.

Embedded

Socko runs within your Scala application. It is not a standalone web server.

You can configure Socko from inside your code and/or via settings in Akka’s configuration file.

You can also start more than web server instance in your application; bound to different ports. This is useful if you have APIs that you wish to publish on different network interfaces; for example a public API and a private administraion/monitoring API.

Lightweight (assuming you are already using Akka)

The core socko-webserver module in the upcoming V0.3 has less than 2562 lines of code.

Supportive of HTTP and HTML5 Standards

Fast-ish

Socko handles and processes incoming HTTP requests in an asynchronous and event driven manner thanks to Netty and Akka.

Here’s some benchmarking that we’ve done with v0.2.

Open Source

Socko is published under the Apache 2 license.

The source code is hosted at github.

If you have a bug fix or enhancements, please send us a github pull request. Your contribution is welcome and appreciated.