Fork me on GitHub

hey all! Anyone have a simple example of subscribing to changes of a datomic db? 🙏


Also, is there any common lein or boot templates to quickly scaffold out a CRUD backend for datomic (ideally a CRUDS starter template with subscriptions built-in as well!) thanks!


As far as backends go, the closest I’m aware of is the (alpha) Datomic plugin for Pathom Connect (EDIT: see following message for other good options!), If you’re looking for a frontend or full-stack solution, there’s Fulcro RAD (also in alpha and under rapid development),, Note that Fulcro also uses Pathom internally, but RAD uses its own Datomic adapter. There exist nice ways of adding websockets to Fulcro (enabled via Sente), but I don’t belive it’s currently pre-integrated with Fulcro RAD etc


If you already have the frontend settled, another option may be to stand up a GraphQL server. Lots of ways to do that. Over Postgres (or Yugabyte…) with (supports subscriptions out of the box). To bridge Clojure(script) and GraphQL, you might use There’s also this new, pure-Clojure GraphQL API creator for MySQL/Postgres Hodur has an “experimental” adapter for declaratively creating a GraphQL API over Datomic (and lots more cool stuff)


Thanks @UCHV4JZ7A! Interesting, I've never heard of Panthom or "EQL"


I thought you could already ask for pieces of data with the standard Datomic api. If that is the case then isn't graphQL kind of unnecessary? :thinking_face:


I think one way to explain it is that EQL+Pathom or GraphQL both serve to decouple your frontend from the schema within your database. Datomic (as with all? SQL databases) is not intended to be exposed directly to a frontend client. This talk from the creator of Pathom may be enlightening: There are a few other good Pathom (and Fulcro) talks out there from the same person


It’s possible you and I are dreaming about the same kind of thing — easily pull DB data from a SPA-style web frontend, with minimal setup. The closest I’ve found outside Clojure-land is + As it matures, I expect Fulcro RAD will enable a similar experience to that, but built on better and more flexible primitives that you can’t ever outgrow


(“Better” to me means a few things. React-admin is made out of the typical mish-mosh of tools from the react ecosystem, which I find to be highly “inconsistent”, with the added bonus of high churn and the resulting breakage. Fulcro RAD is still just Fulcro, which I find to be the closest thing to an internally-consistent framework in the Clojure(script) ecosystem — an ecosystem which itself prizes stability)


This is a question about datalog. I posted this on #datalog but there isn't my activity there. I appreciate any help as I'd like to understand this.


Is it a join? I think it's a join.


@stuartrexking You probably shouldn't think of the function call so much as assignment as just binding. So yeah, it's just joining on different people with the same birth date. Another way to think about it is imagine if there was a :person/born-month and a :person/born-date attribute, you could replace the function call clauses with something like [?p1 :person/born-month ?m] [?p2 :person/born-month ?m]


Ah. That makes sense. Thank you.