Skip to content

Instantly share code, notes, and snippets.

@vsapsai
Last active August 15, 2017 03:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vsapsai/b7a0c89ffc59f2a9a20c052f82706e06 to your computer and use it in GitHub Desktop.
Save vsapsai/b7a0c89ffc59f2a9a20c052f82706e06 to your computer and use it in GitHub Desktop.
Wishful thinking regarding serverless services.

Main usage for serverless service I have in mind is GitHub integration. Specifically, I'd like to have

  • email notifications for various events,
  • CI support for pull requests,
  • time-based issue closing.

What I expect from a serverless framework:

  • abstract away underlying provider
  • help with local development
    • monitor consumed resources
    • help with testing functions with different input
  • easy unit testing
  • packaging
    • including packaging dependencies
    • support for native code
  • deployment integration. Not deploying itself but integrating with existing process
#!/usr/bin/env python
# Bind a function to some URL.
@app.route("/")
def handle_webhook(app, context, input, whatever):
app.send_event(input)
# Have some event-based system. Concrete implementation (some queues, for
# instance) should be abstracted out.
@app.handle_event()
def handle_event(app, context, event):
# TODO: send email
pass
# Another way to trigger serverless function is on schedule.
@app.schedule()
def daily_job(app, context):
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment