Stop Using JPA/Hibernate

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • FrameworkBenchmarks

    Source for the TechEmpower Framework Benchmarks project

    I included the steady state for quarkus because its memory usage (perhaps due to a config flag starting it with a 4GiB heap?) started out extremely high and decreased over the course of the run. That likely affects the standard deviation, which I included to highlight that I didn't try to cherry-pick results.

    Perhaps the funniest thing to me digging into it is, again due to the absurdity of Java's design decisions, to make sure that "Integer" objects are efficient, the Java benchmarks use the command line parameter "-Djava.lang.Integer.IntegerCache.high=10000". This tells you that if the benchmark used a wider range of random values[5], performance would degrade. Have you ever heard of a language requiring an integer cache? It's absurd to me that Java, rather than implement value types, requires Integers to be interned for performance.

    Are there any other languages in the TechEmpower benchmark or the Debian benchmark game (formerly went by another name) that requires setting an "IntegerCache" to optimize... allocating integers? I mean, come on. You can't tell me this is a language that was designed for performance when integers can't be directly stored in arrays and instead have to be autoboxed and a cache is needed to intern them!

    [1] Raw results from https://tfb-status.techempower.com/unzip/results.2021-01-13-...

    [2] - You can see they have simply hardcoded the SQL. See: https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...

    [3] https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...

    [4] https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...

    [5] The update benchmark only requires random numbers between 1 and 10,000. Performance of Java apps would degrade if they were asked to use boxed integers greater than 10,000, which is possibly the most absurd statement I have said of any programming language ever. See: https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Proj...

  • ksuid

    K-Sortable Globally Unique IDs

    How is SEQUENCE different from AUTO_INCREMENT if you have only a single writeable db instance? If you dump & restore a table with SEQUENCE values as IDs, does the restored DB have the same IDs, or are they generated anew on restore?

    Also, SSN is a terrible key [1] and getting uniqueness without central coordination can be done with UUIDv4 or ksuid [2], as long as you have a reasonably trustworthy source of randomness

    [1] https://news.ycombinator.com/item?id=26776092

    [2] https://github.com/segmentio/ksuid/blob/master/README.md

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • zeidon-joe

    Zeidon Java Object Engine and related projects.

    Shameless plug : for a little while now I've been working on a project with others to try a different approach. We use a higher level abstraction that does a better job of modeling the data than language-level objects. This eliminates the impedance mismatch. Because it's not language dependent you can use the same models (we call them "logical objects") with multiple languages.

    The logical objects are hierarchical and serialize easily to JSON and back, making it simple to write REST interfaces. There are a couple of production teams making good use of it.

    Github repo is here; feel free to contact me about it: https://github.com/zeidon/zeidon-joe

  • ObjectiveSync

    A thin Java object persistence layer for JDBC

    "Bad practice - if you hide the database, you may get something done quickly, but it's a bad idea. If your Java code expects to have a collection of one million objects as an array, it does not matter if they are lazily loaded or not - some code somewhere might want to iterate over them, and this will kill the process. You cannot really forget that there is a database somewhere, and you should not do it."

    https://github.com/l3nz/ObjectiveSync

  • OrmLite

    Core ORMLite functionality that provides a lite Java ORM in conjunction with ormlite-jdbc or ormlite-android

    Have you ever tried - ormlite-core[1]?

    I recently found this obscure but quite stable library, kind of fell in love with it.

    [1] https://github.com/j256/ormlite-core

  • Ebean ORM

    Ebean ORM

    I wouldn't call it micro, but https://ebean.io/ is pretty nice.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts