Azure Events Queues and Processing Flashcards
What set of solutions can Azure Event Hubs provide?
How does it differ from IOT Hubs?
Both solutions are designed for data ingestion at a massive scale
Azure Event Hubs is a big data streaming platform and event ingestion service.
It can receive and process millions of events per second.
Event Hubs uses a partitioned consumer model, enabling multiple applications to process the stream concurrently
IOT Hubs use Event Hubs for it’s telemetery flow path.
But it is a separate service tailored for IOT devices - it enables Bi Directional communication so you can send commands and policies back to devices.
Microsoft recommends using Azure IoT Hub to connect IoT devices to Azure
If you want to process incoming data 24-7 from a device such as a weather station.
What solution would be ideal, and what pricing plan would you recommend?
An Azure Function with an IOT Hub trigger.
You would need to make sure it is configured to be “Always On” so it’s warmed up
You only get that on the Premium Plan
If you need to Audit the data, specify a Storage account as the output binding
You might need to Read related data from other services or storage, You would request these dependencies as parameters using an Input binding
You need to react to events happening in the systems components, which is the correct technology?
Event Grid
Event Hub
Azure Notification Hub
IOT Hub
Event Grid
You can add Event Grid bindings to the following services that are referenced in the Az-204 text book
Azure App Configuration Azure Blob Storage Azure Container Registry Azure Event Hubs Azure IoT Hub Azure Key Vault Azure Resource groups Azure Service Bus
As well as: Azure SignalR Azure subscriptions Azure Communication Services Azure Media Services Azure Machine Learning Azure Maps
True or False:
To trigger a function from an event you MUST configure Azure Event Grid
False
You can configure triggers based on events in some services directly
Azure Event Grid Azure Blob Storage Azure Event Hubs Azure Cosmos DB Azure Service Bus Azure Queue storage
https://docs.microsoft.com/en-us/azure/azure-functions/functions-triggers-bindings?tabs=csharp
A series of functions should execute in a specific order, with the output of one function applied to the import of the next function.
What is this pattern known as?
Function chaining
https: //docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=csharp#chaining
https: //docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=csharp
https: //docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-types-features-overview
Multiple functions execute in parallel, and then wait for all functions to finish when aggregation work is done on the results from the functions.
What is this pattern known as?
Fan-out/fan-in
https: //docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=csharp#fan-in-out
https: //docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-orchestrations?tabs=csharp
Example use case for Backups
https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-cloud-backup?tabs=csharp
For Azure Functions
Event data provided in batches by multiple sources over a period of time must be combined into a single addressable entity - what is this pattern known as
Aggregation
You can use Durable entities
https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=csharp#aggregator
What are Durable Functions?
Durable Functions is an extension of Azure Functions. You can use Durable Functions for stateful orchestration of function execution.
A durable function app is a solution that’s made up of different Azure functions. Functions can play different roles in a durable function orchestration.
Stateless functions present problems of concurrency control
Not only do you need to worry about multiple threads modifying the same data at the same time, you also need to worry about ensuring that the aggregator only runs on a single VM at a time.
You can use Durable entities to preserve state in a Function App
What is an Entity Function?
Entity functions define operations for reading and updating small pieces of state, known as durable entities.
Like orchestrator functions, entity functions are functions with a special trigger type, the entity trigger.
Entity functions and related functionality are only available in Durable Functions 2.0 and above.
What are Durable Orchestrations?
You can use an orchestrator function to orchestrate the execution of other Durable functions within a function app. Orchestrator functions have the following characteristics:
Define function workflows using procedural code. No declarative schemas or designers are needed.
Can call other durable functions synchronously and asynchronously. Output from called functions can be reliably saved to local variables.
Durable and reliable. Execution progress is automatically checkpointed when the function “awaits” or “yields”. Local state is never lost when the process recycles or the VM reboots.
Can be long-running. The total lifespan of an orchestration instance can be seconds, days, months, or never-ending.
https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-orchestrations?tabs=csharp
If you haven’t previously used Event Grid in your Azure subscription, you might need to register the Event Grid resource provider as the first step to completing your integration.
What is the Azure cli command to enable Event Grid functionality within a subscription?
az provider register –namespace Microsoft.EventGrid
You can check the status with
az provider show –namespace Microsoft.EventGrid –query “registrationState”
https://docs.microsoft.com/en-us/azure/event-grid/custom-event-quickstart
A client in the Marketing department wants to review uploaded files submitted to Azure Storage Blobs, so that they can sign them off for use in marketing campaigns
You have configured the application to upload the files and a trigger to begin the process.
The advert review process should be managed by members of the creative team, because it will need to change regularly. The creative team would prefer not to have to wait for a developer to become available whenever a change is needed.
You have hired a small team of developers to do the work and you prefer a design-first approach.
Which technology should you use to automate the advert review process?
A Microsoft Power Automate
B Azure Logic Apps
C Azure Functions
D Azure App Service Web Jobs
A Microsoft Power Automate
Implement the workflow using Microsoft Power Automate because this allows the creative team, who are not developers, to manage the flow.
None of the other technologies allow the creative team, who are not developers, to manage the flow.
https: //docs.microsoft.com/en-us/learn/modules/choose-azure-service-to-integrate-and-automate-business-processes/6-knowledge-check
https: //docs.microsoft.com/en-us/learn/modules/choose-azure-service-to-integrate-and-automate-business-processes/
A client in the Marketing department wants to review uploaded files submitted to Azure Storage Blobs, so that they can sign them off for use in marketing campaigns
You have configured the application to upload the files and a trigger to begin the process.
The feedback collection process calls an on-premises SharePoint server. Because this server is not as reliable as a cloud-based server would be, developers want to carefully control the way the workflow retries this connection, if there is a failure.
You have hired a small team of developers to do the work and you prefer a design-first approach.
Which technology should you use to automate the feedback collection process?
A Microsoft Power Automate
B Azure Logic Apps
C Azure Functions
D Azure App Service Web Jobs
Azure App Service Web Jobs
This is the only technology that allow developers to control retry policies.
Therefore all other answers are incorrect
https: //docs.microsoft.com/en-us/learn/modules/choose-azure-service-to-integrate-and-automate-business-processes/6-knowledge-check
https: //docs.microsoft.com/en-us/learn/modules/choose-azure-service-to-integrate-and-automate-business-processes/
You work for a company that makes digital cameras. The company has recently acquired a smaller company that makes lenses. You want to ensure that the same procedures are in use throughout the company for the following processes:
Lens quality control. The company you acquired has a good reputation for lens reliability because of its quality control procedure. You want to implement this procedure across the merged company and integrate it with your parts ordering system, which includes a REST API.
Ordering and dispatch. The company you acquired had no formal order and dispatch procedure, so you want to ensure its employees use your original business procedure. The ordering system has a user interface that is built as an Azure App service web app but you want to manage the order and dispatch workflow as a separate project.
You have hired a small team of developers to do the work and you prefer a design-first approach.
which technology would you use for the lens quality control procedure?
A Microsoft Power Automate
B Azure Logic Apps
C Azure Functions
D Azure App Service Web Jobs
Azure Logic Apps is the only one of the four technologies that provides a design-first approach intended for developers.
https: //docs.microsoft.com/en-us/learn/modules/choose-azure-service-to-integrate-and-automate-business-processes/6-knowledge-check
https: //docs.microsoft.com/en-us/learn/modules/choose-azure-service-to-integrate-and-automate-business-processes/
What is the Design First approach in Azure Logic Apps
In the design-first approach, you can visualize the workflow and therefore easily understand the business processes.
As the diagram is not a separate document, there is no possibility that the diagram is not updated when the process is changed.
Logic Apps are the technology provided by Microsoft to enable this.
Choose queue storage if:
If your requirements are simple, if you want to send each message to only one destination, or if you want to write code as quickly as possible, a storage queue may be the best option
You need a simple queue with no particular additional requirements
You need an audit trail of all messages that pass through the queue
You expect the queue to exceed 80 GB in size
You want to track progress for processing a message inside of the queue
Choose Service Bus queues if:
You need an at-most-once delivery guarantee
You need a FIFO guarantee
You need to group messages into transactions
You want to receive messages without polling the queue
You need to provide role-based access to the queues
You need to handle messages larger than 64 KB but smaller than 256 KB
Your queue size will not grow larger than 80 GB
You would like to be able to publish and consume batches of messages