Closed casperisfine closed 2 years ago
Aside from the question of a compatibility / migration layer, I'm quite happy with the new gem. The code is simpler, sticks very closely with the documented Redis API and should automatically support new commands as they come and go. I would love to see a performance improvement too but it's new and there's always hiredis.
Ultimately I worry about Sidekiq's dependencies and how well they are being maintained. I think this gem is better suited for long-term support and maintenance and that's why I've been aggressively working to use it.
I would love to see a performance improvement too but it's new and there's always hiredis.
Actually, since redis-client
's binding support SSL (contrary to hiredis-rb
). I'm tempted to enable the hiredis
driver by default.
I prefer Ruby infrastructure use pure Ruby by default; it is safer and does not require a compiler/dev env to install. Let the app developer opt into native code if they need that last bit of performance. 90% do not.
Following the discussion and experience gathered in https://github.com/mperham/sidekiq/pull/5298, I think that if we handled keyword arguments as Redis flags, we could significantly ease the transition.
e.g.
Could be done as:
Instead of:
With such feature, a simple
method_missing
based delegator could achieve a fairly large compatibility with theredis
gem.Footguns
The one thing that worries me is the Ruby 2 vs Ruby 3 keyword argument semantic.
But that's limited to string hash literals, so likely only used for
HMSET
, I think a warning in the readme might be enough.cc @etiennebarrie
Also cc @mperham as I'd love your thoughts on wether you think it would make
redis-client
more usable for you.