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
成長中のFanTech領域におけるBiomeを活用したCIの高速化 / fantech-web-biome
cyberagentdevelopers
PRO
2
110
バクラクにおける可観測性向上の取り組み
yuu26
3
440
【技術書典17】OpenFOAM(自宅で極める流体解析)2次元円柱まわりの流れ
kamakiri1225
0
250
Amazon CloudWatch Network Monitor 導入ガイド_デモ説明付き
yukimmmm
0
130
エムスリー流!難読クイズを作ってPythonの深淵に触れるコツ! - 技育CAMPアカデミア
vaaaaanquish
0
100
AWS reInvent 2024 関西組 事前勉強会
shinyayamada
0
130
Amazon_CloudWatch_ログ異常検出_導入ガイド
tsujiba
4
1.7k
「視座」の上げ方が成人発達理論にわかりやすくまとまってた / think_ perspective_hidden_dimensions
shuzon
2
13k
運用イベント対応への生成AIの活用 with Failure Analysis Assistant
suzukyz
0
170
プロポーザルのつくり方 〜個人技編〜 / How to come up with proposals
ohbarye
4
280
マルチモーダルRAGやってみた
tanimon
0
110
君は隠しイベントを見つけれるか?
mujyun
0
380
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
664
120k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
Git: the NoSQL Database
bkeepers
PRO
426
64k
Designing on Purpose - Digital PM Summit 2013
jponch
115
6.9k
Become a Pro
speakerdeck
PRO
24
5k
Done Done
chrislema
181
16k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
[RailsConf 2023] Rails as a piece of cake
palkan
51
4.9k
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.4k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
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 Ͱ շదͳϦΞϧλΠϜ௨৴ϥΠϑΛ