Hello! I’m curious about Asami and how it compares to Datomic. Does anyone know of a blog post or talk which compares them and summarizes the most significant design/conceptual differences?
Not a comparison, no, but I could summarize:
Data model:
• Asami is schemaless, while Datomic requires a schema for each attribute before it is used. This simplifies update operations for Datomic, and makes Asami much more flexible.
• The entity/attribute/value positions in Datomic require an entity node, a keyword, and a general value. In Asami, all 3 positions are general.
• Querying Datomic diatoms can request the transaction ID. Asami has this info, but I haven't exposed it yet (it's coming! But it has other info to come as well, which is why I haven't done it yet).
• Asami can load JSON or EDN, so long as it matches the format of a sequence of maps.
• Datomic queries presume a closed world data model. Asami has an open world assumption. This provides subtly different semantics.
• Some query features differ. For instance, Asami has an optional operator, transitive closure, and primitive (for now) subqueries.
• Datomic has query-based rules built-in. Asami has production rules provided by the sister project Naga
Storage
• Datomic requires a separate transactor that must be provisioned before starting. Asami stores data itself.
• Datomic has implementations for a number of backend stores. Asami is designed to do this, but currently only stores data on disk or in memory.
There's more, of course, but that's the stuff that springs to mind
Oh, and Asami is open source 🙂
And Asami’s development pace is slow, since it happens when I have time. Datomic has a team
Awesome, thank you @quoll! I’m looking for a “default database choice” that is simple to use Clojure on my local machine, which can be deployed in a production setting later if necessary. I’ve considered writing some functions to write and read data to simple files as well, for example by serializing with something like EDN, https://github.com/ptaoussanis/nippy, or https://github.com/pkpkpk/fress. But then I thought maybe it would be better to use an actual database instead. Datomic and Asami seem to be the most “Clojure-friendly databases” out there. I’m also looking at https://www.mongodb.com and https://couchdb.apache.org.
Well, my favorite use-case for Asami is that I can just take a JSON file and load it. 1 step. It's kinda easy 🙂
@leif.eric.fredheim there is this excellent recent podcast where Paula was interviewed. She goes into some details about Asami and it's background and features. I think it would be a great compliment to what Paula described above to give more information: https://clojurescriptpodcast.com/, episode 66.
Awesome, thanks for the tip!
np, you're most welcome.
If you're getting into the details, then I described a bit of this https://youtu.be/-XegX_K6w-o?list=PLcGKfGEEONaBjSfQaSiU9yQsjPxxDQyV8
It's not just about Asami (that's talked about more at the end), but all about graph databases etc...
> a “default database choice” that is simple to use Clojure on my local machine, which can be deployed in a production setting that is exactly why I picked Asami and am making a #Fulcro RAD adapter for it, @leif.eric.fredheim 🙂