Short Question: Is there any nosql flat-file database available as sqlite?
Explanation: Flat file database can be opened in different processes to read, and keep one process to write. I think its perfect for read cache if there's no strict consistent needed. Say 1-2 secs write to the file or even memory block and the readers get updated data after that.
So I almost choose to use sqlite, as my python server read cache. But there's still one problem. I don't like to rewrite sqls again in another place and construct another copy of my data tables in sqlite just as the same as I did in PostgreSql which used as back-end database.
so is there any other choice?thanks!
Maybe shelve
? It's basically a key-value store where you can store python objects. http://docs.python.org/library/shelve.html
Or maybe you could just use the filesystem?
BerkeleyDB is a widely-used embedded database that's been around forever (it originally derived from the database library included in BSD, hence the name) and has excellent performance characteristics for many use cases (and caching is a frequently-used one), but it does have some significant limitations.
If you want to use it with Python, you'll probably want the externally-maintained pybsddb/bsddb3
library, not the deprecated bsddb
library included in Python 2.x (and no longer in 3.x).
It's currently owned by Oracle, but available under an open-source license. Do take careful note of licensing terms -- current versions are GPLish (and GPL-compatible), so make sure that's compatible with what you plan to do.
More information:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With