Slide 1

Slide 1 text

େྔԘج഑ྻొ࿥ਃ੥γεςϜ͕ Ͱ͖Δ·Ͱ ,FJUB6SBTIJNB !VSTN 0DU ,BJHJPO3BJMT

Slide 2

Slide 2 text

w ࠃཱҨ఻ֶݚڀॴੜ໋৘ใɾ%%#+ηϯλʔ͕ w Ԙج഑ྻʢੜ෺ͷҨ఻৘ใʣΛσʔλϕʔεԽͯ͠ެ։͢ΔͨΊʹ w όΠΦݚڀऀ͔ΒԘج഑ྻͷొ࿥ਃ੥Λड͚෇͚Δࡍʹ࢖ΘΕΔγε ςϜ w (PPHMFϑΥʔϜʹϑΝΠϧΞοϓϩʔυػೳ͕෇͍ͨΑ͏ͳΠϝʔδ w ͨͩ͠ѻ͏ϑΝΠϧ͕େ͖͍ ຊ೔ͷ͓୊େྔԘج഑ྻొ࿥ਃ੥γεςϜ

Slide 3

Slide 3 text

ݱঢ়ͱΰʔϧ Ԙج഑ྻͷొ࿥ਃ੥Λड͚෇͚Δͱ͖ɺݱঢ়Ͱ͸ w (PPHMFϑΥʔϜͰҰใΛೖΕͯ΋Β͏ w ϝʔϧͰ΍ΓऔΓΛͯ͠ඞཁͳ৘ใΛώΞϦϯά͢Δ w TDQͰϑΝΠϧΛసૹͯ͠΋Β͏ ͷΑ͏ͳखॱͰߦΘΕ͍ͯͯɺͱͯ΋खֻ͕͔ؒΔͷͰվળ͍ͨ͠

Slide 4

Slide 4 text

μΠϨΫτΞοϓϩʔυ "DUJWF4UPSBHF w ϒϥ΢β͔Β௚઀ετϨʔδαʔϏεʹϑΝΠϧΛΞοϓϩʔυͤ͞Δ w ΞϓϦέʔγϣϯʹ͸࣮ϑΝΠϧͷ୅ΘΓʹϑΝΠϧΛࣝผ͢ΔΩʔ͕౉ͬͯ ͘Δ w ඞཁͰ͋Ε͹͜ͷΩʔΛ࢖ͬͯݩͷϑΝΠϧΛऔಘͰ͖Δ w ΞοϓϩʔυͷϋϯυϦϯάΛετϨʔδαʔϏεʹؙ౤͛Ͱ͖Δ

Slide 5

Slide 5 text

Ξοϓϩʔυ͚ͩͰ͸ͳ͔ͬͨ w Ξοϓϩʔυ͞ΕͨϑΝΠϧͷத਎ΛಡΈग़ͯ͠ϑΥʔϜͷ߲໨ΛҰ෦ࣗಈͰ ຒΊ͍ͨ w ϑΝΠϧ͕େ͖͍ͱۃΊͯ೉͍͠

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

4USFBNT"1* w ϒϥ΢β্ͰσʔλΛࡉ੾ΕʹಡΈॻ͖͢ΔΠϯλʔϑΣʔεΛఏڙ͢Δ w ର৅͸ϑΝΠϧ΍ωοτϫʔΫϦΫΤετϨεϙϯεͳͲ w ϝϞϦരൃͷ৺഑ͳ͘େ͖ͳσʔλΛѻ͑Δ const res = await fetch('https://example.com'); res.body // これが ReadableStream

Slide 8

Slide 8 text

document.querySelector('input') .addEventListener('change', async (e) => { const file = e.target.files[0]; const reader = file.stream().getReader(); for (;;) { const {done, value} = await reader.read(); if (done) { break; } console.log(value); } });

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

>NIES3753_TRINITY_DN0_c0_g1_i1_len285 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCTCTTCATCAAACTCCTGCGCTGCCACT GCAGCCAAACACACAGCTGACACAGCACCAAAATAACCCCACGCCCTGCAGCTACAG // >NIES3753_TRINITY_DN1_c3_g1_i1_len267 CCTCAACGGGAGCAGCTGATCAAACTACAGAACTCCACACGCCCCATGGCACCACTT GTGACGGGACGGGCCTGGAGGTGGATTCATATCAGCCCCACCACTCCAAGCATGCTG // >NIES3753_TRINITY_DN1_c4_g1_i1_len257 GTCCATACTGGTCCTAGCAGGTCCCAGAATCTACCTCTTGCTTGCACCATATGCACT TTCTGCATGCCTGGCCACAGTCTGGCTTGAGCCATTGGATGTGCCAGTTAACAGTAT // >NIES3753_TRINITY_DN1_c2_g1_i1_len229 CCCCCCCCCCCCCCCCCCCTCTCCTGCTGCATCTGTGGGGACATGCCCATCTGAGAG GCAGCCCAGCACTCATTGCAGATCGCAAGACCACTCGCCTCAACTCCCTTCACCCCA //

Slide 11

Slide 11 text

const LF = '\n'.codePointAt(0); const CR = '\r'.codePointAt(0); const GT = '>'.codePointAt(0); async function parse(file) { const reader = file.stream().getReader(); let done, value; let entriesCount = 0; let isBOL = true; while (({done, value} = await reader.read()), !done) { for (const byte of value) { if (isBOL && byte === GT) { entriesCount++; isBOL = false; } else { isBOL = byte === LF || byte === CR; } } } return {entriesCount}; }

Slide 12

Slide 12 text

ύʔεதʹϒϥ΢β͕ݻ·Δ໰୊ w େ͖ͳϑΝΠϧΛύʔε͢Δͱλϒͷඳը͕ࢭ·ͬͯૢ࡞ʹ΋൓Ԡ͠ͳ͍ঢ়ଶ ʹͳͬͯ͠·͏ w ύʔε͕ऴΘΔͱݩʹ໭Δ w +BWB4DSJQU͸γϯάϧεϨουͳͷͰ$16཯଎ͳίʔυ͸ଞͷ͢΂ͯΛࢭΊ ͯ͠·͏Մೳੑ͕͋Δ w Ұൠతʹ͸TFU5JNFPVUͳͲͰଞͷॲཧׂ͕ΓࠐΉ༨஍Λ࡞ͬͯରԠ͢Δ

Slide 13

Slide 13 text

8FC8PSLFST w ϝΠϯεϨουͱ׬શʹಠཱͨ͠ผεϨουͰॲཧΛ࣮ߦ͢Δ࢓૊Έ w ϫʔΧ͸ϝΠϯεϨουͷඳը΍ૢ࡞Λ๦͛ͳ͍ w ϫʔΧ͸ฒྻʹಈ࡞͢ΔͨΊϚϧνίΞΛ׆༻Ͱ͖Δ

Slide 14

Slide 14 text

const worker = new Worker('./worker.js'); worker.addEventListener('message', e => { console.log(e.data); }); worker.postMessage('hello, world'); addEventListener('message', e => { postMessage(e.data.toUpperCase()); }); NBJOKT XPSLFSKT ᶃ ᶄ ᶅ ᶆ

Slide 15

Slide 15 text

addEventListener('message', async ({data: {file}}) => { try { const payload = await parse(file); postMessage([null, payload]); } catch (err) { postMessage([err, null]); } }); async function parse(file) { const reader = file.stream().getReader(); // ... return {entriesCount}; }

Slide 16

Slide 16 text

ϋογϡ஋ͷܭࢉ͕஗͍໰୊ w "DUJWF4UPSBHF͸μΠϨΫτΞοϓϩʔυͷͱ͖ϑΝΠϧͱҰॹʹϋογϡ ஋ΛૹΔ w େ͖ͳϑΝΠϧͩͱϋογϡ஋ͷܭࢉʹֻ͕͔࣌ؒΔ w "DUJWF4UPSBHF͸TQBSLNEͱ͍͏ϥΠϒϥϦΛ࢖ͬͯϋογϡ஋ΛٻΊ ͍ͯΔ w TQBSLNE͸ಉछͷϥΠϒϥϦͷதͰ͸τοϓϨϕϧʹ଎͍

Slide 17

Slide 17 text

8FC"TTFNCMZ w ओʹϒϥ΢βͰ࣮ߦ͢ΔͨΊͷԾ૝తͳػցޠ w +BWB4DSJQUͰ͸౸ୡͰ͖ͳ͍ωΠςΟϒίʔυʹ͍ۙੑೳ͕ಘΒΕΔ w 8FC"TTFNCMZʹΑΔϋογϡؔ਺ͷ࣮૷IBTIXBTN w TQBSLNEͱൺֱͯ͠ഒҎ্ͷ଎౓վળ

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

github.com/ddbj/submission-mss