zio / zio-redis

A ZIO-based redis client
https://zio.github.io/zio-redis
Apache License 2.0
123 stars 63 forks source link

Support async command evaluation #917

Closed mberndt123 closed 9 months ago

mberndt123 commented 10 months ago

Resolves #916

Hey @mijicd,

I've hacked together something to implement the improved async support that I laid out in #916. The code could certainly be made a little bit prettier here and there, but the primary aim here is to try out the idea and see if you consider this a viable way forward.

The essential changes are:

The resources like Queues and the Redis connection are shared between the synchronous and asynchronous Redis client, see the changes in SingleNodeExecutor.

The biggest drawback right now is that I haven't yet looked into the cluster support, so the cluster ZLayer doesn't give you an AsyncRedis object. I'd like to get some feedback on the general approach first before tackling that.

CLAassistant commented 10 months ago

CLA assistant check
All committers have signed the CLA.