github.com/authzed/spicedb@v1.32.1-0.20240520085336-ebda56537386/internal/datastore/memdb/README.md (about) 1 # MemDB Datastore Implementation 2 3 The `memdb` datastore implementation is based on Hashicorp's [go-memdb library](https://github.com/hashicorp/go-memdb). 4 Its implementation most closely mimics that of `spanner`, or `crdb`, where there is a single immutable datastore that supports querying at any point in time. 5 The `memdb` datastore is used for validating and rapidly iterating on concepts from consumers of other datastores. 6 It is 100% compliant with the datastore acceptance test suite and it should be possible to use it in place of any other datastore for development purposes. 7 Differences between the `memdb` datastore and other implementations that manifest themselves as differences visible to the caller should be reported as bugs. 8 9 **The memdb datastore can NOT be used in a production setting!** 10 11 ## Implementation Caveats 12 13 ### No Garbage Collection 14 15 This implementation of the datastore has no garbage collection, meaning that memory usage will grow monotonically with mutations. 16 17 ### No Durable Storage 18 19 The `memdb` datastore, as its name implies, stores information entirely in memory, and therefore will lose all data when the host process terminates. 20 21 ### Cannot be used for multi-node dispatch 22 23 If you attempt to run SpiceDB with multi-node dispatch enabled using the memory datastore, each independent node will get a separate copy of the datastore, and you will end up very confused.