edmodo/frugal — pull request #3 by dvander (2014-08-18 07:35:34+00:00)
Title: Add a simple server.

This is a rewrite of thrift's simple server to allow a little more flexibility in message processing and connection handling. It adds a simpler interface as well.

New types:
- `Request` - similar to a thrift request, just splayed out since there's no reason for it to be an interface anymore.
- `Processor` - similar to a thrift TProcessor. Handles incoming frugal requests.
- `ServerInterface` - This replaces all the protocol and transport factory complexity, so whoever implements the interface is responsible for creating exactly the protocols they want. Transport factories were only needed for framing (which we don't use, but I'd like to support more directly anyway).
- `ServerOptions` - Options that used to be threaded into each go service, but are now handled directly.
- `Server` - Actual server interface itself.

Otherwise this operates exactly the same as thrift's server, with two exceptions: it uses frugal's socket which has slightly different write buffering behavior, and it will keep connections open after reading a message.