3 ms·
That's a great post! Thanks for sharing. Not criticizing, but just curious: couldn't you have done this with "watch" and multi exec?
by ecoffey 14y ago
That's a great post! Thanks for sharing.
Not criticizing, but just curious: couldn't you have done this with "watch" and multi exec?
- pjungwir 14y agoHonestly I barely knew about WATCH! But after reading through the docs, I don't think it would have worked in my case. I only had two keys: a list of pages to crawl, and a set of pages already crawled. WATCHing either key would have been too restrictive. Perhaps I could have approached it differently using lots of keys and GET/SET, but I like the simplicity of combining fewer keys with Redis's nice data structures.
- aaronblohowiak 14y agoWME-style is optimistic, so you might have to retry over and over again to succeed. Lua scripts are queued up so you will make progress in the order you get in line. (Think spin lock vs queue)