Graph Database

Written on May 7, 2018

Ringo the Music Bot

Dan had an idea to make a music recommendation bot, he asked me to get involved and help with some of the backend bits.

So introducing Ringo!!

Ringo can only do a few things at the moment but we have a growing backlog of things we are working on. Early on we figured that the recommendation data store would be a perfect fit for a graph database. I have experimented a few times with Cosmos and it’s graph capabilities so this seemed like a natural choice.

It is early days but we are making progress, using the Spotify API to search for users and persist these to the graph database. We ended up using a Service Bus queue and a background task, so when you search for an artist it returns 20 related results and these are all processed and created as edges. I had to create some update logic to determine if the record and relationship exists, but that was pretty simple and ended up getting into the Gremlin query language with is very powerful, doing inline functions and piping query result sets.

All the code is in GitHub so please check it out.

Written on May 7, 2018