WebJob or Function, something else?

Walshy 6 Reputation points
2022-08-13T06:03:07.09+00:00

Apologies for this vague question but I'm just learning azure and need some help. To learn how azure works I've written a console app that calls a third party API and gets some soccer statistics from live matches and stores them in a db.

I also have a list of start times for these matches and only want to collect statistics when matches are playing (ie have the console execute every minute when there are matches going).

I really don't want this running when there is no matches going on? Any ideas?

And.... Should this be a function or something else? Sorry for the ramble.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,257 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,868 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Takahito Iwasa 4,841 Reputation points MVP
    2022-08-15T01:54:05.457+00:00

    Hi, @Walshy

    In short, a server process that runs periodically should check the list of start times you have, and if it's game time, do some further processing, and if it's not game time, don't do anything.

    The first thing that came to my mind was Durable Functions.

    https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=csharp

    With Durable Functions, you can use orchestration functions to perform individual statistical operations. In this case, if the orchestration function can determine that it is the game time, I think that the statistical function should be executed.

    You can also implement a program that connects to some database from Azure Functions and saves statistics.

    Note: Serverless applications generally have limited computing resources, so you should check in advance if Functions is a good fit.

    https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits#azure-functions-limits

    1 person found this answer helpful.