Crates.io | twinkled |
lib.rs | twinkled |
version | 0.1.2 |
source | src |
created_at | 2019-12-14 11:24:33.389418 |
updated_at | 2019-12-18 04:09:30.907568 |
description | UDP-based, light key-value store |
homepage | |
repository | https://github.com/kirisaki/twinkle |
max_upload_size | |
id | 189335 |
size | 47,208 |
UDP-based, light key-value store.
Use docker. Remenber to open UDP port.
$ docker run -d -p 3000:3000/udp kirisaki:twinkle
Docker repositry is https://hub.docker.com/repository/docker/kirisaki/twinkle
The protcol of twinkle is quiet simple. Only send binary messages expressed following. Its byte-order is big endian.
0 7 8 15 16 23 24 31
+--------+--------+--------+--------+
| 0x01 | UUID
| |
+--------+--------+--------+------...
|
|
...------+
0 7 8 15 16 23 24 31
+--------+--------+--------+--------+
| 0x01 | UUID
| |
+--------+--------+--------+------...
|
|
...------+
0 7 8 15 16 23 24 31
+--------+--------+--------+--------+
| 0x02 | UUID
| |
+--------+--------+--------+------...
| Key |
| Length | key octets ...
...------+-----------------+-----...
0 7 8 15 16 23 24 31
+--------+--------+--------+--------+
| 0x01 | UUID
| |
+--------+--------+--------+------...
|
| value octets
...------+--------+------...
0 7 8 15 16 23 24 31
+--------+--------+--------+--------+
| 0x02 | UUID
| |
+--------+--------+--------+------...
|
|
...------+
0 7 8 15 16 23 24 31
+--------+--------+--------+--------+
| 0x03 | UUID
| |
+--------+--------+--------+------...
| Key |
| Length | key octets ...
...------+-----------------+-----...
|
| value octets ...
...------+--------------...
0 7 8 15 16 23 24 31
+--------+--------+--------+--------+
| 0x01 | UUID
| |
+--------+--------+--------+------...
|
|
...------+
0 7 8 15 16 23 24 31
+--------+--------+--------+--------+
| 0x04 | UUID
| |
+--------+--------+--------+------...
| Key |
| Length | key octets ...
...------+-----------------+-----...
0 7 8 15 16 23 24 31
+--------+--------+--------+--------+
| 0x01 | UUID
| |
+--------+--------+--------+------...
|
|
...------+