Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
原理から解き明かす AIと人間の成長 - Progate BAR
teba_eleven
2
300
Product Engineer
resilire
0
130
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
3
21k
Capture Checking / Separation Checking 入門
tanishiking
0
110
履歴テーブル、今回はこう作りました 〜 Delegated Types編 〜 / How We Built Our History Table This Time — With Delegated Types
moznion
16
9.4k
Databricksによるエージェント構築
taka_aki
1
120
DGX SparkでローカルLLMをLangChainで動かした話
ruzia
1
260
“決まらない”NSM設計への処方箋 〜ビットキーにおける現実的な指標デザイン事例〜 / A Prescription for "Stuck" NSM Design: Bitkey’s Practical Case Study
bitkey
PRO
1
350
Bakuraku Engineering Team Deck
layerx
PRO
11
5.7k
How native lazy objects will change Doctrine and Symfony forever
beberlei
1
380
Digitization部 紹介資料
sansan33
PRO
1
6.1k
Ryzen NPUにおけるAI Engineプログラミング
anjn
0
220
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Embracing the Ebb and Flow
colly
88
4.9k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Automating Front-end Workflow
addyosmani
1371
200k
What's in a price? How to price your products and services
michaelherold
246
12k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
80
KATA
mclloyd
PRO
32
15k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
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