Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Using slanger and websockets to power a warehou...
Search
schokomarie
August 18, 2012
Technology
530
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 エージェント基盤とその組織
ivry_presentationmaterials
0
160
re:Invent初参加で変わったこと、2回目にやってみたいこと(JAWS-UG彩の国埼玉 #12)
mhrtech
2
110
go-sqletch
moznion
0
140
AIにシークレットを見せない、WSL2で安全な開発環境
yazm
0
220
Deep Data Security 機能解説
oracle4engineer
PRO
2
800
無理せず続ける、子育てエンジニアの学び
codmoninc
PRO
0
730
Classmethod Company Deck
satoshi7
0
210
日本語に強いオープンな大規模言語モデル「LLM-jp」
odashi
4
960
パッチ更新でterraform initが落ちた日
grimoh
1
130
UniFi(ユニファイ)AIカメラの現場活用
ludicmind
1
430
DGX Spark でどこまでハッキングができるのか?
kash1064
2
1.2k
脆弱性診断って、何をしているの? 〜弱点を見つけて、会社の改善につなげるまで〜
keeg
0
900
Featured
See All Featured
Building Applications with DynamoDB
mza
96
7.2k
Designing Powerful Visuals for Engaging Learning
tmiket
1
600
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
710
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2k
Why Our Code Smells
bkeepers
PRO
340
58k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
260
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
630
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
540
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
490
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
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