Download presentation
Presentation is loading. Please wait.
Published byJoy Preston Modified over 6 years ago
1
@marco_parenzan Azure Functions e Logic Apps: i tuoi coltellini svizzeri per gestire i tuoi dati in un SQL Database
2
Sponsor
3
Organizzatori GetLatestVersion.it
4
@marco_parenzan .NET, IoT and Azure Developer, Trainer and Consultant Microsoft MVP 2017 for Azure Book Packt, LSWR Community Lead per 1nn0va
5
What SQL Database needs
6
What SQL Database needs
SQL Database is Database as a Service It is only the database Vs. SQL20xx Almost language syntax aligned Deprecated features Migrate features to External/Other Azure Services Overlapping features (ex. JSON)
7
Serverless as glue
8
Choose your abstraction
9
Serverless manifesto Function are the unit of deployment and scaling. Scales per request Users cannot over- or under-provision capacity. Never pay for idle (no cold servers/containers or their costs) Trigger-based invocation code run because of an event happened and has to be handled
10
Serverless as a bridge for SQL Databases
Import/Export Other data formats Data manipulations Schedules Other Azure services bridges
11
What is Azure Serverless
A serverless nirvana? Microsoft Azure CTO Mark Russinovich on the future of the cloud
12
Functions
13
Azure Functions Process events with Serverless code. Make composing Cloud Apps insanely easy Develop Functions in C#, Node.js, Python, PHP, Batch and more Easily schedule event-driven tasks across services Expose Functions as HTTP API endpoints Scale Functions based on customer demand
14
Azure Functions architecture
Azure Functions is built around the WebJobs SDK runtime. The WebJobs SDK makes it easy to react to events and work with data in a consistent abstracted fashion. App Service Dynamic Runtime WebJobs Core SDK WebJobs Extensions WebJobs Script Runtime Triggers Inputs/ Outputs Language Abstraction Code Config
15
Platform and scaling App Service offers dedicated and consumption tiers. Dedicated is the existing App Service plan tiers Basic, Standard, Premium Pay based on # of reserved VMs You’re responsible for scale Consumption (Dynamic) Pay per execution model - two meters, three units Number of executions Duration of execution x reserved memory
16
Supported bindings Type Service Trigger Input Output Schedule
Azure Functions ✔ HTTP (REST or WebHook) Blob Storage Azure Storage Queues Tables No-SQL DB Azure CosmosDB Streams Azure Event Hubs Push Notifications Azure Notification Hubs IoT Azure IoT Hub
17
Supported Languages 1st class support Experimental support
Node/JavaScript C# (.NET Framework 4.7.x) F# Experimental support .NET Core Linux Containers Java Python PHP Batch Bash PowerShell
18
Functions Programming Model
Trigger (data) Input Input Input Output code Function as a single unit of work Functions are executed per trigger Functions have inputs and outputs Output
19
Cognitive Services
20
Cognitive Services Search Vision Speech Language Knowledge
Microsoft Build 2016 9/11/ :32 AM Cognitive Services Search Access billions of web pages, images, videos, and news with the power of Bing APIs Vision From faces to feelings, allow your apps to understand images and video Speech Hear and speak to your users by filtering noise, identifying speakers, and understanding intent Language Process text and learn how to recognize what users want Knowledge Tap into rich knowledge amassed from the web, academia, or your own data © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
21
microsoft.com/cognitive
Microsoft Build 2016 Search 9/11/ :32 AM Vision Speech Language Knowledge Bing Web Search Bing Web Search Computer Vision Bing Speech Bing Spell Check Bing Spell Check Academic Knowledge Bing Custom Search Bing Custom Search Custom Vision Service Custom Speech Service Linguistic Analysis Custom Decision Service Bing Image Search Bing Image Search Emotion Speaker Recognition Language Understanding Knowledge Exploration Bing Video Search Bing Video Search Face Translator Text Analytics QnA Maker Bing News Search Bing News Search Video WebLM Recommendations Bing Autosuggest Bing Autosuggest Video Indexer Entity Linking Content Moderator microsoft.com/cognitive © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
22
Durable Functions Enable “long running” functions while maintaining local state. Simplify complex Function coordination (chaining, etc.) Easily call a Function from another Function All of the above using code-only
23
Functions and Logic Apps
Functions and Logic Apps work great together and that integration will only get better. You can orchestrate Functions using Logic Apps today. Durable Functions overlaps with Logic Apps, one function calling another, but: Offers advance ‘code only’ orchestration ‘like’ capabilities to function Enables "long running" functions Enables "advance" scenarios/patterns which are difficult otherwise: async HTTP, map reduce, actors, etc.
24
Logic Apps
25
Shared with Functions Serverless App Service based Triggers (templated)
26
Unique for Logic Apps «Older»/Mature(?)
Implement and orchestrate visually designed integration workflows Orchestrate distributed microservices Or Functions Every action is a an http endpoint Connectors Declarative No code designer for rapid creation (mostly?)
27
Logic Apps Connectors (120+)
28
Concepts Simple-to-advanced flow control like conditions, loops, exception handling, and parallel Multiple Patterns Manual Invocation Event Based Scheduled Workflows Triggers Actions Managed APIs Flow structures
29
Workflow Definition Language
“Code Behind” Basic Structure
30
Pricing Different billing model from Function App No App Service Plan Per action (each step in a Workflow is an action, also a trigger) More details ACTIONS EXECUTED PER MONTH PRICE PER ACTION EXECUTION First 250K actions € /action 250K–1M actions € /action 1M–50M actions € /action 50M–100M actions € /action 100M+ actions € /action
31
Scale & Performance Different billing model from Function App
100MB message size 90 days run duration 1 sec to 500 days recurrence interval 100’000 ForEach items 10’000 actions executions per 5 minutes Request Timeout 120 Seconds Run duration 90 days ForEach items 100,000 Actions executions per 5 minutes Actions per workflow 250 Allowed action nesting depth 5 Triggers per workflow 10
32
Why do we need “Durable Functions”
Enable “long running” functions while maintaining local state. Simplify complex Function coordination (chaining, etc.) Easily call a Function from another Function All of the above using code-only
33
Bonus: Bot Framework
34
Microsoft Bot Framework
The Microsoft Bot Framework is a comprehensive set of tools and services developers can leverage to build and deploy high-quality, conversational bots in any language. Regardless of the language or platform, developers building bots face the same common challenges: Bots require basic input and output, they need language and dialog skills, they need to be responsive and scalable; and they must connect to users in any conversation experience and language the user chooses. The Microsoft Bot Framework provides the foundation for what developers need to build, connect, manage and publish intelligent bots that interact naturally with users over a variety of services from text/SMS to Skype, Slack, Facebook Messenger, Microsoft Teams, Kik, Office 365 mail and other popular services.
35
Supported Channels Channels are currently available for Skype, web, , Facebook, GroupMe, Microsoft Teams, Kik, Slack, Telegram, Twilio, and direct line app integration. Channels are essentially third party services that a bot can communicate and interaction with in a standardized way. The Microsoft Bot Framework provides developers with a developer portal and SDK to build bots, a Bot Connector service to connect to social channels such as Twitter, Microsoft Teams, and Slack, and a Bot Directory to discover and use existing bots.
36
Azure Bot Services Bots can be created and managed within a browser directly, in both C# and Node.js, using the Azure editor, effectively removing any need for a local editor. You can quickly test your bot directly in the Azure service environment. You can write your bot in C# or Node.js directly in the browser using the Azure editor without any need for a tool chain (local editor and source control). The integrated chat window sits side-by-side with the Azure editor, which lets you test your bot on the fly as you write the code in the browser. Azure Bot Service is powered by Microsoft Bot Framework and Azure Functions. By using Azure Functions, your bot will run in a serverless environment on Azure that will scale based on demand.
37
The Connector The Connector (or Connector Service) handles all communication, conversations, state, and authorization activities between a bot and users. var connector = new ConnectorClient(incomingMessage.ServiceUrl); var replyMessage = incomingMessage.CreateReply("How can I help?"); await connector.Conversations.ReplyToActivityAsync(replyMessage); The Microsoft Bot Connector is a communication service that helps you connect your bot with many different communication channels (Skype, SMS, , and others). If you write a conversational bot or agent and expose a Microsoft Bot Framework-compatible API on the Internet, the Bot Framework Connector service will forward messages from your bot to a user, and will send user messages back to your bot. The Connector is the primary mechanism used to communicate all information between a user and a bot, and includes methods to assist with authentication and state management.
38
Activities An Activity is a specific event that occurs between a bot and users, such as an actual message, or conversation notification. An Activity is the object or information used to communicate between a user and a bot. When an Activity is sent, there are a number of properties and methods you can use and populate to control your message and how it gets presented to a user. There are various types of Activities that can be used as well, including Activities to communicate system operations or channel system operations to the bot, enhancing the information about the bot and/or the state of the channel. Every Activity being routed through the Connector has a Type field, which is typically “Message”, however there are system notifications as well, such as “Typing”, “Ping”, or “User Data Deleted” (for when a user leaves a conversation.)
39
Types of Activities Activity Type Description Message
Sent when general content is passed to or from a user and a bot Conversation Update Sent when the conversation's properties change, for example the topic name, or when user joins or leaves the group Contact Relation Update Sent when bot added or removed to contact list Delete User Data Send when user is removed from a conversation Typing Sent when a user is typing Ping Send when a keep-alive is needed
40
Conclusions
41
Conclusions Function Logic Apps fast and easy tool to start
Great growth potential Lot of investments by Microsoft and the entire Cloud world Bot Framework (and potentially others tools) bonus Logic Apps «Biztalk restart» Declarative/visual advantage Connectors growth
42
Thanks You can find me at: marco [dot] parenzan [at] 1nn0va [dot] it
@marco_parenzan Thanks
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.