[Redis] Sentinel

Damien Krotkine damien at krotkine.com
Tue Jan 14 13:18:17 GMT 2014







On Tue, Jan 14, 2014, at 12:49 AM, Pedro Melo wrote:

Hi,

On Tue, Jan 14, 2014 at 8:29 AM, Damien Krotkine
<[1]damien at krotkine.com> wrote:

On Mon, Jan 13, 2014, at 11:19 PM, Steffen Mueller wrote:> and a

> question: My abstraction was to have a Sentinel*s* (plural) object.
You

> now have a Sentinel (singular) object. And that's how the code
actually

> works. The singular allows you to just subclass. I'm not sure how
that

> works with some of the logic that relies on knowing about all
sentinels

> rather than just the one you're connected to. I suppose that's owned
by

> the top level Redis object?



Yes, the list of sentinels for the service is just an ArrayRef in the

Redis instance. It gets updated when a sentinel is reached, and

informations about linked sentinels can be retrieved. I didn't feel the

need of having a class to represent the sentinels list, but I welcome

counter arguments on that


I think that for now it would be good enough, you only want to know
where to connect to. But if you plan on using this code to implement a
client for the cluster, then it's not enough.

With cluster you'll need multiple connections in parallel, and
distribute the calls over them. It will evolve more into a ArrayRef of
Redis object I think.


I don't expect the code to evolve into a cluster client. I thought that
we could devote the Redis::Cluster namespace to it. But for now I don't
know anything about Redis Cluster, so ... :)


Bye,
--
Pedro Melo
@pedromelo
[2]http://www.simplicidade.org/
[3]xmpp:melo at simplicidade.org
mailto:[4]melo at simplicidade.org

_______________________________________________

Redis mailing list

[5]Redis at lists.scsys.co.uk

[6]http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/redis

References

1. mailto:damien at krotkine.com
2. http://www.simplicidade.org/
3. mailto:xmpp%3Amelo at simplicidade.org
4. mailto:melo at simplicidade.org
5. mailto:Redis at lists.scsys.co.uk
6. http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/redis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/redis/attachments/20140114/c6196237/attachment.htm


More information about the Redis mailing list