Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CBOR as a storage format for the JSON data type #1871

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

PragmaTwice
Copy link
Member

@PragmaTwice PragmaTwice commented Nov 3, 2023

In this PR, CBOR is used as a storage format alternative (written to/read from hard drive) for the JSON data type (RedisJSON).

CBOR (RFC 8949) is a binary data format compatible to the JSON data model, hence it has more efficient encoding/decoding performance and more compact data size.

From my observation and simple benchmarking, using CBOR instead of JSON as a storage format and JSON document testing datasets from RedisJSON, kvrocks speed up its performance of JSON.GET and JSON.SET by ~5%, and its storage usage is reduced by more than 10%.

NOTE: The default storage format of JSON data type is still JSON.

@PragmaTwice PragmaTwice requested a review from git-hulk November 3, 2023 11:35
Copy link

sonarqubecloud bot commented Nov 3, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
4.0% 4.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@git-hulk
Copy link
Member

git-hulk commented Nov 3, 2023

kvrocks speed up its performance of JSON.GET and JSON.SET by ~5%, and its storage usage is reduced by more than 10%.

wow, that's cool

@PragmaTwice PragmaTwice merged commit 80b493c into apache:unstable Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants