3 ms·
I think this is an interesting idea. What I did a year ago was just make Redis cluster able to do Lua scripting transactions on arbitrary keys across the clust
by DrJosiah 8y ago
I think this is an interesting idea.
What I did a year ago was just make Redis cluster able to do Lua scripting transactions on arbitrary keys across the cluster. With rollbacks, like my 2015 patch.
https://news.ycombinator.com/item?id=16294627 https://news.ycombinator.com/item?id=16294627
Instead of reinventing a bad wheel, you could have something better.
- nilkn 8y agoThis sounds really interesting. Is this work available publicly? Could you comment on how you did this and what the pros and cons were (surely a compromise had to be made somewhere)?
- DrJosiah 8y agoIt's not not available for public consumption. After finishing, I realized 2 things: SSL/TLS was necessary for nontrivial cluster solutions, and very few people use Redis Cluster in practice (the multi-key issues being the primary reason). In 2015 I released a patch to allow for transactions with rollbacks in Lua scripts; it used dump/restore to snapshot keys. This idea was extended to be the cluster solution I released last year. The primary compromise is that as implemented, it more or less relied on the equivalent of a temporary key migration. You want a transaction on server X to involve keys from servers X, Y, Z? You migrate the keys to X explicitly, run your transaction, then migrate them back. Caveat: big keys are slow to snapshot, migrate, prepare for rollback, etc. I've got incoming changes to my own fork that allow for fast state transfer for large structures (useful on multiple machines, or just heavily threaded + transactions), more or less eliminating the caveats. But that's also not yet publicly available, and I've spent 5-6 of the last 7 weeks sick (maybe 4 full workdays in that period), so I don't have an ETA on any of it.