Event Driven Solutions Flashcards
Events
What are the Event Types?
(1) Event Grid
(2) Event Hub
(3) Notification Hub
Event Grid - Descrete: Report changes and are actionable
Event Hub - Series: Report a condition, time-ordered, and analyzable
Notification Hub - User Notification: Promp user or their device for attention
Event Grid
What is the Event Grid?
(1) Serverless proposition
(2) Publisher emit and subscribers consume
(Azure or Custom)
(3) Supports many subscribes to one publisher
(4) Filter Events
(5) Scalable up and down to 0
(6) Pay for what you use
Event Grid
Create an Event Grid Steps
(1) Create resource group
(2) Provider Registration
(3) Check registration status
(4) Create a custom topic
(5) Create a message endpoint
Event Grid
What are the Pub/Sub Concepts?
(1) Event signifies something has changed
(2) Publisher HAS NO expectation of what happens with event
(3) Subscribers determines what to do with event
Event Grid
What are the main Event Grid Terminology?
(1) Events
(2) Publishers
(3) Topics
(4) Subscriptions
(5) Handlers
Event Grid
Name some examples of Event Publishers
(1) App Configuration
(2) App Service
(3) Blob Storage
(4) Communication Services
(5) Container Registry
(6) Event Hubs
(7) IoT Hub
(8) Keyvault
Event Grid
What are Custom Topics?
(1) User defined
(2) Same message schema as Azure Topics
(3) Can send custom info with message
Event Grid
Some examples of Event Handlers for Event Grids
(1) Azure Functions
(2) Event Hubs
(3) Service Bus
(4) Storage Queues
(5) Web Hooks
Event Grid
Overview of Event Grids
Event-based architecture (Pub/Sub)
Event Grid can filter, support many subscribers and highly scalable
Pay for what you use
Many built-in Azure services supported
Can also create custom event and topics
Event Hub
What are the Event Hub Fundelmentals?
(1) Scalable event processing service
(2) Big data scenarios
(3) Millions of events/second
(4) Decouples sending and receiving data
(5) Integrates with Azure and Non-Azure services
(6) Captures events to Azure Blob or Data Lake
Event Hub
What types of scenarios would Event Hub be used?
(1) Telemetry
(2) Data archival
(3) Transaction processing
(4) Anomaly detection
Event Hub
Container for Event Hubs has
(1) Scoping container
(2) Contains one or more Event Hubs
(3) Options apply to all
(4) Throughput units
Event Hub
Components for Event Hubs
(1) Namespace
(2) Event Producers
(3) Partitions (Bucket of messages, more than one partition per Event Hub)
(4) Consumer Groups (view of Event Hub)
(5) Consumers (application that reads events)
Event Hub
Event Hub Creation using CLI
Part 1
az eventhubs namespace –resource-group $rgname –location $loc –name $ns –sku [Standard, Basic]
Part 2
az eventhubs eventhub create –name $eventhubname –namespace $ns –message-retention 3 –partition-count 4 –resource-group $rgname
Namespace must be created before
Message retention 1 - 7 days (default?)
Partition count 2 - 32
Compare Standard and Basic skus for Event Hubs
Event Hub
Steps to set up to Send Events to Event Hub (C#)
(1) Install .NET SDK
(2) Obtain connection info
(3) Open Connection
(4) Prepare data
(5) Send data
Event Hub
Charateristics of Partitions
(1) Like a bucket for messages
(2) Holds event time-ordered as they arrive
(3) Events are not deleted once read
(4) Event Hubs decides with partition events are sent to
(can specify partition with partition key)
(5) Maximum 32 partitions
(6) Create as many as expected concurrent subscribers
Event Hub
Steps to read events from Event Hub
(1) Install .NET SDK
(2) Obtain connection info
(3) Open connection
(4) Retrieve data
(5) Decode data
Notification Hubs
Azure Notification Hub Fundelmentals
(1) Send push notifications
(2) Send to multiple platforms
(3) ANH providers abstraction over plantform notification services
Notification Hubs
Features of Notification Hubs
(1) Cross-platform
(2) Multiple deliver formats
(3) Telemetry
(4) Scalable
Multiple delivery formats include push to user, push to device, locationation, and slient push
Notification Hubs
Components of the Notification Service
(1) Platform Notification Service (PNS)
* (Vendor Specific)*
(2) Notification Hub
* (Communicates to PNS)*
(3) Notification Hub Namespace
* (Regional collection of hubs)*
Notification Hubs
Overview of Notification Hubs
(1) Namespace is a collection of Notification Hubs
(2) Usually one namespace per application
(3) One hub per application environment
(4) Credentials at Namespace level
(5) Billing at namespace level
Notification Hubs
Sending Notifications Workflow
(1) Setup PNS’s
(2) Setup ANH
(namespace and hub)
(3) Map PNS to ANH
(apply keys from PNS)
(4) Register devices
(Use .NET SDK Web API Backend)
(5) Send Pushes
* (.NET SDK via web API Targeted, silent, broadcast, etc)*