Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
PHPエンジニアによるScalaエンジニアへの転身とその手引き
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Shingo Harada
November 11, 2018
Technology
840
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時代のチーム開発と内部設計/2026-slsdays
slsops
0
130
あなたの知らないAmazon VPC Route Server/Amazon VPC Route Server you don't know about
masakiokuda
2
210
ミイダス株式会社 テックチームのご紹介 / MIIDAS Tech Team
miidas
0
120
並行性の問題を防げ!実践トランザクション入門
occhi
0
250
雪かき部 #7 もう怖くない!SELECT文!
foursue
0
280
[2026 Oracle Technical Deep Dive] エンタープライズAIエージェントを支えるOCIソリューション。ラインナップと特徴を理解しよう! (2026年9月17日開催)
oracle4engineer
PRO
0
410
AgentCoreで実践するハーネスエンジニアリング
yakumo
1
270
企業の現実世界をグラフで写し取る
sansantech
PRO
0
260
インバスケット試験対策アプリを 作って見えたAIエージェント構築 ナレッジ2選
shichijoyuhi
1
120
MCPゲートウェイを作って運用してわかったこと — Agent時代の権限管理の現在地
mtpooh
10
3k
2026-09-26 Platform Engineering Kaigi 2026 インフラとアプリの境界線と委譲の設計 / Drawing the Infra and App Line
masasuzu
0
630
The kernel report
ennael
PRO
1
230
Featured
See All Featured
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
58k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
460
How to make the Groovebox
asonas
2
2.5k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
540
Testing 201, or: Great Expectations
jmmastey
46
8.3k
The Pragmatic Product Professional
lauravandoore
37
7.5k
Chasing Engaging Ingredients in Design
codingconduct
0
340
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
Visualization
eitanlees
153
17k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.1k
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 ͝ਗ਼ௌ͋Γ͕ͱ͏ޚ࠲͍·ͨ͠