Hacker News new | ask | show | jobs
by Royalaid 2472 days ago
The biggest thing I have noticed, granted I don't have a ton experience with either system, is point 1 outlined in the "Other Differences" section.

>Datomic’s datom model provides a very granular and comprehensive interface for expressing novelty through the assertion and retraction of facts. Crux instead uses documents (i.e. schemaless EDN maps) which are atomically ingested and processed as groups of facts that correspond to top-level fields with each document. This design choice simplifies bitemporal indexing (i.e. the use of valid time + transaction time coordinates) whilst satisfying typical requirements and improving the ergonomics of integration with other document-oriented systems. Additionally, the ordering of fields using the same key in a document is naturally preserved and can be readily retrieved, whereas Datomic requires explicit modelling of order for cardinality-many attributes. The main downside of Crux’s document model is that re-transacting entire documents to update a single field can be considered inefficient, but this could be mitigated using lower-level compression techniques and content-addressable storage. Retractions in Crux are implicit and deleted documents are simply replaced with empty documents

So what this means in pratice is that in Datomic you don't really "have" an entity/document (this isn't entirely true but feel free to dig into the details https://docs.datomic.com/on-prem/entities.html) but rather a set of facts (rows/tuples) at any given time, or across time, generally gathered up under one id. You can query on one of those facts and get exactly that back, one or more specific facts. Crux has this ability to query parts/attributes of a document but in terms of updating its all or nothing. There are other, more niche, considerations. One example I can can cite is looking at an entity through time in Datomic can be alien at first whereas with Crux its just a document, but overall this is the biggest thing I have noticed.

Oh and Datomic is pretty well battle tested and has the full support of Cognitect behind it whereas Crux is a newer OSS product by Juxt. That is both a pro and con for both camps, just depends on your needs.