Abstracted storage for objects
Author: jeromegnCreated May 3, 2022Updated Aug 21, 2026
Labelsenhancement
As discussed externally: it would make a lot of sense for storage to be pluggable for our use-case.
Keeping a whole document in-memory (including its history) does not make much sense for more general-purpose use-cases where data could grow past the available memory for an actor.
What's been proposed is a replacing the HashMap<ObjId, OpTree> with a trait. This would make reads faillible depending on what implements the trait. This is new, so for the default implementation (HashMap), it would have to have an Infallible associated Error type.
Specifically for our use-case, we'd want to store objects on disk. Likely alongside a LRU cache in-memory to optimize performances a bit.
Source: automerge/automerge