kotlinx.collections.immutable VS MapDB

Compare kotlinx.collections.immutable vs MapDB and see what are their differences.

MapDB

MapDB provides concurrent Maps, Sets and Queues backed by disk storage or off-heap-memory. It is a fast and easy to use embedded Java database engine. (by jankotek)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
kotlinx.collections.immutable MapDB
10 5
1,081 4,832
3.7% -
7.3 0.0
9 days ago 4 months ago
Kotlin Java
Apache License 2.0 Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

kotlinx.collections.immutable

Posts with mentions or reviews of kotlinx.collections.immutable. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-07-11.
  • Is there a way to atomically add to a list and return its index?
    1 project | /r/Kotlin | 8 Dec 2023
    In Clojure, it is called an Atom. I created my own via AtomicReference and https://github.com/Kotlin/kotlinx.collections.immutable. It works really well in Kotlin. It works especially well if you use tons of coroutines.
  • I had a great experience with Scala and hopefully it will get more popular
    10 projects | /r/scala | 11 Jul 2023
    So does Java! Also, kotlinx.collections is still not stable and I don't think they are intending to make it so any time soon.
  • Immutable lists, O(1) prepend/append
    1 project | /r/Kotlin | 10 Jul 2023
    If you want to have O(1) with prepend you use the LinkedList. You get a lot of functional benefits but also all of the downsides like no random access. You can use the https://github.com/Kotlin/kotlinx.collections.immutable library to get O(log_64(n)). I haven't spent a ton of time on Tries so I might be a little wrong on that bound. BTW, these are persistent immutable data structures. At work, we use them inside of AtomicReference to roll our own Clojure Atoms.
  • What type of variable contains amutable list?
    1 project | /r/Kotlin | 5 Nov 2022
    This is why Kotlin refers to List as read-only, and not immutable, and has created a library for truly immutable collections: https://github.com/Kotlin/kotlinx.collections.immutable
  • what is the best persistent collection library?
    5 projects | /r/java | 2 Sep 2022
    What I know is only based on this discussion. It seems that pcollections is really outdated and should not be considered.
  • A personal Kotlin guide for Java developers
    2 projects | /r/Kotlin | 24 Mar 2021
    If you want true immutable collections, kotlinx.collections.immutable provides them. They will likely be integrated into the language eventually with value classes and better immutability support.
  • Scala is a Maintenance Nightmare
    5 projects | /r/programming | 22 Mar 2021
    I could see this argument made with Clojure, but I don't really see what makes Scala significantly better at FP than Kotlin. Kotlin has an official persistent data structures library nowadays, and it's got lambdas and higher order functions.
  • What are your concerns and pet peeves about Kotlin so far?
    2 projects | /r/Kotlin | 18 Jan 2021
    It's not immutable, it's read-only, https://kotlinlang.org/docs/reference/collections-overview.html . I think that's a false assumption. But I get the point - immutable collections are not part of the std - for very good reasons. But we know each other, I assume that you will disagree :) For people who know what they want and know all the implications, there is https://github.com/Kotlin/kotlinx.collections.immutable .

MapDB

Posts with mentions or reviews of MapDB. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-10-27.
  • GC, hands off my data!
    6 projects | dev.to | 27 Oct 2023
    I decided to start with an overview of what open-source options are currently available. When it comes to the implementation of the on-heap cache mechanism, the options are numerous – there is well known: guava, ehcache, caffeine and many other solutions. However, when I began researching cache mechanisms offering the possibility of storing data outside GC control, I found out that there are very few solutions left. Out of the popular ones, only Terracotta is supported. It seems that this is a very niche solution and we do not have many options to choose from. In terms of less-known projects, I came across Chronicle-Map, MapDB and OHC. I chose the last one because it was created as part of the Cassandra project, which I had some experience with and was curious about how this component worked:
  • Permazen: Language-natural persistence to KV stores
    6 projects | news.ycombinator.com | 19 Sep 2023
    So, it's an object database, like Zope's ZODB on Python?

    I like the idea, but I'd like to learn about use cases for it.

    Otherwise, in Java, MapDB is about as far as I'd be willing to go: https://github.com/jankotek/mapdb/

  • what is the best persistent collection library?
    5 projects | /r/java | 2 Sep 2022
    Anyway, without further ado, I found MapDB (https://github.com/jankotek/mapdb) which does exactly that. Of course, they also provide their own Java collection implementations as well, so I suspect using it with Vavr would be a poor idea, but it is very cool in its own right anyway. Of course, there is also Apache Derby and HSQLDB, and those great options with a long history as well. I haven't played with these in a while though, so I might give them a try again soon for some personal stuff.
  • Ask HN: What are the best key-value self-hosted storage engines?
    5 projects | news.ycombinator.com | 31 Mar 2022
    In Java I like

    https://mapdb.org/

    It is more feature rich than you want but in Python I'd probably just use sqlite3 since it is in the standard library.

  • Solution for hash-map with >100M values
    7 projects | /r/java | 21 Dec 2020
    I have had good results with mapdb

What are some alternatives?

When comparing kotlinx.collections.immutable and MapDB you can also consider the following projects:

java-immutable-collections - Efficient Immutable/Persistent Collections for Java

Chronicle Map - Replicate your Key Value Store across your network, with consistency, persistance and performance.

Exposed - Kotlin SQL Framework

H2 - H2 is an embeddable RDBMS written in Java.

geni - A Clojure dataframe library that runs on Spark

JetBrains Xodus - Transactional schema-less embedded database used by JetBrains YouTrack and JetBrains Hub.

sbt - sbt, the interactive build tool

Redisson - Redisson - Easy Redis Java client and Real-Time Data Platform. Sync/Async/RxJava/Reactive API. Over 50 Redis based Java objects and services: Set, Multimap, SortedSet, Map, List, Queue, Deque, Semaphore, Lock, AtomicLong, Map Reduce, Bloom filter, Spring Cache, Tomcat, Scheduler, JCache API, Hibernate, RPC, local cache ...

cats - Lightweight, modular, and extensible library for functional programming.

Jedis - Redis Java client

awesome-scala - A community driven list of useful Scala libraries, frameworks and software.