<div dir="ltr">Hi Yuvi,<div><br></div><div>that sounds very interesting! I tried to set up a pipeline system to connect tools on toolserver, this might be very useful for such a system. Some questions:</div><div>* Is the storage in RAM only, or does it use a disk DB? When the redis is restarted, will all entires be gone?</div>

<div>* Is there a time limit on how long data stays in there? Is it based on last request? Can I set one myself?</div><div>* Is there a regis PHP module installed on tools, or do we have to each install out own copy?</div>

<div><br></div><div>Cheers,</div><div>Magnus</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 28, 2013 at 5:42 PM, Yuvi Panda <span dir="ltr"><<a href="mailto:yuvipanda@gmail.com" target="_blank">yuvipanda@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<br>
Redis is now available for tools to use on Tool Labs! Tool Labs<br>
specific documentation available at<br>
<a href="https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Help#Redis" target="_blank">https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Help#Redis</a><br>
<br>
For those who haven't used Redis before - it is a persistant key-value<br>
store (like memcache) but with a lot more features. It can be easily<br>
used to do publish/subscribe between processes, and also maintain<br>
persistant queues. The Wikipedia Article[1] has more information.<br>
<br>
It is already being used by SuchABot (Gerrit <-> GitHub sync) for the<br>
last few weeks, so should be stable for use by other tools too :)<br>
Redis enables/makes easier a lot of things in Tool Labs, such as queue<br>
processing. I'll write up docs about those later on if people are<br>
interested.<br>
<br>
Note on security, copied from the docs:<br>
<br>
Redis has no access control mechanism, so other users can<br>
accidentally/intentionally overwrite and access the keys you set. To<br>
prevent this, it is highly recommended that you prefix all your keys<br>
with an application specific, lengthy, randomly generated secret key.<br>
We have also disabled the redis commands that let users 'list' keys.<br>
Even if you are not worried about security, you should still prefix<br>
your keys in order to prevent accidental key collisions with other<br>
apps - it is highly probably that multiple tools would try to use the<br>
same key (such as lastupdated, etc). To emphasize, PLEASE PREFIX YOUR<br>
KEYS!.<br>
<br>
You can very simply generate a good enough prefix by running the<br>
following command:<br>
<br>
openssl rand -base64 64<br>
<br>
Thanks to Petan, Andrew Bogott, Ryan Lane and Coren for helping get this in!<br>
<br>
[1]: <a href="https://en.wikipedia.org/wiki/Redis" target="_blank">https://en.wikipedia.org/wiki/Redis</a><br>
<br>
--<br>
Yuvi Panda T<br>
<a href="http://yuvi.in/blog" target="_blank">http://yuvi.in/blog</a><br>
<br>
_______________________________________________<br>
Labs-l mailing list<br>
<a href="mailto:Labs-l@lists.wikimedia.org">Labs-l@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/labs-l" target="_blank">https://lists.wikimedia.org/mailman/listinfo/labs-l</a><br>
</blockquote></div><br></div>