Search code examples
node.jsrtos

Is it possible to run node.js on an RTOS?


I have a 8 core ARM device and I was wondering whether I could use it to build a drone. Does a real time operating system require a specific type or method of programming? Is it possible to use node.js with any of these systems?


Solution

  • In short, yes it is possible to run node.js on RTOS.

    About RTOS

    1. You should remove buffer delays. For example, don't block Node.js event loop or don't use Node.js process.nextTick function.
    2. Use event-based approach for better code architecture.
    3. Think like an embedded developer, not like web-developer.
    4. This is an interesting and not trivial job.

    About node.js details

    1. As you can see at the link the device has Linux Kernel 4.9 LTS OS.
    2. You can install Node.js and npm modules on Linux Kernel 4.9 LTS OS.
    3. There can be an issue to run native functionality from Node.js. You must have node.js wrapper module in c language. Good example for Raspberry Pi is wiringpi-node
    4. Python can be used as a node.js alternative