I've got some heavy lifting to do and I don't want it to affect overall responsiveness. Trying to wrap my head around how everything is executed. My understanding of Node.js is that there's a single thread for the event loop and it has worker threads to execute I/O calls. So I take it that Node-RED is essentially running one node at a time, and file I/O etc. goes to those worker threads. Along those lines, some questions:
Is the exec node blocking? Better question, if I call something that's going to take several seconds, will it hold up everything else? Looks like I could do an async call to child_process.exec from within a function block instead: https://nodejs.org/dist/latest-v10.x/docs/api/child_process.html#child_process_child_process_exec_command_options_callback
What's the best way to offload work in general? Async/await? Create my own worker thread? Also seeing some 3rd party nodes: node-red-contrib-mp-function, node-red-contrib-async, etc.
Specifically, I need to zip up a large file, and also to execute numerical methods, both of which may take long enough to hold things up. TIA