moodb

module
v0.0.0-...-8ad9259 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2021 License: GPL-3.0

README

MooDB(mdb)

A simple persistent key-value database implemented in Go.

Offers a simple Write-Ahead-Logging (WAL) implementation that allows data restore across session.

Blog: https://kakku.org/writing-a-simple-database/

Run

Prerequisite
  • Make sure you have protocolbuffer installed

  • Make sure Go 1.17.x is installed

  • Make sure you have Go installed and $GOPATH set

    • Check echo $GOPATH returns a valid path
  • Clone repository git clone https://github.com/amitt001/moodb.git

  • cd moodb

  1. Run build: make build
  2. Run server: go run cmd/server/main.go -logtostderr=true
  3. Open a new terminal window and run client: go run mdbcli/*.go

Commands

In the client shell

MooDB version 0.0.1
o> set name Amit
Inserted 1
o> get name
Amit
o> del name
Deleted 1
o> get name

WAL

To just install write-ahead log Wal module can be used separately.

go get "github.com/amitt001/moodb/wal"

Directories

Path Synopsis
Package client implements a client for MdbServer
Package client implements a client for MdbServer
cmd
Package memtable contains implementation of key-value store
Package memtable contains implementation of key-value store

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL