Orchard Hungary is an archive

This site is now an archive. We'll keep it so the content is accessible, but we won't update it anymore. However, we frequently publish Orchard-related news on our other site Orchard Dojo, so be sure to check that out instead. And if you're interested in news about our Orchard development company, Lombiq, check out our website.

Graph databases in Orchard

Tags: Associativy, graph databases, Neo4j, Orchard Harvest 2012, Orchard Harvest

On the second day of Orchard Harvest one of the hackathon groups explored the idea of using graph databases, specifically Neo4j, in Orchard. I followed up on the topic and researched on how graph databases can play along in an Orchard module.

I've searched for .NET graph databases but couldn't really find any up-to-date project, even .NET drivers for graph databases are scarce. Neo4j seemed indeed like the best way to explore further: it's a very popular graph database and exposes a RESTful API so other pieces of software can use it even if they don't run on Java like Neo4j itself. Fortunately Tatham Oddie and his team developed Neo4jClient, a .NET wrapper that provides a nice interface to interact with Neo4j through its web services.

It turns out that using Neo4jClient from Orchard is quite simple, I've developed a Neo4j driver for Associativy. One special information worth noting that there should live only one connection to a Neo4j server, as advised in the wiki. This required the usage of an ISingletonDependency, but nothing really complicated. Feel free to look at the source code of the Associativy Neo4j driver.

Graphs are wonderful things and there are occasions when your data is best modelled by a graph. Don't be hesitant to dive into the world of graph databases: at least Neo4j is usable with Orchard.

Happy depth-first searching!

No Comments