HACKER Q&A
📣 miraculixx

Long-running polling jobs in FaaS?


Scenario: We need to deploy several long-running polling servers that poll some source (e.g. web page, database). Deployment should work very much like in FaaS such as projectfn, fission.

Problem: projectfn and fission both only support short-lived function calls, but no polling servers. This limits what you can do pretty much.

Alternatives might be dokku or using a straight forward k8s deployment descriptor.

Thoughts?


  👤 eternalban Accepted Answer ✓
The conceptually consistent approach would note that a "long running polling job" is not a function. Architecturally this seems to necessitate a traditional non-FaaS foundation of some sort. A "long running job" (aka as a process in the entirely unhip ancient history of IT) can call from this foundation to "functions" that perform a poll on a resource.

I look at your scenario's stated requirements and wonder how did an asset deployment requirement morph into a operational and computational model requirement.


👤 samblr
Consider trying gcp cloud run. It enables to run a docker in serverless fashion. Or fargate in aws.

👤 potta_coffee
Encountered similar constraints in our project, we moved from Lambda to running tasks in ECS.

👤 whb07
get a raspberry pi and run your script at home 24/7. As long as you have access to the internet this would be a neat little way to do it.

👤 verdverm
Are you doing uptime checks?