This is a persisted, in memory (lazy loading) document store for Common Lisp.
cl-naive-store is a database (document store to more precise) which is
persistent, in-memory (lazily-loaded), indexed, and written completely in
The "naive" comes from the fact that data is persisted as plists in files to make them human and machine readable, also there is no rocket science code.
The store was designed to be customisable, just about anything can be customised, have a look at the implementation API to get an idea of what is possible.
The package is considered stable.
Over the next couple of months the package will be used in commercial software and should get a good shake down during that process.
cl-naive-store is released under the MIT license.
cl-naive-store.utils was added to help with loading database from
I must also give a big shout out to Pascal J. Bourguignon for code reviews, threading code, test code and a whole lot more. His guidance was invaluable, even if I did not always listen to him. /Pascal does not endorse this software in any way, shape or form, he assisted me when and where I asked for specific help./
Data can be written to file for each document update, or as a batch update.
Data is loaded into memory for querying and lookups, which makes these operations fast.
Data is only loaded when needed. If you use the store correctly it means that you will only have the data that users requested up to that point in memory.
Documents and key-values can be indexed, and a user can specify their own additional indexes as well. Queries and lookups can both be done using indexes which speeds up the retrieval of data considerably.
Sharding is the breaking down of files into smaller files, in the case of naive-store that means that instead of one file per collection there could be many.
Sharding is done based on the actual data in collections. The user specifies which elements of a document it wants to use for sharding on a collection. If none is specified no sharding is done.
cl-naive-store can do a lot but you as the user decides how much of
the store's functionality you want to use for your own project.
Functionality was broken down into these packages:
The following .asd files can be used to load different functionality:
cl-naive-store.naive-core.asdloads the most basic functionality for
cl-naive-store. Use this if you don't any of the other extensions.
naive-documentsand theexperimental merkle functionality.
naive-core, document-typesand type definition functionality.
cl-naive-store.documents.asdloads naive-core, naive-indexed,documents-types, document-type-defs and document functionality.
cl-naive-store.asdloads the whole shebang.
The documentation can be found in the docs folder in the repository.
Examples are in the examples folder in the git repository. If those are to simplistic for you have a look at the code in the tests.
1.9Supported CL Implementations
All tests pass on SBCL an CCL
Have a look at the Gitlab issue tracker, future development is tagged accordingly.
Go to the tests folder
Run make with any of the following
You should see the following at the end.
SUCCESS COUNT: 46 FAILURE COUNT: 0 TOTAL TESTS: 46 Completed Test CL-NAIVE-STORE-TESTS:TEST-ALL