Congratulations! Today is your first job as a software engineer at XASA, the Xpirit Aeronautics and Space Administration. You are responsible for creating a system which reacts to detected Near-Earth Objects (NEOs).
A satellite is continuously scanning the skies for these NEOs. The satellite transmits its findings to ground stations which in turn send the data to Azure.
It's your job to ensure the incoming data is analyzed to assess the risk of impact, stored, and to notify the required organizations of this risk and possible counter-measures (think Armageddon style).
You are tasked with implementing the solution using Azure Functions. The reason behind this is that the number of detected NEOs changes heavily over time. And when nothing is being detected XASA prefers not paying for any infrastructure.
The NEO data (of type DetectedNEOEvent
) looks as follows:
{
"id" : "77c924dc-883c-4f53-922f-7cddb7325121",
"date" : "2019-04-23T18:25:43.511Z",
"distance": 3.5,
"velocity" : 10,
"diameter" : 0.52
}
- Distance is measured in Astronomical Units (AU). Usually between 1-5 AU.
- Velocity is measured in km/s. Usually between 5-30 km/s
- Diameter is measured in km. Usually between 0.0001 and 10 km.
Another team was tasked with the ingestion of the NEO data and this data is already being pushed to an Azure Servicebus topic.
You will be responsible for creating a Function App that is triggered by messages pushed to the Servicebus topic.
The Function App needs to make several calls to other services in order to determine the following:
- The kinetic energy of a potential impact
- The probability of an impact
- The Torino impact
In addition to these service calls, the processed data needs to be stored to blob storage and a notification needs to be sent out if the Torino impact is equal or greater than 8.
The final implementation is also in this repo. However, it is lots more fun, and you learn way more, by creating your own solution and following all the labs. Only peek at my solution if you're completely stuck.
I strongly suggest you team up with someone to do pair programming and discuss what you're doing.
Have fun! Marc
During this workshop we're going to write Azure Functions in C# (.NET Core). The goal of this lab is to very that the required SDKs, IDE and tooling are installed.
Verify that you have a recent .NET Core SDK installed:
- .NET Core SDK (at least 2.2+). Check with typing
dotnet --list-sdks
in the console. - .NET Core SDKs can be downloaded here.
Verify that you have an IDE with extension/plugins for Azure Functions:
- VS 2019 with Azure development workload
- VS Code with Azure Functions extension
- Jetbrains Rider 2019 with the Azure Toolkit Plugin
Verify that you have these tools installed in order to run Azure Functions locally:
- Storage Emulator (Windows only) OR
- Azurite (VS Code extension)
- Optional: Azure Storage Explorer
- VS Code + REST Client or Postman in order to make HTTP requests.
Although most of the labs can be done completely locally it would be fun if you could deploy your Function App to Azure in the final labs. For this you require:
- An Azure account.
- The Azure CLI to create the Azure resources (or you can use the Azure portal to create these).
Completely optional but still useful:
- I have made some code snippets, which can speed up the process (and prevent mistakes) when creating client, orchestrator and activity functions.