building Slack bots since May ‘15 • Built Nestor — https://asknestor.me, a “hosted Hubot” that has been installed in 1300+ Slack teams • Built Relax — an open source message broker that lets you build scalable Slack bots • Run botweekly.com
persistent websocket connection with Slack • Go routines to handle keeping connection alive, health checks and so on • Use Redis to maintain state and allow Relax to be deployed in a highly available configuration • Events are Slack are converted into JSON blobs and are pushed to a Redis queue which can be consumed by a Rails app • Events are not duplicated as they are sent to the web app no matter how many Relax instances are deployed
Heroku dyno (512MB) • Handle tens of thousands of events on a daily basis without skipping a beat • Allows developers to focus on building great value in the bot itself and not worry about scalability
a Go daemon (& Redis) • Web developers overlook that with Slack bots you have to maintain websockets and it’s no longer a stateless Request-Response cycle • People don’t know how their bot is doing in terms of analytics/engagement
hook is called with JSON blobs that represent Relax events • Bot Metrics for free • Write a single line of code to use Botmetrics: https:// github.com/botmetrics