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
PHPエンジニアによるScalaエンジニアへの転身とその手引き
Search
Shingo Harada
November 11, 2018
Technology
820
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PHPエンジニアによるScalaエンジニアへの転身とその手引き
Shingo Harada
November 11, 2018
Other Decks in Technology
See All in Technology
AIチャットの改善から見えた、良いAI体験とは / What Constitutes a Good AI Experience: Insights from Improving AI Chat
kubode
0
130
SRE歴2ヶ月でも開発6年の知見を活かして、チームで止まっていた環境改善を前に進めた話
a_ono
0
110
When Platform Engineering Meets GenAI
sucitw
0
200
AWS Summit の片隅で、体育座りしながらコミュニティがにぎわう理由を考えた
k_adachi_01
2
220
MySQL & MySQL HeatWave Report - June 2026
freshdaz
0
200
BPaaSで進むAIオペレーションの現在地 AI実装が効く領域とスケーラビリティの選定と実装
kentarofujii
0
210
AI Agentをシステムに組み込む前にゆるく向き合ってみる
hayama17
0
170
從開發到部署全都交給 AI:實作 AI 驅動的自動化流程
appleboy
0
180
技術・能力を向上する原理原則 #きのこセッションa #きのこ2026
bash0c7
0
140
作る力から、見極める力へ — AI時代に広がるエンジニアの価値と役割
rince
0
360
AIをフル活用してオンコール機能のプロトタイプを2日で作った話 / Building an AI-Powered On-Call Prototype in Just Two Days
nari_ex
0
150
AIに障害切り分けを全部やってもらった。 。 。 。
estie
0
260
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.5k
The Language of Interfaces
destraynor
162
27k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
790
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
340
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
620
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
170
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
Transcript
ݪాਅޗ 1)1ΤϯδχΞʹΑΔ4DBMBΤϯδ χΞͷసͱͦͷखҾ͖ 4DBMBؔ4VNNJU
2017/11/11 © ChatWork All rights reserved. 2 ࣗݾհ ‣ $IBU8PSLגࣜձࣾαʔόʔαΠυ։ൃ෦
‣ ೖࣾ ݱࡏͰஸ͙Β͍ ‣ 1)1ΤϯδχΞͱͯ͠ೖࣾ ‣ ࠷ۙ4DBMBϓϩμΫτʹKPJO 4DBMBྺϲ݄͙Β͍ɺ +BWBະܦݧ
2017/11/11 © ChatWork All rights reserved. 3 $IBU8PSLʹ͍ͭͯ ‣ ϏδωενϟοταʔϏε
‣ λεΫཧɾϏσΦ௨ ‣ ಋೖاۀ ࣾҎ্
2017/11/11 © ChatWork All rights reserved. 4 5PQJDT ‣ $IBU8PSLͰͷ4DBMBͷऔΓΈ
‣ 4DBMBϓϩμΫτͷࢀՃɻֶशͷ͖᪴ͱղܾํ๏ ‣ 4DBMBΤϯδχΞʹసͯ͠Έͨ݁Ռ
2017/11/11 © ChatWork All rights reserved. 5 $IBU8PSLͱ4DBMBͷؔɾ։ൃܦҢ
2017/11/11 © ChatWork All rights reserved. 6 1)1։ൃ͔Β4DBMB։ൃ ‣ ࠒ͔Β1)1͚ͩͰͳ͘4DBMBϓϩμΫτ։ൃ
‣ 4DBMBϓϩμΫτͷ૿Ճ ‣ 0"VUI ‣ 8FCIPPL ‣ #PY࿈ܞ ‣ *'555࿈ܞ
2017/11/11 © ChatWork All rights reserved. 7 $IBU8PSLͱ4DBMBͷؔ ‣ $IBU8PSLͷ4DBMB࠾༻ϓϩμΫτl'BMDPOzϦϦʔε·Ͱͷࣦഊͱ
ޭͷྺ࢙ 4DBMB.BUTVSJ w IUUQTTQFBLFSEFDLDPNKJLPIJTUPSZPGGBMDPOUIFXBZUPQSPEVDUJPOSFMFBTF ‣ $IBU8PSLͷ৽ϝοηʔδϯάγεςϜΛࢧ͑Δٕज़ "84%FW %BZ5PLZP w IUUQTTQFBLFSEFDLDPNKJLPDIBUXPSLGBMTFYJONFUVTF[JOHVTJTVUFNVXP[IJ FSVKJTIV ‣ 4DBMBBOE"LLBBQQTPO,VCFSOFUFTJO$IBU8PSL 4DBMBؔ 4VNNJU w IUUQTTQFBLFSEFDLDPNIBZBTTIJTDBMBBOEBLLBBQQTPOLVCFSOFUFTJO DIBUXPSL
2017/11/11 © ChatWork All rights reserved. 8 4DBMBϓϩμΫτͷࢀՃ ֶशͷ͖᪴ͱղܾ๏
2017/11/11 © ChatWork All rights reserved. 9 4DBMBϓϩδΣΫτͰΘΕ͍ͯͨࣝ ͱֶशঢ়گ ‣
ΘΕ͍ͯͨϥΠϒϥϦͱݴޠͷဃ w TDBMB[ "LLB LBNPO DJSDF FUDʜ ‣ ࠓ·Ͱܦݧͨ͠ϓϩάϥϛϯάݴޠ w 1)1ɺ1ZUIPOɺ$ʜ
2017/11/11 © ChatWork All rights reserved. 10 1)1ˠ4DBMBֶशͷ݁Ռ
2017/11/11 © ChatWork All rights reserved. 11 *'555࿈ܞΛ4DBMBͰ։ൃˍϦϦʔε ‣ ༻ͯ͠ΔϥΠϒϥϦ
w "LLB)UUQ w "LLB4USFBN w TDBMB[ w DJSDF w FUD
2017/11/11 © ChatWork All rights reserved. 12 *'555࿈ܞ ެࣜυΩϡϝϯτ IUUQTQMBUGPSNJGUUUDPNEPDT
2017/11/11 © ChatWork All rights reserved. 13 4DBMBϓϩμΫτʹࢀՃ
2017/11/11 © ChatWork All rights reserved. 14 େ͖ͳน ϓϩμΫτίʔυͱࣝͷဃ def
create(implicit scheduler: Scheduler): Flow[CreateUserAccountRequest, CreateUserAccountResponse, NotUsed] = Flow[CreateUserAccountRequest].mapAsync(1) { userAccount => (for { id <- userIdGenerator.generateId() result <- userRepository.store( UserAccount( id, Status.Active, EmailAddress(userAccount.emailAddress), HashedPassword(userAccount.password), userAccount.firstName, userAccount.lastName, Clock.now, None ) ) } yield CreateUserAccountResponse(id.value)).runAsync }
2017/11/11 © ChatWork All rights reserved. 15 େ͖ͳน ϓϩμΫτίʔυͱࣝͷဃ def
create(implicit scheduler: Scheduler): Flow[CreateUserAccountRequest, CreateUserAccountResponse, NotUsed] = Flow[CreateUserAccountRequest].mapAsync(1) { userAccount => (for { id <- userIdGenerator.generateId() result <- userRepository.store( UserAccount( id, Status.Active, EmailAddress(userAccount.emailAddress), HashedPassword(userAccount.password), userAccount.firstName, userAccount.lastName, Clock.now, None ) ) } yield CreateUserAccountResponse(id.value)).runAsync }
2017/11/11 © ChatWork All rights reserved. 16 ͳͥ͘͠ײͨ͡ͷ͔ ‣ 4DBMB͓Αͼؔܕݴޠʹ׳Ε͍ͯͳ͍
w লུه๏ɺߴ֊ؔɺ҉ͷύϥϝʔλɺΧϦʔԽɺFUDʜ ‣ +BWBपΓͷࣝ ‣ ετϦʔϛϯάɺฒߦॲཧʹؔ͢Δࣝ
2017/11/11 © ChatWork All rights reserved. 17 1)1ͱ4DBMBͷൺֱ 1)1 4DBMB
ܕ͚ ಈత ੩త ϓϩάϥϜύϥμΠϜ खଓ͖ܕ ΦϒδΣΫτࢦ ؔܕ ΦϒδΣΫτࢦ ӨڹΛड͚ͨݴޠ 1FSM $ +BWB IUUQTKBXJLJQFEJBPSHXJLJϓϩάϥϛϯάݴޠͷൺֱ
2017/11/11 © ChatWork All rights reserved. 18 ྫ ؔͷهड़ελΠϧ͕ෳ͋Δ //
ܕΞϊςʔγϣϯΛ͏ val toInt: (String => Int) = (s: String) => s.toInt // ܕΞϊςʔγϣϯΛলུ((Ҿ) => ຊମ) val toInt2 = (s: String) => s.toInt // ϓϨʔεϗϧμʔΛ༻ͨ͠ܗ val toInt3: (String => Int) = _.toInt w FY TUSJOHΛҾʹͱͬͯɺJOUʹมߋ͢Δؔͷهड़ελΠϧʹͯ͠ύλʔϯ͋ΔΑ͏ ʹࢥ͑ͨ w 1)1ͷ߹ w 4DBMBͷ߹ $toInt = function(string $s) {return (int)$s;}; ‣ ࢀߟ w IUUQTHJTUHJUIVCDPNHBLV[[[[ w IUUQTRJJUBDPNOFTIFFQJUFNTBFDFFGEG
2017/11/11 © ChatWork All rights reserved. 19 ྫ ؔܕ ‣
FY UP·ͰͷͰۮͷͷ͚ͩ حআ͘ Λഒͯ͠ɺ ͦͷ૯ΛٻΊΔ w 1)1ͷ߹ // ᶃarray_**ܥͷؔΛͬͨ߹ $result = array_sum( array_map( function ($i) { return $i * 10; }, array_filter(range(1, 10), function ($i) { return ($i % 2 === 0); }) ) ); // ᶄ݁ہ͜͏ͳΓͦ͏ $result = 0; foreach (range(1, 10) as $int) { if ($int % 2 === 0) { $result += $int * 10; } }
2017/11/11 © ChatWork All rights reserved. 20 ྫ ؔܕ def
stringMatching(matcher: (String) => Boolean) = matcher("sample text") def stringStart(query: String) = stringMatching(_.startsWith(query)) // ҎԼͱಉٛ // strMatching((str: String) => str.startsWith(query)) def stringContain(query: String) = stringMatching(_.contains(query)) ‣ 4DBMBͷ߹ ϫϯϥΠφʔͰهड़Մೳ ‣ ଞͷྫɿ4USJOHΛҾʹͱΓɺCPPMFBOΛฦؔ͢Λ͢ (1 to 10).withFilter(_ % 2 == 0).map(_ * 10).sum
2017/11/11 © ChatWork All rights reserved. 21 +BWBपΓͷࣝ ‣ OVMMͷߟྀ
w /VMM1PJOUFS&YDFQUJPO͕ൃੜͯ͠͠·͏ w SFUVSOWBMVFPSOVMMͷ+BWBϝιουΛݺͼग़࣌͢ʹ0QUJPOBQQMZͰғͬͯ͋ ͛Δ ‣ +BWBϥΠϒϥϦɺύοέʔδͷཧղ w MPHCBDLɺKBWBYDSZQUP w εϨουϓʔϧͷׂ ‣ FUDʜ akka { dispatcher { type = Dispatcher executor = "thread-pool-executor" thread-pool-executor { fixed-pool-size = 32 } throughput = 1 } }
2017/11/11 © ChatWork All rights reserved. 22 ղܾํ๏ ‣ ஈ֊తʹֶΜͰ͍͘
Ұʹଟ͘ͷ͜ͱΛֶͳ͍ ‣ ݱঢ়ࠔͱͳΔཁҼΛׂͯ͠ ̍ͭͣͭ ֶͿ w ؔܕݴޠ w "LLBTUSFBN w +BWBͷࣝ w FUDʜ
2017/11/11 © ChatWork All rights reserved. 23 ॻ੶ɾXFC ڭࡐͰֶश ‣
ݴޠ༷ɺؔܕετϦʔϜͷ֓೦ͳͲΛॏతʹֶश ‣ XFC্Ͱͷใ w 4DBMBશൠ w IUUQTEXBOHPHJUIVCJPTDBMB@UFYU w IUUQTHJUIVCDPNIBUFOB)BUFOB5FYUCPPLCMPCNBTUFS GPVOEBUJPOPGQSPHSBNNJOHTDBMBNE w "LLB4USFBN w IUUQTUIJOLJUDPKQBSUJDMF
2017/11/11 © ChatWork All rights reserved. 24 4DBMB ࣾڭࡐͷ׆༻ ‣
ԋश՝Ͱ࣮ࡍʹखΛಈֶ͔ͭͭ͠श
2017/11/11 © ChatWork All rights reserved. 25 ࣾͷϦιʔεΛ׆༻͢Δ ‣ ༗ࣝऀʹώΞϦϯάˍϖΞϓϩ
‣ 4DBMBઐ༻νϟοτ 4DBMB෦ ͷ׆༻
2017/11/11 © ChatWork All rights reserved. 26 श࡞ͰຒΊΔ ‣ ΑΓ࣮ફతͳ༰ͰϓϩμΫτίʔυͱͷࠩΛঃʑʹຒΊΔ
‣ श࡞ ՝ͷ࣮ࢪ w 4DBMB ࣾڭࡐ w FY 1MBZ'SBNFXPSLͷԋश՝ w "LLB (SBQI4UBHFΛ༻ͯ͠ϑΝΠϧˠ%#ͷ؆୯ͳॲཧ w SBNMQBSTFSͷ࡞ w FUD ‣ ϥΠϒϥϦ࡞ˍΞϓϦέʔγϣϯ։ൃ
2017/11/11 © ChatWork All rights reserved. 27 ஈ֊Λ౿ΜͰՌͷϦϦʔε ՌϦϦʔε श࡞՝
4DBMB ݴޠֶश ϓϩμΫτࢀՃ ࣌ܥྻ
2017/11/11 © ChatWork All rights reserved. 28 4DBMB։ൃͷײ ‣ ੩తܕɺؔܕͷԸܙ
w 1)1ͰػೳՃʹΑΔςετ֬ೝ࡞ۀ͕େม Өڹൣғ͕ݟ͑ʹ͍͘ w ϞσϦϯάɺϦϑΝΫλ͍͢͠ ‣ ֶश͕ਐΉʹͭΕརศੑΛ࣮ײ w հग़དྷͳ͔͚ͬͨͲ NBUDIDBTF 'VUVSFɺ&JUIFSɺ0QUJPOɺFUDʜ ‣ +BWBͷ๛ͳࢿ࢈Λ׆༻Ͱ͖Δ
2017/11/11 © ChatWork All rights reserved. 29 ·ͱΊ ‣ 4DBMBΛֶश͔Βೖͬͯ։ൃग़དྷΔڥ͕͋Δ
‣ ΩϟονΞοϓɺग़དྷΔڥ͕͋Δ ‣ ʮֶशʯˠʮश࡞ʯˠʮϓϩμΫτʯͱ͍ͬͨΑ͏ʹஈ֊Λ౿Ή͜ ͱ͕Ͱ͖ͨ ‣ ࣭͕୲อ͞Εอकɾӡ༻͕͘͢͠ͳΔ ‣ ৽ͨͳߟ͑ΛऔΓೖΕΒΕΔ ‣ ੩తɺؔܕɺඇಉظɺฒߦϓϩάϥϛϯάɺFUDʜ
2017/11/11 © ChatWork All rights reserved. 30 ҰॹʹνϟοτϫʔΫΛྑ͍͖ͯͨ͘͠ ͍ΤϯδχΞͷํΛืूʂ IUUQTDPSQDIBUXPSLDPNKBSFDSVJUFOHJOFFS
2017/11/11 © ChatWork All rights reserved. 31 ͝ਗ਼ௌ͋Γ͕ͱ͏ޚ࠲͍·ͨ͠