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.

Serverless. What, Why, Who & How?

260 visualizações

Publicada em

Serverless Compute overview

Publicada em: Internet
  • Seja o primeiro a comentar

Serverless. What, Why, Who & How?

  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. https://aws.amazon.com/lambda/
  4. 4. https://cloud.google.com/functions/
  5. 5. http://aka.ms/TryFunctions
  6. 6. { "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(); }
  7. 7. 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" } ] }
  8. 8. Every 15 minutes Clean tableFind and clean invalid data
  9. 9. File added to Blob Storage Transform CSV to data rows CSV Power BI Chart graphic
  10. 10. Loaded web page calls WebHook Completed pageCreate ad based on user profile
  11. 11. Photo taken and WebHook called Stores in blob storage Produces scaled images
  12. 12. Millions of devices feed into Stream Analytics Store data in SQL Online Transform to structured data
  13. 13. Deployment and management isolation Customers Products Orders API calls customers.azurewebsites.net products.azurewebsites.net orders.azurewebsites.net
  14. 14. Function app A /customers Function app B /products Function app C Function3/orders Function1 API proxy endpoints HttpTrigger function endpoints Key: /products /orders Function2
  15. 15. New file on site root: proxies.json { "proxies": { "proxy1": { "matchCondition": { "methods": [], "route": "/api/{test}" }, "backendUri": "https://contoso.azurewebsites.net/api/{test}" } } }
  16. 16. https://www.npmjs.com/package/azur e-functions-core-tools
  17. 17. https://aka.ms/2017functiontools
  18. 18. Azure Functions Demo
  19. 19. • 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
  20. 20. 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
  21. 21. http://aka.ms/TryFunctions https://aka.ms/func-github
  22. 22. Joe.Raio@Microsoft.com Download this presentation: slideshare.net/joeraio

×