77a7eb3d48fb746c3c2d56164141f0ed4dd03227
David Blume Improve the documentation a...

David Blume authored 7 years ago

1) # Key Value Store
David Blume first commit

David Blume authored 7 years ago

2) 
David Blume Trying a little humor in th...

David Blume authored 7 years ago

3) kvs is an artisanal, hand-crafted online key/value store sourced by a California native.
4) It is written in Python and yet harkens back to a simpler era before Redis and Riak.
David Blume first commit

David Blume authored 7 years ago

5) 
David Blume Document the ACID propertie...

David Blume authored 7 years ago

6) ## Dependencies and Guarantees
7) 
David Blume Mention the format of the b...

David Blume authored 7 years ago

8) kvs uses a local file for its backing store, and stores the data in the human-friendly
dblume Update http to https in REA...

dblume authored 1 year ago

9) [YAML](https://yaml.org/) format. Its ACID properties are as follows:
David Blume Document the ACID propertie...

David Blume authored 7 years ago

10) 
11) * **Atomicity**: Either all tuples in a transaction are successfully saved or none are.
dblume Update http to https in REA...

dblume authored 1 year ago

12) * **Consistency**: Only valid states are saved, and saves are atomic.
David Blume Document the ACID propertie...

David Blume authored 7 years ago

13) * **Isolation**: All transactions are serialized.
14) * **Durability**: System failure or restart won't break the store. Store writes are atomic.
15) 
David Blume first commit

David Blume authored 7 years ago

16) # Getting the project
17) 
18) You can get a copy of this project by clicking on the
dblume Update http to https in REA...

dblume authored 1 year ago

19) [ZIP](https://git.dlma.com/kvs.git/zipball/main)
20) or [TAR](https://git.dlma.com/kvs.git/tarball/main) buttons
David Blume first commit

David Blume authored 7 years ago

21) near the top right of the GitList web page.
22) 
23) If you're me, and you want to contribute to the repo, then you can clone it like so:
24) 
25)     git clone ssh://USERNAME@dlma.com/~/git/kvs.git
26) 
27) # Building it
28) 
David Blume Mention the format of the b...

David Blume authored 7 years ago

29) 1. Enable Python pages at your web server. See [How to use Python in the web](https://docs.python.org/2/howto/webservers.html#).
30)    My configuration is for Apache, hence the .htaccess file.
31) 2. Move auth\_sample.txt to auth.txt, and replace `yourauthorizationhere` with a passcode you choose.
32)    chmod 600 the file or deny access to it via .htaccess.
David Blume Fix a typo.

David Blume authored 7 years ago

33) 3. Optional: Use secure HTTP. I recommend getting a free SSL certificate from [Let's Encrypt](https://letsencrypt.org/).
David Blume Improve the documentation a...

David Blume authored 7 years ago

34) 4. If you don't have the YAML module, pip install pyyaml.
David Blume first commit

David Blume authored 7 years ago

35) 
David Blume Improve the documentation a...

David Blume authored 7 years ago

36) # Using it
David Blume first commit

David Blume authored 7 years ago

37) 
dblume Update http to https in REA...

dblume authored 1 year ago

38) Here is [a live instance that serves an index page](https://kvs.dlma.com/).
David Blume Mention the format of the b...

David Blume authored 7 years ago

39) You can send a key to get a value like so:
David Blume Improve the documentation a...

David Blume authored 7 years ago

40) 
41)     https://kvs.dlma.com/?k=1GM35N000010
42) 
David Blume Mention the format of the b...

David Blume authored 7 years ago

43) Special use case, here's how to get the value for the most-recently updated key of a
44) list of keys. The list could contain any number of keys, but only one value will be returned.
David Blume Improve the documentation a...

David Blume authored 7 years ago

45) 
46)     https://kvs.dlma.com/?k=1GM35N000010,1GU44N010910
David Blume first commit

David Blume authored 7 years ago

47) 
dblume Update http to https in REA...

dblume authored 1 year ago

48) Here's the recipe for a cURL command to store a new value for a key:
David Blume first commit

David Blume authored 7 years ago

49) 
David Blume Improve the documentation a...

David Blume authored 7 years ago

50)     curl --data "key=value&auth={authorization}" https://{url}
51) 
dblume Update http to https in REA...

dblume authored 1 year ago

52) Here's [the source code for a Roku channel client of such a service](https://git.dlma.com/roku_ip_tagger.git/).
David Blume Improve the documentation a...

David Blume authored 7 years ago

53) 
54) # Is it any good?
55) 
56) [Yes](https://news.ycombinator.com/item?id=3067434).
David Blume first commit

David Blume authored 7 years ago

57) 
58) # Licence
59)