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
.
- 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.
- Python 3.11 or later
bitcaskdb
module (ensure it's accessible within your project or install if available)
-
Clone the repository:
git clone https://github.com/yourusername/bitcask-server.git cd bitcask-server
-
Install dependencies:
pip install -r requirements.txt
-
Run the server:
python main.py
To start the server, run:
python main.py
You can use any TCP client to interact with the server. Here is an example using telnet:
- Connect to the server:
telnet localhost 9999
- Commands:
- SET:
SET key value
- GET:
GET key
- DELETE:
DELETE key