is there a way to implement something like this in loopback?
LOCK
READ
INCREMENT
UNLOCK
I would like to keep counters as database values, each key is a counter (or a setting), and they shouldn't accessed my multiple requests at the same time.
Also this should work for local requests too (no remoteHooks)
Thanks
If you are using the mongoDB connector, this is supported by extended operators.
Otherwise, you can use transactions as a workaround for some connectors.