Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryandotsmith/sfdb
bdb experiment
https://github.com/ryandotsmith/sfdb
Last synced: about 2 months ago
JSON representation
bdb experiment
- Host: GitHub
- URL: https://github.com/ryandotsmith/sfdb
- Owner: ryandotsmith
- Created: 2013-05-27T01:48:33.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-07-24T18:46:41.000Z (over 11 years ago)
- Last Synced: 2024-10-13T17:47:20.075Z (3 months ago)
- Language: C
- Homepage:
- Size: 164 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
SFDB
Wire Protocol
Plain text, length prefixed.
LengthVersionCommandIdBody
^ ^ ^ ^ ^
| | | | |
| | | | |
| | | | |Max 976.562 KB
| | | |
| | | |36 bytes
| | |
| | |1 byte
| |
| |1 byte
|
|6 bytesVersion
1Command
Request
p - Put
g - Get
c - Compare & SetReply
s - Success
e - Error
r - Redirect
IdUUID
Body
Array of bytes up to ~976KB.Put
Synopsis:Write the supplied value to the key identified by the request id.
Example:
> 0000581p533cf115-4ffc-4a97-a6eb-4c711645760c{\"hello\": \"world\"}
< 0000401s533cf115-4ffc-4a97-a6eb-4c711645760c> 0000581p533cf115-4ffc-4a97-a6eb-4c711645760c{\"hello\": \"world\"}
< 0000531m533cf115-4ffc-4a97-a6eb-4c711645760c0.0.0.0:1234> 0000581p533cf115-4ffc-4a97-a6eb-4c711645760c{\"hello\": \"world\"}
< 0000541e533cf115-4ffc-4a97-a6eb-4c711645760cStorage full.Get
Synopsis:
Retrieve the value of the supplied key. Response includes the key.
Example:
> 0000401g533cf115-4ffc-4a97-a6eb-4c711645760c
< 0000591s533cf115-4ffc-4a97-a6eb-4c711645760c{\"hello\": \"world\"}Compare & Set
Synopsis:
Write data to a key if the current value of the key matches
the expected value supplied by the client; otherwise return an error.
The body of the request must contain length prefixed values.When operation fails due to invalid expectation, the body
of the response contains 2 length prefixed values: expected, actual.Example:
> 0000421c533cf115-4ffc-4a97-a6eb-4c711645760c1011
< 0000391s533cf115-4ffc-4a97-a6eb-4c711645760c1> 0000421c533cf115-4ffc-4a97-a6eb-4c711645760c1112
< 0000391s533cf115-4ffc-4a97-a6eb-4c711645760c2> 0000421c533cf115-4ffc-4a97-a6eb-4c711645760c1112
< 0000421e533cf115-4ffc-4a97-a6eb-4c711645760c1112Client Libraries
Ruby - https://github.com/ryandotsmith/sfdb-rb