SQLite Forum

SQLite Page Cache Subsystem as Library
Login

SQLite Page Cache Subsystem as Library

(1) By Gavin D. Howard (gavinhoward) on 2021-10-18 18:04:16 [link] [source]

Is it possible to use the SQLite page cache subsystem as a library?

Specifically, I want to write an application that has ACID capabilities, but I would prefer to use something that is already well-tested.

I also have full control over the format, so I can make the file format something that would work with the assumptions of the page cache subsystem.

(2) By Larry Brasfield (larrybr) on 2021-10-18 18:23:47 in reply to 1 [link] [source]

Have you studied SQLite As An Application File Format?

You should be (or become) aware that SQLite's ACID attribute is not resting on the page cache system. Rather, it is the use of that system along with other means that enables such functionality.

(3) By Gavin D. Howard (gavinhoward) on 2021-10-18 18:32:42 in reply to 2 [source]

I have studied that, but I do not want a database or SQL functionality.

You should be (or become) aware that SQLite's ACID attribute is not resting on the page cache system. Rather, it is the use of that system along with other means that enables such functionality.

The architecture of SQLite document says that, while the B-Tree subsystem notifies the page cache subsystem when it wants to commit, the page cache subsystem still does it. Is that what you meant?

I can do this in my app, and I would prefer to, rather than using all of the database code.

(4) By Dan Kennedy (dan) on 2021-10-19 10:59:48 in reply to 3 [link] [source]

I think it's possible, but far from straightforward. The proprietary ZipVFS extension does just that - uses the pager layer to store data in a different file format with ACID properties.

(5) By Marco Bubke (marcob) on 2021-10-19 14:04:08 in reply to 3 [link] [source]

There is the LSM extension which is working as a key value store. But I think nobody is using it.