Closed anthonymf closed 3 years ago
Predis
has a bit nicer API when it come to custom command (Well, it have a API, where phpredis
don't).Predis
doesn't require an external PHP extension to be added (build) to PHP compiler to run.Predis
have a support for phpiredis
PHP extension that can improve performance.But I don't have a strong preference for Predis over anything else. The code don't really use any strong Predis feature that would prevent the code to be use with something else.
I guess I can add a small abstraction layer to be compatible with both phpredis
and Predis
.
That can open more choice when it come to the Redis connection and don't enforce a particular flavor
Yes I agree it would open this project up to a wider audience. Many PHP developers just assume (without understanding the network latency impact on real-world performance) that the phpredis C library is better performance than the Predis library. Rightly or wrongly, when someone chooses Redis, it's not a surprise that they are seeking maximum performance.
I saw an abstraction layer approach here which might be suitable. I just assumed the parsing of redisearch results would be the difficult part - given the varying nature of command responses from redis. Perhaps there is already a solution for this...?
I just open the PR #17 to allow other solution for connecting to Redis.
Right now Predis
lib, phpredis
extension and phpiredis
extension are built-in, but adding other connector should be easy (see README).
For the ethanhann/redis-raw
lib, I know it, but this library exists because the author simply archive his phpredis project when I open a PR for a fix.
(and I see now that he unarchive his project, open a funding and recreate my PR and merge it 🤷 )
So I prefer come up with my own solution
@anthonymf I release the version 2.0.0
with the support of phpredis
.
Thanks again for the idea, it force me to refactor some part and rethink a bit how it was working. I think it's better now.
Nice work! I can see how you've widened the appeal and it makes this library the most attractive for PHP & redisearch. Congratulations on the release.
The phpredis library is known to be lot faster than Predis.
Does this package really need Predis?