Very interesting!
I think the biggest weak points of firebase are a. a weak query engine (as soon as you reach non-trivial complexity you end up having to de-normalize data) and b. a weak rule engine (relying on a bunch of boolean logic is not going to scale as your app grows. you need more abstraction power)
Looks like your library addresses both -- crux has datalog queryability, and the rule dsl you wrote seems pretty powerful.
Good work Jacob!
Thanks! I'm also looking forward to finishing the Materialize[1] integration I've been working on (currently blocked while I wait for them to release some features). Although Crux has datalog, you can't subscribe to datalog queries. But with Materialize, you can basically subscribe to arbitrary SQL queries. I have a branch that lets you define the SQL queries on the backend and then subscribe to the results via Biff's existing subscription system.
Cool! Two noob qs:
1. Would love to learn a bit more about how the rule engine works.
From what I understand crux in essence only gives you key->blob semantics. How do you know that one `doc` is a `user`, and another doc is an `game`, etc
2. re: datalog subscriptions -- do you know if this is something inherently very difficult, or is it that crux hasn't implemented this yet?
2. It is inherently difficult. The closest thing like this that exists for datalog is I believe clj-3df[1]. Hence I was very excited when Materialize was launched publicly a few months ago. A version for datalog would be cool too, but SQL is good enough I think.