Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. moss

moss

NOASSERTIONGo

A simple, fast, ordered, persistable key-value storage library for Go, using an LSM-like design.

GitHubGitHub
1.0k stars63 forks0 contributors

What is moss?

Moss is a Go library that provides a simple, fast, and ordered key-value storage implementation with persistence. It solves the need for an efficient, concurrent, and persistable key-value collection within Go applications, using an LSM-like design with immutable sorted segments.

Target Audience

Go developers building applications that require embedded key-value storage with ordered data, concurrent access, and persistence, such as databases, caching layers, or state management systems.

Value Proposition

Developers choose Moss for its pure Go implementation, non-blocking concurrent reads and writes, efficient snapshot isolation, and flexible persistence options, making it a lightweight yet powerful alternative to heavier storage engines.

Overview

moss - a simple, fast, ordered, persistable, key-val storage library for golang

Use Cases

Best For

  • Embedding a persistent key-value store in Go applications
  • Implementing concurrent data structures with snapshot support
  • Building lightweight databases or storage layers
  • Handling write-heavy workloads with merge operations
  • Creating ordered collections with range iteration
  • Developing educational or experimental storage systems

Not Ideal For

  • Applications requiring complex query languages or SQL-like interfaces beyond key-value lookups
  • Distributed systems needing built-in replication or clustering out of the box
  • Use cases where batch operations frequently include duplicate keys, violating Moss's uniqueness constraint
  • Handling values larger than 268MB due to internal length encoding limitations

Pros & Cons

Pros

Non-blocking Concurrency

Readers and writers operate independently without locks, enabling high throughput in concurrent environments as per the immutable segment stack design.

Efficient Snapshot Isolation

Snapshots provide consistent reads with low overhead by cloning the segment stack, ideal for transactional views without blocking writes.

Write Optimization via Merges

Merge operations allow efficient handling of write-heavy workloads like counters, reducing I/O overhead through read-compute-write optimizations.

Flexible Persistence Options

mossStore offers append-only writes and memory-mapped reads with configurable compaction, and hooks allow integration with external storage like LevelDB or SQLite.

Cons

Batch Key Uniqueness Burden

Each batch must have unique keys, forcing applications to manage this constraint externally, which can complicate logic for some use cases.

Asynchronous Task Dependencies

Performance relies on background merger tasks; if slow or misconfigured, it can stall ingest of new batches, requiring careful tuning of CollectionOptions.

Resource Retention Risks

Long-lived snapshots or iterators can delay reclamation of old segments, potentially leading to increased memory usage and performance degradation.

Frequently Asked Questions

Quick Stats

Stars1,017
Forks63
Contributors0
Open Issues44
Last commit1 year ago
CreatedSince 2016

Tags

#concurrent-access#lsm-tree#storage-engine#go-library#key-value-store#persistent-storage#database-library

Built With

G
Go

Included in

Go169.1k
Auto-fetched 1 day ago

Related Projects

Prometheus.ioPrometheus.io

The Prometheus monitoring system and time series database.

Stars63,873
Forks10,371
Last commit5 days ago
MilvusMilvus

Milvus is a high-performance, cloud-native vector database built for scalable vector ANN search

Stars44,096
Forks3,985
Last commit2 days ago
TiDBTiDB

TiDB is built for agentic workloads that grow unpredictably, with ACID guarantees and native support for transactions, analytics, and vector search. No data silos. No noisy neighbors. No infrastructure ceiling.

Stars40,048
Forks6,179
Last commit3 days ago
cockroachcockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.

Stars32,115
Forks4,119
Last commit1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub