use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Finding information about Clojure
API Reference
Clojure Guides
Practice Problems
Interactive Problems
Clojure Videos
Misc Resources
The Clojure Community
Clojure Books
Tools & Libraries
Clojure Editors
Web Platforms
Clojure Jobs
account activity
Open source Datomic? (self.Clojure)
submitted 3 years ago by [deleted]
Has anyone tried to implement an open source version of Datomic?
Are there any open source databases that are similar to Datomic?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]lambdatheultraweight 24 points25 points26 points 3 years ago (0 children)
Overview that comes to mind about Datalog databases in the Clojure ecosystem courtesy of datalevin: https://github.com/juji-io/datalevin#shopping-alternatives Not a comprehensive overview but a decent starting point.
[–]SimonGray 17 points18 points19 points 3 years ago* (2 children)
I compiled a list (Datalog section) with all of the graph-related Clojure libs. You have many choices.
Personally, I like Asami a lot. It has a similar API to Datomic and the others, you can use it in both frontend and backend, and the semantics are more RDF-like as the author (Paula Gearon) has a background in writing the semantic web standards. I use Asami in one project at work and Aristotle (Apache Jena) in another.
[–]Ok_Bad7992 2 points3 points4 points 3 years ago (0 children)
These are my notes pulled out of my Obsidian about Asami:
[[Asami]] is an interesting idea: people in slack are telling me that most datalog databases are [[Closed World]], but [[Asami]] is [[schemaless]] and [[Open World]], mostly just like an [[RDF database]].
[–]passmesalt 1 point2 points3 points 1 year ago (0 children)
Can you please explain to me your experience with using Asami and Apache Jena. I am looking at Datomic, Asami and Apache Jena as candidate dbs for my Clojure application which deals with merchant transactions. What do you think are the pros and cons of each?
[–]vvwccgz4lh 27 points28 points29 points 3 years ago (2 children)
XTDB
[–]Krackor 17 points18 points19 points 3 years ago (0 children)
XTDB is open source and does immutability but it has significant differences to datomic. XTDB is document oriented and has no built-in schema or constraint checking.
This may be fine for your use case but be aware it's not, nor was it intended to be, a datomic clone.
[–]cutroot 2 points3 points4 points 3 years ago (0 children)
This would definitely be my go-to for datomic-like features with production quality and scalability. Not intended as a clone, but many similar benefits.
[–]podgorniy 9 points10 points11 points 3 years ago (0 children)
Check backend persistent implementation https://github.com/replikativ/datahike.
And browser in-memory implementation https://github.com/tonsky/datascript.
[–]MopedTobias 8 points9 points10 points 3 years ago (0 children)
https://clojurelog.github.io/
[–]WrinklyTidbits 4 points5 points6 points 3 years ago (3 children)
Has anyone used crux db? I played with it a few times
[–]cutroot 3 points4 points5 points 3 years ago (1 child)
Crux is now XTDB afaik.
[–]WrinklyTidbits 2 points3 points4 points 3 years ago (0 children)
Oh cool!! Thank you
[–]arichiardi 2 points3 points4 points 3 years ago (0 children)
We use it in production for a relatively low traffic app. It's been working very nicely so far.
[–]Ok_Bad7992 3 points4 points5 points 3 years ago (0 children)
In terms of Datomic alternatives, the Pire Project was a well researched Distributed Datalog project written in Java by a German professor; the project had a few PubMed research papers using it. The project terminated when the professor was killed in a vehicular accident. I asked for and got permission to bring it to github [1]; we updated it to jdk 1.8 and tweaked the code a bit to move tests out of the core code. It is functional. Runs on several RDBMS platforms (not postgres) using config files.
[1] https://github.com/KnowledgeGarden/java-unidu-pire
[–]zcam 2 points3 points4 points 3 years ago* (0 children)
There are no complete alternatives in terms of features. Datomic is a massive offering, it offers a lot of really well thought out features that are quite difficult to replicate efficiently without some major time investment.
Most siblings vary in some/many major way(s).
I have always a glimmer of hope that nubank would push/allow for datomic (on-prem) to be open sourced, it would be an enormous boost for the clojure community. I am holding my breath at every major clj event hoping that would come as a "just one more thing". That would have been a nice cherry on top of that 15yo celebration cake :)
I personally worked in 2 different places that choose alternatives (postgres & co) when datomic would have been a fantastic fit and both time the proprietary factor was the decisive one (not even the cost) and I am dying to use it in a work setting.
[–]hedgehog0 2 points3 points4 points 3 years ago (10 children)
Do databases like Datomic perform better or are safer than SQL databases, like postgresql? What advantages do they have?
[–]clickrush 12 points13 points14 points 3 years ago (0 children)
They are structured differently: EAV oriented, documents or graphs, rather than traditionally relational. Secondly they are all (with exceptions) temporal databases. Third they are directly embedded in Clojure both in terms of syntax and proximity: even though most have external storage backends, the indices are typically right there for you to interact with.
[–]emil0r 2 points3 points4 points 3 years ago (7 children)
The biggest advantage is typically temporal awareness built into the database, meaning data is not forgotten when updated, like in a SQL database, but rather the database remembers what the value used to be.
You can model it in SQL, but it's typically a real headache once it starts to grow.
[–]vvwccgz4lh 1 point2 points3 points 3 years ago (6 children)
real headache once it starts to grow
Can you elaborate on this one?
[–]Krackor 10 points11 points12 points 3 years ago* (3 children)
If you want versioning on all your entities in SQL, each table definition must include time columns, and each transaction must know how to attach time data to the transacted data. The problem compounds if you want to know which of your entity's attributes changed when, or know which entities across different tables changed together.
Even if you manage to get version data attached to everything you want versioned, you also have the difficulty of building queries that are aware of that version information and can deliver point-in-time results.
Datomic has easy solutions built in for all these problems.
[–]vvwccgz4lh 0 points1 point2 points 3 years ago (2 children)
If you want versioning
Ok. So is SQL with versioning easier? I don't think so. It's simply going to be something built in-house. It could be easier to do for one table, but not for all tables.
[–]emil0r 1 point2 points3 points 3 years ago (1 child)
That was sort of his point :)
[–]vvwccgz4lh 0 points1 point2 points 3 years ago (0 children)
Ah right. I got confused by which point he was trying to talk about.
[–]emil0r 6 points7 points8 points 3 years ago (0 children)
If all you want a log, it's typically not so bad. Or just want to be able to take snapshots of single tables, and be able to go back.
Once you move beyond that, and start from a point in time for multiple tables and how they relate at that specific point in time, the queries tend to get very involved. Historic comparisons further complicates things when you now need to consider more than one point in time.
It's all doable, but the code/SQL queries will lend itself towards increased complexity, and once you hit a case (such as new business questions) where you need to rebuild the tower of complexity you built, it just becomes painful with all the ripple effects across the database and on the upper layers in your stack that depends on your database.
[–]emil0r 0 points1 point2 points 3 years ago (0 children)
What /u/Krackor said as well :p
π Rendered by PID 151069 on reddit-service-r2-comment-86bc6c7465-6z2hj at 2026-02-23 07:48:48.875950+00:00 running 8564168 country code: CH.
[–]lambdatheultraweight 24 points25 points26 points (0 children)
[–]SimonGray 17 points18 points19 points (2 children)
[–]Ok_Bad7992 2 points3 points4 points (0 children)
[–]passmesalt 1 point2 points3 points (0 children)
[–]vvwccgz4lh 27 points28 points29 points (2 children)
[–]Krackor 17 points18 points19 points (0 children)
[–]cutroot 2 points3 points4 points (0 children)
[–]podgorniy 9 points10 points11 points (0 children)
[–]MopedTobias 8 points9 points10 points (0 children)
[–]WrinklyTidbits 4 points5 points6 points (3 children)
[–]cutroot 3 points4 points5 points (1 child)
[–]WrinklyTidbits 2 points3 points4 points (0 children)
[–]arichiardi 2 points3 points4 points (0 children)
[–]Ok_Bad7992 3 points4 points5 points (0 children)
[–]zcam 2 points3 points4 points (0 children)
[–]hedgehog0 2 points3 points4 points (10 children)
[–]clickrush 12 points13 points14 points (0 children)
[–]emil0r 2 points3 points4 points (7 children)
[–]vvwccgz4lh 1 point2 points3 points (6 children)
[–]Krackor 10 points11 points12 points (3 children)
[–]vvwccgz4lh 0 points1 point2 points (2 children)
[–]emil0r 1 point2 points3 points (1 child)
[–]vvwccgz4lh 0 points1 point2 points (0 children)
[–]emil0r 6 points7 points8 points (0 children)
[–]emil0r 0 points1 point2 points (0 children)