Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Using slanger and websockets to power a warehou...
Search
schokomarie
August 18, 2012
Technology
1
490
Using slanger and websockets to power a warehouse backend
Websockets are fun for chats and online games. But are there serious uses? ...
schokomarie
August 18, 2012
Tweet
Share
Other Decks in Technology
See All in Technology
Knowledge Work の AI Backend
kworkdev
PRO
0
210
Microsoft Agent Frameworkの可観測性
tomokusaba
1
110
Introduce marp-ai-slide-generator
itarutomy
0
110
アラフォーおじさん、はじめてre:Inventに行く / A 40-Something Guy’s First re:Invent Adventure
kaminashi
0
130
AR Guitar: Expanding Guitar Performance from a Live House to Urban Space
ekito_station
0
150
ActiveJobUpdates
igaiga
1
310
ペアーズにおけるAIエージェント 基盤とText to SQLツールの紹介
hisamouna
2
1.6k
Connection-based OAuthから学ぶOAuth for AI Agents
flatt_security
0
350
LayerX QA Night#1
koyaman2
0
250
Amazon Quick Suite で始める手軽な AI エージェント
shimy
1
1.8k
20251222_サンフランシスコサバイバル術
ponponmikankan
2
140
Next.js 16の新機能 Cache Components について
sutetotanuki
0
170
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
WCS-LA-2024
lcolladotor
0
390
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
0
300
The Language of Interfaces
destraynor
162
25k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
The Pragmatic Product Professional
lauravandoore
37
7.1k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.3k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
2
3.8k
The Cult of Friendly URLs
andyhume
79
6.7k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
340
Transcript
$whoami Samstag, 18. August 2012
Using slanger and websockets to power a warehouse backend Samstag,
18. August 2012
© NBC Samstag, 18. August 2012
What? •a web application for a printing company to simplify
the packing process Samstag, 18. August 2012
What? •the system runs on a touchscreen desktop in kiosk
mode and needs to be synchronized in realtime Samstag, 18. August 2012
© NBC Samstag, 18. August 2012
websockets •native browser support •real bi-directional connection •less overhead than
ajax-requests •easier to handle than long-polling Samstag, 18. August 2012
© NBC Samstag, 18. August 2012
protocol •roll your own •pre-made Samstag, 18. August 2012
pusher •a webservice sending realtime messages between clients •german Datenschutz:
can not send german client data to an us-based service Samstag, 18. August 2012
© NBC Samstag, 18. August 2012
slanger •open source websocket server •runs on a local machine
•compatible with pusher‘s API •thus compatible with pusher. js Samstag, 18. August 2012
architecture •Padrino backend •slanger •html-5 client Samstag, 18. August 2012
architecture •application handles entity changes and sends events to slanger
•client subscribes to slanger events •slanger dispatches events to the client •client uses event data to render mustache templates Samstag, 18. August 2012
Samstag, 18. August 2012
Samstag, 18. August 2012
advantages •very simple client side js code •almost no logic
in the client •server side business logic Samstag, 18. August 2012
© NBC Samstag, 18. August 2012
handle with care •Never mix client-side events with server-side events
•keep all business logic on the server •Minimize assumptions about event behaviour in the client Samstag, 18. August 2012
© NBC Samstag, 18. August 2012
© NBC Samstag, 18. August 2012
pitfalls •correct redis version (≥2.4.14) •slanger is an app, not
a lib Samstag, 18. August 2012
stuff • https://github.com/stevegraham/slanger • https://github.com/defunkt/resque • http://redis.io/ • https://github.com/padrino/padrino-framework •
http://handlebarsjs.com/ • http://twitter.github.com/bootstrap/ • http://www.websocket.org/quantum.html Samstag, 18. August 2012
© NBC Samstag, 18. August 2012