The devices will be running SQLite for their task queues since it is lightweight, fast, and it will only need to be accessed synchronously. The hub will be running Redis. The idea is that a cron job will run a script with an ID argument that corresponds to a task (a JSON object) in Redis or SQLite. Tasks can run from either the hub or a specific device. The hub will be able to send a task to a device in realtime to run immeaditely as well as schedule tasks on them. Action Hero will manage assigning tasks/jobs/schedules to devices and the hub. It will also track uptime of devices and itself into a database (not SQLite). I will probably use a TCP sokcet since I can track connections and disconnections.
The system will be modular. Rather than implementing things that I don't own (i.e. a Nest thermostat or another home automation product), I will allow NPM modules to be installed that will interact with the system. They can be installed to a device or hub. Something that controls something else on the network would probably be installed on the hub, but a module to control a garage door with switches and relays would go on a device.
The hub will also run like IFTTT. If a device reports "Garage door 1 open," then the hub can respond with actions/tasks on itself or other devices immediately based on set options.
I suppose #3 is the best route unless Action Hero can use SQLite as a cache system. I don't want to use the "fake" Redis server either because it will build up memory too. Raspberry Pis don't have much memory (mine will have 512mb).
I know this is a lot to read, but I want to get this right the first time. I have a lot ahead of me and I don't want to have to do anything over. Thank you for your help!
--
You received this message because you are subscribed to the Google Groups "actionHero.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to actionhero-j...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.