GoStore is a simple, modular, and extensible key-value storage engine written in Go. It supports basic database and table management, as well as key-value operations, and provides both a command-line interface (CLI) and a TCP server/client for remote access.
- Create Database: Create new logical databases.
- Create Table: Create tables within databases with configurable block size and total blocks.
- Put: Store key-value pairs in a specific table.
- Get: Retrieve values by key from a specific table.
- CLI: Interactive command-line interface for local management.
- TCP Server/Client: Networked access to the storage engine.
"Available commands:\n"
welcomeMsg += " Create db <database-name>\n"
welcomeMsg += " Create table <table-name> --db=<database> [--block-size=<size>] [--total-blocks=<blocks>]\n"
welcomeMsg += " Get <database> <table> <key>\n"
welcomeMsg += " Put <database> <table> <key> <value>\n"
welcomeMsg += " help - Show this help\n"
welcomeMsg += " quit - Close connection\n"
- Go 1.18 or higher
Clone the repository: https://github.com/mahadev-k/gostore.git
To build the TCP server:
cd cmd/storage_engine/server
go run main.go
To start the client:
$ go run cmd/storage_engine/client/main.go localhost:8080