Consider using D1 instead of DO storage #4
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.
Previously, as an implementation strategy for persistent state, I introduced DO and event sourcing.
Also described it may provide better flexibility. And at the time, D1 wasn't such a good option.
I changed my mind after seeing this announcement today.
https://blog.cloudflare.com/d1-turning-it-up-to-11/
It now JSON features and time travel recovery. A very reasonable pricing policy is also included.
What DO still does better is its lower access cost and actor model. It allows for more aggressive distribution model and elasticity if we don't want distributed transactions or something (indeed it is very difficult)
The SQL frontend definetely will provide better DX and operational convenience.
The only blocker is that it doesn't yet provide Rust bindings, but that will probably be there soon.
cloudflare/workers-rs#270