asb / lua-tinycdb
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (2)
- Wiki (1)
- Graphs
-
Tree:
f5ea285
lua-tinycdb / README.mkd
| 3afe61bc » | asb | 2008-07-28 | 1 | # lua-tinycdb | |
| 2 | |||||
| 3 | A binding to the [tinycdb](http://www.corpit.ru/mjt/tinycdb.html) library by | ||||
| 4 | Michael Tokarev, which is a public domain implementation of Daniel J. | ||||
| 0336f646 » | asb | 2008-08-04 | 5 | Bernstein's Constant Database ([cdb](http://cr.yp.to/cdb.html)). A cdb is a | |
| 3afe61bc » | asb | 2008-07-28 | 6 | key-value store (much like BDB/gdbm), but it cannot be updated at runtime | |
| 7 | (only rebuilt). Reading is very fast, and rebuilding is done atomically by | ||||
| 8 | building the new database and then renaming. lua-tinycdb includes the tinycdb | ||||
| 9 | source so there are no external dependencies. | ||||
| 10 | |||||
| 11 | ## Features | ||||
| 12 | I include below the list some of the features of the cdb database structure, | ||||
| 13 | stolen (and slightly modified) from D.J. Bernstein's [cdb | ||||
| 14 | page](http://cr.yp.to/cdb.html): | ||||
| 15 | |||||
| 16 | * Fast lookups: A successful lookup in a large database normally takes | ||||
| 17 | just two disk accesses. An unsuccessful lookup takes only one. | ||||
| 18 | * Low overhead: A database uses 2048 bytes, plus 24 bytes per record, plus the | ||||
| 19 | space for keys and data. | ||||
| 20 | * Fast atomic database replacement | ||||
| 21 | |||||
| 22 | ## Project links | ||||
| f92fcf81 » | asb | 2008-07-28 | 23 | * [Home](http://asbradbury.org/projects/lua-tinycdb/) | |
| 3afe61bc » | asb | 2008-07-28 | 24 | * [Download](http://luaforge.net/projects/lua-tinycdb/) | |
| f92fcf81 » | asb | 2008-07-28 | 25 | * [Documentation](http://asbradbury.org/projects/lua-tinycdb/doc/) | |
| 3afe61bc » | asb | 2008-07-28 | 26 | * [Source](http://github.com/asb/lua-tinycdb/) | |
| 27 | |||||
| 28 | ## Release history | ||||
| d1c32424 » | asb | 2008-11-07 | 29 | * lua-tinycdb-0.2 (2008-11-07) | |
| 30 | * documentation | ||||
| 31 | * `db:iter()` is now `db:pairs()`, though for this release `iter` is | ||||
| 32 | available as an alias. | ||||
| 33 | * bugfix: `__tostring` on a cdb maker returned no results | ||||
| 34 | * small internal refactoring | ||||
| 3afe61bc » | asb | 2008-07-28 | 35 | * lua-tinycdb-0.1 (2008-01-23) | |
| 36 | * first public release | ||||
| 37 | |||||
| 38 | ## See also | ||||
| 39 | * [tinycdb](http://www.corpit.ru/mjt/tinycdb.html) | ||||
| 40 | * [cdb](http://cr.yp.to/cdb.html) DJ Bernstein's original implementation | ||||
| 41 | * [cdb format specification](http://cr.yp.to/cdb/cdb.txt) | ||||
| 42 | * [luacdb](http://www3.telus.net/taj_khattra/luacdb.html) Taj Khattra's | ||||
| 43 | binding to the original cdb library. lua-tinycdb was developed | ||||
| 44 | independently. | ||||
| 45 | |||||
| 46 | ## License | ||||
| 47 | lua-tinycdb is distributed under the MIT license. | ||||
| 48 | |||||
| 49 | Copyright (c) 2008 A.S. Bradbury | ||||
| 50 | |||||
| 51 | Permission is hereby granted, free of charge, to any person | ||||
| 52 | obtaining a copy of this software and associated documentation | ||||
| 53 | files (the "Software"), to deal in the Software without | ||||
| 54 | restriction, including without limitation the rights to use, | ||||
| 55 | copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
| 56 | copies of the Software, and to permit persons to whom the | ||||
| 57 | Software is furnished to do so, subject to the following | ||||
| 58 | conditions: | ||||
| 59 | |||||
| 60 | The above copyright notice and this permission notice shall be | ||||
| 61 | included in all copies or substantial portions of the Software. | ||||
| 62 | |||||
| 63 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||||
| 64 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||||
| 65 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||||
| 66 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||||
| 67 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||||
| 68 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||||
| 69 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||||
| 70 | OTHER DEALINGS IN THE SOFTWARE. | ||||
| 71 | |||||
| 72 | |||||
| 73 | ## Contact | ||||
| 74 | Author: A.S. Bradbury | ||||
| 75 | Email: <asb@asbradbury.org> | ||||
| 76 | Homepage: <http://asbradbury.org/> | ||||
