Wednesday, July 4

Datomic with examples in Clojure

So for some quick background, Rich Hickey the inventor of Clojure created yet another NoSQL database called Datomic. I was quite skeptical at it's release with the plethora of other NoSQL solutions available, but was converted by a simple question asked during Clojure Conj West. 

"What is faster, a local spinning disk or an SSD connected via a fat pipe?"

Hearing this I suddenly realized that the significant changes that have occurred with large memory, many locally connected machines, and SSD's really have changed the game and that a re-architecture of databases was called for. 

For more details on that topic, I high recommend starting with Jay Kreps blog post here.

Anyways, Datomic's idea of moving much of the read-only query work to the client, and abstracting away data storage, is very attractive. Loads more details here.

Finally jumping in to Datomic, after I started playing with working sets many times larger than available RAM; I ran into a couple issues that I thought I should mention to hopefully help any other "datomic clojure intro howto" googlers.
  1. Grab the latest greatest version of datamic from here.
  2. Second, unzip it and do;
    $ mvn install:install-file -DgroupId=com.datomic -DartifactId=datomic -Dfile=datomic-${VERSION}.jar -DpomFile=pom.xml

  3. Where ${VERSION} is the numbered version of datomic that you download.
  4. Check out some Clojure examples, and project, I extracted from official Datomic tutorial found here.Examples -> https://github.com/thebusby/datomic-tester/blob/master/src/datomic_tester/core.clj

Hope it helps ;)

2 comments:

Christopher Devine said...

The Datomic architecture link has been changed to: http://docs.datomic.com/architecture.html

Christopher Devine said...

Likewise, the Datomic download link is now: http://www.datomic.com/get-datomic.html