Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Shahed Chowdhuri
Sr. Technical Evangelist
CSE, Microsoft
Shahed.Chowdhuri@microsoft.com
@shahedC
github.com/shahedc
DC/MD/...
Type Service Trigger Input Output
Schedule Azure Functions 
HTTP Azure Functions  
Blob Storage Azure Storage   
Eve...
{
"bindings": [
{
"name": "myQueueItem",
"type": "queueTrigger",
"direction": "in",
“queueName": "outputqueue",
"connectio...
public static void Run(byte[] image, string filename,
Stream outputBlob, TraceWriter log)
{
log.Info($"Processing image: {...
Every 15 minutes Clean tableFind and clean invalid data
File added to
Blob Storage
Transform CSV to data rows
CSV
Power BI
Chart graphic
Excel file saved
to OneDrive
Microsoft Graph API analyzes content Creates new sheets
with charts
Loaded web page
calls WebHook
Completed pageCreate ad based on user profile
Photo taken and
WebHook called Stores in blob storage Produces scaled images
Millions of devices feed
into Stream Analytics
Store data in
SQL Online
Transform to structured data
Deployment and management isolation
Customers
Products
Orders
API calls
customers.azurewebsites.net
products.azurewebsites...
Function app A
/customers
Function app B
/products
Function app C
Function3/orders
Function1
API proxy endpoints
HttpTrigg...
New file on site root: proxies.json
{
"proxies": {
"proxy1": {
"matchCondition": {
"methods": [],
"route": "/api/{test}"
}...
https://www.npmjs.com/package/azur
e-functions-core-tools
http://wakeupandcode.com/azure-functions-dev-workflow/
> npm i -g azure-functions-core-tools
> func init
> func new
> func...
https://blogs.msdn.microsoft.com/appserviceteam/2017/09/
25/develop-azure-functions-on-any-platform
https://azure.microsof...
Azure
Functions
Demo
• Costa Farms
http://aka.ms/costafarms
https://github.com/joescars/CostaIoTSensorProject
• Fish Angler
http://aka.ms/fisha...
https://github.com/Azure/Azure-Functions
Azure WebJobs SDK script
Azure WebJobs SDK
Azure WebJobs SDK extensions
Azure Fun...
http://aka.ms/TryFunctions
https://aka.ms/func-github
https://aka.ms/phillyfunctions
Email: shchowd@microsoft.com  Twitter: @shahedC
Going Serverless with Azure Functions
Going Serverless with Azure Functions
Going Serverless with Azure Functions
Going Serverless with Azure Functions
Going Serverless with Azure Functions
Going Serverless with Azure Functions
Going Serverless with Azure Functions
Going Serverless with Azure Functions
Going Serverless with Azure Functions
Going Serverless with Azure Functions
Going Serverless with Azure Functions
Going Serverless with Azure Functions
Going Serverless with Azure Functions
Going Serverless with Azure Functions
Going Serverless with Azure Functions
Going Serverless with Azure Functions
Going Serverless with Azure Functions
Going Serverless with Azure Functions
Going Serverless with Azure Functions
Upcoming SlideShare
Loading in …5
×

Going Serverless with Azure Functions

1,530 views

Published on

Whether you’re new to cloud computing or have been using various cloud services over the years, Azure Functions opens the door to new workflows for development, deployment, devops and scaling. Learn about how you can go serverless with Azure Functions using a web browser, code editor or a full blown IDE.

Published in: Technology
  • Be the first to comment

Going Serverless with Azure Functions

  1. 1. Shahed Chowdhuri Sr. Technical Evangelist CSE, Microsoft Shahed.Chowdhuri@microsoft.com @shahedC github.com/shahedc DC/MD/VA, Mid-Atlantic, East Coast, US
  2. 2. Type Service Trigger Input Output Schedule Azure Functions  HTTP Azure Functions   Blob Storage Azure Storage    Events Azure Event Hubs   Queues Azure Storage   Queues and topics Azure Service Bus   Storage tables Azure Storage   No-SQL DB Azure CosmosDB   Push notifications Azure Notification Hubs  Twilio SMS Text Twilio  SendGrid email SendGrid 
  3. 3. { "bindings": [ { "name": "myQueueItem", "type": "queueTrigger", "direction": "in", “queueName": "outputqueue", "connection": "AzureWebJobsStorage" }, { "type": "blob", "name": "outputBlob", "path": "outblob/{rand-guid}.txt", "connection": "AzureWebJobsStorage", "direction": "out" } ] } module.exports = function (context, myQueueItem, myOutputBlob) { context.log('JavaScript queue trigger function ', myQueueItem); //validate if (myQueueItem.apiId && myQueueItem.method && myQueueItem.body) { const value = DoWork(myQueueItem); if(value) { context.bindings.myOutputBlob = JSON.stringify(value); //myOutputBlob = JSON.stringify(value); } } else { //handle error queue item missing params context.log('invalid queue item ', myQueueItem); } context.done(); }
  4. 4. public static void Run(byte[] image, string filename, Stream outputBlob, TraceWriter log) { log.Info($"Processing image: {filename}"); var imageBuilder = ImageResizer.ImageBuilder.Current; imageBuilder.Build( image, outputBlob, new ResizeSettings(640, 400, FitMode.Max, null), false); } { "bindings": [ { "name": "image", "type": "blobTrigger", "direction": "in", "path": "card-input/{filename}.jpg", "connection": "AzureWebJobsStorage" }, { "type": "blob", "name": "outputBlob", "path": "card-output/{filename}.jpg", "connection": "AzureWebJobsStorage", "direction": "out" } ] }
  5. 5. Every 15 minutes Clean tableFind and clean invalid data
  6. 6. File added to Blob Storage Transform CSV to data rows CSV Power BI Chart graphic
  7. 7. Excel file saved to OneDrive Microsoft Graph API analyzes content Creates new sheets with charts
  8. 8. Loaded web page calls WebHook Completed pageCreate ad based on user profile
  9. 9. Photo taken and WebHook called Stores in blob storage Produces scaled images
  10. 10. Millions of devices feed into Stream Analytics Store data in SQL Online Transform to structured data
  11. 11. Deployment and management isolation Customers Products Orders API calls customers.azurewebsites.net products.azurewebsites.net orders.azurewebsites.net
  12. 12. Function app A /customers Function app B /products Function app C Function3/orders Function1 API proxy endpoints HttpTrigger function endpoints Key: /products /orders Function2
  13. 13. New file on site root: proxies.json { "proxies": { "proxy1": { "matchCondition": { "methods": [], "route": "/api/{test}" }, "backendUri": "https://contoso.azurewebsites.net/api/{test}" } } }
  14. 14. https://www.npmjs.com/package/azur e-functions-core-tools
  15. 15. http://wakeupandcode.com/azure-functions-dev-workflow/ > npm i -g azure-functions-core-tools > func init > func new > func azure login > func azure functionapp list > func azure functionapp fetch-app-settings <fn-app-name> > func host start > func azure functionapp publish <fn-app-name> Next: * Select a language, e.g. C# * Select a template, e.g. HttpTriggerWithParameters * Enter a name for your new Function, e.g. “MyFunction”, which will create a subfolder using the Function’s name.
  16. 16. https://blogs.msdn.microsoft.com/appserviceteam/2017/09/ 25/develop-azure-functions-on-any-platform https://azure.microsoft.com/en-us/blog/announcing-the- preview-of-java-support-for-azure-functions
  17. 17. Azure Functions Demo
  18. 18. • Costa Farms http://aka.ms/costafarms https://github.com/joescars/CostaIoTSensorProject • Fish Angler http://aka.ms/fishangler https://github.com/FishAngler/AzureFunctions • Simple Recon https://github.com/simpledealersuite/media2azure • NullspaceVR https://github.com/DaveVoyles/NullspaceVR-web-portal/tree/master/AzureFunctions • Missing Children Society of Canada https://github.com/Missing-Children-Society-Canada
  19. 19. https://github.com/Azure/Azure-Functions Azure WebJobs SDK script Azure WebJobs SDK Azure WebJobs SDK extensions Azure Functions CLI Azure Functions Portal Azure Functions templates Azure Functions samples
  20. 20. http://aka.ms/TryFunctions https://aka.ms/func-github
  21. 21. https://aka.ms/phillyfunctions
  22. 22. Email: shchowd@microsoft.com  Twitter: @shahedC

×