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?
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?