Why Datomic?

Many of you know we’re using Datomic for all our storage needs for Zolodeck. It’s an extremely new database (not even version 1.0 yet), and is not open-source. So why would we want to base our startup on something like it, especially when we have to pay for it? I’ve been asked this question a number of  times, so I figured I’d blog about my reasons:

  • I’m an unabashed fan of Clojure and Rich Hickey
  • I’ve always believed that databases (and the insane number of optimization options) could be simpler
  • We get basically unlimited read scalability (by upping read throughput in Amazon DynamoDB)
  • Automatic built-in caching (no more code to use memcached (makes DB effectively local))
  • Datalog-as-query language (declarative logic programming (and no explicit joins))
  • Datalog is extensible through user-defined functions
  • Full-text search (via Lucene) is built right in
  • Query engine on client-side, so no danger from long-running or computation-heavy queries
  • Immutable data – audits all versions everything automatically
  • “As of” queries and “time-window” queries are possible
  • Minimal schema (think RDF triples (except Datomic tuples also include the notion of time)
  • Supports cardinality out of the box (has-many or has-one)
  • These reference relationships are bi-directional, so you can traverse the relationship graph in either direction
  • Transactions are first-class (can be queried or “subscribed to” (for db-event-driven designs))
  • Transactions can be annotated (with custom meta-data) 
  • Elastic 
  • Write scaling without sharding (hundreds of thousands of facts (tuples) per second)
  • Supports “speculative” transactions that don’t actually persist to datastore
  • Out of the box support for in-memory version (great for unit-testing)
  • All this, and not even v1.0
  • It’s a particularly good fit with Clojure (and with Storm)

This is a long list, but perhaps begins to explain why Datomic is such an amazing step forward. Ping me with questions if you have ‘em! And as far as the last point goes, I’ve talked about our technology choices and how they fit in with each other at the Strange Loop conference last year. Here’s a video of that talk.

9 thoughts on “Why Datomic?

  1. I’d like to add to your list that all reference relationships in Datomic are bi-directional.
    This is one of elegant design decision.

  2. Why not?

    Because a lot of things are just presumed (see recent threads of google groups), most dev dont have any low-level knowledge of how it works (screencasts q&as with ‘dont know’) and with scant documentation (its weak and ambigious) and no source code (not even a reference license), you have to rely on the mailing list and hope Hickey or Stuart actually answers the question. Good luck when you run into a real problem. I forsee a new stream of blog posts in about 12 months ‘how we got burnt by datomic’ and ‘startup lesson 101 – dont be an early adopter’

    • Of course, there are always trade-offs. And you decide based on that trade-off.To my mind, the pros outweigh the cons. Your mileage may vary. Having said that, I’m certainly taking a bit of a leap of faith in hoping that we’re not one of those who write those blog posts you’re predicting. Hopefully, the past (Rich’s & Stu’s) will be an indicator of the future.

    • +1.

      Its vital for people to be able to understand the internal workings of a product for long term sustainability. I am reminded of rife, a really cool web framework that came out in early 2000 with continuation support etc, which was packed with amazing features but was a complete blackbox since very few people grokked its internals. Rife eventually died. I really hope datomic either releases its source code under some restrictive license or documents its internal workings in much more detail.

  3. Pingback: Why Datomic? « s-expressions

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s