Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Demystifying deepstream's HTTP API
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Srushtika Neelakantam
November 17, 2017
Technology
85
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Demystifying deepstream's HTTP API
The fourth one from the webinar series by deepstream, exploring it's features and concepts.
Srushtika Neelakantam
November 17, 2017
More Decks by Srushtika Neelakantam
See All by Srushtika Neelakantam
Realtime data on the JAMstack
srushtika
0
110
NodeJS worker threads
srushtika
0
52
Building scalable breakout rooms with Node.js worker threads
srushtika
0
130
Building a multiplayer version of space invaders
srushtika
1
130
Ably Masterclass Episode 2 - Building an IoT based realtime attendance system for Slack
srushtika
0
3.1k
Ably Masterclass Episode 1 - Building a realtime voting app in less than an hour
srushtika
0
3.8k
Understanding how 'Hubs by Mozilla' works
srushtika
1
160
Mixed Reality - Zero to Hero in 25min
srushtika
1
130
The current state of the data sharing economy
srushtika
1
96
Other Decks in Technology
See All in Technology
Claude Code本は、どのように執筆チームで書かれたか
oikon48
1
380
V8のArray.prototype.flatを最大約20倍速くするまでと、巨大OSSへの大規模コミットの道のり
riyaamemiya
0
290
USB PDを使ってスマホを労わりたい
raspython3
0
180
AI導入は済んだ。次は統制を作り替える番だ_AI×開発組織 Summit 2026
techtekt
PRO
0
210
夫婦で子育てするための育児標準化
codmoninc
PRO
0
330
[JAWS-UG彩の国埼玉#12]そろそろ準備する?re:Invent2026をやさしく解説 / reinvent2026-sainokuni
sh_fk2
1
340
エンタメ企業のM&Aを支えるデータ基盤 ― 統合から店舗のリアルタイム分析まで / Data Engineering Summit 2026
genda
0
170
会社説明資料
persolserverworks
0
9.8k
M5Stackで作る BLEマウス GPSログの世界
tomokusaba
0
420
サブエージェントと Claude Mods で作る独自 Advisor ツールの話
kenichiodo
2
160
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
770
Claude の新機能を、 出た日に触って社内に届けるまで
rfdnxbro
1
170
Featured
See All Featured
Designing Experiences People Love
moore
143
24k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Six Lessons from altMBA
skipperchong
29
4.5k
Facilitating Awesome Meetings
lara
57
7.2k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
570
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
58k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Building an army of robots
kneath
307
47k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Typedesign – Prime Four
hannesfritz
42
3.2k
Everyday Curiosity
cassininazir
0
350
Transcript
demystifying deepstream’s HTTP API Srushtika Neelakantam @Srushtika |
[email protected]
[email protected]
HTTP? Realtime?
• IoT, FTW. • Bulk dump. • No deepstream? No
problem! • Fan of CGI languages? - We got you covered.
HTTP
AJAX POLLING AJAX LONG POLLING HTTP/2
HTTP isn’t realtime. Hence: Receive a Pub/Sub event Get record
updates for Data-Sync Presence Subscribe Anything else that requires persistent connections. x x x x
general format <HTTP ENDPOINT URL> POST DAT A
with deepstream.io
config.yml
with deepstreamHub
application dashboard
authentication request { "type": "webhook", "email": "
[email protected]
", "password": "y4b4d4b4d00" }
with deepstream.io localhost://8080/auth with deepstreamHub <HTTP AUTH URL> No Auth
File Auth Webhook Auth No Auth Token Auth Email Auth Webhook Auth
authentication request { "type": "webhook", "email": "
[email protected]
", "password": "y4b4d4b4d00" }
authentication response { "success": "true", "token": "aI2wYSh1FS_2WODD14bYZe1TfIyhAukl", "clientData": { "profileColor":
"brown", "Id": "s64907sdkjdsif" } }
ERROR plain text messages with 4xx status codes
POST requests: • Emit an event. • Read a record.
• Create and update a record. • Delete a record. • Make an RPC. • Query presence.
command format requests responses • topic • action • success
• error • errorTopic • errorEvent
emitting an event { "topic": "event", "action": "emit", "eventName": "lights-on",
"data": 134.52 }
reading a record { "topic": "record", "action": "read", "recordName": "my-record"
}
reading a record { "topic": "record", "action": "read", "recordName": "my-record"
} { "success": true, "version": 2, "data": { "foo": "bar" } } request response
record heads { "topic": "record", "action": "head", "recordName": "my-record" }
record heads { "topic": "record", "action": "head", "recordName": "my-record" }
{ "success": true, "version": 2 } request response
creating and updating a record { "topic": "record", "action": "write",
"recordName": "users/123", "path": "firstname", "version": 6, "data": "Bob" }
creating and updating a record { "success": false, "error": "Record
update failed. Version 6 exists for record \"users/123\".", "errorTopic": "record", "errorEvent": "VERSION_EXISTS", "currentVersion": 6, "currentData": { "firstname": "Alan", "lastname": "Smith" } } response
deleting a record { "topic": "record", "action": "delete", "recordName": "my-record"
}
making an RPC { "topic": "rpc", "action": "make", "rpcName": "add-two",
"data": { "numA": 2, "numB": 5 } }
making an RPC { "topic": "rpc", "action": "make", "rpcName": "add-two",
"data": { "numA": 2, "numB": 5 } } { "success": true, "data": 7 } request response
querying presence { "topic": "presence", "action": "query" }
querying presence { "success": true, "users": [ "ac65902c-13ea-469c-91e6-2cdc8c31136d", "fba85ac8-02bd-98a7-bb42-b2526243b562", "aba325bd-dd23-aba4-3390-02763477453e"
] } response
batching HTTP requests
That’s all folks ! questions? @Srushtika |
[email protected]
[email protected]