A simple graph

July 8th 2017

I want to use a graph database as the backend to simian-picture-server in order to describe collections of pictures. I looked at a few options, but didn't really like any. I don't wish to have a separate Java server, and I don't have the time to learn a new language just to operate a db. Also, I want to store relationships as well as node data in the graph database. So after conducting hardly any research, and thinking way too little about the problem, I decided to roll my own solution. This isn't too bad, as I don't intend to make a general purpose graph.

I figure the basic operations I need are

  1. create nodes
  2. find nodes
  3. delete nodes
  4. link nodes using a relationship ("picture1.jpg" is a member of "collection1")
  5. unlink nodes ("picture1.jpg" is no longer a member of "collection1")

So far, I plan to put all my nodes into a single Mongo collection (say nodes), and put relationships into another collection (say edges). This probably going to be bad for performance, but should be an interesting experiment.

Expect more updates about this project in the coming months. Cheers :)