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

REALTIME™ WRITING A SIMPLE REALTIME HARDWARE MONITOR

REALTIME™ WRITING A SIMPLE REALTIME HARDWARE MONITOR

Writing a simple monitoring os realtime system

Christian Kvalheim

September 29, 2012
Tweet

More Decks by Christian Kvalheim

Other Decks in Technology

Transcript

  1. REAL-TIME (ADJ) “ (Electronics & Computer Science / Computer Science)

    denoting or relating to a data-processing system in which a computer receives constantly changing data, such as information relating to air- traffic control, travel booking systems, etc., and processes it sufficiently rapidly to be able to control the source of the data ”
  2. THE TRADITIONAL REALTIME Real time os (RTOS) Known latency Known

    end to end processing time Controlled environment
  3. OUR DEFINITON OF REALTIME Non realtime os (linux, bsd, osx,

    windows) Completely random network topology Unknown end to end processing time Random hardware performance (HELLO AMAZON) Only websockets for now
  4. PROPOSAL FOR A NEW DEFINITION OF REALTIME “ (Electronics &

    Computer Science / Computer Science) denoting or relating to a data-processing system in which a computer receives constantly changing data, such as information relating to air- traffic control, travel booking systems, etc., and processes it in an acceptable window of latency to control the source of data. ”
  5. SAMPLE APP "REALTIME" Collect machine metrics on linux and osx

    Publish them to a central server Buffer and stream to client
  6. NODE-PSUTIL Partial port of psutil from python All operations using

    async (including C++) Only supports linux/osx/darwin for now Not all operations yet https://github.com/christkv/node-psutil
  7. REALTIME™ Metrics collection agent Collection server Metrics buffering using mongodb

    Websockets Dashboard https://github.com/christkv/realtime
  8. SERVER - CLIENT PROTOCOL ConnectionHandler.prototype.pause = function() {...} ConnectionHandler.prototype.stop =

    function() {...} ConnectionHandler.prototype.list = function() {...} ConnectionHandler.prototype.subscribe = function() {...} ConnectionHandler.prototype.unsubscribe = function() {...}
  9. This webpage is not available Google Chrome cannot reach the

    website. This is typically caused by network issues, but can also be the result of a misconfigured firewall or proxy server. Here are some suggestions: Reload this webpage later. Add Google Chrome as a permitted program in your firewall's or antivirus software's settings. If it is already a permitted program, try deleting it from the list of permitted programs and adding it again. If you use a proxy server, check your proxy settings or contact your network administrator to make sure the proxy server is working. If you don't believe you should be using a proxy server, adjust your proxy settings: Go to Applications > System Preferences > Network > Advanced > Proxies and deselect any proxies that have been selected. Error 109 (net::ERR_ADDRESS_UNREACHABLE): Unable to reach the server.
  10. FLOW 1. Collect metric 2. Send to server 3. Write

    to capped collection 4. Write to historic store 5. Stream data from capped collection to clients
  11. CAPPED COLLECTION IN MONGODB 1. Used as ring-buffer 2. Fixed

    memory size 3. FIFO 4. Avoid additional IPC complexity 5. Can be replicated
  12. REALTIME APP REALTIME EXPERIMENTAL 1. Extending Agent to be more

    generalized 2. Agent upgradable transport (UDP-TCP-Websocket-HTTP) 3. Finishing up complete app over time 4. Adding more metrics and aggregated metrics 5. Experiment with different realtime models
  13. DO YOU NEED ACK? TCP/Websocket In order Packet delay can

    cause stalls SUCKS for realtime/gaming
  14. DO YOU NEED ACK? UDP No order guarantee Possible packet

    loss Nowhere in the browser Possible to bridge with flash for javascript
  15. DO WE HAVE OPTIONS ? 1. Flash-UDP bridge? 2. Native

    client? 3. Proper UDP support in the browser? 4. Data channel in webRTC (SCTP)
  16. LET'S TALK WEBRTC 1. Data channels 2. Not yet 1.0

    spec but in chrome 3. In order/out of order messages
  17. DATA CHANNELS Services/Features Services/Features SCTP SCTP TCP TCP UDP UDP

    Connection-oriented yes yes no Full duplex yes yes yes Reliable data transfer yes yes no Partial-reliable data transfer optional no no Ordered data delivery yes yes no Unordered data delivery yes no yes Flow control yes yes no Congestion control yes yes no ECN capable yes yes no AND MORE ...