zio-lmdb icon indicating copy to clipboard operation
zio-lmdb copied to clipboard

Allow for custom serialization layers

Open sirthias opened this issue 1 year ago • 1 comments
trafficstars

We are using LMDB as the primary persistence layer for a number of small to medium sized applications and are thus looking into zio-ldmb. In principle it fits our bill quite well with one big exception: We are serializing all our data to CBOR rather than JSON (using borer).

It seems to us that a layer like zio-lmdb should be agnostic to the serialization logic rather than hard-wired to JSON. How hard would it be to introduce another type-class layer (for example) abstracting over the (de)serialization logic? zio-json could still be the default, if need be, but it'd be great if we could plug our own custom or alternative implementation.

sirthias avatar Feb 08 '24 13:02 sirthias

Hello, thanks for your feedback, and what you describe is a new need I also have right now :) Going to explore and prototype this.

dacr avatar Mar 01 '24 11:03 dacr

LMDBCodec type class added, still have to work on scala 2.13 support and check developer experience related to this change not yet fully happy with this implementation

dacr avatar Apr 05 '25 10:04 dacr

scala 3 is mature enough for a while now, scala 2.13 support removed

dacr avatar Apr 06 '25 20:04 dacr