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.

Visual Studio Team Services を使った Serverless のための継続的デリバリ

1,811 views

Published on

モダンなServerless 開発スタイル、継続的デリバリ、そしてサーバーレスの未来と Durable Functions
Tech Summit 2017 のセッション

Published in: Technology
  • Hello! Get Your Professional Job-Winning Resume Here - Check our website! https://vk.cc/818RFv
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Visual Studio Team Services を使った Serverless のための継続的デリバリ

  1. 1. Microsoft Tech Summit 2017 Visual Studio Team Services を使った Serverless のための継続的デリバリー
  2. 2. Microsoft Tech Summit 2017 モダンな開発スタイル
  3. 3. Microsoft Tech Summit 2017 継続的デリバリ
  4. 4. Microsoft Tech Summit 2017
  5. 5. Serverless を始めてほしい
  6. 6. Redmond Microsoft campus
  7. 7. Data Factory Blob Storage Key Vault Storage Queue Event Hub Stream Analytics Log Analytics Power BI SQL Server Azure SQL Server Redis Cache
  8. 8. Serverless 地獄
  9. 9. 地獄
  10. 10. 地獄
  11. 11. 地獄
  12. 12. 地獄
  13. 13. Function App Function Function Function AppSettings Connection Strings
  14. 14. 面倒
  15. 15. 地獄 (再掲載)
  16. 16. 地獄 (再掲載)
  17. 17. テスト
  18. 18. リリース
  19. 19. 地獄 (再掲載)
  20. 20. Ver 2.0
  21. 21. Data Factory Blob Storage Key Vault Storage Queue Event Hub Stream Analytics Log Analytics Power BI SQL Server Azure SQL Server Redis Cache (再掲載)
  22. 22. AppSettings EndpointA: xxx AppSettings EndpointB: xxx
  23. 23. 地獄(再掲載)
  24. 24. Data Factory Blob Storage Key Vault Storage Queue Event Hub Log Analytics SQL Server Redis Cache Terraform / ARM
  25. 25. Logic App どうするよ?
  26. 26. Visual Studio で ローカル開発する
  27. 27. Architecture
  28. 28. Orchestration – Manage the Complexity
  29. 29. Durable Functions – Orchestrators for Azure Functions Reduce ComplexitySimplify Enable Long Running FunctionsEnable Orchestrate FunctionsCoordinate
  30. 30. Why do we need “Durable Functions” Long Running & Local State 01 Simplify Function Coordination 02 Easy Function Communication 03 Code-Only 04
  31. 31. What is Durable Functions? Automatic Save of Local State 03 No JSON schemas, No designer! 01 Sync & Async Functions Calls 02
  32. 32. F1 F2 F3 F4
  33. 33. // calls functions in sequence public static async Task<object> Run(DurableOrchestrationContext ctx) { try { var x = await ctx.CallFunctionAsync("F1"); var y = await ctx.CallFunctionAsync("F2", x); var z = await ctx.CallFunctionAsync("F3", y); return await ctx.CallFunctionAsync("F4", z); } catch (Exception) { // global error handling/compensation goes here } }
  34. 34. F1 F2 F3
  35. 35. public static async Task Run(DurableOrchestrationContext ctx) { var parallelTasks = new List<Task<int>>(); // get a list of N work items to process in parallel object[] workBatch = await ctx.CallFunctionAsync<object[]>("F1"); for (int i = 0; i < workBatch.Length; i++) { Task<int> task = ctx.CallFunctionAsync<int>("F2", workBatch[i]); parallelTasks.Add(task); } await Task.WhenAll(parallelTasks); // aggregate all N outputs and send result to F3 int sum = parallelTasks.Sum(t => t.Result); await ctx.CallFunctionAsync("F3", sum); }
  36. 36. Worker Worker Worker Worker Worker Stateful/Partitioned Stateless Control Queue(s) Triggers orchestrator function execution Work Item Queue Triggers activity function execution History & Instance Tables
  37. 37. Key Takeaways - Orchestrator functions Code Stateful Durable When sleeping, not billed Automatically wake up Scalable
  38. 38. Serverless を始めてみよう
  39. 39. https://github.com/Azure-Samples/azure-serverless-workshop- team-assistant/tree/lang/jp https://blogs.msdn.microsoft.com/kenakamu/
  40. 40. • Azure WebJobs SDK Script: https://github.com/Azure/azure-webjobs-sdk-script • Azure Functions CLI: https://github.com/Azure/azure-functions-cli • Durable Functions: https://docs.microsoft.com/en-us/azure/azure-functions/durable-functions-overview • Azure Samples: https://azure.microsoft.com/en-us/resources/samples/?sort=0&service=functions • Logic Apps: https://github.com/logicappsio • Event Grid: https://docs.microsoft.com/en-us/azure/event-grid/overview

×