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
OpenIL vol.1
Search
Take
February 21, 2014
Technology
0
3.6k
OpenIL vol.1
http://www.infiniteloop.co.jp/blog/2014/02/publicstudy01/
Take
February 21, 2014
Tweet
Share
More Decks by Take
See All by Take
トルテが実践したマッチしたユーザーを除く3つの方法/torte-es
ww24
1
12k
トルテリリースまでの Go Tips 16/torte-go-tips-16
ww24
1
11k
AMEBA OWND DE HTTP/2
ww24
0
450
Service Workers Push API Hands-on
ww24
1
160
Other Decks in Technology
See All in Technology
Application Development WG Intro at AppDeveloperCon
salaboy
0
190
DynamoDB でスロットリングが発生したとき/when_throttling_occurs_in_dynamodb_short
emiki
0
250
飲食店データの分析事例とそれを支えるデータ基盤
kimujun
0
160
Taming you application's environments
salaboy
0
190
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
2
330
The Role of Developer Relations in AI Product Success.
giftojabu1
0
130
マルチモーダル / AI Agent / LLMOps 3つの技術トレンドで理解するLLMの今後の展望
hirosatogamo
37
12k
日経電子版のStoreKit2フルリニューアル
shimastripe
1
140
アジャイルチームがらしさを発揮するための目標づくり / Making the goal and enabling the team
kakehashi
3
140
心が動くエンジニアリング ── 私が夢中になる理由
16bitidol
0
100
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
300k
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
For a Future-Friendly Web
brad_frost
175
9.4k
Practical Orchestrator
shlominoach
186
10k
Optimizing for Happiness
mojombo
376
70k
Into the Great Unknown - MozCon
thekraken
32
1.5k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
Designing for Performance
lara
604
68k
How GitHub (no longer) Works
holman
310
140k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
130
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Docker and Python
trallard
40
3.1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
Transcript
SMARTPHONE CONTROLLER OpenIL vol.1 த ݑ
ࣗݾհ • var age = 19 ࡀ (ੜ 2/24) •
ւಓۀେֶɹֶ෦ 2 ੜ • ΠϯϑΟχοτϧʔϓɹΞϧόΠτ • झຯཱྀߦɺࣸਅɺϓϩάϥϛϯά • Web Developer
͋ͱ 3 Ͱ age++ ͢ΔΠϕϯτ͕ɻ
p.tl/53x8 24 ࣌ؒडத
WORKS • IT ษڧձΧϨϯμʔ for Android & iOS • Image
Shortener - [img.ww24.jp] • Realtime Chat - [rtc.ww24.jp] • Connect Smartphone - [connect-sp.ww24.jp]
IT ษڧձΧϨϯμʔ εϚʔτϑΥϯΞϓϦ
IMAGE SHORTENER ॖ URL Λར༻ͨ͠ΦϯϥΠϯετϨʔδ
REALTIME CHAT Google Drive Realtime API Λར༻ͨ͠ Chat
CONNECT SMARTPHONE ύιίϯͱεϚϗͷϦΞϧλΠϜ࿈ܞ
CONNECT SMARTPHONE
CONNECT SMARTPHONE • Express.IO ΛͬͨɺεϚʔτϑΥϯͱύι ίϯͷϦΞϧλΠϜͳ࿈ܞΞϓϦέʔγϣϯ
AGENDA • ϦΞϧλΠϜͳ࿈ܞͱ • Express ͱ Socket.IO • Έ •
σϞ • αϯϓϧίʔυ • ɺ՝
CONNECT SMARTPHONE • ϦΞϧλΠϜͳ࿈ܞͷྫ • Chrome World Wide Maze •
https://chrome.com/maze/ • jsdo.it WebSocket Controller • http://jsdo.it/controller
CHROME WORLD WIDE MAZE Google ͷ໎࿏ήʔϜ
WEBSOCKET CONTROLLER jsdo.it
CONNECT SMARTPHONE εϚʔτϑΥϯΛύιίϯܨ͛ͯɺίϯτϩʔϥʹɻ
CONNECT SMARTPHONE • Έ • WebSocket Server (Socket.IO) • Web
Application Server (Express.js) • Socket.IO + Express.js = Express.IO
ۚͷ EXPRESS ޠௐͰղઆ
EXPRESS ͱ SOCKET.IO ͋ΔϓϩάϥϚ͕ίʔυΛॻ͍͍ͯͨͱ͜Ζɺ git commit ͢Δલʹख͕ͬͯΤσΟλ͝ͱ མͱͯ͠͠·͍·ͨ͠ɻ! ͢Δͱɺಥવঁਆ͕ݱΕʮ͋ͳ͕ͨམͱͨ͠ͷۚͷ express
Ͱ͔͢ʁͦΕͱۜͷ Socket.IO Ͱ͔͢ʁʯͱਘͶ͖ͯ·ͨ͠ɻ
EXPRESS ͱ SOCKET.IO ਖ਼ऀͷϓϩάϥϚɺʮࢲ͕མͱͨ͠ͷੜͷ WebSocket Ͱ௨৴͢ΔεύήοςΟίʔυ Ͱ͢ʯͱ͑·͢ɻ
EXPRESS ͱ SOCKET.IO ਖ਼ऀͷϓϩάϥϚʹײ৺ͨ͠ঁਆɺ! express ͱ Socket.IO Λֻ͚߹Θͤͨɺ express.io ΛϓϩάϥϚʹत͚ΔͷͰͨ͠ɻ
ຊͱແؔͰ͢ɻ
None
EXPRESS.IO express ͷΑ͏ͳײతͳϧʔςΟϯά express ͱڞ༗Ͱ͖Δηογϣϯ
CONNECT SMARTPHONE /connect/{connection_id}ɹʹϦμΠϨΫτ ɹଓɹॲɹཧ ΞϓϦέʔγϣϯɾήʔϜϖʔδʹϦμΠϨΫτ
CONNECT SMARTPHONE Connect Smartphone Smartphone (ࢠ) PC () Game Page
1 2 2 3 3 /connect/KCL98U
CONNECT SMARTPHONE Connect Smartphone Smartphone (ࢠ) PC () Game Page
Socket.IO
CONNECT SMARTPHONE • Connect Smartphone Ͱͷଓॲཧ • ཚ͔Β connection_id ੜ
• ͱࢠΛ connection_id Ͱর߹ • ʹଓ(ࢠ)ͷҰཡΛදࣔ
None
None
None
None
DEMO connect-sp.ww24.jp
αϯϓϧίʔυ
ଓ
ૹ৴ (ࢠ)
ड৴ ()
CONNECT SMARTPHONE • • ಉ͡ϒϥβͰ 2 ը໘։͘ͱɺશ͘ಉ͡ηογϣϯ ใΛ͍࣋ͬͯΔͷͰɺͲͪΒ͕͔ผͰ͖ͳ͍ !
! ઌʹଓ͖ͯͨ͠ํ͕Ͱྑ͍ΑͶʂ ͨ·ʹόάΔ
྆ํࢠͱఆ͞ΕΔ͜ͱ͕͋Δɻ
CONNECT SMARTPHONE • ͳͥͦ͏ͳΔ͔… • HTTP ϦΫΤετεςʔτϨεɻঢ়ଶΛ࣋ͨͳ ͍ɻঢ়ଶΛ࣋ͨͤΔͨΊʹηογϣϯΛ༻͍Δɻ • WebSocket
௨৴εςʔτϑϧɻίωΫγϣϯຖ ʹݸʑʹঢ়ଶΛอ࣋Ͱ͖Δɻϒϥβ͕ಉ͡Ͱ͋ͬ ͯɺ͔ࢠ͔ఆՄೳɻ
CONNECT SMARTPHONE • ϦμΠϨΫτͤ͞Δ࣮ʹͨ͠ཧ༝ • ελϯυΞϩϯͳ࣮Λࢦͨ͠ • αʔόͷ࣮ෆཁͰϦΞϧλΠϜ࿈ܞΛ࣮ݱ • URL
ϧʔςΟϯάࢠͷೝূͳͲɺ໘ ͳॲཧΛҰׅͯ͠ߦͬͨ
ࠓޙͷ՝ • ࣗಈతʹೝূ͍ͨ͠ • ύιίϯ㱻εϚϗʹݶΒͣɺ ήʔϜͰϓϨΠϠʔϚονϯάͰ͖ͦ͏
ϦΞϧλΠϜ௨৴ָ͍͠ʂ
express.io Ͱ շదͳϦΞϧλΠϜ௨৴ϥΠϑΛ