2017.01.11
Slack Hash Store

Created 2017-01-11 / Edited 2017-01-18

Last night at the DC Perl Mongers meetup we collaboratively built a proof-of-concept for storing key/value pairs as messages in a slack channel, https://github.com/plicease/globalhash. This was made straightforward by great Slack API docs and cpan:WebService::Slack::WebApi. Example usage:

# writes "hello=world" into the #globalhash channel $ globalhash set hello world

reads the #globalhash channel for the most

recent value of hello and prints it

$ globalhash get hello
world

There are of course a TON of things you could do from here. Some ideas:

  • More features: list of keys, delete, complex values, binary values, value history
  • Clean implementation and better usage/error messaging, docs
  • Port to other languages -- perl6 and still using the perl5 module would be fun
  • Register as a slack app that anyone can use, fix up OAuth or whatever