Another Word For It Patrick Durusau on Topic Maps and Semantic Diversity

April 10, 2014

Using Datomic as a Graph Database

Filed under: Clojure,Datomic,Functional Programming,Graphs — Patrick Durusau @ 6:32 pm

Using Datomic as a Graph Database by Joshua Davey.

From the post:

Datomic is a database that changes the way that you think about databases. It also happens to be effective at modeling graph data and was a great fit for performing graph traversal in a recent project I built.

I started out building kevinbacon.us using Neo4j, a popular open-source graph database. It worked very well for actors that were a few hops away, but finding paths between actors with more than 5 hops proved problematic. The cypher query language gave me little visibility into the graph algorithms actually being executed. I wanted more.

Despite not being explicitly labeled as such, Datomic proved to be an effective graph database. Its ability to arbitrarily traverse datoms, when paired with the appropriate graph searching algorithm, solved my problem elegantly. This technique ended up being fast as well.

Quick aside: this post assumes a cursory understanding of Datomic. I won’t cover the basics, but the official tutorial will help you get started.
….

If you are interested in Datomic, Clojure, functional programming, or graphs, this is a must read for you.

Not to spoil any surprises but Joshua ends up with excellent performance.

I first saw this in a tweet by Atabey Kaygun.

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress