You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have appreciated using your gem for a few years now, to connect to our redis cluster. We are in the process of upgrading our Ruby application to use Async (new in Ruby 3) and Async Redis. The Async Redis client has the same interface and works as a mostly drop in replacement within this redis_cluster gem.
The only change we had to do was in initializing redis in the Node class:
module RedisCluster
class Node
def self.redis(options)
# Async Redis requires host & port as a single endpoint argument
async_client_options = options.dup
host = async_client_options.delete(:host)
port = async_client_options.delete(:port)
endpoint = Async::IO::Endpoint.tcp(host, port)
Async::Redis::Client.new(endpoint, **async_client_options)
end
end
end
We would like to continue using your gem, but also want to clean up our dependencies to avoid pulling in multiple redis libraries. Would you be open to a small refactor of this gem, where this gem becomes a combination of "core" functionality and then has multiple adapter gems that provide the concrete implementation (and dependency management) for a given redis client?
For backwards compatibility (since hiredis is the default driver), leave the redis_cluster gem name and gemspec as is - it would require redis and hiredis still.
Create a new gemspec in the same repo, called redis_cluster-core.gemspec and release a new gem to Rubygems: redis_cluster-core
This will not have any dependencies on redis libraries
Create new gems (nested folders in this repo, which could be moved to new repos eventually), of the following:
redis_cluster-redis-rb
redis_cluster-hiredis
redis_cluster-async-redis
Each of these gems would have a dependency to redis_cluster-core and to the specific redis gem, and would implement the RedisCluster::Node::Redis method
Consuming services would use the specific adapter gem in their Gemfile
This would be a good time to bump to version 1.0
Let me know your thoughts on the above. If this is a direction you are open to, we could submit a PR with the proposed changes.
The text was updated successfully, but these errors were encountered:
We like the interface of this gem, and we like that it is agnostic to the redis driver itself. Since we are using Async now (and it has its own async-redis gem, which does not support cluster mode), we saw an opportunity to continue using / extending your gem.
If you do not have use for this gem and/or do not plan to maintain it any further, I'm open to this plan:
or you maintenance in your repo and continue your plan? And this repo's readme will introduce and link to you repo.
I can reach out again on this issue thread (or we could just create a PR?) when we have made progress on that and are ready to link to our repo. Thanks!
Hi,
We have appreciated using your gem for a few years now, to connect to our redis cluster. We are in the process of upgrading our Ruby application to use Async (new in Ruby 3) and Async Redis. The Async Redis client has the same interface and works as a mostly drop in replacement within this redis_cluster gem.
The only change we had to do was in initializing redis in the
Node
class:We would like to continue using your gem, but also want to clean up our dependencies to avoid pulling in multiple redis libraries. Would you be open to a small refactor of this gem, where this gem becomes a combination of "core" functionality and then has multiple adapter gems that provide the concrete implementation (and dependency management) for a given redis client?
DelayedJob uses this pattern: https://github.com/collectiveidea/delayed_job/wiki/Backends as does DatabaseCleaner: https://github.com/DatabaseCleaner/database_cleaner#list-of-adapters and I think it would work well here.
Proposal:
hiredis
is the default driver), leave theredis_cluster
gem name and gemspec as is - it would requireredis
andhiredis
still.redis_cluster-core.gemspec
and release a new gem to Rubygems:redis_cluster-core
redis_cluster-redis-rb
redis_cluster-hiredis
redis_cluster-async-redis
redis_cluster-core
and to the specific redis gem, and would implement theRedisCluster::Node::Redis
methodLet me know your thoughts on the above. If this is a direction you are open to, we could submit a PR with the proposed changes.
The text was updated successfully, but these errors were encountered: