Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version: 0.1

cli:
version: 1.22.9
version: 1.22.10

plugins:
sources:
Expand All @@ -18,20 +18,20 @@ runtimes:

lint:
enabled:
- renovate@39.149.0
- renovate@39.164.1
- [email protected]
- [email protected].4
- [email protected].5
- [email protected]
- [email protected].360
- [email protected].369
- git-diff-check
- [email protected]
- [email protected]
- prettier@3.4.2:
- prettier@3.5.0:
packages:
- "@mintlify/[email protected]"
- [email protected]
- [email protected].0
- [email protected].4
- [email protected].1
- [email protected].5
- [email protected]
ignore:
- linters: [ALL]
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ documentation for the open source projects that Hypermode leads:

- [Modus](https://github.com/hypermodeinc/modus) - serverless framework for
building functions and APIs, powered by WebAssembly
- [Dgraph](https://github.com/dgraph-io/dgraph) - distributed, transactional
- [Dgraph](https://github.com/hypermodeinc/dgraph) - distributed, transactional
graph database for real-time use cases
- [Badger](https://github.com/dgraph-io/badger) - embeddable key-value store in
Go
- [Ristretto](https://github.com/dgraph-io/ristretto) - embeddable memory-bound
cache in Go
- [Badger](https://github.com/hypermodeinc/badger) - embeddable key-value store
in Go
- [Ristretto](https://github.com/hypermodeinc/ristretto) - embeddable
memory-bound cache in Go

## Found an issue?

Expand Down
62 changes: 62 additions & 0 deletions badger/design.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
title: Design
description: Architected for fast key-value storage in Go
"og:title": "Design - Badger"
---

We wrote Badger with these design goals in mind:

- Write a key-value database in pure Go
- Use latest research to build the fastest KV database for data sets spanning
terabytes
- Optimize for modern storage devices

Badger’s design is based on a paper titled

Check failure on line 14 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] In general, use active voice instead of passive voice ('is based').
[WiscKey: Separating Keys from Values in SSD-conscious Storage](https://www.usenix.org/system/files/conference/fast16/fast16-papers-lu.pdf).

Check failure on line 15 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] ': S' should be in lowercase.

Check failure on line 15 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Spell out 'SSD', if it's unfamiliar to the audience.

## References

The following blog posts are a great starting point for learning more about
Badger and the underlying design principles:

- [Introducing Badger: A fast key-value store written natively in Go](https://dgraph.io/blog/post/badger/)
- [Make Badger crash resilient with ALICE](https://dgraph.io/blog/post/alice/)

Check failure on line 23 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Spell out 'ALICE', if it's unfamiliar to the audience.
- [Badger vs LMDB vs BoltDB: Benchmarking key-value databases in Go](https://dgraph.io/blog/post/badger-lmdb-boltdb/)

Check failure on line 24 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Spell out 'LMDB', if it's unfamiliar to the audience.
- [Concurrent ACID Transactions in Badger](https://dgraph.io/blog/post/badger-txn/)

Check failure on line 25 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Spell out 'ACID', if it's unfamiliar to the audience.

## Comparisons

| Feature | Badger | RocksDB | BoltDB |
| ----------------------------- | -------------------------------------- | ---------------------------- | ------- |
| Design | LSM tree with value log | LSM tree only | B+ tree |

Check failure on line 31 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Spell out 'LSM', if it's unfamiliar to the audience.

Check failure on line 31 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Spell out 'LSM', if it's unfamiliar to the audience.
| High Read throughput | Yes | No | Yes |
| High Write throughput | Yes | Yes | No |
| Designed for SSDs | Yes (with latest research<sup>1</sup>) | Not specifically<sup>2</sup> | No |

Check failure on line 34 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Did you really mean 'SSDs'?
| Embeddable | Yes | Yes | Yes |

Check failure on line 35 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Use 'embeddable' instead of 'Embeddable'.
| Sorted KV access | Yes | Yes | Yes |
| Pure Go (no Cgo) | Yes | No | Yes |

Check failure on line 37 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Did you really mean 'Cgo'?
| Transactions | Yes | Yes | Yes |
| ACID-compliant | Yes, concurrent with SSI<sup>3</sup> | No | Yes |

Check failure on line 39 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Spell out 'ACID', if it's unfamiliar to the audience.

Check failure on line 39 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Spell out 'SSI', if it's unfamiliar to the audience.
| Snapshots | Yes | Yes | Yes |
| TTL support | Yes | Yes | No |

Check failure on line 41 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Spell out 'TTL', if it's unfamiliar to the audience.
| 3D access (key-value-version) | Yes<sup>4</sup> | No | No |

<sup>1</sup> The WiscKey paper (on which Badger is based) saw big wins with

Check failure on line 44 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] In general, use active voice instead of passive voice ('is based').
separating values from keys, significantly reducing the write amplification
compared to a typical LSM tree.

Check failure on line 46 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Spell out 'LSM', if it's unfamiliar to the audience.

<sup>2</sup> RocksDB is an SSD-optimized version of LevelDB, which was designed

Check failure on line 48 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Spell out 'SSD', if it's unfamiliar to the audience.

Check failure on line 48 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] In general, use active voice instead of passive voice ('was designed').
specifically for rotating disks. As such RocksDB's design isn't aimed at SSDs.

Check failure on line 49 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Did you really mean 'SSDs'?

<sup>3</sup> SSI: Serializable Snapshot Isolation. For more details, see the

Check failure on line 51 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Spell out 'SSI', if it's unfamiliar to the audience.

Check failure on line 51 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] ': S' should be in lowercase.
blog post [Concurrent ACID Transactions in

Check failure on line 52 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Spell out 'ACID', if it's unfamiliar to the audience.
Badger](https://dgraph.io/blog/post/badger-txn/)

<sup>4</sup> Badger provides direct access to value versions via its Iterator
API. Users can also specify how many versions to keep per key via Options.

## Benchmarks

We've run comprehensive benchmarks against RocksDB, BoltDB, and LMDB. The

Check failure on line 60 in badger/design.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Spell out 'LMDB', if it's unfamiliar to the audience.
benchmarking code with detailed logs are in the
[badger-bench](https://github.com/dgraph-io/badger-bench) repo.
19 changes: 19 additions & 0 deletions badger/overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: Overview
description: Welcome to the Badger docs!
mode: "wide"
"og:title": "Overview - Badger"
---

## What is Badger? {/* <!-- vale Google.Contractions = NO --> */}

Check failure on line 8 in badger/overview.mdx

View check run for this annotation

Trunk.io / Trunk Check

vale(error)

[new] Use 'what's' instead of 'What is'.

BadgerDB is an embeddable, persistent, and fast key-value (KV) database written
in pure Go. It's the underlying database for [Dgraph](https://dgraph.io), a
fast, distributed graph database. It's meant to be an efficient alternative to
non-Go-based key-value stores like RocksDB.

## Changelog

We keep the
[repo Changelog](https://github.com/hypermodeinc/badger/blob/main/CHANGELOG.md)
up to date with each release.
Loading