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
Using slanger and websockets to power a warehou...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
schokomarie
August 18, 2012
Technology
500
1
Share
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
Other Decks in Technology
See All in Technology
バイブコーディングで3倍早く⚪⚪を作ってみた
samakada
0
210
ボトムアップの改善の火を灯し続けろ!〜支援現場で学んだ、消えないための3つの打ち手〜 / 20260509 Kazuki Mori
shift_evolve
PRO
2
360
Anthropic「Long-running a gents」をGeminiで再現してみた
tkikuchi
0
760
多角的な視点から見たAGI
terisuke
0
120
要件定義の精度を高めるための型と生成AIの活用 / Using Types and Generative AI to Improve the Accuracy of Requirements Definition
haru860
0
270
雑談は、センサーだった
bitkey
PRO
2
160
試作とデモンストレーション / Prototyping and Demonstrations
ks91
PRO
0
160
20260428_Product Management Summit_tadokoroyoshiro
tadokoro_yoshiro
15
18k
拝啓、あの夏の僕へ〜あなたも知っているApp Runnerの世界〜
news_it_enj
0
180
Fabric MCPの紹介と使い分け
ryomaru0825
1
110
Building a Study Buddy AI Agent from Scratch: From Passive Chatbots to Autonomous Systems
itchimonji
0
120
エージェントスキルを作って自分のインプットに役立てよう
tsubakimoto_s
0
510
Featured
See All Featured
So, you think you're a good person
axbom
PRO
2
2k
The Cost Of JavaScript in 2023
addyosmani
55
9.9k
sira's awesome portfolio website redesign presentation
elsirapls
0
230
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
270
RailsConf 2023
tenderlove
30
1.4k
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
320
Leo the Paperboy
mayatellez
7
1.7k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.7k
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