A lightweight IOT application server with a hard shell written for node.js
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
tigerbot da68c102cd stop double printing uncaught error stacks il y a 7 ans
..
README.md Near-minimal app boot il y a 9 ans
master.js create the config dir in the install process il y a 7 ans
worker.js stop double printing uncaught error stacks il y a 7 ans

README.md

Small and Fast

We're targetting very tiny systems, so we have to be really small and really fast.

We want to get from 0 to a listening socket as quickly as possible, so we have this little folder of boot code that uses no external modules and as few internal modules as reasonably possible.

  • fs.readFileSync is fast (< 1ms)
  • v8's parser is pretty fast
  • v8's fast compiler is slow
  • v8's optimizer happens just-in-time

Master

Master has a few jobs:

  • spin up the reverse proxy (caddy in this case)
  • spin up the workers (as many as CPU cores)
  • manage shared key/value store
  • manage shared sqlite3
  • perform one-off processes once boot is complete
    • SIGUSR1 (normally SIGHUP) to caddy
    • watch and update ip address
    • watch and update router unpn / pmp-nat
    • watch and update Reverse VPN

Worker

Workers are the ones that master spins up to do the hard core stuff. They run the apis of the apps.

Low Mem

We need to profile very low memory devices and see if it is better to have just one process, or if master and worker is still okay over time.

The working suspision is that by occasionally starting up a new worker and killing the old one when memory usage starts to rise should fair pretty well and keeping the system stable.