Fork me on GitHub
#asami
<
2022-03-29
>
leifericf07:03:33

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?

quoll10:03:54

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.

👀 1
1
❤️ 1
2
quoll10:03:33

There's more, of course, but that's the stuff that springs to mind

quoll10:03:53

Oh, and Asami is open source 🙂

quoll10:03:27

And Asami’s development pace is slow, since it happens when I have time. Datomic has a team

❤️ 3
💯 1
leifericf12:03:38

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.

quoll12:03:38

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 🙂

👍 1
dharrigan13:03:49

@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.

👂 1
🎧 2
leifericf13:03:47

Awesome, thanks for the tip!

dharrigan13:03:08

np, you're most welcome.

quoll13:03:08

If you're getting into the details, then I described a bit of this https://youtu.be/-XegX_K6w-o?list=PLcGKfGEEONaBjSfQaSiU9yQsjPxxDQyV8

👀 1
partyparrot 1
dharrigan13:03:50

It's not just about Asami (that's talked about more at the end), but all about graph databases etc...

Jakub Holý (HolyJak)16:03:28

> 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 🙂

💖 1
partyparrot 2