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
surprise-lt-for-intern-vol-1
Search
Hirokazu Maruta
June 21, 2019
Technology
0
47
surprise-lt-for-intern-vol-1
インターン生の課題がLINEBot作成だったので、インターン生が制作物の発表を終えた後に社員からのサプライズLTとして登壇しました。
Hirokazu Maruta
June 21, 2019
Tweet
Share
More Decks by Hirokazu Maruta
See All by Hirokazu Maruta
encryption
mochisuna
0
94
わかった気になるチューリングマシン
mochisuna
0
38
Elementary algorithm
mochisuna
0
17
ssh-dynamic-forward
mochisuna
0
46
ServerlessFramework-Trello
mochisuna
0
26
TechBash Slack Reaction Award
mochisuna
0
43
techbash-clasp
mochisuna
0
54
vuejs-night-publish
mochisuna
0
840
surprise-lt-for-intern-vol-2
mochisuna
0
49
Other Decks in Technology
See All in Technology
A Tour of Anti-patterns for Functional Programming
guvalif
0
1.8k
"とにかくやってみる"で始めるAWS Security Hub
maimyyym
2
160
DynamoDB でスロットリングが発生したとき/when_throttling_occurs_in_dynamodb_short
emiki
0
310
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
400
2024年のAmazon Bedrockアップデート一挙おさらい 〜まだ間に合う! re:Invent直前までの重大ニュースを速習しよう〜
minorun365
PRO
3
110
Postman Flowsで作るAPI連携LINE Bot
miura55
0
180
Continuous Integration! Raising the Bar
tdpauw
1
100
FlutterアプリにおけるSLI/SLOを用いたユーザー体験の可視化と計測基盤構築
ostk0069
0
290
飲食店データの分析事例とそれを支えるデータ基盤
kimujun
0
240
OCI Vault 概要
oracle4engineer
PRO
0
9.8k
累計2500万着電を支える大規模 電話自動応答サービスのアーキテクチャ / Architecture of a Large-Scale Automated Phone Response Service Supporting 25 Million Cumulative Calls
ymachida
1
1.4k
Is Go A Good Language to Build Compilers?
kennethanceyer
0
110
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
24k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Agile that works and the tools we love
rasmusluckow
327
21k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
For a Future-Friendly Web
brad_frost
175
9.4k
Building Applications with DynamoDB
mza
90
6.1k
A better future with KSS
kneath
238
17k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Transcript
LINEBotͰLTձΛྑ͍ͨ͘͠ giftee SaaS div. Engineer ·ΔͨͻΖ͔ͣ
ࣗݾհ • ؙాʢ·ΔͨͻΖ͔ͣʣ • Twitter: @mochi_suna • giftee.co SaaSνʔϜΤϯδχΞ •
झຯɿϐΞϊɺϘυήɺΞΠίϯ࡞ʢΧούʣ • ࣗಈԽେ͖ɻख࡞ۀ͖Β͍ɻ • github
ٕज़໘
͔݁Β
LINEBot ࡞Γ·ͨ͠
Agenda • LINEBotΛ࡞ͬͯΈͨ • ઃܭࢥ • LINEBotͰͰ͖Δ͜ͱ • ࢥ͍ͷৎ
LINEBot
࡞ͬͨͷ ʮLTձBotʯ ΠϕϯτͷࢀՃͱΞϯέʔτ • Πϕϯτͷ։࠵ɾऴྃ • ΠϕϯτͷࢀՃɾ • Πϕϯτͷථ •
ूܭʢະ࣮ʣ
LTձBot • ΠϕϯτΛ։࠵ LINEBot Φʔφʔʢొஃऀʣ Πϕϯτ ʢ-5ձͳͲʣ Πϕϯτ࡞ Πϕϯτ։࠵
LTձBot • ։࠵ࡁΈͷΠϕϯτʹࢀՃ ࢀՃऀ LINEBot Φʔφʔʢొஃऀʣ Πϕϯτ ʢ-5ձͳͲʣ ΠϕϯτࢀՃ
LTձBot • ࢀՃதͷΠϕϯτʹථ ࢀՃऀ LINEBot Φʔφʔʢొஃऀʣ Πϕϯτ ʢ-5ձͳͲʣ ථ
LTձBot • ूܭʢ͜ΕͲ͏͠Α͔ͬͳ͊ɾɾɾʣ ࢀՃऀ LINEBot Φʔφʔʢొஃऀʣ Πϕϯτ ʢ-5ձͳͲʣ ूܭ
ઃܭࢥ
ઃܭࢥ 1. goݴޠ • Standard package layout 2. dockerͰϗοτϦϩʔυ •
σϓϩΠ༻Πϝʔδ = ϩʔΧϧͷΠϝʔδ 3. DDDʹ։ൃ࣌ʹؾྗ͕͚࣋ͭؒͩଇΔ ίʔυ
Why Go? 1. ࣮༻తͳϗοτϦϩʔυͷ࿅श • realizeΛ༻͍ͨϗοτϦϩʔυ • DockerΠϝʔδ࡞ˠϩʔΧϧىಈ 2. ࣮ߦ
3. *͕ͭ͘ͱͪΐͬͱมΘΔʢϙΠϯλతͳҙຯͰʣ ܾͯ͠RailsΛ͍ͨ͘ͳ͔͔ͬͨΒͱ͔Ͱͳ͍
What’s DDD? • ΤΠϓϦϧϑʔϧͳͷͰӕͭ͘ • ͍͍ͩͨ͜Μͳײ͡
What’s DDD? • ΤΠϓϦϧϑʔϧͳͷͰӕͭ͘ • ͍͍ͩͨ͜Μͳײ͡ ґଘؔͷ໌֬ͳ͕Մೳ
Standard Package Layout ϧʔτύοέʔδυϝΠϯλΠϓͷͨΊʹ ଘࡏ͢Δ 3PVUFS 4FSWJDF 3FQPTJUPSZ *OGSBTUSVDUVSF .Z42-
*OUFSGBDF NBJO 4FSWJDF 3FQPTJUPSZ Handler Service Action Entity Call DB ORM
Standard Package Layout ϧʔτύοέʔδυϝΠϯλΠϓͷͨΊʹ ଘࡏ͢Δ 3PVUFS 4FSWJDF 3FQPTJUPSZ *OGSBTUSVDUVSF .Z42-
*OUFSGBDF NBJO 4FSWJDF 3FQPTJUPSZ Handler Service Action Entity Call DB ORM DDDͱ ͷ ૬ ੑ ͕ ྑ ͍
͜͏͍ͤͣ localhost:8080 localhost:3306 "DUJPO)BOESJOH ΅͘ͷͺͦ͜Μ
LINEBotͰͰ͖Δ͜ͱ
ΞΫγϣϯςϯϓϨʔτ ֬ೝςϯϓϨʔτ ϘλϯςϯϓϨʔτ ΧϧʔηϧςϯϓϨʔτ બςϯϓϨʔτ ͳͲ
Ϧονϝχϡʔ
Ϧονϝχϡʔ • LINE@ίϯιʔϧ͔ΒઃఆՄೳ
ࠓճ͜ͷลΛશྗͰར༻ • ϢʔβʔʹίϚϯυΛ֮͑ͤͨ͘͞ͳ͍ • ײతʹૢ࡞͍ͨ͠ • ී௨ʹͬͯΈ͍ͨ • ઃఆΛָʹ͍ͨ͠
શମతʹࡶʁ
શମతʹࡶʁ
·ͱΊ • LTձͰʹཱͪͦ͏ͳbotΛ࡞Γ·ͨ͠ • LINEBot͍͢͝ • ׂͱଟػೳ • ͿͬͪΌ͚͜ΜͳʹϦονͳΈʹ͢Δඞཁͳ͔ͬͨ •
ngrokΫιศར • ߏ͏গ͠ਪᏏ͕ඞཁ͔ͳ͊
·ͱΊ • LTձͰʹཱͪͦ͏ͳbotΛ࡞Γ·ͨ͠ • LINEBot͍͢͝ • ׂͱଟػೳ • ͿͬͪΌ͚͜ΜͳʹϦονͳΈʹ͢Δඞཁͳ͔ͬͨ •
ngrokΫιศར • ߏ͏গ͠ਪᏏ͕ඞཁ͔ͳ͊ ί ϯ τ Ϧ Ϗϡ ʔ λ ʔ ਵ ࣌ ื ू ͯ͠ · ͢
Πϯλʔϯ ͓͔ͭΕ͞·ʂ