Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Long-running polling jobs in FaaS?
4 points by miraculixx 3 days ago | hide | past | web | favorite | 7 comments
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?






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.


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

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

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.

Are you doing uptime checks?

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.

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.



Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: