$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
mastodonのnodeのはなし
Search
geta6
April 26, 2017
0
3.1k
mastodonのnodeのはなし
geta6
April 26, 2017
Tweet
Share
More Decks by geta6
See All by geta6
pixiv SketchのSSRの話
geta6
10
4.3k
ReactとFluxのこと
geta6
166
64k
What is CoffeeScript
geta6
8
890
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
118
20k
Building an army of robots
kneath
306
46k
Faster Mobile Websites
deanohume
310
31k
RailsConf 2023
tenderlove
30
1.3k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Speed Design
sergeychernyshev
33
1.3k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Statistics for Hackers
jakevdp
799
230k
We Have a Design System, Now What?
morganepeng
54
7.9k
Transcript
ͳΜ͔OPEFͷ$16༻͕ ͰுΓ͍ͯͯϚδϠ ό͔ͬͨͷͰͳΜͱ͔ͨ͠
w ໊લɿ͛ͨ w ৬ۀɿҰൠϊʔϚϧΤϯδχΞ w +BWB4DSJQUమ๒ۄͱ͍ͯ͠ΖΜͳϓϩδΣΫτʹಥͬ ࠐ·ΕΔΛ͍ͯ͠·͢ɺීஈQJYJW4LFUDIͰ8FC ͷ࣮Λ͍ͯ͠·͢ HFUB
w ϦϦʔεޙɺ༵ۚͷ࣌͝Ζͷ͜ͱ
w ʮͳΜ͔OPEFͷ$16༻͕ͰுΓ͍ͯͯ ϚδϠό͍ʯ w ʮͳΜ͔λΠϜϥΠϯ͕खΕͯΔͧʯ
w Կͱ͔͠Α͏ɺͬͯݴͬͯԿͱ͔ͨ͠Λ͠·͢
w 8FC4PDLFUΛͬͨ4USFBNJOHؔ࿈ͷ"1*࣮ɺ શͯ̍ϑΝΠϧͷϙΤϜͰ࣮ݱ͞Ε͍ͯΔ w QHTRMίωΫγϣϯϓʔϧɺSFEJTίωΫγϣϯɺIUUQ ΠϯλʔϑΣʔεɺXTΠϯλʔϑΣʔεɺʑ
w OQNTDSJQUΛΑ͘ݟΔͱɺ͜ͷ࣮͕CBCFMOPEF ίϚϯυΛͬͯ&4ίʔυΛىಈ͢Δے ྗӡ༻ํࣜʹͳ͍ͬͯΔ͜ͱ͕Θ͔Δ w ಛʹQNͳͲͷϚωʔδϟʔڬΜͰ͍ͳ͍
w ͱ͜ΖͰOPEFγϯάϧεϨου w ίΞͷҧ͍ͰύϑΥʔϚϯεมΘΒͳ͍
w ݩͷίʔυૉͳ࣮ɺαʔόʔ͋ͨΓϓϩη εɺͭ·ΓίΞ͔͠ར༻Ͱ͖ͳ͍ঢ়ଶͰཱ͔͠ ͯΒΕͳ͍ w $16ෛՙ͕ภͬͨঢ়ଶʹͳΔ
w $16ෛՙ͕ภͬͨঢ়ଶ w ϚετυϯΛಈ͔ͯ͠Δαʔόʔతʹશવେৎ ͳϋζͳͷʹOPEFͷϓϩηε͚͕ͩͰு Γ͍ͯࢮɺͱ͍͏ঢ়ଶͷ͜ͱ w ͭͷίΞΛूதతʹࡴ͠ʹ͔͔Δ
1 3 2 4
w Կ͕ى͖Δ͔ w ϖʔδී௨ʹݟ͑Δͷʹɺͳ͔ͥετϦʔϛϯ ά͕߱ͬͯ͜ͳ͍ w λΠϜϥΠϯ͕ΊͪΌͪ͘ΌΕͯΔ
w Ͳ͏ͬͯղܾ͢Δ͔ w ϓϩηεΛ૿ͯ͠εέδϡʔϦϯά ɺϚγϯ ͷίΞؒͰෛՙΛࢄ͢Δ w ఆੴͱͯ͠QNͳͲͷϓϩηεϚωʔδϟʔΛͬ ͯɺ͍͍ײ͡ʹOPEFͷϓϩηεΛ૿ͯ͋͛͠Δ w
ࡴ͢ྗΛʹͯ͠Δ
1 3 2 4
w खͬऔΓૣ͘QNͰ࣮ݱ͠Α͏ͱͨ͠ w QNͷDPOpHpMFॻ͍ͯྡʹ͍ͨTVEPFSʹͨ͠ w ʮͳΜ͔ಈ͔ͳ͍Μ͚ͩͲʯ
w ϩάΛړͬͨΓ৭ʑͨ͠ΒɺͲ͏ΒTZTUFNEͱ૬ ੑ͕ѱ͘͏·͘ಈ͍͍ͯͳ͍Β͍͜͠ͱ͕Θ͔ͬͨ ʢΓํ͕ѱ͔͔ͬͨ͠Εͳ͍ʣ
w ͏ϦϦʔεͨ͠ޙɺϢʔβʔ͕ࠔͬͯΔͷࠓ w ղܾ͕࠷༏ઌɺ͏ےྗͰղܾ͠Α͏
w ࠷खͬऔΓૣ͘OPEFΛϚϧνίΞʹରԠͤ͞Δ ʹɺDMVTUFSϞδϡʔϧΛ͏ w OPEFʹඪ४Ͱόϯυϧ͞Ε͍ͯΔϞδϡʔϧ w ΫϥελϦϯάػೳΛ࣋ͬͨϓϩηεϚωʔδϟʔ ͷجૅʹͳ͍ͬͯΔ
None
w ಋೖͱͯ؆୯ɺSFRVJSFͯ͠JGจॻ͍ͯϝιου Λݸ࣮ߦ͢Δ͚ͩ
const cluster = require('cluster'); if (cluster.isMaster) { cluster.fork(); } else
{ // your code here }
w ͜ͷ··ͰίΞ͔͑͠ͳ͍ w ίΞ ճɺGPSLΛ࣮ߦ͢ΕΑ͍
const cluster = require('cluster'); const os = require('os'); if (cluster.isMaster)
{ const core = Math.max(os.cpus().length - 1, 1); for (let i = 0; i < core; i++) cluster.fork(); } else { // your code here }
w ͜ΕͰΕͯϚϧνίΞΛશ෦͍͖ΕΔΑ͏ʹͳ Γ·ͨ͠ w ίΞ ͍ͯ͠ΔͷGPSLͨ͠ϓϩηε͕രൃ͠ ͨ࣌ʹϚγϯ͕ਧͬඈͳ͍Α͏ʹ͢ΔͨΊͰ͢
w GPSLݩ͕NBTUFSɺGPSLઌ͕XPSLFS w XPSLFSͷࣄͷׂΓৼΓ04͕উखʹͬͯ͘ Ε·͢ʢϥϯυϩϏϯબͰ͖·͢ʣ
w ʢ͜͜ʹϓϩηεͷෛՙ͕͍͍ײ͡ʹݮ͍ͬͯΔ༷ ࢠ͕ݟͯऔΕΔඒ͍͠άϥϑΛஔ͘ʣ
w *NQSPWFTUSFBNJOH"1*TFSWFSQFSGPSNBODFXJUI DMVTUFS w ຊՈʹऔΓࠐ·Ε·ͨ͠ɺWͰϦϦʔε͞Εͯ ͍·͢ͷͰօ͞Μͥͻ͝ར༻͍ͩ͘͞
None
w تΜͰΒ͑ͯͳʹΑΓ
w ͓·͚ w ͋ͱͭϚʔδ͞Εͨͷ͕͋ΔͷͰհ͠·͢
w "EEIBT.PSFpFMEUPBDDPVOUUJNFMJOFUPCMPDL MBSHFBNPVOUPG9)3
w εΫϩʔϧ͕λΠϜϥΠϯͷඌ౸ୡͨ࣌͠ʹແ ݶʹ9)3ϦΫΤετ͕ΔͷΛ੍ͨ͠
w ͨͿΜ࣮Εɺ3FEVYͷ"DUJPO3FEVDFSʹOFYU VSM͕ଘࡏ͠ͳ͍࣌ͷॲཧΛ͍Εͨ
w "VUPNBUJDBMMZDIBOHFUIFTJ[FPGUFYUBSFB
w ͍จষΛೖྗͨ࣌͠ʹɺUPPU͢Δ࣌ͷUFYUBSFBͷ αΠζ͕ࣗಈతʹมΘΔΑ͏ʹͨ͠ w UFYUBSFBͷBVUPSFTJ[F؆୯ɺߦͰ࣮ݱͰ͖Δ
onChange (e) { e.target.style.height = 'auto'; e.target.style.height = `${e.target.scrollHeight}px`; },
onChange (e) { e.target.style.height = 'auto'; e.target.style.height = `${e.target.scrollHeight}px`; },
ߦΛݮΒ࣌͢ͷॲཧ ☝ߦΛ૿࣌͢ͷॲཧ
w ͓͠·͍Ͱ͢