Request Details
I would like the ability to declare a table as a disk table, where disk tables are cheaper, with higher limits, but may have higher access latency:
#[table(accessor = foobar, storage = disk)]
struct Foobar {
id: u64
}
Requested by @cloutiertyler via the SpacetimeDB site.
Activity
View on GitHub#5207Supporting this feature for games with a large registered-player population but relatively few concurrent players.
For example, 300,000 registered players with up to 200 equipment/inventory slots each could represent 60 million slot records if every slot is stored. Keeping all offline players' data resident in RAM creates substantial memory overhead even when only a small fraction of players are online. Actual usage depends on occupied slots, row layout, and indexes, but the gap between registered and concurrent players is the key concern.
Disk-backed tables with on-demand loading and a bounded cache would be very useful: load rows/pages when accessed, keep active players' data hot, and allow inactive data to be evicted safely while preserving transactional guarantees. Higher access latency for cold data would be an acceptable tradeoff.
Is this the intended direction for disk tables, and is there any planned implementation or timeline?
