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
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
47
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
3k
Ably Masterclass Episode 1 - Building a realtime voting app in less than an hour
srushtika
0
3.7k
Understanding how 'Hubs by Mozilla' works
srushtika
1
150
Mixed Reality - Zero to Hero in 25min
srushtika
1
120
The current state of the data sharing economy
srushtika
1
89
Other Decks in Technology
See All in Technology
Genieを崇めよ
kameitomohiro
0
160
SREへの勘違いに気づいた後の話
tomodakengo
0
110
10Xに技術的負債をもたらした「2つの境界の歪み」その構造と解消への営み
10xinc
0
2.1k
AIエージェントの権限管理 3: Agentic RAG の Fine grained access control 編
ren8k
0
110
生成AIエージェントを用いた、 手動テスト手順書から自動テストへの 変換手法の検討
magicpod
0
170
EventBridge に「合流」はない ― サーバーレスのワークフローを育てるということ / No Join in EventBridge
yusukeshimizu
2
140
すぐできる衛星通信対応 あとは山奥に行くだけ
tatetate55
0
130
AIは推し活である。
kurazuuuuuu
0
200
ユーザー価値を届け続けるためにウォンテッドリーが大切にしている文化
kotaminato
0
180
アプリログインとWeb認証基盤をつなぐ ASWebAuthenticationSession 作法
shimastripe
1
340
AgentCore Runtime上にAgentic Coding基盤を構築・展開する際の設計ポイントと限界点 / Design considerations and limitations when building an agentic coding platform on AgentCore Runtime
har1101
4
300
AI de Idea
kawaguti
PRO
2
120
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
247
13k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
850
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
280
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
390
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.7k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
530
Joys of Absence: A Defence of Solitary Play
codingconduct
1
520
We Are The Robots
honzajavorek
0
380
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
Are puppies a ranking factor?
jonoalderson
2
3.9k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
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]