Skip to content

Instantly share code, notes, and snippets.

@noam87
Created March 23, 2016 17:47
Show Gist options
  • Save noam87/77d5e0a6b42f1f821b10 to your computer and use it in GitHub Desktop.
Save noam87/77d5e0a6b42f1f821b10 to your computer and use it in GitHub Desktop.
.-------------------. .-------------------. |
| SlackController | | KickController | | Receive commands
'-------------------' '-------------------' | from users.
| | |
v v |
.------------------. .----------------. |
| IncomingSlackJob | | IncomingKikJob | | Kick off async jobs.
'------------------' '----------------' |
| | |
v v |
.-------------------. .-------------------. | Convert service-specific JSON
| Normalizer::Slack | | Normalizer::Kick | | command into internal format.
'-------------------' '-------------------' |
\ / |
v v |
.---------------------. | Figure out command type
| Command::EntryPoint | | and forward to proper
'---------------------' | response class.
/ \ |
v v |
.----------------. .----------------. |
| Response::Help | | Response::Help | | Generate response.
'----------------' '----------------' |
\ / |
v v |
.---------------------------. | Turn response back into
| Denormalizer::Kik | | service-specfic format.
'---------------------------' |
| | |
v v |
.----------------..----------------. |
| Responder::Kik || Responder::Kik | | Send response to bot
'----------------''----------------' | service server.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment