redibot: Bring redis into the Conversation!
So I decided to code my first Slack bot the other day. I was looking to learn the most basic concepts of how a server communicates with Slack to create the bot experience, while hopefully creating something useful while I’m at at.
This is how redibot was born. I hacked on the project for a few hours during one evening and the result was surprisingly useful IMHO.
redibot is basically a go application that communicates with Slack RTM API on one hand (this is the API for real time communication within Slack. As you can imagine, this communication is websockets-based) and redis on the other hand (using the awesome redigo package ).
Initially I was looking to replicate the redis-cli experience of running redis commands from within Slack. The idea was to make it easier for the team to work with redis by using Slack instead of having to use redis-cli on the side.
While I was at it, a couple of interesting things happened.
It turns out that Slack’s collaborative nature works pretty well when integrated with a DB-platform likeredis.
Often times you may find channels where the team discusses a day-to-day operation which requires access to data. For example, on a certain channel, you may have the QA person asking something about data from yesterday. This will be followed by a response from one or more of the engineers on the team, and then perhaps the data scientist would step in providing a query to be ran.
This all becomes a lot more comfortable when used directly from Slack. Everyone is exposed to the sequence of the redis commands used to produce the story which the data tells us. The data itself is of course right there as well. I found this to be very useful.Pub-sub using redis with Slack can change the way you use notifications on Slackforever
Well, perhaps that’s being a bit being over dramatic, but with redibot, since you can publish and subscribe to an arbitrary redis channel directly from Slack, you no longer need any other notification mechanism.
All of your servers which have access to publish to redis can now push notifications directly into Slack, without having to go through web hooks. This is especially useful if you already have lots of backends working with redis. They now have a simple way of reporting stuff to Slack without significant code changes.Contribute!
redibot is open source and it would be cool to have this nice little project become something more serious.