Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rvarago/toy-storage-rs
A toy storage implemented in Rust purely for learning
https://github.com/rvarago/toy-storage-rs
network protocol rust
Last synced: about 15 hours ago
JSON representation
A toy storage implemented in Rust purely for learning
- Host: GitHub
- URL: https://github.com/rvarago/toy-storage-rs
- Owner: rvarago
- License: mit
- Created: 2020-11-28T02:00:01.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-23T10:02:44.000Z (over 3 years ago)
- Last Synced: 2023-03-05T07:41:58.722Z (almost 2 years ago)
- Topics: network, protocol, rust
- Language: Rust
- Homepage:
- Size: 44.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A **toy** in-memory storage
This is a toy in-memory storage server with data exchanged over the network.
> DISCLAIMER: This is nothing more than a self-contained **playground** project for having some fun while learning Rust.
## Wire Protocol
This is a request-response protocol over TCP, where the client initiates an exchange by sending a request to the server which then sends a response back to the client.
Messages (request/response) are line-delimited.
### SET
- Request: `SET \n`
- Response: `OKAY \n`
### GET- Request: `GET \n`
- Response (Success): `OKAY \n`
- Response (Failure): `FAIL \n`## Example Session
By simulating a client as an `nc` instance:
```bash
λ nc 127.0.0.1 8080
GET rafael
FAIL rafael
SET rafael 123
OKAY rafael
GET rafael
OKAY rafael 123
```