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
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
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.6k
Context Engineeringの取り組み
nutslove
0
380
Exadata Fleet Update
oracle4engineer
PRO
0
1.1k
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
93k
Cosmos World Foundation Model Platform for Physical AI
takmin
0
960
StrandsとNeptuneを使ってナレッジグラフを構築する
yakumo
1
120
茨城の思い出を振り返る ~CDKのセキュリティを添えて~ / 20260201 Mitsutoshi Matsuo
shift_evolve
PRO
1
380
Codex 5.3 と Opus 4.6 にコーポレートサイトを作らせてみた / Codex 5.3 vs Opus 4.6
ama_ch
0
190
Bedrock PolicyでAmazon Bedrock Guardrails利用を強制してみた
yuu551
0
260
GitHub Issue Templates + Coding Agentで簡単みんなでIaC/Easy IaC for Everyone with GitHub Issue Templates + Coding Agent
aeonpeople
1
260
モダンUIでフルサーバーレスなAIエージェントをAmplifyとCDKでサクッとデプロイしよう
minorun365
4
220
配列に見る bash と zsh の違い
kazzpapa3
3
160
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
350
[SF Ruby Conf 2025] Rails X
palkan
1
760
YesSQL, Process and Tooling at Scale
rocio
174
15k
Faster Mobile Websites
deanohume
310
31k
Building Adaptive Systems
keathley
44
2.9k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
Done Done
chrislema
186
16k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
130
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
130
Product Roadmaps are Hard
iamctodd
PRO
55
12k
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