ATM is a lightweight, high-performance in-memory database written in Go, designed to provide key-value storage similar to Redis. It supports efficient storage and retrieval of data, enabling developers to build fast and scalable applications.
- Key-Value Storage: Store and retrieve data with ease using a simple key-value mechanism.
- High Performance: Built for speed with an emphasis on low-latency data operations.
- Concurrency: Leverages Go’s concurrency model for handling multiple requests simultaneously.
- Persistence (Optional): Support for saving in-memory data to disk for durability.
- Minimal Dependencies: Built using Go's standard library for simplicity and reliability.
- Extensible Protocol: Easily add new features or integrate with existing systems.
-
Clone the repository:
git clone https://github.com/teamcutter/atm.git cd atm -
Build the application:
go build
-
Run the server:
./atm -pass 12345 -login user -p :8001
-
Start the server:
Run the ATM server as described above. -
Interact with the database:
Use any TCP client (e.g.,netcator custom tools) to interact with the server. Example commands:-
Set a key-value pair:
SET mykey myvalue
-
Retrieve a value by key:
GET mykey
-
Delete a key:
DEL mykey
You can also use client:
- Simply run:
go run cmd/client/main.go
- Make http request:
localhost:8080/set/key/value localhost:8080/get/key localhost:8080/del/key
-
-
Custom Protocol:
The server communicates using a lightweight, custom protocol for simplicity and efficiency.