clockworklabs / clockworklabs/SpacetimeDB
Inquiry about primary key support for Views — update operations not recognized in subscriptions
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 25.2k
- Forks
- 1.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 46
Description
Hi SpacetimeDB team,
I'm using SpacetimeDB for real-time game state sync, and I've run into an issue with View subscriptions: because Views lack primary keys, the client SDK can't pair insert+delete operations as updates. This means onUpdate callbacks never fire—we only get separate insert and delete events.
I understand Views currently don't support primary keys by design, and I've heard there might be plans to add this in the future. Could you share:
- Is primary key support for Views still on the roadmap? Any rough timeline or current status?
- If it's not coming soon, do you have any recommended workarounds for subscription scenarios that need proper update detection?
My use case involves pushing aggregated multi-table data via Views to clients, where distinguishing actual updates (vs. separate insert/delete pairs) matters for smooth gameplay.
This limitation is currently blocking a clean implementation for real-time game state sync. I'd really love to see primary key support for Views land soon—it would make Views truly viable for reactive applications. Fingers crossed it's high on the priority list! 🙏
Thanks for your work on SpacetimeDB—appreciate any insight you can share! 😊
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
The issue discusses primary key support for Views and update detection in subscriptions, but names no files, tests, or implementation entry points. Start by confirming the current roadmap and investigating the requested workaround; done would require a decided implementation scope or documented guidance for subscription update handling.
Written by the indexing model from the issue text.
Assessment
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100