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
Microservices Batch on GAE
Search
petitviolet
March 27, 2018
Programming
0
1.9k
Microservices Batch on GAE
Implement microservices architecture batch Scala program on Google AppEngine Standard Environment.
petitviolet
March 27, 2018
Tweet
Share
More Decks by petitviolet
See All by petitviolet
Stripeで請求書払い&銀行振込を実装する
petitviolet
0
1.2k
ピュアなドメインを支える技術/pure domain model and the technology behind it
petitviolet
14
9.9k
小さく始めるクラウドネイティブ/small start CloudNative
petitviolet
0
1.8k
2019年だからこそ12factor app/The Twelve-Factor app in 2019
petitviolet
1
970
実践GraphQL on Scala/Real world GraphQL on Scala
petitviolet
8
2.9k
Kubernetesを知る/Introduction Kubernertes
petitviolet
1
620
GraphQL on Scala
petitviolet
3
2.6k
Web API Design
petitviolet
18
8.2k
Property Based Testing introduction
petitviolet
1
110
Other Decks in Programming
See All in Programming
As an Engineers, let's build the CRM system via LINE Official Account 2.0
clonn
1
670
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
layerx_20241129.pdf
kyoheig3
2
290
17年周年のWebアプリケーションにTanStack Queryを導入する / Implementing TanStack Query in a 17th Anniversary Web Application
saitolume
0
250
return文におけるstd::moveについて
onihusube
1
650
似たもの同士のPerlとPHP
uzulla
1
130
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
160
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
1
350
CSC305 Lecture 25
javiergs
PRO
0
130
Discord Bot with AI -for English learners-
xin9le
1
120
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
5
900
快速入門可觀測性
blueswen
0
310
Featured
See All Featured
Bash Introduction
62gerente
608
210k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Designing for Performance
lara
604
68k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.3k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
160
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
Transcript
("&Ͱ.JDSPTFSWJDFTͳόον 'SJOHF$P -UE )JSPLJ,PNVSBTBLJ!QFUJUWJPMFU
ࣗݾհ w খࢵ߂و )JSPLJ,PNVSBTBLJ w ΠϯλʔωοτͰ!QFUJUWJPMFU w αʔόαΠυΤϯδχΞ! w
͜ͷ͘Β͍͍͍ͩͨ4DBMBॻ͍ͯΔ
͜ͷลͷͰ͢
ࠓ͢͜ͱ͞ͳ͍͜ͱ ͢͜ͱ w ("& 5BTL2VFVF 4DBMBͰόονΛ࡞Δ w ओʹΞʔΩςΫνϟతͳઓུ ͞ͳ͍͜ͱ w
("& 5BTL2VFVFͷࡉ͔͍ w 4DBMBͷ࣮ςΫχοΫ
ࠓ͢͜ͱ͞ͳ͍͜ͱ ͢͜ͱ w ("& 5BTL2VFVF 4DBMBͰόονΛ࡞Δ w ओʹΞʔΩςΫνϟతͳઓུ ͞ͳ͍͜ͱ w
("& 5BTL2VFVFͷࡉ͔͍ w 4DBMBͷ࣮ςΫχοΫ
όονʁ
όονʁ ϓϩάϥϜ܈Λॲཧత͝ͱʹ۠Γɺ͜ͷ۠ Γຖʹॱ࣮࣍ߦͯ͠Ώ͘ॲཧͷ͜ͱ XJLJQFEJB ཁ͢ΔʹɺԿ͔͠ΒͷॲཧΛॱ࣮࣍ߦ͢Δ͜ͱ
όονͷ͋Δ͋Δ Α͋͘Δ݅ҎԼͷΑ͏ͳͷ w ఆظ࣮ߦ DSPO w σʔλΛཷΊͯ·ͱΊͯॲཧ w FUD
όονͷΘ͕·· w ىಈ࣌Ҏ֎͓͔͚ۚͨ͘ͳ͍ w ίέͨΒࣗಈͰϦτϥΠ͍ͨ͠ w σʔλ͕૿͑ͨΒΦʔτεέʔϧ͍ͤͨ͞
ͦΕɺ("&Ͱग़དྷΔΑ
("& w (PPHMF"QQ&OHJOF w ͍ΘΏΔ1BB4 w \4UBOEBSE 'MFYJCMF^&OWJSPONFOUͷछྨ w 4&੍ݶ͕ݫ͍͕͠ӡ༻͓ͤ
w '&੍ݶ͕؇͍͕ӡ༻खಈ
("& ϑϨΩγϒϧڥɺελϯμʔυڥΛิ͢ Δ͜ͱΛతͱ͍ͯ͠·͢ɻ IUUQTDMPVEHPPHMFDPNBQQFOHJOFEPDTqFYJCMFKBWBqFYJCMFGPSTUBOEBSEVTFST IMKB جຊ4&Λݕ౼͠ɺμϝͬΆ͍ͳΒ'&ʹ͢Δ
("& ϑϨΩγϒϧڥɺελϯμʔυڥΛิ͢ Δ͜ͱΛతͱ͍ͯ͠·͢ɻ IUUQTDMPVEHPPHMFDPNBQQFOHJOFEPDTqFYJCMFKBWBqFYJCMFGPSTUBOEBSEVTFST IMKB جຊ4&Λݕ౼͠ɺμϝͬΆ͍ͳΒ'&ʹ͢Δ ΠϯελϯελΠϓͰεέʔϧઓུΛม͑ΒΕΔ w BVUPNBUJDҰ൪͓ͤͰ("&ͬΆ͍ w
CBTJDόονͱ͔ w NBOVBMखӡ༻Ͱ*BB4دΓ
όονͷΘ͕·· w ىಈ࣌Ҏ֎͓͔͚ۚͨ͘ͳ͍ w ("&4&ͳΒ࣮ߦ࣌ؒ՝ۚ w ίέͨΒࣗಈͰϦτϥΠ͍ͨ͠ w w
σʔλ͕૿͑ͨΒΦʔτεέʔϧ͍ͤͨ͞ w
5BTL2VFVF
5BTL2VFVF w ("&ɺಛʹ4&Ͱ؆୯ʹ͑ΔδϣϒΩϡʔ w \1VTI 1VMM $SPO^Ωϡʔͷछྨ͋Δ w ("&αʔϏεؒͷ࿈ܞʹ1VTIΩϡʔ͕ඇৗʹศར w
DSPO͋ΔͷͰόονͷىಈ؆୯ w εςʔλε͕YYͱ͔ͳΒϦτϥΠͯ͘͠ΕΔ
5BTL2VFVF w ઃఆൺֱత୯७Ͱ؆୯ʹ࡞Մೳ w ͜Μͳײ͡ ˡϦτϥΠճͷ্ݶ ˡλεΫͷੜଘ࣌ؒ
όονͷΘ͕·· w ىಈ࣌Ҏ֎͓͔͚ۚͨ͘ͳ͍ w ("&4&ͳΒ࣮ߦ࣌ؒ՝ۚ w ίέͨΒࣗಈͰϦτϥΠ͍ͨ͠ w 5BTL2VFVFʹϦτϥΠػೳ͕͋Δ w
σʔλ͕૿͑ͨΒΦʔτεέʔϧ͍ͤͨ͞ w
όονͷΘ͕·· w ىಈ࣌Ҏ֎͓͔͚ۚͨ͘ͳ͍ w ("&4&ͳΒ࣮ߦ࣌ؒ՝ۚ w ίέͨΒࣗಈͰϦτϥΠ͍ͨ͠ w 5BTL2VFVFʹϦτϥΠػೳ͕͋Δ w
σʔλ͕૿͑ͨΒΦʔτεέʔϧ͍ͤͨ͞ w σʔλগ σʔλଟ
ΦʔτεέʔϧʹΉ͚ͯ w εέʔϧΞοϓ͍ͨ͠ w ("&ͩͱࣗಈͰग़དྷͳ͍ w εέʔϧΞτ͍ͨ͠ w ("&ϦΫΤετ૿ͰεέʔϧΞτ w
σʔλ͕૿͑ΔͱϦΫΤετ͕૿͑ΔΑ͏ ʹ࣮͢Δ
ΦʔτεέʔϧʹΉ͚ͯ w εέʔϧΞοϓ͍ͨ͠ w ("&ͩͱࣗಈͰग़དྷͳ͍ w εέʔϧΞτ͍ͨ͠ w ("&ϦΫΤετ૿ͰεέʔϧΞτ w
σʔλ͕૿͑ΔͱϦΫΤετ͕૿͑ΔΑ͏ ʹ࣮͢Δ
4DBMBͱ("&
4DBMBͱ("& w 'SJOHFͰαʔόαΠυ։ൃʹ4DBMBΛΑ͘͏ w ("&4&ͷ+BWBରԠ݄ w IUUQTDMPVEQMBUGPSNHPPHMFCMPHDPN+BWBPO"QQ&OHJOF4UBOEBSEFOWJSPONFOUJTOPXHFOFSBMMZBWBJMBCMFIUNM w 4&Ͱ+BWB͕ಈ͚4DBMBಈ͘ʂ
4DBMBͰόονॲཧ w 4DBMBඇಉظॲཧϧʔϓॲཧ͕هड़͘͢͠ɺ όονͰ͋Γ͕ͪͳॲཧΛ؆୯ʹॻ͚Δ w 'VUVSFͱ-JTUNBQͷΑ͏ͳ"1*Λ͏ val targets: List[Data] =
??? val resultFutures: List[Future[Result]] = targets map { target => Future { execute(target) } // 何か重い処理を非同期で実行 } val results: Future[List[Result]] = Future.sequence(resultFutures)
͜͜Ͱൃੜ w ("&4&γϯάϧίΞ w ඇಉظॲཧͷޮՌ͕ബ͍ w '&ʹͯ͠ϚϧνίΞʹ͢Δʜ
ίΞ͕Γͳ͚Ε ϚγϯΛ૿͍͍ͤ͡Όͳ͍
5BTL2VFVFΛͬͯίΞΛ૿͢ ϚϧνίΞγϯά ϧίΞ ϚϧνΠϯελϯε w ඇಉظॲཧΛλεΫͱͯ͠5BTL2VFVFQVU͢Δ w \ಉ͡ ผͷ^("&αʔϏεͰड͚औͬͯඇಉظॲཧ w
ϧʔϓॲཧҰͭͣͭผͷλεΫʹ͢Δ 5BTL2VFVF
େ͖ͳόονॲཧΛ খ͞ͳλεΫʹׂͯ͠ ඇಉظʹॲཧ͢Δ
·͞ʹ.JDSPTFSWJDFT
ͪͳΈʹ ("&4&ͩͱϝϞϦͷ࠷େαΠζ͕(#ͳͷͰɺ Լखʹେ͖ͳόονΛಈ͔͢ͱ؆୯ʹ00.͕ى ͖ΔͷͰɺόονΛখׂͤ͘͟͞ΔΛ͑ͳ͍ σʔλଟ
.JDSPTFSWJDFTͳόον όονॲཧΛׂͯ͠ޙଓͷॲཧ5BTL2VFVF Λͬͯܨ͙ 5BTL2VFVF ॲཧରͷ ҰཡΛऔಘ Ұͭͣͭ ॲཧ͢Δ ͞Βʹࡉ͔͘ ॲཧ͢Δ
ͪ߹Θͤͯ ΫϦʔϯΞοϓ ʜ ʜ
όονͷΘ͕·· w ىಈ࣌Ҏ֎͓͔͚ۚͨ͘ͳ͍ w ("&4&ͳΒ࣮ߦ࣌ؒ՝ۚ w ίέͨΒࣗಈͰϦτϥΠ͍ͨ͠ w 5BTL2VFVFʹϦτϥΠػೳ͕͋Δ w
σʔλ͕૿͑ͨΒΦʔτεέʔϧ͍ͤͨ͞ w ࡉ͔͘λεΫʹΓ͚ͯεέʔϧΞτ 5BTL2VFVF
·ͱΊ 4DBMBͰॻ͍ͨόονΛ ("&4&Ͱಈ͔͢ͱͤʹͳΕΔ