Permazen VS weightless-orm

Compare Permazen vs weightless-orm and see what are their differences.

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
Permazen weightless-orm
10 1
397 23
1.3% -
9.2 2.1
3 months ago 7 months 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

weightless-orm

Posts with mentions or reviews of weightless-orm. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-01-31.

What are some alternatives?

When comparing Permazen and weightless-orm you can also consider the following projects:

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

ObjectiveSql - Writing SQL using Java syntax

Persism - A zero ceremony ORM for Java

hyhac - A HyperDex Haskell Client

moditect - Tooling for the Java Module System

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

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

peritext - A CRDT for asynchronous rich-text collaboration, where authors can work independently and then merge their changes.

foundationdb - FoundationDB - the open source, distributed, transactional key-value store

datascript - Immutable database and Datalog query engine for Clojure, ClojureScript and JS

relic - Functional relational programming for Clojure(Script).

fdb-kubernetes-operator - A kubernetes operator for FoundationDB