https://github.com/amitt001/moodb
A Simple & Efficient Implementation of a Small Database in Go 🐮
https://github.com/amitt001/moodb
database db go
Last synced: 2 months ago
JSON representation
A Simple & Efficient Implementation of a Small Database in Go 🐮
- Host: GitHub
- URL: https://github.com/amitt001/moodb
- Owner: amitt001
- License: gpl-3.0
- Created: 2019-07-09T18:51:02.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-09-21T20:25:50.000Z (almost 5 years ago)
- Last Synced: 2025-12-29T14:18:08.340Z (6 months ago)
- Topics: database, db, go
- Language: Go
- Homepage:
- Size: 64.5 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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
- https://grpc.io/docs/protoc-installation/
- Verify `protoc --help`
- Make sure Go 1.17.x is installed
- https://golang.org/dl/
- Verify `go version`
- 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"`