yiisoft / yii2-redis

Yii 2 Redis extension.
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
452 stars 183 forks source link

Use predis to support replication and Sentinel #45

Open djagya opened 8 years ago

djagya commented 8 years ago

Do we want to add a new connection class, that will use predis (as e.g. laravel does) to support such features as replication and sentinel support? Or it could be set of abstract connection class with common things and two inherited to implement basic socket connection and predis connection. I think it's a good step to HA. Though sentinel support is still not in the stable predis branch, but it will soon, i think.

samdark commented 8 years ago

Using predis is a good idea.

djagya commented 8 years ago

I can create a PR. Also do we want to leave basic socket connection? Or since we're using predis for replication and sentinel - we can use it for basic connection too, therefore we'll have only one class.

bazilio91 commented 8 years ago

Sure

On 20 Nov 2015, at 19:58, Danil Zakablukovskiy notifications@github.com wrote:

I can create a PR. Also do we want to leave basic socket connection?

— Reply to this email directly or view it on GitHub.

samdark commented 8 years ago

Relying on predis only sounds OK to me.

tom-- commented 8 years ago

High availability is a hard requirement for my project so I need something like this.

yii2-redis adoption of Predis' new Sentinel feature would be good for that project.

tom-- commented 8 years ago

I noticed that predis is showing signs of having been abandoned. There was a little activity in the summer but nothing since July. Daniele's 12 month activity, compared to Twitter activity, shows perhaps a change of interests.

predis is used by Laravel and Doctrine and other projects. Does anyone have ideas who might be recruited into maintaining it?

cebe commented 8 years ago

reference for sentinel implementation in yii 1.1.: https://github.com/yiisoft/yii/pull/3106

nrk commented 8 years ago

@tom-- I noticed this issue while browsing GitHub and just want to take the chance to clarify the current situation around Predis: it is definitely not an abandoned project! Sure there's been little to no activity from me on GitHub because I had an extremely busy 2015 (and btw I don't tweet that much compared to most of my tweeps ;-)) but thankfully the library is very stable with only a very few aknowledged but minor issues reported. Native support for redis-sentinel has been almost ready since... well, months! But I tend to hold back new important features until I'm not satisfied about how they are implemented and that's always been the case, even back when I had many green squares plotted in my GitHub activity graph ;-) Things should change in the next few weeks anyway.

tom-- commented 8 years ago

@nrk I already noticed that activity resumed because I "subscribed" to all of predis in November. That was a relief.

In my own project, we are using @djagya's fork for now. I imagine his offer to send a PR with his fixes is still open.

Proper integration test of a realistic HA setup including clients for a predis+redis+sentinel is not at all simple and I understand your hesitance to release that, and especially because it is an HA feature. We've done basic testing on three VMs with our application using PHP sessions provided by Yii 2 via our fork of yii2-redis that uses predis and sentinel. But that's certainly not enough to really say that it works.

pavlelee commented 6 years ago

https://github.com/Liv1020/yii2-redis This is ext for predis, predis can create phpredis connection class to use phpredis. It's compatible with yii2-redis

frops commented 4 years ago

Hello, have you any news, guys?

samdark commented 4 years ago

No. Noone is working on it at the moment.