
Ask HN: Long-running polling jobs in FaaS? - miraculixx
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.<p>Problem: projectfn and fission both only support short-lived function calls, but no polling servers. This limits what you can do pretty much.<p>Alternatives might be dokku or using a straight forward k8s deployment descriptor.<p>Thoughts?
======
eternalban
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?

~~~
miraculixx
No, in general looking to deploy stateful long-running tasks. This was just an
example. Can be any application that runs on a loop, i.e. not triggered but
polling.

~~~
giaour
You can always write a function that gets triggered on a schedule and then
performs a polling action. For example, instead on continuously polling, have
a Lambda function that polls once and stops immediately if there's no work to
be done yet, then use a CloudWatch Event to run that function once a minute.

