clockworklabs / clockworklabs/SpacetimeDB
Recommended Approach for Instanced Content
@jdetter is already working on this.
Since May 5, 2025.
- Dominant language
- Rust
- Stars
- 25.2k
- Forks
- 1.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 46
Description
The realtime parts of my game are highly instanced (instances or raid in WoW, matches in Fortnite/DotA/etc). What is the recommended approach to do that with spacetime db?
I see two options, instance IDs or db for each instance.
With instance ids, we'd add a instance_id column to every table that has instances content. We'd have to create indexes and pollute many queries with WHERE instance_id = ?. It might also have difficulty scaling at some point.
With multiple DBs, we'd init a new DB for each instance and shut it down after the match is over. This might have a high cost for startup and shutdown. It also might not easily support replays or other innate features well.
Which would the creators of the system or expert users recommend?
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.
Assessment
This issue has not been assessed yet.