SpacetimeDB icon indicating copy to clipboard operation
SpacetimeDB copied to clipboard

Smarter compression for transaction updates

Open joshua-spacetime opened this issue 1 year ago • 4 comments

Currently message compression happens on a per-client basis. However typically many clients will subscribe to the same queries in which case we compress the same message multiple times. Note this compression happens off of the main execution thread. Depending on the implementation, removing such redundant compression may or may not require a breaking change to the API.

Note: I'm not proposing we do this. We should determine if it's worthwhile first.

joshua-spacetime avatar Sep 17 '24 21:09 joshua-spacetime

@Centril Can you determine if this would require a breaking change?

cloutiertyler avatar Sep 18 '24 01:09 cloutiertyler

WS protocol versioning should protect us.

gefjon avatar Sep 18 '24 03:09 gefjon

Except for the fact that we'd have to support two versions right off the bat, which I would like to avoid.

cloutiertyler avatar Sep 18 '24 03:09 cloutiertyler

True, if we want to do this in the near future it is more relevant whether it requires a different WS message schema.

gefjon avatar Sep 18 '24 03:09 gefjon