clockworklabs / clockworklabs/SpacetimeDB
Add cacheless mode escape hatch across SDKs
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 25.2k
- Forks
- 1.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 46
Description
This issue tracks reimplementing the work from stale PR #3244, which has been closed because it is too far out of date to merge directly.
Original pull request
- PR #3244: sdk/rust: escape hatch for cacheless mode
- Original author: @vis-eyth
What the original PR was trying to do
Description of Changes These changes allow SDK consumers to register a tokio::sync::mpsc::UnboundedSender for a DbConnection that directly receives all database updates instead of the ClientCache. Rationale For writing tooling the current client cache feels very inefficient - these changes allowed us to reduce memory consumption by around a factor of 8, from being able to run the tooling for one region of BitCraft Online to all of them. Batch processing all rows in a database update as well as processing them in a different thread also lead to increased performance. Expected complexity level and risk 1 - for complexity i believe this is a fairly minor change, although not completely aware of your scale. ? - for risk. Behavioral changes only exist if the channel is registered via DbConnectionBuilder::with_update_channel, currently hidden from the docs. Risk may increase signi...
Closure context
- I'm going to close this PR since we would really need to provide this as a distinct feature in all of our SDKs. I will create a ticket to track that.
Reimplementation notes
- Reimplement this work on top of current
masterin a new PR. - Keep the original PR linked as historical context and as a source of useful implementation ideas where still relevant.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing closed PR #3244 and its cacheless-mode design, then inspect the current DbConnection, DbConnectionBuilder::with_update_channel, and DbUpdate entry points on master. Determine how the escape hatch should be exposed consistently across the SDKs; done means the feature is reimplemented for all required SDKs rather than only Rust.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100