Zero Entry Barrier
to Internet of Things


Lauri Svan / SC5 Online

This is where it started

HW hackathon in SC5

Cheap hackable Linux powered devices are everywhere!


So many possibilities with connected devices!

  • Smart cameras that can be extended to manipulate images
  • Sensor systems that act as and talk to Internet services
  • Autonomous robots & control logic
  • ... and so much more - anything can be made smarter!

... but writing embedded software isn't fun!

  • Languages that computers get well but humans don’t
  • Disparate communities that don’t get along
  • Super-complicated toolchains
  • Hard to debug
  • Complex packaging and dependency chains
  • Some of the gadgets can already be controlled with JavaScript

    ... using your computer; the gadgets don't run JavaScript 



     

    saves

    JSOS makes your system and
    HW accessible by JavaScript

  • Hides the C/C++ & removes the need for cross-compilation toolchain
  • Adds a few, simple JavaScripted system services
  • JavaScript "HAL" for low-level device drivers
  • Independent of the typical embedded Linux libraries (e.g. busybox, connman)

  • JSOS contents

    Work in progress:

    • jsos-init: System boot & app life-cycle management
    • jsos-hal: JavaScripted device drivers
    • jsos-networking: Network (WIFI, USB etc.) management

    What we could use directly from upstream:
    • Atom and Sublime text for editor (& debugger)
    • node.js
    • npm package management
    • OpenEmbedded for creating device images

    What else we could add in distant future:

    ... but does it make any sense?

    Remember


    Source: Blackduck Knowledge Base

    Innovation doesn't live in C or Java anymore.
    New development happens in JavaScript



    Source: modulecounts.com

    npm repository grows faster than the other module repos

    JavaScript & V8 isn't that fat!

    V8 memory footprint is some 10Mb/instance

    This is a problem for running several node.js processes


    Remedy: Do the same as Android/Zygote does: Fork the root-level node.js instance; V8 supports it already, node.js could support it if we can patch libev to support forking.


    Remember: Android runs Java VM which is equally fat!

    JSOS - Where do we stand now?

    Still a "crazy idea", but already close to a MVP

    Done:

    • Board bringup & few image mods on Intel Galileo
    • First custom Yocto image with node.js 0.11 and rudimentary jsos-init
    • Web site & Github user is up! www.js-os.org

    Work in progress:
    • jsos-init boots real node.js packages & pulls packages from a custom repo
    Todo:
    • Pretty much everything else

    Contribute and support the cause!

    js-os.org

    Learning from Zygote: jsos-init


    • Kernel passes execution to node.js (replaces SysV init)
    • A simple IPC channel between processes (like intents & actions) using what node.js process.fork() provides
    • Handle application life-cycle like monit/pm2/forever
    • Launch npm packages (with npm start)

    Title

    Made with Slides.com