Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
mastodonのnodeのはなし
Search
geta6
April 26, 2017
0
2.9k
mastodonのnodeのはなし
geta6
April 26, 2017
Tweet
Share
More Decks by geta6
See All by geta6
pixiv SketchのSSRの話
geta6
10
4k
ReactとFluxのこと
geta6
166
63k
What is CoffeeScript
geta6
8
820
Featured
See All Featured
Thoughts on Productivity
jonyablonski
67
4.3k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
43
6.6k
How to Ace a Technical Interview
jacobian
275
23k
Designing the Hi-DPI Web
ddemaree
280
34k
What's new in Ruby 2.0
geeforr
342
31k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
Testing 201, or: Great Expectations
jmmastey
38
7k
Documentation Writing (for coders)
carmenintech
65
4.4k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
The Invisible Side of Design
smashingmag
297
50k
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 ͓͠·͍Ͱ͢