by hosh · 3y ago · 0 comments
Would Datalog be performant enough at scale?
I think one neat thing about logic programming languages is that you can ask for the reasoning chain to get to the conclusion it did, or do reverse queries. (Such as, give me all the actions that a person is authorized for this time)
I've used it with success in authorization, but the developer experience could be better. I've found the experience to be better when paired with some constraint framework.
The other trade-off as mentioned in another comment is that it's stateless. The pro is that it's stateless, but the con is that someone needs to figure out a way to get input and data into your evaluation runtime so that you can write meaningful policies.
[0] https://www.openpolicyagent.org/docs/latest/policy-language/
Or why not SQL?
Which will be more optimized -or is easier to optimize- for the logic in question?