80x improvements in caching by moving from JSON to gob

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • msgp

    A Go code generator for MessagePack / msgpack.org[Go]

    Meanwhile, encoding/gob is still slow. For real speed, see e.g. https://github.com/tinylib/msgp

  • decimal

    Arbitrary-precision fixed-point decimal numbers in go

    I make heavy use of caching, and was caching both in-memory and in Redis using JSON to convert the data in to a string. The struct itself isn't super complicated, one level nested, and some fields use the shopspring/decimal library.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • go_serialization_benchmarks

    Benchmarks of Go serialization methods

  • cbor

    CBOR codec (RFC 8949) with CBOR tags, Go struct tags (toarray, keyasint, omitempty), float64/32/16, big.Int, and fuzz tested billions of execs.

    If you need to support non-Go code I suggest you explore CBOR. There are a few implementations in Go but his is my favorite.

  • encoding

    Go package containing implementations of efficient encoding, decoding, and validation APIs.

    Binary formats work well for some cases but JSON is often unavoidable since it is so widely used for APIs. However, you can make it faster in golang with this https://github.com/segmentio/encoding.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts