αʔόʔڥͷมԽ
w ΫϥυͷొͰॊೈʹੜɾഁغ͕Ͱ͖Δ༷ʹͳͬͨɻ
w ελϯυΞϩϯΞϓϦ͔Βͷ٫ϚΠΫϩαʔϏεͷོ
w αʔόʔ͕ͳ͘ͳΔͱ͍͏͜ͱͰͳ͍ɻ։ൃऀ͕αʔόʔʹ͍ͭͯࢁͷ
͜ͱΛߟ͑ͳͯ͘ྑ͘ͳΔͱ͍͏͜ͱɻ
IUUQTSFBEXSJUFDPNXIZUIFGVUVSFPGTPGUXBSFBOEBQQTJTTFSWFSMFTT
Slide 8
Slide 8 text
αʔόʔڥͷมԽ
IUUQTCMPHTNTEONJDSPTPGUDPNB[VSFTFDVSJUZCFTUQSBDUJDFTGPSVQEBUJOHWJSUVBMNBDIJOFTJONJDSPTPGUB[VSFJBBTEFQMPZNFOUT
Best Practices for Updating Virtual Machines in Microsoft Azure IaaS Deployments
Slide 9
Slide 9 text
αʔόʔϨεͱʁ
w αʔόʔΛҙࣝ͠ͳ͍Ͱྑ͍
w ؆୯ʹεέʔϧͰ͖Δ
w ར༻ྔʹΑΔ՝ۚ
Slide 10
Slide 10 text
Α͘ޠΒΕΔϢʔεέʔε
w 8FCΞϓϦέʔγϣϯ
w ϞόΠϧόοΫΤϯυ
w *P5όοΫΤϯυ
w ετϦʔϜϓϩηογϯά&5-
w νϟοτϘοτɺίάχςΟϒαʔϏε
w όονॲཧ
w ӡ༻ͷࣗಈԽ
"[VSF'VODUJPOT
w ΊͬͪΌ͍҆
w ೖྗɾग़ྗͷ࿈ܞػೳ͕๛ τϦΨʔɾόΠϯσΟϯά
w 7JTVBM4UVEJPΛͬͯͷσόοά ϩʔΧϧɾϦϞʔτʣ
w ΦϯϓϨͰ͍͚Δ "[VSF4UBDL
w ϥϯλΠϜ͕Φʔϓϯ IUUQTHJUIVCDPN"[VSF"[VSF'VODUJPOT
w (JUIVC͔ΒσϓϩΠͰ͖Δ
'VODUJPO1SPYZ QSFWJFX
w ෳͷ'VODUJPOΛ౷߹Ͱ͖Δ
w "1*.BOBHFNFOUͷΘΓʹ͑Δ
w 'VODUJPOҎ֎ͷϦΫΤετઃఆͰ͖Δ
"[VSF"1*NBOBHFNFOU
"[VSF'VODUJPOT
"[VSF'VODUJPOT1SPYZ
"[VSF'VODUJPOT
ͪΐͬͱ
͓ߴ͍
%VSBCMF'VODUJPOT Ћ൛
w ෳͷ'VODUJPOͷ࿈ܞΛൺֱత؆୯ʹ࣮Ͱ͖Δ
w 'VODUJPODIBJOJOH
w 'BOPVU'BOJO
w "TZOD)551"1*T
IUUQTB[VSFHJUIVCJPB[VSFGVODUJPOTEVSBCMFFYUFOTJPOJOEFYIUNM
IUUQRJJUBDPN5TVZPTIJ6TIJP!HJUIVCJUFNTFBDCCCGEC
Slide 33
Slide 33 text
'VODUJPO$IBJOJOH
public static async Task 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)
{
// error handling/compensation goes here
}
}
Slide 34
Slide 34 text
public static async Task Run(DurableOrchestrationContext ctx)
{
var parallelTasks = new List>();
// get a list of N work items to process in parallel
object[] workBatch = await ctx.CallFunctionAsync("F1");
for (int i = 0; i < workBatch.Length; i++)
{
Task task = ctx.CallFunctionAsync("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);
}
'BOPVU
'BOJO
Slide 35
Slide 35 text
"TZOD)551"1*T
public static async Task Run(
HttpRequestMessage req,
DurableOrchestrationClient starter,
string functionName,
TraceWriter log)
{
// Function name comes from the request URL.
// Function input comes from the request content.
dynamic eventData = await req.Content.ReadAsAsync();
string instanceId = await starter.StartNewAsync(functionName, eventData);
log.Info($"Started orchestration with ID = '{instanceId}'.");
return starter.CreateCheckStatusResponse(req, instanceId);
}
Slide 36
Slide 36 text
-JHIUXFJHIU"DUPST
public static async Task Run(DurableOrchestrationContext ctx)
{
int counterState = ctx.GetInput();
string operation = await ctx.WaitForExternalEvent("operation");
if (operation == "incr")
{
counterState++;
}
else if (operation == "decr")
{
counterState--;
}
ctx.ContinueAsNew(counterState);
}