Skip to content

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

@philippgille

Description

@philippgille

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions