News for hackers. Stuff that matters.
Re:A multithreaded fork of Redis that is faster by nicolaslem on Monday October 07, 2019 @01:30PM (#21183568)
Not parent but the single threaded approach really shines when executing Lua scripts in Redis. Except for some very specific edge cases, the execution of a script is atomic and since no command is ever processed concurrently you can rule out data races.

I am sure it would be possible to provide these guaranties while offering concurrent execution but most likely at the expense of a simple design.

Re:A multithreaded fork of Redis that is faster by jdsully on Monday October 07, 2019 @01:33PM (#21183594)
KeyDB provides that guarantee via a lock. However that does mean long running scripts don’t benefit from the multithreading. Ditto for modules.

The goal is 100% Redis compatibility so I can’t compromise on atomicity.

Re:A multithreaded fork of Redis that is faster by avar on Monday October 07, 2019 @02:21PM (#21184232)
It shines right up until the moment someone writes a Lua command that takes more than a trivial amount of time, now your entire server is blocked in a pile-up of connections waiting on some relatively trivial amount of code being executed.
Re:A multithreaded fork of Redis that is faster by aflag on Monday October 07, 2019 @03:32PM (#21185011)
Couldn't you just rollback the change or fix the lua script?
Re:A multithreaded fork of Redis that is faster by thamer on Monday October 07, 2019 @06:03PM (#21186459)
Or just embrace modern hardware and use threads. This is the experience many people have running Redis in production with 21st-century hardware: https://twitter.com/rbranson/status/540565059337195520
Re:A multithreaded fork of Redis that is faster by aflag on Tuesday October 08, 2019 @08:29AM (#21191482)
That's a different issue. If they're in that situation without any custom scripts and the latency is cropping up, they should consider using a different tool or changing their codebase.