taskiq-redis icon indicating copy to clipboard operation
taskiq-redis copied to clipboard

feature request: valkey support

Open ac130kz opened this issue 1 year ago • 6 comments

As you all probably know, Redis has changed its license, giving major corporations and contributors all the incentive to make a move to Linux Foundation's new project Valkey. So far the migration to valkey-py process seems to be quite straightforward, so I wonder, if it would be possible to implement its support.

ac130kz avatar Aug 21 '24 15:08 ac130kz

I don't think it's necessary. At least for now. Because valkey and other technologies as a KeyDB are basically drop-in replacements for redis. The taskiq-redis is not affected by this issue, since the underlying library still has an MIT license and can be used without any issue.

s3rius avatar Aug 26 '24 15:08 s3rius

Understandable, it's just that taskiq-redis has a hard dependency on redis-py. The problem that I see in the nearest year or so is compatibility with official redis is going to be less and less of the concern of fork maintainers. Well, I guess we have to wait and see.

ac130kz avatar Aug 26 '24 18:08 ac130kz

Hi, I second this request. While it may be a drop-in placement for now redis and valkey will most likely diverge. And it seems like ValKey is the alternative that is been pushed forward the most compared to the other redis forks. Since bigger companies are investing into it

ItsCurstin avatar Oct 09 '24 21:10 ItsCurstin

I third this request.

At this point (since 20 March 2024), redis is not open source. The valkey-py package can be used as a drop in replacement to redis. Having extra dependencies in the pyproject toml could be a good way to use this same repo. so we have:

pip install taskiq-redis[redis]
pip install taskiq-redis[valkey]
pip install taskiq-redis[libvalkey] (to include the libvalkey optional dependency)

then include a separate proxy module file to import valkey if available, otherwise fallback onto redis.

# redis_proxy.py

try:
    import valkey.asyncio as redis

except ImportError:
    import redis.asyncio as redis

Spill-Tea avatar Jan 02 '25 09:01 Spill-Tea

In order to support both projects I've created a separate repo.

https://github.com/taskiq-python/taskiq-valkey

I'll release it soon.

s3rius avatar Feb 28 '25 13:02 s3rius

I already created pull request for that issue: https://github.com/taskiq-python/taskiq-valkey/pull/1

So after review it will be possible to use taskiq-valkey in a similar way as taskiq-redis.

danfimov avatar May 05 '25 16:05 danfimov