SharePoint meetup Speaking Deck - Knowing the formula

35
Knowing the formula SHAREPOINT SOLUTIONS USING SERVERLESS FUNCTIONS

Transcript of SharePoint meetup Speaking Deck - Knowing the formula

Page 1: SharePoint meetup Speaking Deck -  Knowing the formula

Knowing the formulaSHAREPOINT SOLUTIONS USING SERVERLESS FUNCTIONS

Page 2: SharePoint meetup Speaking Deck -  Knowing the formula

background

Software (Services) Artificial Intelligence Databases Workflow Business Intelligence Mobile

Infrastructure Scalability Business continuity High availability Reliability

Business Fail fast with minimal

collateral damage Faster time to market Expanded capabilities

Explosion of the Cloud Ecosystem Cloud computing has enabled a huge ecosystem of services and providers. Cloud can/has/will easily enable some of the main pillars of delivering IT services

Page 3: SharePoint meetup Speaking Deck -  Knowing the formula

Serverless Functions?

A service that wakes up on events, loads and executes a block of code then gradual decommission itself.

Listen for

EventReact to Event

Provision

Function

De-provisio

n Function

Page 4: SharePoint meetup Speaking Deck -  Knowing the formula

Serverless Functions Once the service is provisioned* it will load the code

associated with the service, execute, and return a result to the caller

Load Code

Execute Code

Return Result

Provision Function

Page 5: SharePoint meetup Speaking Deck -  Knowing the formula

So why is this cool? Reason for cool factor:

We are using Azure -> (software, infrastructure & business)

Discoverability Reusable Fast development, ramp up time And we pay (¢) just for execution time !!!!!!

Languages*

DevOps (CD)*

Page 6: SharePoint meetup Speaking Deck -  Knowing the formula

Leveraging Azure Functions with SharePoint

Formula 0 - (SPO + AzFn = Solution) Azure Functions can be triggered based on:

Timer Events

Azure Storage (Blobs, Queues, External File, External Table, Azure Table Storage, Azure DocumentDB, Azure Moble Table Record, Bot Framework, etc)

Web (Web Hooks, Web Services, & Rest APIs)

Page 7: SharePoint meetup Speaking Deck -  Knowing the formula

Scenarios of Usage

Auto Image Tagger (InstaTag)Currency Conversion

Page 8: SharePoint meetup Speaking Deck -  Knowing the formula

Auto Image Tagger = SP + AzFn + AI“A.I. what is that a picture of?”Mountain on tatooine

Mountain24.2 km

!@#!@#

Page 9: SharePoint meetup Speaking Deck -  Knowing the formula

Usage: Auto Image Tagger

Formula –> Image Auto Tagging = SPO + AzFn + AI Use Case: Tag images with keywords Goal: Improve the findability images and pictures. Business Issues and pain points:

To much work tagging/updating attributes I can’t find anything! SP is just a big file share Tagging is not my job ! Utilization is down because we have required field on upload

Page 10: SharePoint meetup Speaking Deck -  Knowing the formula

Auto Image Tagger

A.I. to the rescue – Once again thanks to the diverse ecosystem of hosted and cloud services A.I. platforms are easily accessible.

Formula Components SP = SharePoint Image Library AzFn = Azure Function (the new Timer Job) AI = Azure Cognitive Services

DEMO

Page 11: SharePoint meetup Speaking Deck -  Knowing the formula

Auto Image Tagger

What’s Happening?

Page 12: SharePoint meetup Speaking Deck -  Knowing the formula

SP - Currency Converter

Of course we can do currency conversion in SharePoint …There’s a currency field right ????

Over promising Oliver

Page 13: SharePoint meetup Speaking Deck -  Knowing the formula

Usage: Currency Conversion

Formula –> Currency Conversion = SPO + AzFn + Flow Use Case: Users want to enter their sales in their local currency.

Management wants all numbers reported in USD. Issues and pain points:

Yes a workflow can be used, but logic becomes difficult Decouples the dependency on SP workflows Off load processing from your SP environment to another resource Custom business rules can be supported in AzFn. AzFn can be reused by other services Data is maintained in a Storage table (might be some performance gains) …

Page 14: SharePoint meetup Speaking Deck -  Knowing the formula

Currency Conversion - Architecture

Page 15: SharePoint meetup Speaking Deck -  Knowing the formula

Currency Conversion – MS Flow IFTTT/Connector/Workflow service A plug and play service that connects to MS applications to other

3rd services WITHOUT CODING (SORT OF)!

Page 16: SharePoint meetup Speaking Deck -  Knowing the formula

MS Flow – Custom APIs

Can reference other services with Custom APIs

But you need a little swagger!!!

Page 17: SharePoint meetup Speaking Deck -  Knowing the formula

MS Flow – Custom APIsCustom API form BTW don’t forget about the name at the top!!!

Page 18: SharePoint meetup Speaking Deck -  Knowing the formula

MS Flow – Flow Currency Conversion

Hook into a SharePoint list eventStart flow when list item is created

DEMO

Page 19: SharePoint meetup Speaking Deck -  Knowing the formula

Azure Functions - Getting Started…

Needed - Azure Subscription https://azure.microsoft.com/en-us/services/functions/ Free Account (60 days) https://azure.microsoft.com/en-us/free/ From Azure Portal …

Page 20: SharePoint meetup Speaking Deck -  Knowing the formula

AzFn - Creating One (Deployment)

App Name Resource Group

Try using an existing plan or group by product/project billing

Hosting Plan Consumption App Service Plan

Location * Try keeping your resources together

Storage Account Can use existing storage accounts

Page 21: SharePoint meetup Speaking Deck -  Knowing the formula

AzFn – Create the Function

Can use premade function

Choose language

Or Create your own custom function

Create!

Page 22: SharePoint meetup Speaking Deck -  Knowing the formula

AzFn - IDE

Save / Run Test Logs Keys

Page 23: SharePoint meetup Speaking Deck -  Knowing the formula

AzFn – Keys & Logs

Keys – AuthenticationLogs – Debugging & Troubleshooting

Page 24: SharePoint meetup Speaking Deck -  Knowing the formula

AzFn - Integrations

Integrations with Storage accounts, database, other Azure services

Page 25: SharePoint meetup Speaking Deck -  Knowing the formula

AzFn – Management (Light)

Enable/Disable Function Key Management Delete Function

Page 26: SharePoint meetup Speaking Deck -  Knowing the formula

AzFn - Monitoring

Run logs and execution details

Page 27: SharePoint meetup Speaking Deck -  Knowing the formula

AzFn – Management (Advanced)

Config Settings Continous

Integration Kudu (metrics) CORS Authentication

Page 28: SharePoint meetup Speaking Deck -  Knowing the formula

AzFn – API Management

Public out your API Create a mock web API project

in VS 2015 using Swashbuckle (latest version)

Generate the json file Upload the json file here

Page 29: SharePoint meetup Speaking Deck -  Knowing the formula

Need to know - to make life easier

#r to include external libraries Use ASE to do advanced functionality Can deploy your own libraries

Use ASE or FTP to deploy files to a bin directory Might need to create the bin directory

Page 30: SharePoint meetup Speaking Deck -  Knowing the formula

Pricing

Page 31: SharePoint meetup Speaking Deck -  Knowing the formula

Pricing https://azure.microsoft.com/en-us/pricing/details/functions/ Resource Consumption and Executions Consumption Plan

Free Monthly grant of 1 Million requests and 400k resource consumption

Functions can use – Customer App Service Plan @ regular plan rates Note: Storage account is created and charge at regular rates

Total requested executions each month for all functions – (first million are free)

Resource Consumption Observed resource consumption measured in Gigabyte Seconds Average Memory size (GB) * Function Exe (s) Free grant of 400k GBs monthly

Page 32: SharePoint meetup Speaking Deck -  Knowing the formula

Pricing – Resource Consumption

Page 33: SharePoint meetup Speaking Deck -  Knowing the formula

Pricing – Execution Billing

Page 34: SharePoint meetup Speaking Deck -  Knowing the formula

Pricing – Total Consumption

Total Monthly = Monthly Resource Consumption + Monthly Executions Cost

$41.60 + $0.20 = $ 41.80

https://azure.microsoft.com/en-us/pricing/calculator/?service=functions

Page 35: SharePoint meetup Speaking Deck -  Knowing the formula

Resources

Introducing Azure Functions https://azure.microsoft.com/en-us/blog/introducing-azure-functions/

Free Azure Function Account https://azure.microsoft.com/en-us/free/

Azure Function Pricing Calculator https://azure.microsoft.com/en-us/pricing/calculator/?

service=functions Subscription for Cognitive Services

https://www.microsoft.com/cognitive-services/en-US/subscriptions