<div dir="ltr"><div>I have added a license as well as configuration snippets on use. I think its probably best for infinispan if it were transferred to the Infinispan org.</div><div><br></div><div>Looking forward to your feedback.</div><div><br></div><div>Thanks,</div><div>Simon</div><br><div class="gmail_extra"><br><div class="gmail_quote">On 27 August 2015 at 12:21, Tristan Tarrant <span dir="ltr">&lt;<a href="mailto:ttarrant@redhat.com" target="_blank">ttarrant@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thank you Simon, this is excellent news !<br>
<span class=""><br>
On 27/08/2015 12:49, Simon Paulger wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; This is now done and is available to see here:<br>
&gt; <a href="https://github.com/spaulg/infinispan-cachestore-redis" rel="noreferrer" target="_blank">https://github.com/spaulg/infinispan-cachestore-redis</a>. I used the remote<br>
&gt; store within the infinispan repo as a base of reference.<br>
<br>
</span>I see there is no license associated with that repo. I think you should<br>
add one.<br>
Would like the repo to become officially owned by the Infinispan<br>
organization ?<br>
<span class=""><br>
&gt;<br>
&gt; There are some points that my be worth further discussion. They are:<br>
&gt; 1. the cache loader size method return type is limited to int. Redis<br>
&gt; servers can hold much more than Integer.MAX_VALUE and the Jedis client<br>
&gt; method for counting items on the Redis server returns longs for each<br>
&gt; server, which in addition must be totalled up for each server if using a<br>
&gt; Redis cluster topology. To get around this I am checking for a long over<br>
&gt; Integer.MAX_VALUE and logging a warn, then returning Integer.MAX_VALUE.<br>
<br>
</span>This is a last-minute change we could do in Infinispan 8&#39;s<br>
AdvancedCacheLoader.<br>
<span class=""><br>
&gt; 2. Redis handles expiration. I am using lifespan to immediately set the<br>
&gt; expiration of the cache entry in Redis, and when that lifespan is<br>
&gt; reached the item is immediately purged by Redis itself. This means,<br>
&gt; there is no idle time, and there is no purge method implementation.<br>
<br>
</span>Good :)<br>
<span class=""><br>
&gt; 3. A few unit tests around expiration had to be disabled as they require<br>
&gt; changes to time. As expiration is handled by Redis, I would have to<br>
&gt; change the system time to make Redis force expiration. For now, they are<br>
&gt; just disabled.<br>
<br>
</span>Absolutely reasonable.<br>
<span class=""><br>
<br>
&gt; I have built it against the Jedis client. I also tried 2 other clients,<br>
&gt; lettuce and redisson, but felt that Jedis gave the best implementation<br>
&gt; as a) it didn&#39;t try to do too much (by this I mean running background<br>
&gt; monitoring threads that try to detect failure and perform automatic<br>
&gt; failover of Redis slaves) and b) had all the API features I needed to<br>
&gt; make the implementation work efficiently.<br>
&gt;<br>
&gt; Jedis supports 3 main modes of operation. They are, single server, Redis<br>
&gt; sentinel and Redis cluster. Redis versions that should be supported are<br>
&gt; 2.8+ and 3.0+.<br>
&gt;<br>
&gt; I haven&#39;t tested this beyond the unit tests distributed with Infinispan<br>
&gt; which are starting full Redis servers in single server, sentinel and<br>
&gt; cluster configurations to run the tests, but I am hoping to start<br>
&gt; working on getting integration in to Wildfly 10, which I can test with a<br>
&gt; cache container for web sessions and a simple counter web app.<br>
<br>
</span>I will take a look at the code.<br>
<br>
Thanks again for this awesome contribution.<br>
<span class="HOEnZb"><font color="#888888"><br>
Tristan<br>
</font></span><div class="HOEnZb"><div class="h5">--<br>
Tristan Tarrant<br>
Infinispan Lead<br>
JBoss, a division of Red Hat<br>
_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</div></div></blockquote></div><br></div></div>