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
Demystifying deepstream's HTTP API
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Srushtika Neelakantam
November 17, 2017
Technology
0
73
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
Tweet
Share
More Decks by Srushtika Neelakantam
See All by Srushtika Neelakantam
Realtime data on the JAMstack
srushtika
0
73
NodeJS worker threads
srushtika
0
32
Building scalable breakout rooms with Node.js worker threads
srushtika
0
100
Building a multiplayer version of space invaders
srushtika
1
110
Ably Masterclass Episode 2 - Building an IoT based realtime attendance system for Slack
srushtika
0
2.5k
Ably Masterclass Episode 1 - Building a realtime voting app in less than an hour
srushtika
0
3.1k
Understanding how 'Hubs by Mozilla' works
srushtika
1
120
Mixed Reality - Zero to Hero in 25min
srushtika
1
110
The current state of the data sharing economy
srushtika
1
70
Other Decks in Technology
See All in Technology
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.5k
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
1
350
GitHub Issue Templates + Coding Agentで簡単みんなでIaC/Easy IaC for Everyone with GitHub Issue Templates + Coding Agent
aeonpeople
1
180
Cosmos World Foundation Model Platform for Physical AI
takmin
0
110
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
170
~Everything as Codeを諦めない~ 後からCDK
mu7889yoon
3
270
こんなところでも(地味に)活躍するImage Modeさんを知ってるかい?- Image Mode for OpenShift -
tsukaman
0
100
20260204_Midosuji_Tech
takuyay0ne
0
120
MCPでつなぐElasticsearchとLLM - 深夜の障害対応を楽にしたい / Bridging Elasticsearch and LLMs with MCP
sashimimochi
0
140
Amazon S3 Vectorsを使って資格勉強用AIエージェントを構築してみた
usanchuu
3
440
生成AI時代にこそ求められるSRE / SRE for Gen AI era
ymotongpoo
5
2.7k
プロダクト成長を支える開発基盤とスケールに伴う課題
yuu26
4
1.3k
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
We Are The Robots
honzajavorek
0
160
Mind Mapping
helmedeiros
PRO
0
78
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
120
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
Building Adaptive Systems
keathley
44
2.9k
ラッコキーワード サービス紹介資料
rakko
1
2.2M
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Why Our Code Smells
bkeepers
PRO
340
58k
Prompt Engineering for Job Search
mfonobong
0
160
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]