AspadaX / AspadaX/memvdb

Use CBOR for database persistance?

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Hi there,

I love this crate - I've done some experimentation between using JSON vs using CBOR as the database persistence format, and I've decided to use CBOR within my own application for several reasons:

1. Database size: CBOR is about 1/5th the size of JSON when storing memvdb databases
2. Loading / Saving speed: CBOR is about twice as fast for saving / loading database
3. CBOR is an IETF standard just like JSON ([RFC 8949](https://www.rfc-editor.org/rfc/rfc8949.html)).
4. CBOR is considered the "successor" to JSON

I'm using the `serde_cbor` crate.

It might be a good idea to move to CBOR as the default serialization format for the above reasons - but ultimately, since memvdb generically supports serde, it could also be left up to users.

More information about CBOR can be found here: https://cbor.io/

Contributor guide

No contributing guide indexed for this repository

Research direction

No files, tests, or entry points are identified. First review how memvdb currently serializes and persists databases, then compare the implications of making CBOR via serde_cbor the default versus leaving serialization to users. Done requires a decided scope and an agreed persistence-format change.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.