clockworklabs / SpacetimeDB

Multiplayer at the speed of light
https://spacetimedb.com
Other
4.41k stars 110 forks source link

Eliminate dependency on `im`; just mutate the client cache #1897

Open gefjon opened 4 weeks ago

gefjon commented 4 weeks ago

Description of Changes

This turns out to be effectively a prerequisite for client-side indices. Storing indexes in a type-erased way while making them Clone for storage in im::HashMap is likely possible, but it's at least very challenging and complex. Given that we no longer actually need the concurrent persistence offered by im::HashMap, it seems easier to just revert to using std::collections::HashMap.

API and ABI breaking changes

Breaks SDK codegen. No user-facing breakage.

Expected complexity level and risk

2 - minor risk of deadlocks because the SDK's concurrency story is pretty complex, but well-tested so likely safe.

Testing