caleberi / bitcask

A simple implementation of bitcask storage engine with a tcp wrapper with python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bitcask Server and Database

Overview

This project implements a simple TCP server using a Bitcask-inspired database for handling key-value store operations. The server supports basic commands such as SET, GET, and DELETE.

Features

  • SET: Store a key-value pair in the database.
  • GET: Retrieve the value associated with a key.
  • DELETE: Remove a key-value pair from the database.

Requirements

  • Python 3.11 or later
  • bitcaskdb module (ensure it's accessible within your project or install if available)

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/bitcask-server.git
    cd bitcask-server
  2. Install dependencies:

    pip install -r requirements.txt
  3. Run the server:

    python main.py

Usage

Server

To start the server, run:

python main.py

Client

You can use any TCP client to interact with the server. Here is an example using telnet:

  1. Connect to the server:
telnet localhost 9999
  1. Commands:
  • SET:
SET key value
  • GET:
GET key
  • DELETE:
DELETE key

About

A simple implementation of bitcask storage engine with a tcp wrapper with python

License:MIT License


Languages

Language:Python 100.0%