Use SQLite storage in the durable object#256
Closed
acoreyj wants to merge 7 commits intotinyplex:mainfrom
Closed
Conversation
Contributor
|
Mind blown! Not able to check this over today. Give me a few days to take a look. In theory this is very exciting! |
Contributor
|
10/10 no notes. I'll check over the tests/lint for the next release - probably valid for a 6.3 before we maybe break things in v7.0. I'll handle any merge issues etc. Thank you so much! |
Contributor
|
Cherry picked onto main. Let's go! |
Contributor
Author
|
Awesome! Thanks for making TinyBase! |
Contributor
|
Rolled in v6.3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SQLite is now the preferred storage method for Durable Objects
See https://developers.cloudflare.com/durable-objects/api/storage-api/ and https://developers.cloudflare.com/durable-objects/best-practices/access-durable-objects-storage/
Using SQLite is much cheaper, see https://developers.cloudflare.com/durable-objects/platform/pricing/
SQLite also has a much higher limit on the row/value of 2mb meaning we can do way less writes.
That being said 2mb may be too small for some people so I implemented a fragmented mode if people are worried about the 2mb limit. This uses a lot more writes, but writes in SQLite storage are still much cheaper (well you get more built into your plan)
How did you test this change?
I used 2 different applications and made sure stores could be merged into new clients from the server with both modes.
I wasn't able to get the local tests running though.