[Labs-l] Redis now available in Tool Labs

Yuvi Panda yuvipanda at gmail.com
Fri Jun 28 16:42:23 UTC 2013


Hello!

Redis is now available for tools to use on Tool Labs! Tool Labs
specific documentation available at
https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Help#Redis

For those who haven't used Redis before - it is a persistant key-value
store (like memcache) but with a lot more features. It can be easily
used to do publish/subscribe between processes, and also maintain
persistant queues. The Wikipedia Article[1] has more information.

It is already being used by SuchABot (Gerrit <-> GitHub sync) for the
last few weeks, so should be stable for use by other tools too :)
Redis enables/makes easier a lot of things in Tool Labs, such as queue
processing. I'll write up docs about those later on if people are
interested.

Note on security, copied from the docs:

Redis has no access control mechanism, so other users can
accidentally/intentionally overwrite and access the keys you set. To
prevent this, it is highly recommended that you prefix all your keys
with an application specific, lengthy, randomly generated secret key.
We have also disabled the redis commands that let users 'list' keys.
Even if you are not worried about security, you should still prefix
your keys in order to prevent accidental key collisions with other
apps - it is highly probably that multiple tools would try to use the
same key (such as lastupdated, etc). To emphasize, PLEASE PREFIX YOUR
KEYS!.

You can very simply generate a good enough prefix by running the
following command:

openssl rand -base64 64

Thanks to Petan, Andrew Bogott, Ryan Lane and Coren for helping get this in!

[1]: https://en.wikipedia.org/wiki/Redis

--
Yuvi Panda T
http://yuvi.in/blog



More information about the Labs-l mailing list