Add db and sockets

This implements the basic functionality for streaming data to the client. We should set up some pub/sub for level to simplify communications with the client.