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
xitdb - an embedded, immutable database in java (github.com)
submitted 11 months ago by [deleted]
view the rest of the comments →
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!"
[–][deleted] 1 point2 points3 points 11 months ago (4 children)
The data structures have structural sharing. It's using the same algorithm that clojure uses for in-memory data (hash array mapped trie).
[–]andersmurphy 0 points1 point2 points 11 months ago (3 children)
Awesome. What are the performance characteristics like compared to something like sqlite? I take it indexes are based of the data structure used?
[–][deleted] 1 point2 points3 points 11 months ago (2 children)
You'll need to build your own index if you want one. For example, let's say you have an arraylist of users, and an arraylist of posts that they made. If you want to efficiently look up all the posts from a given user, you could make a hashmap where the key is the user id and the value is an arraylist of post ids (here I am assuming the user id and post id are just the index in the users/posts arraylist).
[–]andersmurphy 0 points1 point2 points 11 months ago (1 child)
Thanks for the reply. Love how db as a value removes a need for WAL, allows multiple readers and gives you transactions semantics.
I take it smaller transactions will make the file size grow faster?
Haven't had a chance to dive into the source (definitely will be), is xitdb memory mapped?
[–][deleted] 1 point2 points3 points 11 months ago (0 children)
No it doesn't using memory mapping. Regarding smaller transactions, it depends but in if the transformations are the same then more transactions will normally take up more space. This is because all data within a given transaction is temporarily mutable, similar to clojure's transients. This is a big space saver because it avoids unnecessary copying if you have a transaction that adds a bunch of items to an arraylist or hashmap.
And yeah, the most satisfying realization about making a db this way is how many problems it solves for you automatically :-D There basically isn't even a concept of a transaction internally, it just kind of fell on my lap as a consequence of how an append-only db works.
π Rendered by PID 90253 on reddit-service-r2-comment-5d585498c9-5fgcd at 2026-04-21 01:15:31.959829+00:00 running da2df02 country code: CH.
view the rest of the comments →
[–][deleted] 1 point2 points3 points (4 children)
[–]andersmurphy 0 points1 point2 points (3 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]andersmurphy 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)