atomic session update #40

furtivefelon opened this Issue Feb 26, 2012 · 1 comment


None yet
2 participants

Hey guys,

I am trying to manage uploads through sessions, so for every uploaded file, a new entry will be made in the req.session object. Since i support concurrent uploads, if i just do[] = photo;; There could possibly be race conditions since the updates are not atomic (where a later save would just override the earlier object)

can someone enlighten me whether it is possible to get atomic updates (since redis does support atomic update)?

Thanks a lot :)



ghost commented Mar 23, 2012

A good place to start is to look at redis's multi/exec support, also the watch capability. You can trigger a watch on a new entry or old, and if anything alters it while a group of commands are being executed, you can have it notify and then disable or stop the new incoming command/request. I would start there to reach a solution .


chirag04 commented Oct 28, 2013

chirag04 closed this Oct 28, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment