Designed as a lightweight, high-performance alternative for caching and shared state management, Fetis is built to handle massive concurrency for distributed applications and multiplayer game backends.
The core engine for Fetis is fully functional. It successfully handles highly concurrent TCP connections, custom text-protocol parsing, and thread-safe memory mutation.
- Language: Rust (Strictly safe, memory-leak-free concurrency)
- Networking: Tokio (Work-stealing async I/O via
epoll) - Storage Engine:
Arc<RwLock<HashMap>>(Permits infinite simultaneous readers and safely isolated writes)
Fetis communicates over raw TCP. The engine currently supports the following operations:
| Command | Description | Example |
|---|---|---|
PING |
Health check. Server responds with PONG. |
PING\r\n |
SET |
Stores a string value under a specific key. | SET username Countless\r\n |
GET |
Retrieves the value associated with a key. | GET username\r\n |
GET all |
Diagnostic: Dumps the entire server state. | GET all\r\n |
DEL |
Deletes a key-value pair from memory. | DEL username\r\n |
Clone the repository and run the server using Cargo. By default, Fetis binds to 127.0.0.1:8080.
cargo runOptional: You can provide a custom port as a command-line argument:
cargo run 9000Because Fetis uses a custom raw text protocol, you can interact with it using Netcat (nc).
Note: Use the -C flag (OpenBSD netcat) to ensure your terminal sends the required \r\n line endings.
nc -C 127.0.0.1 8080Once connected, send commands directly to the engine:
SET studio Countless
Done
GET studio
Countless
PING
PONG
This project is licensed under the MIT License - see the LICENSE file for details.