SlideShare une entreprise Scribd logo
1  sur  31
Introduction
Evolution Technologies is an innovative software-solutions company based in the United Arab Emirates. We are intensely proud of our team of highly
professional software engineers and developers. We started our operations in UAE since June 2014 under the Microsoft BizSpark partnership program .
Our Products Managing more 6 Billion USD AUM for our clients. One of the most talented Team of Software and business expert in region.
Usama Wahab Khan,
Chief Technology Officer at Evolution Technologies (Microsoft MVP)
Mr. Khan holds the prestigious award of Microsoft Most Valuable Professional (MVP). Indeed, he is one of
the most prominent Microsoft architect experts in the Gulf region and MIT Trained Artificial Intelligence
Professional. He is a keynote speaker in many conferences, related to various topics such as Microsoft Cloud
Technologies , Business Intelligence and AI. He authored Multiple books on Artificial Intelligence Professional
,Machine Learning ,Business Intelligence and digital transformation.
We are Leading Microsoft Cloud Partner and Solution Provider with focus on capital market.
Providing state of the art technologies an cloud solution for Private Equity firm , Investment
banks and real state fund.
Valuable Clients
Compareion Cloud Services
What is Function-as-a-Service (FaaS)?
FaaS is the concept of serverless computing via serverless
architectures. Software developers can leverage this to deploy
an individual “function”, action, or piece of business logic.
They are expected to start within milliseconds and process
individual requests and then the process ends.
Serverless Computing (FaaS)
• Function as a Service (Azure Functions)
• Platform to develop, run, and manage application
• Without the complexity of building and maintaining the
infrastructure
Similar Technologies
• AWS Lambda
• Google Cloud Functions
• Open Whisk (IBM)
Azure Functions
Process events with Serverless code.
Make composing Cloud Apps insanely easy
Develop Functions in C#, Node.js, F#, Python, PHP, Batch and more
Easily schedule event-driven tasks across services
Expose Functions as HTTP API endpoints
Scale Functions based on customer demand
Easily integrate with Logic Apps
What can Azure Functions do?
• Run code based on HTTP requests
• Schedule code to run at predefined times
• Process new and modified:
• Azure Cosmos DB documents
• Azure Storage blobs
• Azure Queue storage messages
• Respond to Azure Event Grid events by using subscriptions and filters
• Respond to high volumes of Azure Event Hubs events
• Respond to Azure Service Bus queue and topic messages
12
Azure Functions architecture
Built on top of App Service and WebJobs SDK
Function integrations
Azure Functions hosting
https://github.com/azure/azure-functions-host (+other repos)
App Service plan
Code or container
Windows or Linux
Core Tools + favorite editor
Code or container
Windows, macOS, or Linux
●●●
+
Azure Functions host
runtime
Azure Functions Core
Tools
Azure Functions base
Docker image
Azure Functions .NET
Docker image
Azure Functions Node
Docker image ●●●
Premium plan
Windows or Linux
Consumption plan
Code
Windows or Linux
Platform
App delivery
OS
Code or container
• App Service offers dedicated and dynamic tiers.
• Dedicated is the existing App Service plan tiers
• Basic, Standard, Premium
• Pay based on # of reserved VMs
• You’re responsible for scale
• Dynamic
• Pay on number of executions
• Platform responsible for scale
15
Platform and scaling
Pay per execution model - two meters, three units
• Number of executions
• Duration of execution x reserved memory
16
Dynamic Tier Pricing
Input and Output Bindings
Trigger types
• Triggers based on Azure services:
• Cosmos DB
• Blob and queues
• Service Bus
• Event Hub
• Triggers based on common scenarios:
• HTTP request
• Scheduled timer
• Triggers based on third-party services:
• GitHub
• And more…
Trigger and Bindings example
Demo Azure function
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.
Durable Functions
• Write stateful functions in a stateless environment
• Manages state, checkpoints, and restarts
• Defines an Orchestrator function
• Workflows are defined in code
• Calls other functions synchronously or asynchronously
• Checkpoint progress whenever function awaits
Example :Serverless batch processing with Durable Functions in Azure
Container Instances
1.The batch processing job is packaged into a container image stored in Azure
Container Registry (ACR), ready to deploy with options like AKS, Service Fabric, or ACI.
2.An HTTP trigger invokes the orchestrator function to orchestrate the container
deployment.
3.An activity function uses the container image stored in ACR to create an ACI
container in a container group.
4.The orchestrator function uses the container URL to call and start the batch
processing job on the container instance, and to monitor job progress.
5.Once the job completes, the batch processing job invokes the orchestrator function
by raising an external event, and provides job status Completed or Failed.
6.Depending on job status, the orchestrator function stops, restarts, or deletes the
container group.
Durable Function scenario - Chaining
Function chaining refers executing a sequence of functions in a particular order. Often, the
output of one function needs to be applied to the input of another function.
Durable Function scenario - Fan-out/fan-in
Fan-out/fan-in refers to the pattern of executing multiple functions in parallel, and then waiting
for all to finish
Durable Function scenario - Async HTTP APIs
Durable Functions provides built-in APIs that simplify the code that you write for interacting with
long-running function executions
Durable Function scenario - Monitoring
The monitor pattern refers to a flexible recurring process in a workflow—for example, polling
until certain conditions are met
Durable Function scenario - Human
interaction
Many processes involve human interaction. Automated processes must allow for human low
availability, and they often do so by using time-outs and compensation logic.
C#
Durable Function scenario - Chaining code
[FunctionName("Chaining")]
public static async Task<object> Run(
[OrchestrationTrigger] IDurableOrchestrationContext context)
{
try
{
var x = await context.CallActivityAsync<object>("F1", null);
var y = await context.CallActivityAsync<object>("F2", x);
var z = await context.CallActivityAsync<object>("F3", y);
return await context.CallActivityAsync<object>("F4", z);
}
catch (Exception)
{
// Error handling or compensation goes here.
}
}
Durable Function scenario - Fan-out/fan-in
code
[FunctionName("FanOutFanIn")]
public static async Task Run([OrchestrationTrigger] IDurableOrchestrationContext context)
{
var parallelTasks = new List<Task<int>>();
// Get a list of N work items to process in parallel.
object[] workBatch = await context.CallActivityAsync<object[]>("F1", null);
for (int i = 0; i < workBatch.Length; i++)
{
Task<int> task = context.CallActivityAsync<int>("F2", workBatch[i]);
parallelTasks.Add(task);
}
await Task.WhenAll(parallelTasks);
// Aggregate all N outputs and send the result to F3.
int sum = parallelTasks.Sum(t => t.Result);
await context.CallActivityAsync("F3", sum);
}
Thank you

Contenu connexe

Similaire à ServerLess by usama Azure fuctions.pptx

Serverless API with Azure Functions
Serverless API with Azure FunctionsServerless API with Azure Functions
Serverless API with Azure FunctionsAnalben Mehta
 
Getting started with development in azure
Getting started with development in azureGetting started with development in azure
Getting started with development in azureJasjit Chopra
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"Volker Linz
 
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Amazon Web Services
 
Azure Serverless Toolbox
Azure Serverless ToolboxAzure Serverless Toolbox
Azure Serverless ToolboxJohan Eriksson
 
Serverless architecture
Serverless architectureServerless architecture
Serverless architecturevipin kumar
 
Building stateful serverless orchestrations with Azure Durable Azure Function...
Building stateful serverless orchestrations with Azure Durable Azure Function...Building stateful serverless orchestrations with Azure Durable Azure Function...
Building stateful serverless orchestrations with Azure Durable Azure Function...Callon Campbell
 
Durable Azure Functions
Durable Azure FunctionsDurable Azure Functions
Durable Azure FunctionsPushkar Saraf
 
Serverless Architecture
Serverless ArchitectureServerless Architecture
Serverless Architecturejuly mon
 
GIDS 2019: Developing Apps with Containers, Functions and Cloud Services
GIDS 2019: Developing Apps with Containers, Functions and Cloud ServicesGIDS 2019: Developing Apps with Containers, Functions and Cloud Services
GIDS 2019: Developing Apps with Containers, Functions and Cloud ServicesPatrick Chanezon
 
Develop in ludicrous mode with azure serverless
Develop in ludicrous mode with azure serverlessDevelop in ludicrous mode with azure serverless
Develop in ludicrous mode with azure serverlessLalit Kale
 
Introduction to Azure Functions
Introduction to Azure FunctionsIntroduction to Azure Functions
Introduction to Azure FunctionsCallon Campbell
 
DevOps, Microservices and Serverless Architecture
DevOps, Microservices and Serverless ArchitectureDevOps, Microservices and Serverless Architecture
DevOps, Microservices and Serverless ArchitectureMikhail Prudnikov
 
AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)Ashish Kushwaha
 
Devoxx 2018 - Pivotal and AxonIQ - Quickstart your event driven architecture
Devoxx 2018 -  Pivotal and AxonIQ - Quickstart your event driven architectureDevoxx 2018 -  Pivotal and AxonIQ - Quickstart your event driven architecture
Devoxx 2018 - Pivotal and AxonIQ - Quickstart your event driven architectureBen Wilcock
 
Building workflow solution with Microsoft Azure and Cloud | Integration Monday
Building workflow solution with Microsoft Azure and Cloud | Integration MondayBuilding workflow solution with Microsoft Azure and Cloud | Integration Monday
Building workflow solution with Microsoft Azure and Cloud | Integration MondayBizTalk360
 
Serverless with Firebase - Launchpad Build Burgos
Serverless with Firebase - Launchpad Build Burgos Serverless with Firebase - Launchpad Build Burgos
Serverless with Firebase - Launchpad Build Burgos Carlos Azaustre
 

Similaire à ServerLess by usama Azure fuctions.pptx (20)

Serverless API with Azure Functions
Serverless API with Azure FunctionsServerless API with Azure Functions
Serverless API with Azure Functions
 
Getting started with development in azure
Getting started with development in azureGetting started with development in azure
Getting started with development in azure
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"
 
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
Integrating Infrastructure as Code into a Continuous Delivery Pipeline | AWS ...
 
Azure Service Fabric Overview
Azure Service Fabric OverviewAzure Service Fabric Overview
Azure Service Fabric Overview
 
Azure Serverless Toolbox
Azure Serverless ToolboxAzure Serverless Toolbox
Azure Serverless Toolbox
 
Apache OpenWhisk
Apache OpenWhiskApache OpenWhisk
Apache OpenWhisk
 
Serverless architecture
Serverless architectureServerless architecture
Serverless architecture
 
Building stateful serverless orchestrations with Azure Durable Azure Function...
Building stateful serverless orchestrations with Azure Durable Azure Function...Building stateful serverless orchestrations with Azure Durable Azure Function...
Building stateful serverless orchestrations with Azure Durable Azure Function...
 
Durable Azure Functions
Durable Azure FunctionsDurable Azure Functions
Durable Azure Functions
 
Serverless Architecture
Serverless ArchitectureServerless Architecture
Serverless Architecture
 
GIDS 2019: Developing Apps with Containers, Functions and Cloud Services
GIDS 2019: Developing Apps with Containers, Functions and Cloud ServicesGIDS 2019: Developing Apps with Containers, Functions and Cloud Services
GIDS 2019: Developing Apps with Containers, Functions and Cloud Services
 
Develop in ludicrous mode with azure serverless
Develop in ludicrous mode with azure serverlessDevelop in ludicrous mode with azure serverless
Develop in ludicrous mode with azure serverless
 
Azure Functions
Azure FunctionsAzure Functions
Azure Functions
 
Introduction to Azure Functions
Introduction to Azure FunctionsIntroduction to Azure Functions
Introduction to Azure Functions
 
DevOps, Microservices and Serverless Architecture
DevOps, Microservices and Serverless ArchitectureDevOps, Microservices and Serverless Architecture
DevOps, Microservices and Serverless Architecture
 
AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)AWS Serverless Introduction (Lambda)
AWS Serverless Introduction (Lambda)
 
Devoxx 2018 - Pivotal and AxonIQ - Quickstart your event driven architecture
Devoxx 2018 -  Pivotal and AxonIQ - Quickstart your event driven architectureDevoxx 2018 -  Pivotal and AxonIQ - Quickstart your event driven architecture
Devoxx 2018 - Pivotal and AxonIQ - Quickstart your event driven architecture
 
Building workflow solution with Microsoft Azure and Cloud | Integration Monday
Building workflow solution with Microsoft Azure and Cloud | Integration MondayBuilding workflow solution with Microsoft Azure and Cloud | Integration Monday
Building workflow solution with Microsoft Azure and Cloud | Integration Monday
 
Serverless with Firebase - Launchpad Build Burgos
Serverless with Firebase - Launchpad Build Burgos Serverless with Firebase - Launchpad Build Burgos
Serverless with Firebase - Launchpad Build Burgos
 

Plus de Usama Wahab Khan Cloud, Data and AI

unleshing the the Power Azure Open AI - MCT Summit middle east 2024 Riyhad.pptx
unleshing the the Power Azure Open AI - MCT Summit middle east 2024 Riyhad.pptxunleshing the the Power Azure Open AI - MCT Summit middle east 2024 Riyhad.pptx
unleshing the the Power Azure Open AI - MCT Summit middle east 2024 Riyhad.pptxUsama Wahab Khan Cloud, Data and AI
 
Introduction to development using the share point framework mv ps
Introduction to development using the share point framework mv psIntroduction to development using the share point framework mv ps
Introduction to development using the share point framework mv psUsama Wahab Khan Cloud, Data and AI
 
Build with Serverless Applications with azure functions By usama wahab Khan
Build with Serverless Applications with azure functions By usama wahab KhanBuild with Serverless Applications with azure functions By usama wahab Khan
Build with Serverless Applications with azure functions By usama wahab KhanUsama Wahab Khan Cloud, Data and AI
 

Plus de Usama Wahab Khan Cloud, Data and AI (16)

unleshing the the Power Azure Open AI - MCT Summit middle east 2024 Riyhad.pptx
unleshing the the Power Azure Open AI - MCT Summit middle east 2024 Riyhad.pptxunleshing the the Power Azure Open AI - MCT Summit middle east 2024 Riyhad.pptx
unleshing the the Power Azure Open AI - MCT Summit middle east 2024 Riyhad.pptx
 
TechDayPakistan-Slides RAG with Cosmos DB.pptx
TechDayPakistan-Slides RAG with Cosmos DB.pptxTechDayPakistan-Slides RAG with Cosmos DB.pptx
TechDayPakistan-Slides RAG with Cosmos DB.pptx
 
introduction Azure OpenAI by Usama wahab khan
introduction  Azure OpenAI by Usama wahab khanintroduction  Azure OpenAI by Usama wahab khan
introduction Azure OpenAI by Usama wahab khan
 
Azure synapse by usama whaba khan
Azure synapse by usama whaba khanAzure synapse by usama whaba khan
Azure synapse by usama whaba khan
 
MCT Summit Azure automated Machine Learning
MCT Summit Azure automated Machine Learning MCT Summit Azure automated Machine Learning
MCT Summit Azure automated Machine Learning
 
Azure databricks by usama whaba khan
Azure databricks by usama whaba khanAzure databricks by usama whaba khan
Azure databricks by usama whaba khan
 
Introduction to development using the share point framework mv ps
Introduction to development using the share point framework mv psIntroduction to development using the share point framework mv ps
Introduction to development using the share point framework mv ps
 
GIS Into to Cloud Microsoft Azure
GIS  Into  to Cloud Microsoft Azure GIS  Into  to Cloud Microsoft Azure
GIS Into to Cloud Microsoft Azure
 
Build with Serverless Applications with azure functions By usama wahab Khan
Build with Serverless Applications with azure functions By usama wahab KhanBuild with Serverless Applications with azure functions By usama wahab Khan
Build with Serverless Applications with azure functions By usama wahab Khan
 
Elearning usama
Elearning usamaElearning usama
Elearning usama
 
Microsoft PowerApps Introduction by Usama Wahab Khan MVP
Microsoft PowerApps Introduction by Usama Wahab Khan MVP Microsoft PowerApps Introduction by Usama Wahab Khan MVP
Microsoft PowerApps Introduction by Usama Wahab Khan MVP
 
SharePoint on Azure
SharePoint on Azure SharePoint on Azure
SharePoint on Azure
 
Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros
 
Developing apps for share point 2013
Developing apps for share point 2013Developing apps for share point 2013
Developing apps for share point 2013
 
SPS Gulf : SharePoint 2013 Cloud Business App
SPS Gulf : SharePoint 2013 Cloud Business AppSPS Gulf : SharePoint 2013 Cloud Business App
SPS Gulf : SharePoint 2013 Cloud Business App
 
SharePoint 2013 REST and CSOM
SharePoint 2013 REST  and CSOMSharePoint 2013 REST  and CSOM
SharePoint 2013 REST and CSOM
 

Dernier

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 

Dernier (20)

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 

ServerLess by usama Azure fuctions.pptx

  • 1.
  • 2.
  • 3. Introduction Evolution Technologies is an innovative software-solutions company based in the United Arab Emirates. We are intensely proud of our team of highly professional software engineers and developers. We started our operations in UAE since June 2014 under the Microsoft BizSpark partnership program . Our Products Managing more 6 Billion USD AUM for our clients. One of the most talented Team of Software and business expert in region. Usama Wahab Khan, Chief Technology Officer at Evolution Technologies (Microsoft MVP) Mr. Khan holds the prestigious award of Microsoft Most Valuable Professional (MVP). Indeed, he is one of the most prominent Microsoft architect experts in the Gulf region and MIT Trained Artificial Intelligence Professional. He is a keynote speaker in many conferences, related to various topics such as Microsoft Cloud Technologies , Business Intelligence and AI. He authored Multiple books on Artificial Intelligence Professional ,Machine Learning ,Business Intelligence and digital transformation. We are Leading Microsoft Cloud Partner and Solution Provider with focus on capital market. Providing state of the art technologies an cloud solution for Private Equity firm , Investment banks and real state fund. Valuable Clients
  • 4.
  • 6.
  • 7.
  • 8. What is Function-as-a-Service (FaaS)? FaaS is the concept of serverless computing via serverless architectures. Software developers can leverage this to deploy an individual “function”, action, or piece of business logic. They are expected to start within milliseconds and process individual requests and then the process ends.
  • 9. Serverless Computing (FaaS) • Function as a Service (Azure Functions) • Platform to develop, run, and manage application • Without the complexity of building and maintaining the infrastructure Similar Technologies • AWS Lambda • Google Cloud Functions • Open Whisk (IBM)
  • 10. Azure Functions Process events with Serverless code. Make composing Cloud Apps insanely easy Develop Functions in C#, Node.js, F#, Python, PHP, Batch and more Easily schedule event-driven tasks across services Expose Functions as HTTP API endpoints Scale Functions based on customer demand Easily integrate with Logic Apps
  • 11. What can Azure Functions do? • Run code based on HTTP requests • Schedule code to run at predefined times • Process new and modified: • Azure Cosmos DB documents • Azure Storage blobs • Azure Queue storage messages • Respond to Azure Event Grid events by using subscriptions and filters • Respond to high volumes of Azure Event Hubs events • Respond to Azure Service Bus queue and topic messages
  • 12. 12 Azure Functions architecture Built on top of App Service and WebJobs SDK
  • 14. Azure Functions hosting https://github.com/azure/azure-functions-host (+other repos) App Service plan Code or container Windows or Linux Core Tools + favorite editor Code or container Windows, macOS, or Linux ●●● + Azure Functions host runtime Azure Functions Core Tools Azure Functions base Docker image Azure Functions .NET Docker image Azure Functions Node Docker image ●●● Premium plan Windows or Linux Consumption plan Code Windows or Linux Platform App delivery OS Code or container
  • 15. • App Service offers dedicated and dynamic tiers. • Dedicated is the existing App Service plan tiers • Basic, Standard, Premium • Pay based on # of reserved VMs • You’re responsible for scale • Dynamic • Pay on number of executions • Platform responsible for scale 15 Platform and scaling
  • 16. Pay per execution model - two meters, three units • Number of executions • Duration of execution x reserved memory 16 Dynamic Tier Pricing
  • 17. Input and Output Bindings
  • 18. Trigger types • Triggers based on Azure services: • Cosmos DB • Blob and queues • Service Bus • Event Hub • Triggers based on common scenarios: • HTTP request • Scheduled timer • Triggers based on third-party services: • GitHub • And more…
  • 21. 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.
  • 22. Durable Functions • Write stateful functions in a stateless environment • Manages state, checkpoints, and restarts • Defines an Orchestrator function • Workflows are defined in code • Calls other functions synchronously or asynchronously • Checkpoint progress whenever function awaits
  • 23. Example :Serverless batch processing with Durable Functions in Azure Container Instances 1.The batch processing job is packaged into a container image stored in Azure Container Registry (ACR), ready to deploy with options like AKS, Service Fabric, or ACI. 2.An HTTP trigger invokes the orchestrator function to orchestrate the container deployment. 3.An activity function uses the container image stored in ACR to create an ACI container in a container group. 4.The orchestrator function uses the container URL to call and start the batch processing job on the container instance, and to monitor job progress. 5.Once the job completes, the batch processing job invokes the orchestrator function by raising an external event, and provides job status Completed or Failed. 6.Depending on job status, the orchestrator function stops, restarts, or deletes the container group.
  • 24. Durable Function scenario - Chaining Function chaining refers executing a sequence of functions in a particular order. Often, the output of one function needs to be applied to the input of another function.
  • 25. Durable Function scenario - Fan-out/fan-in Fan-out/fan-in refers to the pattern of executing multiple functions in parallel, and then waiting for all to finish
  • 26. Durable Function scenario - Async HTTP APIs Durable Functions provides built-in APIs that simplify the code that you write for interacting with long-running function executions
  • 27. Durable Function scenario - Monitoring The monitor pattern refers to a flexible recurring process in a workflow—for example, polling until certain conditions are met
  • 28. Durable Function scenario - Human interaction Many processes involve human interaction. Automated processes must allow for human low availability, and they often do so by using time-outs and compensation logic.
  • 29. C# Durable Function scenario - Chaining code [FunctionName("Chaining")] public static async Task<object> Run( [OrchestrationTrigger] IDurableOrchestrationContext context) { try { var x = await context.CallActivityAsync<object>("F1", null); var y = await context.CallActivityAsync<object>("F2", x); var z = await context.CallActivityAsync<object>("F3", y); return await context.CallActivityAsync<object>("F4", z); } catch (Exception) { // Error handling or compensation goes here. } }
  • 30. Durable Function scenario - Fan-out/fan-in code [FunctionName("FanOutFanIn")] public static async Task Run([OrchestrationTrigger] IDurableOrchestrationContext context) { var parallelTasks = new List<Task<int>>(); // Get a list of N work items to process in parallel. object[] workBatch = await context.CallActivityAsync<object[]>("F1", null); for (int i = 0; i < workBatch.Length; i++) { Task<int> task = context.CallActivityAsync<int>("F2", workBatch[i]); parallelTasks.Add(task); } await Task.WhenAll(parallelTasks); // Aggregate all N outputs and send the result to F3. int sum = parallelTasks.Sum(t => t.Result); await context.CallActivityAsync("F3", sum); }

Notes de l'éditeur

  1. Microsoft Azure Functions is a powerful solution for processing bulk data, integrating systems, working with the Internet of Things (IoT), and building simple APIs and microservices. Azure includes a series of templates you can use for the key scenarios that are listed on this slide.
  2. Azure Functions integrates with various Azure and third-party services. These services can trigger your function and start execution, or they can serve as input and output for your code. The following service integrations are supported by Azure Functions: Azure Cosmos DB Azure Event Hubs Azure Event Grid Azure Notification Hubs Azure Service Bus (queues and topics) Azure Storage (blob, queues, and tables) On-premises (using Service Bus) Twilio (SMS messages)
  3. Azure Functions are designed to be portable and to be hosted in a variety of places, including: Azure Functions service by using Resource consumption, Premium, or App Service Plans Internet of Things (IoT) devices Only Linux containers are supported as of now
  4. Input and output bindings provide a declarative way to connect to data from within your code. Bindings are optional and an Azure Function can have multiple input and output bindings.
  5. There are many types of triggers for Azure services including: HTTPTrigger - Trigger the execution of your code by using an HTTP request. TimerTrigger - Execute cleanup or other batch tasks on a predefined schedule. GitHub webhook - Respond to events that occur in your GitHub repositories. Generic webhook - process webhook HTTP requests from any service that supports webhooks. CosmosDBTrigger - Process Azure Cosmos DB documents when they are added or updated in collections in a NoSQL database. BlobTrigger - Process Azure Storage blobs when they are added to containers. You might use this function for image resizing. QueueTrigger - Respond to messages as they arrive in an Azure Storage queue. EventHubTrigger - Respond to events delivered to an Azure Event Hub. Particularly useful in application instrumentation, user experience, or workflow processing, and Internet of Things (IoT) scenarios. ServiceBusQueueTrigger - Connect your code to other Azure services or on-premises services by listening to message queues. ServiceBusTopicTrigger - Connect your code to other Azure services or on-premises services by subscribing to topics.
  6. In this example, the Function is triggered by a recurring schedule (nightly) and queries Azure Cosmos DB for a set of documents. The function then processes the documents, outputs blobs to Azure Storage, and outputs logs to Event Hubs.
  7. Durable Functions is an extension of Azure Functions and Azure WebJobs that lets you write stateful functions in a serverless environment. The extension manages state, checkpoints, and restarts for you. The extension lets you define stateful workflows in a new type of function called an Orchestrator function. Here are some of the advantages of Orchestrator functions: They define workflows in code. No JSON schemas or designers are needed. They can call other functions synchronously and asynchronously. Output from called functions can be saved to local variables. They automatically checkpoint their progress whenever the function awaits. Local state is never lost if the process recycles or the virtual machine (VM) reboots. Note: Durable Functions is an advanced extension for Azure Functions that is not appropriate for all applications. The rest of this section assumes that you have a strong familiarity with Azure Functions concepts and the challenges involved in serverless application development. The primary use case for Durable Functions is simplifying complex, stateful coordination problems in serverless applications.
  8. Durable Functions is an extension of Azure Functions and Azure WebJobs that lets you write stateful functions in a serverless environment. The extension manages state, checkpoints, and restarts for you. The extension lets you define stateful workflows in a new type of function called an Orchestrator function. Here are some of the advantages of Orchestrator functions: They define workflows in code. No JSON schemas or designers are needed. They can call other functions synchronously and asynchronously. Output from called functions can be saved to local variables. They automatically checkpoint their progress whenever the function awaits. Local state is never lost if the process recycles or the virtual machine (VM) reboots. Note: Durable Functions is an advanced extension for Azure Functions that is not appropriate for all applications. The rest of this section assumes that you have a strong familiarity with Azure Functions concepts and the challenges involved in serverless application development. The primary use case for Durable Functions is simplifying complex, stateful coordination problems in serverless applications.
  9. Function chaining refers to the pattern of executing a sequence of functions in a particular order. Often, the output of one function needs to be applied to the input of another function.
  10. Fan-out/fan-in refers to the pattern of executing multiple functions in parallel, and then waiting for all to finish. Often, some aggregation work is done on results returned from the functions. With normal functions, fanning out can be done by having the function send multiple messages to a queue. However, fanning back in is much more challenging. You'd have to write code to track when the queue-triggered functions end and store function outputs. The Durable Functions extension handles this pattern with relatively simple code.
  11. The third pattern is all about the problem of coordinating the state of long-running operations with external clients. A common way to implement this pattern is by having the long-running action triggered by an HTTP call, and then redirecting the client to a status endpoint that they can poll to learn when the operation completes. Durable Functions provides built-in APIs that simplify the code you write for interacting with long-running function executions. After an instance is started, the extension exposes webhook HTTP APIs that query the Orchestrator function status. The following example shows the REST commands to start an Orchestrator and to query its status. For clarity, some details are omitted from the example.
  12. The monitor pattern refers to a flexible recurring process in a workflow—for example, polling until certain conditions are met. A regular timer-trigger can address a simple scenario, such as a periodic cleanup job, but its interval is static and managing instance lifetimes becomes complex. Durable Functions enables flexible recurrence intervals, task lifetime management, and the ability to create multiple monitor processes from a single orchestration. An example would be reversing the earlier async HTTP API scenario. Instead of exposing an endpoint for an external client to monitor a long-running operation, the long-running monitor consumes an external endpoint, waiting for some state change. Using Durable Functions, multiple monitors that observe arbitrary endpoints can be created in a few lines of code. The monitors can end execution when some condition is met, or be terminated by the DurableOrchestrationClient, and their wait interval can be changed based on some condition (that is, exponential backoff). The code on the next slide implements a basic monitor.
  13. Many processes involve some kind of human interaction. The tricky thing about involving humans in an automated process is that people are not always as highly available and responsive as cloud services. Automated processes must allow for this, and they often do so by using timeouts and compensation logic. One example of a business process that involves human interaction is an approval process. For example, approval from a manager might be required for an expense report that exceeds a certain amount. If the manager does not approve within 72 hours (maybe the manager went on vacation), an escalation process starts to get the approval from someone else (perhaps the manager's manager). This pattern can be implemented by using an Orchestrator function. The Orchestrator would use a durable timer to request approval and escalate in case of timeout. It would wait for an external event, which would be the notification generated by some human interaction.
  14. The values "F1", "F2", "F3", and "F4" are the names of other functions in the function app. Control flow is implemented by using normal imperative coding constructs. That is, code executes top down and can involve existing language control flow semantics, like conditionals and loops. Error handling logic can be included in try/catch/finally blocks. The ctx parameter (DurableOrchestrationContext) provides methods for invoking other functions by name, passing parameters, and returning function output. Each time the code calls await, the Durable Functions framework checkpoints the progress of the current function instance. If the process or VM recycles midway through the execution, the function instance resumes from the previous await call. We will cover more on this restart behavior later.
  15. The fan-out work is distributed to multiple instances of function F2, and the work is tracked by using a dynamic list of tasks. The .NET Task.WhenAll API is called to wait for all the called functions to finish. Then the F2 function outputs are aggregated from the dynamic task list and passed on to the F3 function. The automatic checkpointing that happens at the await call on Task.WhenAll ensures that any crash or reboot midway through does not require a restart of any already completed tasks.