Skip to content
New issue

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

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

Already on GitHub? # to your account

(Un-)marshal to/from gobs as alternative to JSON #22

Closed
philippgille opened this issue Nov 10, 2018 · 0 comments
Closed

(Un-)marshal to/from gobs as alternative to JSON #22

philippgille opened this issue Nov 10, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@philippgille
Copy link
Owner

Currently all gokv.Store implementations in this repo (un-)marshal to/from JSON. This is nice because:

  1. In case a distributed store is used, other applications can easily work with the same data (e.g. a Java web service can get a value from Redis and deal with the JSON with a simple JSON library)
  2. When you want to examine some values manually you can use some client (like some web admin dashboard for Redis for example) and see and understand the data without having to decode anything

But:

  1. The marshalled JSON data is probably bigger than gob in its size
  2. According to the gob documentation the (un-)marshalling to/from gob is extremely fast, so using gob should improve the (un-)marshalling performance

So: Implement gob as alternative to JSON for (un-)marshalling for all currently existing gokv.Store implementations in this repo. Make this optional (via the Options struct in each implementation package)!

The issue already existed back when gokv was still part of ln-paywall as package storage, so maybe have a look at the issue created for that repo as well: philippgille/ln-paywall#32

@philippgille philippgille added the enhancement New feature or request label Nov 10, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant