I'm not sure if this would be lower latency, since it depends on the R2 service, which seems to be centralized. I suspect this didn't use the distributed KV store since the free plan limits are much lower than R2.
The issue with KV is the write propagation delays across nodes can be up to 10s, so for a back and forth like this that needs to happen quickly it doesn’t work. My original version supported KV but I dropped it because it often failed to connect due to these delays.
Ah yep. I guess you could do http polling with a durable object - would have to do the math to see if that had lower expected costs. Websocket are prohibitively expensive.