Permazen VS moditect

Compare Permazen vs moditect and see what are their differences.

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
Permazen moditect
10 10
397 522
1.3% 1.5%
9.2 7.8
3 months ago 6 days ago
HTML 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.

Permazen

Posts with mentions or reviews of Permazen. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-01.
  • ORMs are nice but they are the wrong abstraction
    7 projects | news.ycombinator.com | 1 Feb 2024
    The most interesting/fresh approach I've seen to this problem is Permazen.

    https://github.com/permazen/permazen/

    It starts by asking what the most natural way is to integrate persistence with a programming language (Java in this case, but the concepts are generic), and then goes ahead and implements the features of an RDBMS as an in-process library that can be given different storage backends as long as they implement a sorted K/V store. So it can sit on top of a simple in-process file based K/V store, RocksDB, FoundationDB, or any SQL database like PostgreSQL, SQLite, Spanner, etc (it just uses the RDBMS to store sorted key/value pairs in that case).

    Essentially it's a way to map object graphs to key/value pairs but with the usual features you'd want like indexing, validation, transactions, and so on. The design is really nice and can scale from tiny tasks you'd normally use JSON or object serialization for, all the way up to large distributed clusters.

    Because the native object model is mapped directly to storage there's no object/relational mismatch.

  • Permazen: Language-natural persistence to KV stores
    6 projects | news.ycombinator.com | 19 Sep 2023
    Ok, let's change to that from https://permazen.io/ above.

    Usually we go the other way and prefer the project page, but there's clearly not enough info there.

    6 projects | news.ycombinator.com | 19 Sep 2023
  • How FoundationDB works and why it works
    5 projects | news.ycombinator.com | 18 Sep 2023
    An obvious question you face when deploying something like FDB is how to write your app on top of it. With FDB it's like RocksDB. You get a transactional key/value store, but that's a very low level interface for apps to work with.

    FDB provides "layers", such as the Record layer. It helps map data to keys and values. But a more sophisticated solution that I sometimes wish would take off is this library:

    https://permazen.io/

    It's a small(ish) open source project that implements an ORM-like API but significantly cleaned up, and it can run on any K/V backend. There's an FDB plugin for it, so you can connect your app directly to an FDB cluster using it. And with that you get built-in indexing, derived data, triggers, you can do queries using the Java collections API, there's a CLI, there's an API for making GUIs and everything else you might need for a business CRUD app. It's got a paper of its own and is quite impressive.

    There are a few big gaps vs an RDBMS though:

    1. There's no query planner. You write your own plans by using functional maps/filters/folds etc in regular Java (or Kotlin or Python or any other language that can run on the JVM).

    2. It's weak on analytics, because there's no access control and the ad-hoc query language is less convenient than SQL.

    3. There's no network protocol other than FDB itself, which assumes low latency networks. So if there's a big distance between the user generating the queries and the servers, you have a problem and will need to introduce an app specific protocol (or move the code).

    5 projects | news.ycombinator.com | 18 Sep 2023
  • Figma Is a File Editor
    3 projects | news.ycombinator.com | 13 Jul 2023
    You can use a scalable database that gives you serializable transactions whilst not requiring you to represent your document in the relational model.

    A good example of this architecture would be using FoundationDB [1] with Permazen [2]. In this design there are three layers:

    1. A horizontally scaling sorted transactional K/V store. This is provided by FoundationDB. Transactions are automatically ordered within the cluster.

    2. A network protocol that can serialize database transactions. Permazen has the ability to do this, you can do things like cache reads, HTTP POST transactions and so on. Stuff you can't easily do with SQL databases.

    3. A way to map in-memory objects to/from key/value pairs, with schema migration, indexing and other DB-like features. Permazen also does this.

    Permazen can be thought of as an ORM for KV stores. It's an in-memory library intended to execute on trusted servers (because the KV store can't do any business logic validation). However, for something like Figma where it's basically trusting the client anyway that doesn't matter. Additionally you can do some tricks with the architecture to support untrusted clients; I've explored these topics with Archie (the Permazen designer) in the past.

    The nice thing about this design is that it doesn't require sharding by "file", can scale to large numbers of simultaneous co-authors, and results in a very natural coding model. However, Permazen is a Java library. To use it from a browser would be awkward. That said it has fairly minimal reliance on the JDK. You could probably auto-convert it to Kotlin and then use Kotlin/JS or Kotlin/WASM. But frankly it'd be easier to do that architecture as a real desktop app where you aren't boxed in by the browser's limitations.

    The writeup mentions a couple of reasons for not using a database:

    1. Relational/object mismatch. Permazen+FDB solves this.

    2. Cost of a database vs S3. This is mostly an artifact of cloud pricing. Cloud is highly profitable but most of the margin comes from managed databases and other very high level services, not commodity byte storage. Given that FDB is free you could eliminate the cost gap by just running the database yourself, and especially, running it on your own metal.

    Because Permazen has a pluggable KV backend and because there are backends that write to files, you can have both worlds - a scalable DB in the cloud and also write to files for individual cases where people don't want to store data on your backend.

    https://www.foundationdb.org/ [1]

    https://permazen.io/ [2]

  • FoundationDB: A Distributed Key-Value Store
    13 projects | news.ycombinator.com | 3 Jul 2023
    You can do online schema changes with FDB, it all depends on what you do with the FDB primitives.

    A great example of how to best utilize FDB is Permazen [1], described well in its white paper [2].

    Permazen is a Java library, so it can be utilized from any JVM language e.g. via Truffle you get Python, JavaScript, Ruby, WASM + any bytecode language. It supports any sorted K/V backend so you can build and test locally with a simple disk or in memory impl, or RocksDB, or even a regular SQL database. Then you can point it at FoundationDB later when you're ready for scaling.

    Permazen is not a SQL implementation. Instead it's "language integrated" meaning you write queries using the Java collections library and some helpers, in particular, NavigableSet and NavigableMap. In effect you write and hard code your query plans. However, for this you get many of the same features an RDBMS would have and then some more, for example you get indexes, indexes with compound keys, strongly typed and enforced schemas with ONLINE updates, strong type safety during schema changes (which are allowed to be arbitrary), sophisticated transaction support, tight control over caching and transactional "copy out", constraints and the equivalent of foreign key constraints with better validation semantics than what JPA or SQL gives you, you can define any custom data derivation function for new kinds of "index", a CLI for ad-hoc querying, and a GUI for exploration of the data.

    Oh yes, it also has a Raft implementation, so if you want multi-cluster FDB with Raft-driven failover you could do that too (iirc, FDB doesn't have this out of the box).

    FDB has something a bit like this in its Record layer, but it's nowhere near as powerful or well thought out. Permazen is obscure and not widely used, but it's been deployed to production as part of a large US 911 dispatching system and is maintained.

    Incremental schema evolution is possible because Permazen stores schema data in the K/V store, along with a version for each persisted object (row), and upgrades objects on the fly when they're first accessed.

    [1] https://permazen.io/

    [2] https://cdn.jsdelivr.net/gh/permazen/permazen@master/permaze...

  • Warp: Lightweight Multi-Key Transactions for Key-Value Stores
    5 projects | news.ycombinator.com | 29 May 2022
  • Persism 1.0.1 released - A zero ceremony ORM for Java
    3 projects | /r/java | 2 Mar 2021
    Compare to https://github.com/permazen/permazen ?
  • Introducing Weightless, an extremely easy to use database mapping library for Java
    2 projects | /r/java | 31 Jan 2021
    Did you see https://github.com/permazen/permazen - it's in the same space

moditect

Posts with mentions or reviews of moditect. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-01-29.
  • Java Modules in Real Life
    5 projects | /r/java | 29 Jan 2023
    And then you have to use moditect to generate a module-info.java and this is again because the annotation processor will pick up the provides Processor with YourAnnotationProcessor.
  • Modularization (modular-info.java), maven, and testing misery
    4 projects | /r/java | 6 Jan 2022
    Maybe you've somehow missed https://maven.apache.org/plugins/maven-jlink-plugin/ https://github.com/moditect/moditect https://github.com/beryx/badass-jlink-plugin https://github.com/sormuras/testing-in-the-modular-world
  • JRE & JDK implementation mess
    3 projects | /r/java | 25 Dec 2021
    Yes, you are right. jlink does not work with automatic modules. But using that plugin https://github.com/moditect/moditect you can easily transform almost any java library into a named module. It is a shame there are libraries under development, that have not been adapted to the java modular system.
  • Forking google
    13 projects | /r/java | 20 Nov 2021
  • Minvio - a simple Java graphical app framework.
    5 projects | /r/java | 19 Sep 2021
    FWIW, I've had a lot more issues with reflective access when using GraalVM. Reflection is mainly a problem with modules if you forget to 'open' your modules which is easy to fix in many cases. There's also moditect if the library author still doesn't want to learn how to include a module-info in the legacy compatible jar.
  • Persism 1.0.1 released - A zero ceremony ORM for Java
    3 projects | /r/java | 2 Mar 2021
    Or apply the https://github.com/moditect/moditect plugin and keep the build in JDK8. Let the plugin create the module descriptors without configuring JDK toolchains.
  • Java Modules - are they common and should we use them?
    7 projects | /r/java | 25 Feb 2021
    You can use the https://github.com/moditect/moditect maven plugin to add the module-info to the third-party jars
  • JPMS Migration Playground
    4 projects | dev.to | 17 Feb 2021
    The next solution, which is the one I'm writing about. Is to modularize foo's jar, this is easily accomplished using the moditect plugin. But it can be tricky since I don't have, nor do I need, bar, and I prefer doing most of the work in build time and not manually.
  • Distribution of JVM desktop applications
    4 projects | dev.to | 14 Feb 2021
    It's possible to add this information during one's build even though the procedure is error-prone and boring. The description on how to achieve this deserves a post on its own. For more information, please check this Oracle magazine article. Suffice to say here that it makes heavy use of the Moditect Maven plugin.

What are some alternatives?

When comparing Permazen and moditect you can also consider the following projects:

Doma 2 - DAO oriented database mapping framework for Java 8+

ObjectiveSql - Writing SQL using Java syntax

os-maven-plugin - A Maven plugin that sets various useful properties detected from ${os.name} and ${os.arch} properties.

Persism - A zero ceremony ORM for Java

badass-jlink-plugin - Create a custom runtime image of your modular application

packr - Packages your JAR, assets and a JVM for distribution on Windows, Linux and Mac OS X

piranha - Piranha - a modern cloud runtime

hyhac - A HyperDex Haskell Client

Feather - Lightweight dependency injection for Java and Android (JSR-330)

avaje-inject - Dependency injection via APT (source code generation) ala "Server-Side Dagger DI"

tigris - Tigris is an Open Source Serverless NoSQL Database and Search Platform.

QueryStream - Build JPA Criteria queries using a Stream-like API