API Reference / @evolu/common / Evolu/Storage
Evolu/Storage
Evolu Storage for SQLite.
Evolu uses a Skiplist, which leverages SQLite indexes. The core logic is implemented in SQL, so it doesn't have to make roundtrips to the DB.
The ideal storage for a Relay should use a similar architecture to strfry (a KV storage), but with Skiplist to ensure that insertion order doesn't matter (local-first apps can often write in the past.)
The ideal client implementation should probably use the SQLite extension instead of SQL or even a KV storage, when such a thing for browsers/native will exist and will be faster than SQLite.
Scaling
The load can be distributed by deploying multiple relays, synchronized with each other, if necessary. One relay should handle hundreds of thousands of users, and when it goes down, nothing happens, because it will be synchronized later.
Interfaces
Interface | Description |
---|---|
CreateSqliteStorageBaseOptions | - |
SqliteStorageBase | Common interface for both client and relay SQLite storages. |
SqliteStorageBaseDep | - |
Type Aliases
Type Alias | Description |
---|---|
SqliteStorageDeps | - |
Functions
Function | Description |
---|---|
createSqliteStorageBase | - |
getTimestampByIndex | - |