Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment: Serverless option #29

Open
I-Dont-Remember opened this issue Oct 13, 2022 · 2 comments
Open

Deployment: Serverless option #29

I-Dont-Remember opened this issue Oct 13, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@I-Dont-Remember
Copy link
Contributor

I-Dont-Remember commented Oct 13, 2022

Serverless is a common utility in the current age, and allowing people to deploy bots on FaaS providers like AWS Lambda is pretty much a given - whether that's because their company doesn't allow use of external hosting like Fly, or they want to manage costs, or etc.

AWS Lambda is likely the largest contingent, so this work would include:

  • modifying core code to operate in the constraints of an ephemeral function (really just updating Bolt references, or potentially removing entirely and going with the bare SDK). If we abstract enough of the code into utility functions, they could be shared across multiple deployment types.
  • ⚠ Needs an alternative data-store that can be shared across functions.
  • Setting up a serverless.yml file to have any necessary infrastructure as code.
@I-Dont-Remember I-Dont-Remember added the enhancement New feature or request label Oct 13, 2022
@jphorn
Copy link

jphorn commented Oct 13, 2022

Would this work as a Cloudflare Worker as well?

@I-Dont-Remember
Copy link
Contributor Author

Yes, solid idea, especially with it having KV stores, D1 (sql database), the queues coming out, etc!

Would require a decent bit of work to flesh out though. I was playing with the idea recently to see what it would take to have a fully-featured Slack App on Workers, ran into a few things:

  • Bolt-js & even the @slack/web-api won't work out of the box since they are written for Node - things blew up when i tried using.
  • Small team wrote a convenient alternative to web-api for use in Workers and open-sourced it - works great, but may need contributions to unwrap all of the Slack functionality.

Though it sounds like a lot of work to do a rewrite, it actually wouldn't be TOO crazy in this case. A lot of the logic is very simple, the blocks code is language-agnostic, so is definitely possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants