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
Websocket en WAMP in sPHPace
Search
Davy De Coster
May 26, 2020
Programming
0
73
Websocket en WAMP in sPHPace
Davy De Coster
May 26, 2020
Tweet
Share
Other Decks in Programming
See All in Programming
2 週間で Twitter Bot を作ってみた
contour_gara
0
810
From Spring Boot 2 to Spring Boot 3 with Java 21 and Jakarta EE
ivargrimstad
0
850
冗長なエラーログを削減し、スタックトレースを手に入れる / Reducing Verbose Error Logs and Obtaining Stack Traces
upamune
0
1.1k
効率化に挑戦してみたらモバイル開発が少し快適になった話
ryunakayama
0
140
GitHub Copilotのススメ
marcy731
1
240
Docker_OSS_ホスティング入門
satokoki645
0
110
GitLab CI/CD で C#/WPFアプリケーションのテストとインストーラーのビルド・デプロイを自動化する
hacarus
0
500
検証も兼ねて個人開発でHonoとかと向き合った話
hanetsuki
1
1.4k
Introducing Kotlin Multiplatform in an existing mobile app - Workshop Edition | AndroidMakers Paris
prof18
0
170
Goのエラースタックトレースの歴史と今後
sonatard
10
2k
Snowflakeで眠ったデータを起こそう!
estie
0
160
PHPはいつから死んでいるかの調査
chiroruxx
2
430
Featured
See All Featured
The Language of Interfaces
destraynor
151
23k
A Philosophy of Restraint
colly
197
16k
Building Applications with DynamoDB
mza
88
5.6k
Design by the Numbers
sachag
274
18k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
21
1.9k
Optimising Largest Contentful Paint
csswizardry
13
2.4k
The Cult of Friendly URLs
andyhume
74
5.7k
Rails Girls Zürich Keynote
gr2m
91
13k
The MySQL Ecosystem @ GitHub 2015
samlambert
244
12k
Designing for humans not robots
tammielis
247
25k
Being A Developer After 40
akosma
67
580k
Code Reviewing Like a Champion
maltzj
515
39k
Transcript
Websocket en WAMP in sPHPace
About
Davy De Coster Backend Developer @ Ocular Twitter: @davydecoster
None
None
Websocket?
Websocket Protocol • Bestaat sinds 2010 – RFC sinds december
2011 (https://tools.ietf.org/html/rfc6455) • Realtime communicatiekanaal • Lage overhead tov polling • ws:// en wss:// • Meerdere subprotocollen • Veel gebruikt: socket.io
Websocket in PHP • Ratchet Package (http://socketo.me/) • Websocket server
in PHP
DEMO
Subprotocollen • Meerdere implementaties (https://www.iana.org/assignments/websocket/websocket.xml)
WAMP?
WAMP • Web Application Messaging Protocol • Crossbar.io • Publish
& Subscribe naar topics (PubSub) • Remote Procedure Call (RPC) • Veel gebruikt bij IoT
Crossbar.io - Connection & security • Python • Realms •
Namespace • Roles • Security • Authentication • Veel platformen kunnen hiermee connecteren • Build in Docker container • Data in args en kwargs
PubSub • Topic = ‘be.ocular.demo’ • Subscribe om events te
ontvangen • Publish om event te sturen
RPC • Registreer procedure op topic (‘be.ocular.doe.iets’) • Procedure is
uniek • Call een topic om de procedure uit te voeren • Procedure kan iets returnen naar caller
WAMP - Schema
WAMP in PHP • Voryx/Thruway (https://github.com/voryx/Thruway) • Non-blocking
DEMO
Real-life voorbeelden
None
None
None
Questions?
Merci!