An Azure Function implemented in Java for checking whether or not a number is prime.
-
Show how CPU-intensive computation can be off-loaded from a mobile app to the cloud, by comparison to a mobile device, an unlimited resource for computation and storage.
-
End-to-end example of continuous integration (CI), continuous deployment/delivery (CD), and DevOps in Java using Azure Functions.
See also the corresponding mobile app.
To use, put the number to be checked in the query string of the deployed function, e.g.
https://primechecker.azurewebsites.net/api/isPrime?number=7
See Quickstart: Create a Java function in Azure from the command line.
Test with
$ mvn test
Run locally with
$ mvn azure-functions:run
and use via the provided local URLs.
Visit the Function App section of the Azure portal.
A function app can have one or more functions. Drill into a specific function:
Home > Function App > primechecker > isPrime
In it's Code + Test section, you can verify the mapping between the function's published entry point and the corresponding method implementation:
"entryPoint": "edu.luc.cs.cs371.primechecker.web.PrimeCheckerFunction.run",
There, you can press the Test/Run button to interact directly with the function: