mezis/blurrily — pull request #5 by dawid-sklodowski (2013-03-26 16:27:58+00:00)
Title: Blurrily/event machine server 46824777

This relies on: https://github.com/mezis/blurrily/pull/4
(I merged that branch inside this PR)

Blurrily::Server
-----------------------

Class which would listen on given port for incoming connections, parse incoming strings (queries), call blurrily internals and then provide some response.

Protocol accepts three commands: put, find and clear:
```PUT -> -> -> -> [weight] ```
```FIND -> -> -> [limit] ```
```CLEAR -> ```

Response:
```FOUND -> [ -> ,...]```
```NOT FOUND``` if no results
```ERROR -> [message]``` if error
``` OK ``` if command succeeded (PUT or CLEAR)

( ``` -> ``` stands for [TAB])

API
```.new(host, port, dir) ```
```#start ```
```#process(data) ```