twitter/zipkin — pull request #272 by IceCreamYou (2013-07-03 00:44:31+00:00)
Title: Add support for SQL databases

**This is NOT ready to be merged yet.** I'm submitting this pull request because most everything is implemented and it's time for high-level review.

The goal is to add support for SQL databases using Anorm from the Play framework. I learned Scala in order to do this so let me know if there is a more idiomatic way to do things.

Note that I started by trying to do this with Slick instead of Anorm, but Slick depends on Scala 2.10 and it was too much scope creep to manage upgrading the whole project to be compatible with 2.10.

*Things that remain to be done:*
- Figure out the easiest way for someone to set up the schema the first time. The new DB class has an install method but ideally this would be runnable from the command line
- Figure out the easiest way to load the dependencies for different SQL database types for people who want to use something other than SQLite. These are listed in a comment in DB.scala
- The DB class should load its configuration from a config file like the other services in Zipkin. I haven't started looking into how to do this, and it would be nice if we could do it using the fancy new autoloading instead of Eval if possible.
- Need to write tests... :) This will be easier once we can load config dynamically because then we can run databases in-memory and throw them away once the test is over