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
Srushtika Neelakantam
November 17, 2017
Technology
74
0
Share
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
78
NodeJS worker threads
srushtika
0
36
Building scalable breakout rooms with Node.js worker threads
srushtika
0
110
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.6k
Ably Masterclass Episode 1 - Building a realtime voting app in less than an hour
srushtika
0
3.2k
Understanding how 'Hubs by Mozilla' works
srushtika
1
130
Mixed Reality - Zero to Hero in 25min
srushtika
1
110
The current state of the data sharing economy
srushtika
1
76
Other Decks in Technology
See All in Technology
Even G2 クイックスタートガイド(日本語版)
vrshinobi1
0
180
AI時代のIssue駆動開発のススメ
moongift
PRO
0
330
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
11k
AIエージェント勉強会第3回 エージェンティックAIの時代がやってきた
ymiya55
0
180
QA組織のAI戦略とAIテスト設計システムAITASの実践
sansantech
PRO
1
300
How to install a gem
indirect
0
2k
開発チームとQAエンジニアの新しい協業モデル -年末調整開発チームで実践する【QAリード施策】-
qa
0
640
JAWS DAYS 2026でAIの「もやっと」感が解消された話
smt7174
1
120
20260323_データ分析基盤でGeminiを使う話
1210yuichi0
0
210
互換性のある(らしい)DBへの移行など考えるにあたってたいへんざっくり
sejima
PRO
0
510
FlutterでPiP再生を実装した話
s9a17
0
240
MIX AUDIO EN BROADCAST
ralpherick
0
140
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Discover your Explorer Soul
emna__ayadi
2
1.1k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
290
WENDY [Excerpt]
tessaabrams
9
37k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
94
My Coaching Mixtape
mlcsv
0
91
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
The browser strikes back
jonoalderson
0
860
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
160
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
300
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]