$30 off During Our Annual Pro Sale. View Details »
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
AgentCore BrowserとClaude Codeスキルを活用した 『初手AI』を実現する業務自動化AIエージェント基盤
ruzia
7
1.5k
Entity Framework Core におけるIN句クエリ最適化について
htkym
0
120
障害対応訓練、その前に
coconala_engineer
0
200
ペアーズにおけるAIエージェント 基盤とText to SQLツールの紹介
hisamouna
2
1.7k
New Relic 1 年生の振り返りと Cloud Cost Intelligence について #NRUG
play_inc
0
230
AWSの新機能をフル活用した「re:Inventエージェント」開発秘話
minorun365
2
450
Connection-based OAuthから学ぶOAuth for AI Agents
flatt_security
0
360
AWSに革命を起こすかもしれない新サービス・アップデートについてのお話
yama3133
0
500
2025年のデザインシステムとAI 活用を振り返る
leveragestech
0
220
SQLだけでマイグレーションしたい!
makki_d
0
1.2k
202512_AIoT.pdf
iotcomjpadmin
0
140
業務の煩悩を祓うAI活用術108選 / AI 108 Usages
smartbank
2
2.3k
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
GraphQLとの向き合い方2022年版
quramy
50
14k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
290
Amusing Abliteration
ianozsvald
0
69
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
210
Information Architects: The Missing Link in Design Systems
soysaucechin
0
720
How to build a perfect <img>
jonoalderson
0
4.7k
Utilizing Notion as your number one productivity tool
mfonobong
2
190
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Odyssey Design
rkendrick25
PRO
0
440
Code Reviewing Like a Champion
maltzj
527
40k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.1k
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