node-slack-events-api icon indicating copy to clipboard operation
node-slack-events-api copied to clipboard

Proxy connection through a gateway

Open aoberoi opened this issue 9 years ago • 4 comments

Description

What if we could remove the need for a development proxy (ngrok/localtunnel) by allowing a developer to stand up a gateway service very easily. Then a config flag could be introduced in this module that transparently (without needing any additional code changes) would connect to that gateway using a long-lived connection (such as websocket or HTTP SSE) and receive individual HTTP requests from the gateway. This may ease the use of the Events API substantially by not having to have a sidecar process running while developing. This could be as simple as creating a Heroku Button for deploying the gateway service to Heroku (or other cloud providers).

On the flip side, it introduces some level of non-parity between development and production, which is notoriously a source of bugs in general.

What type of issue is this? (place an x in one of the [ ])

  • [ ] bug
  • [x] enhancement (feature request)
  • [ ] question
  • [ ] documentation related
  • [ ] testing related
  • [ ] discussion

Requirements

  • [x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • [x] I've read and agree to the Code of Conduct.
  • [x] I've searched for any related issues and avoided creating a duplicate issue.

aoberoi avatar Apr 05 '17 22:04 aoberoi

This would be awesome. If we could somehow make this independent from a specific library, and make it more agnostic to a specific language so it could be used with Node, Python, or any other Events API listener, that would be a great solution for a broader range of developers. 🤔

cc @brianleroux @johnagan

Roach avatar Apr 05 '17 22:04 Roach

Also interesting to think about: Can the gateway be implemented super simply and with the same HTTP semantics (request, response) using HTTP/2's multiplexing?

aoberoi avatar Apr 05 '17 22:04 aoberoi

This would be super helpful for getting folks up-and-running quickly.

An AWS Lambda approach w something like Apex would allow for language agnosticism buuut that doesn't help w the local development story---you have to deploy to see the changes. That being said: you have to be online to build a slackbot regardless and deploys are zero downtime, instantly available and take only seconds (depending on how big your handlers are). Its how we're working and I'm super happy with it. I'd be happy to share more of our architecture and how we approach the dev process if there's interest. We plan on bloggin and all that jazz eventually!

brianleroux avatar Apr 06 '17 03:04 brianleroux

https://github.com/slackapi/node-slack-sdk/issues/817

shaydewael avatar Jul 16 '19 20:07 shaydewael