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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
数案件を同時に進行するためのコンテキスト整理術
sutetotanuki
2
250
ある製造業の会社全体のAI化に1エンジニアが挑んだ話
kitami
2
980
🀄️ on swiftc
giginet
PRO
0
370
Rebirth of Software Craftsmanship in the AI Era
lemiorhan
PRO
2
230
幾億の壁を超えて/Beyond Countless Walls(JP)
ikuodanaka
0
130
AgentCore RuntimeからS3 Filesをマウントしてみる
har1101
4
440
Code Interpreter で、AIに安全に コードを書かせる。
yokomachi
0
6.1k
Eight Engineering Unit 紹介資料
sansan33
PRO
3
7.2k
AWS認定資格は本当に意味があるのか?
nrinetcom
PRO
1
220
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
78k
生成AI時代のエンジニア育成 変わる時代と変わらないコト
starfish719
0
5.3k
昔はシンプルだった_AmazonS3
kawaji_scratch
0
270
Featured
See All Featured
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
The Limits of Empathy - UXLibs8
cassininazir
1
290
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.4k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Design in an AI World
tapps
0
190
Making the Leap to Tech Lead
cromwellryan
135
9.8k
GraphQLとの向き合い方2022年版
quramy
50
15k
Rails Girls Zürich Keynote
gr2m
96
14k
Building AI with AI
inesmontani
PRO
1
880
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
170
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
160
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