Re:PathQuery, Google's Graph Query Language
by ampdepolymerase on Thursday July 01, 2021 @12:45PM
(#27701150)
You might like Google's Logica
https://opensource.googleblog.com/2021/04/logica-organizing-...
(Datalog/Prolog family language compiled to SQL)
Re:PathQuery, Google's Graph Query Language
by oddthink on Thursday July 01, 2021 @02:56PM
(#27703015)
I've been using this fairly heavily recently (internal to Google), to the point where I'm thinking of investing in writing an org-babel mode for it. It's a really nice way to structure queries!
Re:PathQuery, Google's Graph Query Language
by lmeyerov on Thursday July 01, 2021 @03:40PM
(#27703622)
Oh wow that is neat!
And yes, this kind of thing is why datalog is a lot more amenable to fast query plans & runtimes than prolog. This part is especially cool: https://github.com/EvgSkv/logica/blob/main/compiler/dialects...
Datalog solves most of that :) My read of the paper is their semantics largely reduces to datalog. The most interesting semantic exception is their bounded recursion, which suggests they're doing optimizations normal datalog wouldn't. Likewise, graph workloads often have weird phenomena to optimize for in terms of expected queries & data, where I'm guessing datalog might fit semantically but not how people would normally implement an engine. The PathQuery paper carefully side-stepped all such discussion, so I've been curious.
At Graphistry, we do end-to-end GPU stuff, so I've been thinking about this particular problem, and came to a similar conclusion of a datalog-ish subset being the most straightforward way to get more performance/$ for this kind of task.