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
510
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
作る力から、見極める力へ — AI時代に広がるエンジニアの価値と役割
rince
0
410
しぶいSRE: サーバから見えない障害にどう向き合うか。ラストワンマイルのデバッグ実践 / Shibui SRE
kanny
0
120
打造你的 AI 工作流:Agent Skill + MCP 實戰工作坊
appleboy
0
480
【FinOps】データドリブンな意思決定を目指して
z63d
3
590
そのタスクオンスケですか?
poropinai1966
0
120
product engineering with qa
nealle
0
140
AIで政治は変わるのか? — 中高生と考えたAI時代の民主主義(東海高校サタデープログラム)
eitarosuda
0
370
トークン最適化のためのユーザーストーリー分析 / User Story Analysis for Token Optimization
oomatomo
0
160
デジタル・デザイン構想 by Sayaka Ishizuka
y150saya
0
180
飲食店もAIで。レジ締めやハンディシステムをつくってる話 / Using AI for restaurant management
vtryo
0
230
感情と身体を置き去りにしない、エンジニアの生きのこり方 ──いまから、ここから「自分の状態」を扱うという選択
saorimurooka
1
470
はてなのサービス基盤を支える Kubernetes《足腰》
masayoshimaezawa
0
430
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
GraphQLとの向き合い方2022年版
quramy
50
15k
Agile that works and the tools we love
rasmusluckow
331
22k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
300
A Soul's Torment
seathinner
6
3k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
430
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Statistics for Hackers
jakevdp
799
230k
Designing for humans not robots
tammielis
254
26k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
230
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.3k
Documentation Writing (for coders)
carmenintech
77
5.4k
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