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
JEDAI認定プログラム JEDAI Order 2026 エントリーのご案内 / JEDAI Order 2026 Entry
databricksjapan
0
150
高度サイバー人材育成専科(後半)
nomizone
0
430
通勤手当申請チェックエージェント開発のリアル
whisaiyo
3
340
Microsoft Agent 365 についてゆっくりじっくり理解する!
skmkzyk
0
440
Amazon Connect アップデート! AIエージェントにMCPツールを設定してみた!
ysuzuki
0
120
アプリにAIを正しく組み込むための アーキテクチャ── 国産LLMの現実と実践
kohju
0
170
Database イノベーショントークを振り返る/reinvent-2025-database-innovation-talk-recap
emiki
0
250
AIの長期記憶と短期記憶の違いについてAgentCoreを例に深掘ってみた
yakumo
4
470
Strands AgentsとNova 2 SonicでS2Sを実践してみた
yama3133
1
1.5k
マイクロサービスへの5年間 ぶっちゃけ何をしてどうなったか
joker1007
17
7.4k
特別捜査官等研修会
nomizone
0
520
日本Rubyの会: これまでとこれから
snoozer05
PRO
5
220
Featured
See All Featured
Color Theory Basics | Prateek | Gurzu
gurzu
0
140
AI Search: Where Are We & What Can We Do About It?
aleyda
0
6.7k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
220
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
170
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
400
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
115
91k
Optimizing for Happiness
mojombo
379
70k
A better future with KSS
kneath
240
18k
HDC tutorial
michielstock
0
260
ラッコキーワード サービス紹介資料
rakko
0
1.7M
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
81
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