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
さわやか待ち時間LINE botを作った話 / Sawayaka LINE bot
Search
muttan
January 25, 2020
Programming
0
100
さわやか待ち時間LINE botを作った話 / Sawayaka LINE bot
#ふくもく会
#SawayakaMeetup
muttan
January 25, 2020
Tweet
Share
More Decks by muttan
See All by muttan
コンテナ開発入門 1回目/Introduction to Container Development 1
bath_poo_
0
130
ISUCONってなんだ / What is ISUCON
bath_poo_
0
310
Web技術の基本 8回目 / Introduction to Web technologies 8th class
bath_poo_
0
160
Web技術の基本 7回目 / Introduction to Web technologies 7th class
bath_poo_
0
140
Web技術の基本 6回目 / Introduction to Web technologies 6th class
bath_poo_
1
230
Web技術の基本 5回目 / Introduction to Web technologies 5th class
bath_poo_
0
110
Web技術の基本 4回目 / Introduction to Web technologies 4th class
bath_poo_
0
190
Web技術の基本 3回目 / Introduction to Web technologies 3rd class
bath_poo_
0
230
Web技術の基本 2回目 / Introduction to Web technologies 2nd class
bath_poo_
0
240
Other Decks in Programming
See All in Programming
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
EventSourcingの理想と現実
wenas
6
2.3k
イベント駆動で成長して委員会
happymana
1
320
Outline View in SwiftUI
1024jp
1
330
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
CSC509 Lecture 11
javiergs
PRO
0
180
C++でシェーダを書く
fadis
6
4.1k
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
470
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.1k
ヤプリ新卒SREの オンボーディング
masaki12
0
130
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
1
290
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
Featured
See All Featured
Speed Design
sergeychernyshev
25
620
Building Applications with DynamoDB
mza
90
6.1k
It's Worth the Effort
3n
183
27k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
Agile that works and the tools we love
rasmusluckow
327
21k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Happy Clients
brianwarren
98
6.7k
What's in a price? How to price your products and services
michaelherold
243
12k
How GitHub (no longer) Works
holman
310
140k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Transcript
LINE botΛ࡞ͬͨΜ͢Α ;͘͘ձ ͦͷ60 ʙ৽ձʹंΛग़͢ͳʙ Kamiya Keisuke(@bath_poo_)
͓લ୭Αʁ • ҪେֶֶݚڀՊ M2 • ΦλΫ • aikoͱҏ౻ඒདྷͷ͔Γͯ͠Δ • TwitterͷΞΧϯτ໊͕සൟʹ
มΘΔ͜ͱͰ༗໊ • Ͱେମʮ͘·͞Μʯͬͯݺ Εͯ·͢ Kamiya Keisuke a.k.a kuma @bath_poo_
͍͖ͳΓͰ͕͢
͜ΕͳΜͷਤͰ͠ΐ͏
ͳΜͷਤʁ
ͳΜͷਤʁ
None
ͳΜͷਤʁ
• ٠ʹຊళ͕͋Δ • ੩Ԭݝ෦ʹଟ͍ • ࠷౦͕ޚ఼ • ࠷͕ބ
͋ʂʂʂʂʂʂʂʂʂʂʂʂ
None
͞Θ͔͡ΌΜ • ম͖Ϩετϥϯ͞Θ͔ • ͛Μͭ͜ϋϯόʔά͕༗໊ • ϗʔϜϖʔδͷURL͕sawayakaͰͳͯ͘genkotsu-hb ‣ https://www.genkotsu-hb.com •
#SawayakaMeetup ڇ100% 250g 1,100ԁ(੫ࠐΈ)→
͞Θ͔ͷͪ࣌ؒ • ͛Μͭ͜ϋϯόʔά༗໊ʹͳΓ͗ͨ͢ • ͋ΔళฮGW6hͪʹͳͬͨͱ͔ͳΜͱ͔ • ʢҰ෦ళฮΛআ͍ͯʣฏͰ͋Ε͋·Γؾʹͤͣʹߦͬ ͯͬ͢ͱ৯ΒΕΔ • ൺֱతࠞΜͰ͍Δ͜ͱ͕ଟ͍
• ൟظʢGWɼ࢝ɼۙลͰͷϥΠϒΠϕϯτʣ ࣌ؒͪ( )ʹͳΔ͜ͱβϥ → ͳΔ͘ళฮͰͷͪ࣌ؒΛݮΒ͍ͨ͠ → ͔͠͠ళฮʹߦͬͯͪ࣌ؒΛ֬ೝ͢Δͷ໘ N N ≥ 1
࠷ۙศརػೳ͕Ͱ͖ͨ
AirWAIT
AirWAITͷಋೖ • ʢళฮʣiPad͚ͩͰडγεςϜΛߏஙՄೳ • ʢϢʔβʔʣ͓ళͰडΛͨ͠ޙWebϖʔδ͔Β ͪ࣌ؒΛ֬ೝ͢Δ͜ͱ͕Մೳ
AirWAITͷಋೖ • ʢళฮʣiPad͚ͩͰडγεςϜΛߏஙՄೳ • ʢϢʔβʔʣ͓ళͰडΛͨ͠ޙWebϖʔδ͔Β ͪ࣌ؒΛ֬ೝ͢Δ͜ͱ͕Մೳ
AirWAITͷಋೖ • ʢళฮʣiPad͚ͩͰडγεςϜΛߏஙՄೳ • ʢϢʔβʔʣ͓ళͰडΛͨ͠ޙWebϖʔδ͔Β ͪ࣌ؒΛ֬ೝ͢Δ͜ͱ͕Մೳ → Θ͟Θ͟ళฮʹߦ͔ͳͯ͘ྑ͘ͳͬͨ
͋Δͷग़དྷࣄ ͞Θ͔ͷͪ࣌ؒ ΦϯϥΠϯͰݟΕΔΑ͏ʹͳͬͨΑ ϚδʁͲ͏ͬͯΈΔͷʁ ͜ͷWebϖʔδΛ։͍ͯ… ΊΜͲ͆͘͞
ͦ͏͔… • ͦͷͨΊ͚ͩʹSafari։͘ͷ໘ • ͡Ό͋ͳΔ͘༻ස͕ଟ͍ͷͰͳΜͱ͔Ͱ͖ͳ ͍͔… → LINEͳΒൺֱత͏Μ͡Όͳ͍ʁ
͞Θ͔ͷͪ࣌ؒ LINE botΛ࡞ͬͨΜ͢Α ;͘͘ձ ͦͷ60 ʙ৽ձʹंΛग़͢ͳʙ Keisuke Kamiya(@bath_poo_)
༻ٕज़
ΞʔΩςΫνϟ ᶃbotʹ͔ͬͯ ݕࡧΫΤϦΛ͛Δ ᶄAlgoliaͰݕࡧ ᶅݕࡧ݁ՌΛฦ͢ ᶅݕࡧ݁ՌΛฦ͢ εΫϨΠϐϯά݁ՌΛ ֨ೲ
ΞʔΩςΫνϟ • Messaging APIͷWebhook༻ͷαʔόHerokuͰϗεςΟ ϯά → Go + Go modules
• ΫϩʔϥʔHerokuͰϗεςΟϯά(3ʹ1ճऔಘ) → Python + pipenv • ݕࡧΛͲ͏͢Δ͔໎͕ͬͨɼͯ͢ͷࢥߟΛ์غͯ͠ Algoliaʹͯ͛ͨ͢ → ϥΠϒϥϦυΩϡϝϯτॆ࣮͍ͯͯ͠։ൃ͕εϜʔζ ʹਐΜͩ https://speakerdeck.com/shinodogg/introducing-algolia-with-demo
ͱ͜ΖͰAlgoliaͷ༻ྉۚ… PQFSBUJPONPOUI SFDPSENPOUI
ͱ͜ΖͰAlgoliaͷ༻ྉۚ… • Operationͷఆٛ • ΦϒδΣΫτͷՃߋ৽̍ΦϖϨʔγϣϯ • ݄50000ΦϖϨʔγϣϯ͙ͬͯ͢αʔϏε͕ऴΘΓͦ͏ → ͦΕͦ͏ https://www.algolia.com/doc/faq/basics/what-is-an-operation/
ͱ͜ΖͰAlgoliaͷ༻ྉۚ…
ͱ͜ΖͰAlgoliaͷ༻ྉۚ… Μʁ
ͱ͜ΖͰAlgoliaͷ༻ྉۚ… Μʁ
None
GitHub EducationΛ͏ • ֶੜͷಛݖGitHub Education • ͨ͘͞ΜͷιϑτΣΞSaaSɼPaaSͷ༗ྉϓϥϯ૬ ΛແྉͰ͏͜ͱ͕Ͱ͖Δ • Algoliaରʹͳͬͯ·ͨ͠
ͱ͍͏Θ͚Ͱ
σϞ
σϞ • ݕࡧ͍ͨ͠ళฮΛೖྗ → ళฮ໊ͷ෦จࣈྻͷ߹ώοτ • ෳళฮͷ߹ → CarouselTemplateΛ༻ •
ళฮΛλοϓ → ৄࡉϖʔδ
·ͱΊ
·ͱΊ • ͞Θ͔ͷͪ࣌ؒΛڭ͑ͯ͘ΕΔLINE botΛॻ͍ͨ • GoͱPythonͱHerokuͱAlgoliaͰ࡞ • LINE bot SDKͱAlgolia
SDK͕ΊͪΌͪ͘Ό͍͢ ͔ͬͨͷͰγϡοͱ࡞Δ͜ͱ͕Ͱ͖Δ • ݱࡏ͔Βྑ͛͞ళฮΛαδΣετ͢Δػೳͱ͔͋Δ ͱ͍͍Ͷͬͯࢥ͍·ͨ͠ ‣ Ͱ͖ͦ͏ɼAlgoliaͳΒͶ
ʢ͞Θ͔ͷʣ·ͱΊ Ξϗ΄ͲࠞΉ ࠞΉ দӺલͱ੩ԬӺલʹ ళฮ͕Ͱ͖ͨ ҏ౾ʹͳ͍ ϥΠϒձ࠷دΓ