Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Using slanger and websockets to power a warehouse backend

Using slanger and websockets to power a warehouse backend

Websockets are fun for chats and online games. But are there serious uses? ...


August 18, 2012

Other Decks in Technology


  1. What? •a web application for a printing company to simplify

    the packing process Samstag, 18. August 2012
  2. What? •the system runs on a touchscreen desktop in kiosk

    mode and needs to be synchronized in realtime Samstag, 18. August 2012
  3. websockets •native browser support •real bi-directional connection •less overhead than

    ajax-requests •easier to handle than long-polling Samstag, 18. August 2012
  4. 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
  5. slanger •open source websocket server •runs on a local machine

    •compatible with pusher‘s API •thus compatible with pusher. js Samstag, 18. August 2012
  6. 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
  7. advantages •very simple client side js code •almost no logic

    in the client •server side business logic Samstag, 18. August 2012
  8. 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
  9. 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