It's about putting together some of the most interesting Azure Serverless resources to build a cloud-native application that uploads Market Data to Blob storage and then, in a event-based, fashion builds Bollinger Bands as Trading Strategy inputs. It also provides an API to get the bands.
Main features:
- Event Grid, with a custom Topic and Event, for even-based communication.
- Azure Functions for the Serverless code.
- Azure Data Factory for the data transformation pipeline, i.e., from row Market Data to Bollinger Bands and event notification.
- Azure Logic App for triggering the front-to-back process and workflow managements. Specifically, it gets triggered by a custom event.
- Azure Key Vault for storing storage and event grid topic secrets.
- Event Grid Topic subscriptions to Function Apps.
The whole workflow gets triggered by raising the event "MarketDataAvailable", technically by calling a RESTful endpoint running on a Azure Function:
curl -d '{"EventType":"MarketDataAvailable", "EventData":"no data"}' -H "Content-Type: application/json" -X POST https://workflow-manager-function.azurewebsites.net/api/EventPublisher?code=xxx
I've managed the access to resources in a mixed way:
- Through directly using resource keys, which is a no-go for productive systems.
- Through Service Principal. That's good, but not ideal, from my point of view.
- Through Managed Identities, both System (MSI) or User generated. ...
- Ubuntu 19.04.
- IntelliJ.
- Java 8. (Version 8 due to compatibility with the Azure Functions Java Runtime being capped at that Java version).
First off, request an Azure free account, then install the following:
- Azure CLI.
- Azure Functions Core Tools.
- .NET Core, required for building Azure Functions with triggers like EventGrid.
Very useful link on how to create an Azure Functions project with IntelliJ from an archetype, package and deploy to an Azure subscription.