[Java] Permazen key/value store adapter updated

So great to see FoundationDB come back to life. FoundationDB was part of the original inspiration for Permazen, so I’m really happy to see it working again.

For anyone interested in using FoundationDB with Java, I’ve updated the Permazen key/value store to fdb-java release 5.1.5. Enjoy.

-Archie

1 Like

Thanks a lot for your project! I discovered JSimpleDB/Permazen today while researching FoundationDB since its open source release. I must say that I have been blown so far though yet to read the paper - just going through the higher-level documentation right now. I’m wondering about the overall performance impact of the layers that Permazen adds on top of the underlying database - especially for FDB - does it just pass-through as FDB supports most features.

TL;DR Thanks and I’m curious about the overall performance overhead - do you have any benchmarks you could share for the FDB backend.

I don’t have any formal benchmarks, but here are some practical observations…

If the database layer involves any network communication, then the time spent in Permazen is usually dwarfed by the time spent in the database layer. This is due to the fact that in general, moving around bits in memory is a lot faster than moving around bits across the network.

Permazen tends to generate a larger number of smaller volume database accesses than e.g. JPA. For example, with ORM solutions you typically read all of the non-collections properties of an object at once (in a single table row), whereas Permazen reads each field “on demand” individually. In addition, with ORM solutions SQL not only serves as a query language but also as a way to effectively batch up requests and responses, which saves time when the database has high access latency (e.g., over a network).

So for these reasons, from a performance perspective, Permazen works best with underlying databases that have low latency for access. Consider for example what persistence layer you’d want to use in a system with a fast local persistent memory (e.g., see this).

There is a key/value caching layer that somewhat helps with higher latency databases, but what would help more is an analogous ability to “batch” query the database. This is something being worked on.

Like with a lot of software, there is a spectrum of trade-offs from performance to conceptual elegance. Permazen is definitely an attempt to think about the latter side of that spectrum in the persistence domain.

Thank you for your detailed reply :+1:

I do understand the trade-offs you’ve mentioned wrt network vs memory. My query was more specific to the database accesses with the FDB backend as I’m looking to utilizing this for a distributed app architecture.

AW, guess I’ll dig into fdb-kv/FoundationKVDatabase further and raise doubts in Permazen group.