Upgrade to Pro — share decks privately, control downloads, hide ads and more …

非同期Jobの設計と実装

 非同期Jobの設計と実装

Akira Chiku

May 27, 2017
Tweet

More Decks by Akira Chiku

Other Decks in Programming

Transcript

  1. BHFOEB  Ø  ⵸䲿 فٗتؙز؟؎ؤث٦ي  Ø  ꬊず劍+PCד㹋植׃׋ְֿה Ø  RVFHP

    1PTUHSF42-XJUI"EWJTPSZ-PDLך稱➜ Ø  +PCךꬊず劍Ⳣ椚ػة٦ٝ
  2. લఏ αΠζ   Ø  TJ[F BTPG.BS   Ø 

    PGFOEQPJOUT JOUFSOBM"1*  Ø  PGFYUFSOBMTFSWJDFT Ø  OPUJODMVEJOH4FOUSZ/FX3FMJD4UBUVT1BHFJP  Ø  PGUBCMFT 1PTUHSF42-  Ø  PGMJOFT (PDPEFXJUIPVUWFOEPS  Ø  XJUIHFOFSBUFEDPEF  Ø  XJUIPVUHFOFSBUFEDPEF 
  3. લఏ ث٦ي   NFNCFS EFTJHO GSPOUFOE CBDLFOE *OGSB "84

     NPRBEB ZZPTIJLJ BDIJLV "TPG.BZ 
  4. ࣮ݱ͍ͨ͠ࣄ  Ø  וַֿדؒٓ٦ꥺ㹱ָ涪欰׃ג׮ر٦ةך侭さ䚍׾ז׷ץֻ⥂ג ׷״ֲחׅ׷捀ךꬊず劍 Ø  ِ٦ؠ٦ַ׵ך؎ٝفحز׾넝鸞ח䯢ְגְ׷״ֲח鋅ׇ׷捀 ךꬊず劍הכ㼰׃殯ז׷ Ø  ⰻ鿇ך3%#.4׌ֽדכזֻծ㢩鿇"1*הךر٦ةך侭さ䚍׮《

    ׶׋ְ Ø  䔲儗⯓䎃ך✲噟鎘歗ח㛇בֻꬊず劍+PCػؿؓ٦وٝأ鎘歗׾ ⡲׏׋ֽו׉ֿתדػؿؓ٦وٝأ実׭׵׸גזְ Ø  ،سذؙ׫׋ְז侧ך凐⸂כչ瑱搫պ涪欰׃זְ䟝㹀 Ø  ػؿؓ٦وٝأ״׶׮ر٦ة侭さ䚍׾㸚׷捀ךꬊず劍Ⳣ椚 Ø  〳腉ז׵麊欽ׅ׷ىسٕؐؑ،׾㟓װ׃׋ֻזְ Ø  醱꧟䚍㟓ծ鏣鎘ծꟚ涪ծ嗚鏾ծ麊欽㣐㢌
  5. ݱ࣮  Ø  䔲倯 NPRBEBBDIJLV ח3BCCJU.2瘝1FSTJTUFODZך剣׷2VFVFى سٕؐؑ،麊欽穗꿀ָזְ Ø  ׉ך䔲儗ىسٕ嗚鏾ծ统擾䏝׾넝׭ג㼪Ⰵׅ׷玎儗꟦涸⡭酔כ 搀ַ׏׋

    Ø  3FEJTך麊欽穗꿀֮׷ֽו1FSTJTUFODZהְֲ錁挿דכ銲⟝ח鋅 さ׻׆ Ø  IUUQTSFEJTJPUPQJDTQFSTJTUFODF Ø  ♧儗涸ח搀ֻז׏ג׮ٔأز،ׅ׸ל葺ְر٦ةךغحؙ،ح ف׾《׷הַכ葺ְ׿׌ֽו
  6. RVFHP  Ø  1PTUHSF42-ךزٓٝؠؙءّٝח㸚׵׸׋ꬊず劍+PCؿٖ٦ي ٙ٦ؙ2VF SVCZ ך(P㹋鄲 Ø  IUUQTHJUIVCDPNDIBOLTRVF Ø 

    %FMZBFE+PCװ2VF$MBTTJDח剏׻׷ع؎ػؿؓ٦وٝأד⥋걾 䚍ך넝ְꬊず劍+PCؿٖ٦يٙ٦ؙ Ø  1PTUHSF42-ךزٓٝؠؙءָّٝ+PC׾㸚׷ Ø  2VFך(P㹋鄲 Ø  IUUQTHJUIVCDPNCHFOUSZRVFHP Ø  8JUI2VF ZPVBMTPHFUBMMUIFUSBOTBDUJPOBM"$*%HVBSBOUFFT PG1PTUHSFTXJUIZPVSKPCT5IJTNFBOTUIBUKPCTBSF HVBSBOUFFEUPSVOBUMFBTUPODF BOEDBOCFFORVFVFEJOB USBOTBDUJPOBMPOHXJUIPUIFSEBUBCBTFDIBOHFT
  7. Կ͕خ͍͠ͷ͔  Ø  ٔزٓ؎ך➬穈׫ FYQPOFOUJBMCBDLPהַ ծؘؚٗٝך➬穈׫ ろ׭גꬊず劍+PCח䗳銲ז僴傈כرؿٕؓزד穈׫鴥ת׸גְ׷ Ø  ⸇ִג Ø 

    ׮ה׮ה1PTUHSF42-׾⢪׏גְ׷ךד倜鋉דىسٕؐؑ،׾ 駈ׅ䗳銲ָזְ Ø  ➭ךر٦ة㢌刿הずׄزٓٝؠؙءّٝד+PC׾ُؒٝؗ٦ד ֹ׷ Ø  ُؒٝؗ٦׃׋+PCכ1PTUHSF42-ךذ٦ـٕד盖椚ׁ׸׷ךד 黝ⴖח麊欽ׁ׸׸ל ➭ךر٦ةהずֻׄ׵ְ⥋걾䚍ָ넝ְ Ø  "EWJTPSZ-PDL׾ⵃ欽׃גְ׷ךדծⳢ椚㼎韋侧+PC侧ָ♳ָ׏ ג׮ծ䱖➭ⵖ䖴鿇ⴓד鹼ֻז׷然桦ָ⡚ְ
  8. ࢀߟ 1PTUHSF42-"EWJTPSZ-PDL  Ø  ،فٔ؛٦ءّٖٝكٕד⚛⴨Ⳣ椚盖椚׾ׅ׷ꥷחⵃ欽ׁ׸׷ Ø  IUUQTXXXQPTUHSFTRMPSHEPDTTUBUJDFYQMJDJU MPDLJOHIUNM Ø  4FTTJPO"4&-&$5QH@BEWJTPSZ@MPDL

     SFUVSOUSVF Ø  4FTTJPO#4&-&$5QH@BEWJTPSZ@MPDL  SFUVSOGBMTF Ø  4FMFDU'PS6QEBUFהכ殯ז׶ծSPXMFWFMMPDLׅ׷׻ֽדכזֻծ ׉ך*%ָ➭ךإحءַّٝ׵MPDLׁ׸׋朐䡾ַוֲַ׾CPPMFBOד 鵤ׅ %#⩎דⳢ椚׾CMPDL׃זְ  Ø  5BCMFחBH׾䭯׋ׇג⚛⴨Ⳣ椚盖椚ׅ׷ך׮֮׶׌ֽוծ BEWJTPSZMPDLכ׉ך➭ךFYQMJDJUMPDLהずֻׄTIBSFENFNPSZ QPPM♳ח呓秛ׁ׸׷ךדTUPSBHFח剅ֹ⳿ׅ铣׫⳿ׅ״׶鸞ְ
  9. ݪଇ  Ø  ⾱⵱+PC5SBOTBDUJPO׾㸚׷ Ø  ⡦׮罋ִ׆חⱄ㹋遤דֹ׷״ֲח׃׋ְ Ø  醱侧زٓٝؠؙءّٝ׾אך+PCⰻד⢪ֲהծא湡ך DPNNJUתד䧭⸆׃ג䖓竲Ⳣ椚ד㣟侁׃׋䖓ⱄ㹋遤ׅ׷儗ח HVBSE涸זⳢ椚ָ䗳銲חז׷ַ׵

    Ø  וֲ׃ג׮㔐ךُؒٝؗ٦ד醱侧زٓٝؠؙءّٝ䗳銲ז㜥 さכ+PC׾ⴓⶴ׃ծא湡ך+PCך剑䖓דא湡ך+PC׾ؒٝ ُؗ٦ׅ׷ Ø  㢩鿇"1*ד《䖤㢌刿דֹ׷ر٦ةהⰻ鿇ך3%#.4ך侭さ䚍׾〳腉 זꣲ׶⥂ג׷״ֲח鏣鎘ׅ׷
  10. +PCͷઃܭύλʔϯ  Ø  $6%˘$SFBUF6QEBUF%FMFUF Ø  3˘3FBE 3%#.4 &YUFSOBM"1* OB 3

    $6% OB 3 $6% Ø  1BUUFSO Ø  㢩鿇ך刿倜禸"1*׾ㄎל׆ծ 3%#.4ה㢩鿇ך⿫撑禸"1*׌ֽ דⳢ椚ָ㸣穠ׅ׷ Ø  1BUUFSO Ø  㢩鿇ך刿倜禸"1*׾ㄎןծ 3%#.4׾⿫撑刿倜ׅ׷
  11. 1BUUFSO  3%#.4 &YUFSOBM"1* OB 3 $6% OB 3 $6%

    Ø  3%#.4׌ֽדⳢ椚ָ㸣穠ׅ׷ Ø  +PCⰻ鿇ךⳢ椚כⰋגزٓٝؠؙءّٝח㸚׵׸גְ׷ Ø  Ⳣ椚ָוַֿד㣟侁׃ג׮ծ䔲鑩+PCך⚥ד遤׻׸׋3%#.4ך 㢌刿כⰋגٗ٦ٕغحؙדֹ׷
  12. 1BUUFSO  3%#.4 &YUFSOBM"1* OB 3 $6% OB 3 $6%

    Ø  㢩鿇ך刿倜禸"1*׾ㄎןծ3%#.4׾⿫撑刿倜ׅ׷ Ø  3%#.4ך㢌刿כ㣟侁׃׋׵Ⰻגٗ٦ٕغحؙדֹ׷ָծ㢩鿇ך 刿倜禸"1*כ♧䏝ㄎ׿׌׮ך׾ծ׉ךزٓٝؠؙءّٝⰻד搀 ַ׏׋✲חכדֹזְ Ø  ⢽㢩Ⳣ椚ך♧橆ה׃גծؒٓ٦ָ涪欰׃׋׵׮ֲ♧䏝刿倜 禸㢩鿇"1*׾ㄎ׿ד㢩鿇ر٦ة׾+PC㹋遤⵸ך朐䡾ח䨱ׅծ הְֲ⡲׶׮֮׶ַ׮׃׸זְֽו׋ע׿㣐㢌 Ø  ٔزٓ؎׃ג׮ずׄ刿倜禸"1*׾ז׷ץֻㄎלזְ״ֲחׅ׷ Ø  㢩鿇ך刿倜禸"1*׾ㄎעךכծ〳腉זꣲ׶Ⳣ椚ך剑䖓חׅ׷ Ø  㢩鿇ך刿倜禸"1*כאך+PCך⚥ד㔐תדהׅ׷ Ø  زٓٝؠؙءّٝծ刿倜禸㢩鿇"1*