Closed reimavronicolas closed 9 months ago
This is all the supported commands by our redis server: https://upstash.com/docs/redis/overall/rediscompatibility. It's currently supported by the server, but not implemented in the SDK. I'll see what I can do this week to support this command.
Unfortunately, we can't support watch
,unwatch
and discard
commands via SDK. And the reason is Redis transactions are stateful and bound the connection itself, that’s why we don’t support them in REST api.
https://upstash.com/docs/redis/features/restapi#rest-redis-api-compatibility
@ogzhanolguncu Thanks for confirming the unavailability of watch
, but I'm not sure I fully understand the explanation. Would you be able to expand a bit? How might we support concurrent operations that may conflict without the use of watch
to detect these potential changes?
Well, our SDK designed to work with mainly serverless environments where TCP(stateful) calls are not allowed. And, since watch like commands require long running connections we can't allow it. Maybe you can use Upstash Lock to have more control over concurrent operations?
Hi, not sure if I'm overlooking it, but is the watch command supported?
I'm looking to do something like: