Fork me on GitHub
#datascript
<
2016-07-05
>
conaw16:07:22

Cross posting this from Datomic channel, since also need in ds. Hey all, I’m storing a multigraph in datomic, and I’m interested in the shortest path (or all paths) between 2 or more vertices. I found one example https://hashrocket.com/blog/posts/using-datomic-as-a-graph-database Here, using rules, the author @jgdavey (thanks for the post) was able to get back a path, provided he specified the depth to search. Since that approach is very limited he ended up just working with pure datoms to do the graph search stuff I found a number of papers about implementing recursive algorithms in datalog http://blogs.evergreen.edu/sosw/files/2014/04/Green-Vol5-DBS-017.pdf http://web.cs.ucla.edu/~zaniolo/papers/tplp01.pdf but before trying to convert those into the datomic flavored datalog syntax I know and love, I wanted to see if anyone else has an opinion on this. Has anyone used Loom and Datomic together? Are there some smart patterns for using rules to do recursive querying? Or is @jgdavey’s approach still the best 2 years later?