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
Twilio IP メッセージング勉強会資料
Search
Kiminari Homma
August 05, 2016
Technology
0
92
Twilio IP メッセージング勉強会資料
Kiminari Homma
August 05, 2016
Tweet
Share
More Decks by Kiminari Homma
See All by Kiminari Homma
Twilio Meetup 東京 2022/11/11
honkimi
0
35
Twilio iOS 徹底攻略
honkimi
1
1.1k
2021年 Twilio Voice 報告
honkimi
0
270
WebRTC ビジネスの失敗と成功
honkimi
2
1.7k
最近の Twilio トレンド報告
honkimi
0
350
Twilio Meet Up
honkimi
0
69
利用ユーザーからみた Twilio の紹介
honkimi
0
61
Zendesk App を Heroku で作ってみた話
honkimi
0
93
国内における Twilio x Alexa
honkimi
0
700
Other Decks in Technology
See All in Technology
安心してください、日本語使えますよ―Ubuntu日本語Remix提供休止に寄せて― 2024-11-17
nobutomurata
1
1k
複雑なState管理からの脱却
sansantech
PRO
1
160
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
200
Terraform Stacks入門 #HashiTalks
msato
0
360
飲食店データの分析事例とそれを支えるデータ基盤
kimujun
0
210
Flutterによる 効率的なAndroid・iOS・Webアプリケーション開発の事例
recruitengineers
PRO
0
120
AWS Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
200
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
130
OS 標準のデザインシステムを超えて - より柔軟な Flutter テーマ管理 | FlutterKaigi 2024
ronnnnn
1
300
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
130
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
1.4k
Storybook との上手な向き合い方を考える
re_taro
5
960
Featured
See All Featured
BBQ
matthewcrist
85
9.3k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Navigating Team Friction
lara
183
14k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Music & Morning Musume
bryan
46
6.2k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
900
Unsuck your backbone
ammeep
668
57k
A Philosophy of Restraint
colly
203
16k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Building Adaptive Systems
keathley
38
2.3k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Transcript
Twilio IP ϝοηʔδϯάษڧձ Twillo UG-JP Tokyo @KDDI Web Communications
19:00 ~ 19:15 ɹड։࢝ 19:15 ~ 19:20 ɹձͷઆ໌ / Keynote
19:20 ~ 19:45 ɹWeb ͷϦΞϧλΠϜͱ IP ϝοηʔδϯά ɹ- ηϧϑϦʔ ຊؒ͞· 19:50 ~ 20:20 ɹIPϝοηʔδϯάΛLambdaͰ࣮ͨ͠ ɹ- άϩʔόϧɾΠϯλʔωοτɾδϟύϯ ߴڮ͞· 20:25 ~ 21:00 ɹiOS༻IP MessagingΞϓϦΛJavaScriptͰ࡞ͬͯΈͨ ɹ- ീ͞· 21:00 ~ ɹɹɹɹرऀͱผձͰ࠙ձ༧ఆ Twilio IP ϝοηʔδϯάษڧձ
ձͷઆ໌ / Keynote
Web ͷϦΞϧλΠϜͱ IP ϝοηʔδϯά @kimihom selfree, llc
ࣗݾհ
ຊؒ ߖ @kimihom ϘΫίί ӡӦऀ http://www.bokukoko.info/ CTO at selfree,llc Twilio,
Ruby on Rails, AWS, Heroku, Android, iOS TwilioJP-UG ϝϯόʔ
3݄7(݄) ߴԁࣉϥϘ “ίʔϧηϯλʔۀք” ʹ͍ͭͯษڧ͠·͢ɻ http://customersupport.connpass.com/ event/27162/ (ࠂ) αϙʔτ UX ษڧձ
Q. Twilio Λͬͨ͜ͱ͕͋Δํʁ Twilio ͰαʔϏε։ൃͷܦݧ༗ͳํʁ IPM Λͬͨ͜ͱ͕͋Δํʁ
Twilio? Voice Client ిͷड৴ ԻϑΝΠϧ࠶ੜ௨Ի μΠϠϧૢ࡞ʹԠͨ͡ಈ࡞ସ ௨தͷిͷ੍ޚ ిͷൃ৴ ϒϥβɾεϚϗͰి Voice
ͱ࿈ಈͯ͋͠ΒΏΔ௨Λૢ࡞ and More.. →ࣗ༝ʹΈ߹ΘͤՄʂ ిΛ API Ͱ؆୯ʹγεςϜԽͰ͖·͢ɻ
ਐԽΛଓ͚Δ Twilio
Twilio ͷݱࡏ νϟοτ ϏσΦ ίϛϡχέʔγϣϯͱͯ͠ͷϓϥοτϑΥʔϜɻ ·ͩ·ͩਐԽͷաఔɻ ࠓ͔ΒTwilioΛ࢝Ίͯશ͘͘ͳ͍Ͱ͢ʂ
ɾWeb ʹ͓͚ΔϦΞϧλΠϜ ɾIP ϝοηʔδϯάʹ͍ͭͯ - Ͱ͖Δ͜ͱ - ֓ཁ - ֶशࢿྉ
- ࣄྫ ༰
5XJMJP*1.FTTBHJOHNBLFTJUFBTZGPSZPVUPBEEDIBUGFBUVSFTJOUPZPVSXFC BOEOBUJWFNPCJMFBQQMJDBUJPOTXJUIPVUCVJMEJOHPSTDBMJOHBSFBMUJNFCBDLFOE 5XJMJP*1.FTTBHJOHɺϦΞϧλΠϜॲཧͷߏஙεέʔϧ Λؾʹ͢Δ͜ͱͳ͘ɺ8FCωΠςΟϒΞϓϦʹ νϟοτػೳΛՃͰ͖·͢ɻ
νϟοτػೳ օ͞ΜͳΒͲ͏࡞Γ·͔͢ʁ
νϟοτͷ ”ࠜຊ” A: Hello A: Hello A B αʔόʔ͔ΒಛఆͷΫϥΠΞϯτ(B)ʹϝοηʔδΛૹ৴͍ͨ͠…
A ͷΠϕϯτΛ B ͕ݕ͢Δʹ ɾϙʔϦϯά ɾComet ɾServer Sent Events ɾWebSocket
ɾPusher, PubNub ɾFirebase, Milkcocoa, IP ϝοηʔδϯά ࣗલ ֎෦
ࣗલͰΔͳΒ WebSocket socket.io (Node.js) ActionCable (Ruby on Rails 5.0~ )
͕ͩ… ɾઐ༻αʔόʔͷ༻ҙͱཧ͕ඞཁ νϟοτΞϓϦͷΑ͏ͳϦΞϧλΠϜ͕ओػೳͳαʔϏεͳΒ͍͍͚Ͳ… ɾεέʔϧ͢Δͱ͖Ͳ͏͢Δͷʁ ɹ࡞Δ͚ͩͳΒ؆୯͚ͩͲɺͦͷઌӡ༻Ͱ͖Δʁ
֎෦ WebSocket αʔϏε Pusher, PubNub ɾγϯϓϧͳ ϦΞϧλΠϜػߏ ɾϝοηʔδػೳࣗͰ࣮͢Δඞཁ༗ ɾσʔλࣗͨͪͰཧ Firebase,
Milkcocoa, IP ϝοηʔδϯά ɾϝοηʔδػೳ SDK Ͱطʹ༻ҙ (։ൃऀ͚ Dropbox) ɾϝοηʔδσʔλαʔϏεଆͰอଘ (ಉظ) ɾΦϑϥΠϯରԠ, ϚϧνσόΠεରԠͳͲ
Firebase ͱࠩผԽ? ΦϜχνϟωϧͳίϛϡχέʔγϣϯ ଏʹݴ͏ Contextual Communication จɹ຺ɹΛɹཧɹղɹ͠ɹͨɹސɹ٬ɹͱɹͷɹରɹ ͷ࣮ݱΛࢦ͍ͯ͠Δ (Β͍͠)
ɾWeb ʹ͓͚ΔϦΞϧλΠϜ ɾIP ϝοηʔδϯάʹ͍ͭͯ - Ͱ͖Δ͜ͱ - جຊ֓೦ - ֶशࢿྉ
- ࣄྫ ༰
Ͱ͖Δ͜ͱ
ࠓͰ͖Δ͜ͱ νϟϯωϧ࡞ɾআ private, public ͳνϟϯωϧ ϝϯόʔটɺআɺऔಘ νϟϯωϧࢀՃɺୀࣨ ϝοηʔδͷૹड৴ɾฤूɾআ ϢχʔΫͳνϟϯωϧ໊ ෳσόΠεͰͷಉظ
ΦϑϥΠϯରԠ WebhookͰͷΠϕϯτίʔϧόοΫ λΠϓதදه ׂݖݶ iOS, Android, JavaScript SDK APN, GCM ϓογϡ௨ طಡεςʔλε ࠓޙͰ͖ΔΑ͏ʹͳΔ͜ͱ iOS. AndroidͰطಡεςʔλε ը૾ϏσΦϝοηʔδ ௨ͱ࣮ߦΦϓγϣϯ ϢʔβʔϓϩύςΟ
جຊ֓೦ ࣮ํ๏ Ҏ߱ͷ Part Ͱʂ
5XJMJP"DDPVOU 4FSWJDF $IBOOFM 6TFS JEFOUJUZ 3PMF IP ϝοηʔδϯά֓ཁ $IBOOFM .FNCFS
JEFOUJUZ .FTTBHF JEFOUJUZ .FTTBHF JEFOUJUZ .FNCFS JEFOUJUZ $IBOOFM3PMF 6TFS JEFOUJUZ 3PMF 4FSWJDF3PMF
identity ͕େࣄʂ IPM ͰਓΛࣝผ͢Δจࣈྻ ෳσόΠε͋ͬͯಉ͡ਓͳΒಉ͡ identity identity ͕ΘΕ͍ͯΔͱ͜Ζɿ ɹɾࣗ୭͔(τʔΫϯ࡞) ɹɾ୭͕ൃݴ͔ͨ͠
ɹɾ୭͕νϟϯωϧॴ༗ऀ͔ ɹɾ୭͕νϟϯωϧʹ͍Δ,ೖͬͨ,ୀ੮͔ͨ͠ Ϣʔβʔৄࡉσʔλidentityͱඥ͚ͯࣗͨͪͰཧ ͠ͳ͚ΕͳΒͳ͍ɻ
User ͱ Member ͱ User - identity ʹର͢Δ “Service Role”
ͷཧͷΈ - τʔΫϯऔಘ࣌ʹ identity ͔Βࣗಈੜ or REST API Ͱ࡞ Member - identity ͕Ͳͷ Channel ʹ͍Δ͔ - identity ʹର͢Δ “Channel Role” ͷཧ - SDK ͷ channel.join() or REST API Ͱ Channel ʹ Member Ճ
5XJMJP"DDPVOU 4FSWJDF $IBOOFM 6TFS JEFOUJUZ 3PMF IP ϝοηʔδϯά֓ཁ $IBOOFM .FNCFS
JEFOUJUZ .FTTBHF JEFOUJUZ .FTTBHF JEFOUJUZ .FNCFS JEFOUJUZ $IBOOFM3PMF 6TFS JEFOUJUZ 3PMF 4FSWJDF3PMF ͜Ε
Service Role and Channel Role ֤छ SDK Λ͏ͱɺͲΜͳਓͰ SDK ͷϝιουΛݺ
ԿͰͰ͖ΔΑ͏ʹͳͬͪΌ͏ͷͰɺͦΕͷରԠɻ Service Role - Channel ͷཧݖݶͷΑ͏ͳΠϝʔδ - νϟϯωϧ࡞ɺϝϯόʔটɺνϟϯωϧࢀՃͳͲ Channel Role - Channel ͷϢʔβʔݖݶͷΑ͏ͳΠϝʔδ - ϝοηʔδૹ৴ɺνϟϯωϧୀࣨͳͲ
IPM SDK or REST API ? REST API γεςϜଆͰϝϯόʔɺνϟϯωϧͳͲΛࢦఆͰ࡞Δ IPM
SDK ϢʔβʔଆͰࣗ༝ʹνϟϯωϧ࡞ɺϝϯόʔཧΛͤ͞Δ -> ݖݶઃఆ͕ॏཁ Channel, Member, Message ૢ࡞ͲͪΒͰͰ͖Δɻ ࡞Γ͍ͨαʔϏεʹΑ͍͚ͬͯΔɻ
ֶशࢿྉ
ɾTwilio Document ɹhttps://jp.twilio.com/docs/api/ip-messaging ɾGoogle Groups ɹhttps://groups.google.com/forum/?hl=ja#!forum/ip-messaging-public-beta ɾSDK ιʔείʔυ https://jp.twilio.com/docs/api/ip-messaging/changelogs/javascript
ࣄྫ
as a Service ސ٬ใͱ࿈ಈͨ͠ి૭ޱΛ5Ͱߏங Webϒϥβ͕ిΘΓ ֨҆ɾຊ֨ػೳɾଈಋೖ ̎िؒແྉτϥΠΞϧ࣮ࢪத αʔϏεհ https://www.callconnect.jp/
Twilio ͷ Queue Queue ͷͪਓ, ઌ಄ίʔϧใ REST API (Queues/{QueueSid}/Members/Front) Λݺͳ͍ͱऔͬͯ͜Εͳ͍ʂ
Problem CallConnect Ͱɺ௨ͷอཹͱண৴ΩϡʔΠϯάͰ Twilio ͷ Queue Λར༻ɻ
ϙʔϦϯάͰ Twilio REST API ΛݺΜͰ͍·ͨ͠ɻ ϦΫΤετͷແବແବແବແବΝʂ
2VFVF A B 1, Ωϡʔʹೖͬͨ 2, ௨։࢝ Queue ͷͪਓ͕มΘΔ2ͭͷΠϕϯτ 2ͭͷλΠϛϯάͷ͚࣌ͩΩϡʔͷͪਓͱઌ಄ͪ௨ͷ
ใΛΫϥΠΞϯτʹ௨Ͱ͖ΕOK! 2, ػதஅ
IP ϝοηʔδϯά REST API Ͱ Web ϓογϡ௨ 1. ֤Πϕϯτൃੜ࣌ʹ JSON
ܗࣜͰ REST API ͔Β IPM ϝοηʔδૹ৴ 2. IPM ͔Βड͚औͬͨใΛϒϥβଆ ͰϦΞϧλΠϜߋ৽
DEMO (࣌ؒ͋Ε) https://www.youtube.com/watch?v=SgR3XMDn_3w
IP ϝοηʔδϯά νϟοτػೳΛ͡Ίͱͨ͠ Web ͷϦΞϧλΠϜػೳΛखܰʹ࣮ݱͰ͖·͢ɻ ·ͱΊ
Questions ?