clockworklabs / SpacetimeDB

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

Clients should generate an ID for each reducer call #1369

Open cloutiertyler opened 4 weeks ago

cloutiertyler commented 4 weeks ago

Phoebe: Sohan wanted a way to uniquely identify a reducer run so the words3 can track failures. Currently, to identify a reducer call based on a reducer-callback, a client has to be able to backtrack from the reducer args; this may be impossible if the client has issued multiple calls with the same args, some of which succeeded and some of which failed.

Sohan writes:

if its useful to know how it works for the on-chain version is I just get a tx hash and then await its receipt, then parse the receipt for status

(awaiting receipt polls but wtvr)

would be super nice to get an id for a reducer call that I can check status of

We need to figure out the exact semantics of this, but I imagine something like:

Tyler edit Feb 13: This also may become important for implementing exactly-once semantics between databases as databases would need to deduplicate retried requests. We should revisit this for 1.0.

cloutiertyler commented 4 weeks ago

As discussed internally, this particular ticket needs a proposal because of its implications on the wider distributed systems model of SpacetimeDB. Just needs more thought.