Hacker News new | ask | show | jobs
by tobyhede 2065 days ago
I've been doing serverless in anger for years. My vision is to use annotations or decorators to tag functions and have the implementation transparently handled.

@spawn //makes this a lambda

function fn() ... {}

@queue //makes this a queued function sqs or similar

function fn() ... {}

2 comments

im thinking along the same lines, it'd be even better if there was built in retrying or event based message queuing, time out, and default error message if it really fails for all funcs .... await fn(); // -> {err: 'timedout'}