O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Code Europe - Azure Functions

286 visualizações

Publicada em

Presentation from Code Europe providing an overview of Azure Functions, Command Line Tools, Visual Studio Tools and demo applications

Publicada em: Internet
  • Seja o primeiro a comentar

  • Seja a primeira pessoa a gostar disto

Code Europe - Azure Functions

  1. 1. Joe Raio Senior Technical Evangelist DX Audience joe.raio@microsoft.com @joescars github.com/joescars Based in Miami, FL United States. Proud father. Passions are Music, Space, Aviation & all things Technology
  2. 2. Serverless is to servers as wireless is to wired. Wireless internet still requires wires, but customers don't need to interact with them
  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. https://aka.ms/2017functiontools
  16. 16. Azure Functions Demo
  17. 17. • 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
  18. 18. 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
  19. 19. http://aka.ms/TryFunctions https://aka.ms/func-github
  20. 20. Joe.Raio@Microsoft.com Download this presentation: slideshare.net/joeraio