This presentation is from the Integration Day event, a TechMeet360 Community Initiative, held on September 10, 2016 at Microsoft GSTC in Bangalore. In this slide, Microsoft's Escalation Engineers Tulika Chaudharie and Harikharan Krishnaraju explain using Azure Functions for Integration. The presentation starts with a general overview of Azure Functions and then it moves on to some of the common Integration Patterns and how Azure Functions fit into the scenarios.
3. Azure
Functions
APIM
Notification
Hubs Web Apps
Mobile Apps
API Apps
Logic
Apps
Custom AppseCommerce Digital Global Presence LOB
Apps
Services
App Service
• Languages and Frameworks
• Superior DevOps
• Self service supportability
• Auto scale
• OS and Framework patching
• Load balancing
• Enterprise grade SLA
• Security and Compliance
• On-Premise Connectivity
Platform
API / Services / ISV
5. 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
Azure
Functions
6. INTEGRATION DAY
MICROSOFT GTSC, Bengaluru September 10, 2016
6
Azure Functions architecture
Built on top of App Service and WebJobs SDK
7. INTEGRATION DAY
MICROSOFT GTSC, Bengaluru September 10, 2016
7
Dual abstraction
• Serverless compute abstracts away the compute
• Bindings abstract away the services you interact with
8. INTEGRATION DAY
MICROSOFT GTSC, Bengaluru September 10, 2016
• 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
8
Platform and scaling
9. INTEGRATION DAY
MICROSOFT GTSC, Bengaluru September 10, 2016
Pay per execution model - two meters, three units
• Number of executions
• Duration of execution x reserved memory
9
Dynamic Tier Pricing
11. INTEGRATION DAY
MICROSOFT GTSC, Bengaluru September 10, 2016
• Function as the unit of work
• Functions are executed; they start and finish
• Functions have inputs and outputs
11
What is the “Functions” programming model?
12. INTEGRATION DAY
MICROSOFT GTSC, Bengaluru September 10, 2016
• Functions should “do one thing”
• Functions should be idempotent
• Functions should finish as quickly as possible
12
Best practices for the “Functions” model
1
15. INTEGRATION DAY
MICROSOFT GTSC, Bengaluru September 10, 2016
• Generalizing
WebJobs SDK == more freedom -> more work
Azure Functions == less responsibilities -> less work
• Commonalities
Programming model differences
Hosting model differences
15
WebJobs SDK vs Azure Functions
16. INTEGRATION DAY
MICROSOFT GTSC, Bengaluru September 10, 2016
• Both use the ”Function” oriented programming model
• Both support ”bindings” for trigger/input/output
• Both support WebJobs SDK extensions model
• Both support external libraries being used
• Both can run locally and be debugged
• Both have runtime telemetry via the WebJobs Dashboard
16
Commonalities
17. INTEGRATION DAY
MICROSOFT GTSC, Bengaluru September 10, 2016
Programming Model Differences
WebJobs SDK
C# only
Attributes for configuring bindings
Traditional .NET developer
experience (Visual Studio, NuGet,
MSBuild)
Many functions per class
Can access and manipulate many
core SDK features
Can’t listen for HTTP requests*
Azure Functions
C# & Node.js + more
Config files for configuring bindings
More diverse development experience
(Web portal, VSCode, dynamically
builds itself)
Limited access to manipulate core
SDK features, but (C# only) still some
access
Supports HTTP!
17
18. INTEGRATION DAY
MICROSOFT GTSC, Bengaluru September 10, 2016
Hosting Model Differences
• WebJobs SDK
• You configure host
• Build a console app which is run
• WebJobs and Dedicated
App Service plans
• Runs the service in the background
of Web/Mobile/API app
• Runs any console app (not just SDK
based ones)
• You manage scale
• Azure Functions
• Limited control over the host
• Just give it your code/config
• Function App + Dynamic
App Service Plans
• Function app owns the whole host,
including web frontend.
• Only runs Azure Functions stuff – no
other things
• Scale is managed for you
18