I've never been interested in hot code-swapping; I find it's sufficient to just take that resource out of the pool, give it the new goodies and then boot it up again. I know the Erlang runtime can do this, but I've yet to find a good use case.
As far as std{err,out} redirection, does Node.js have no Unicorn equivalent?
Daemonization (and respawning) should be handled by a process supervisor, like supervisord/Upstart/Monit or whatever. They can do more than just 'this process died, restart it.'
Also, most of this logging code didn't need to be written:
I apologize - "hot code swapping" may be a misnomer. Naught does the process that you describe about taking the resource out of the pool, giving it the new goodies, and booting it up again.
The native cluster API is the Unicorn equivalent in the node.js world. Naught is essentially unicorn for node. And naught is the equivalent of a process supervisor.
Fair point about logrotate. Here's a counter one: The server that you describe requires 4 moving parts: 1. the app code, 2. the unicorn equivalent, 3. a process supervisor, 4. logrotate in a cron job. An app deployed with naught requires 2: 1. the app code, 2. naught.
That's legit process supervision. Your process may still be running, but be wedged somehow. Monit can perform remediation based on signals other than process status. Naught can't (and shouldn't) do this.
The server that you describe requires 4 moving parts:
True, but our servers are running all of this anyway; you should use the best tool for the job. Instead of rewriting a fraction of logrotate, you should read `man 8 logrotate` and move on to writing code that will help your business. When you deploy an app written using another runtime, are you going to rewrite 10% of logrotate in that language too?
As far as std{err,out} redirection, does Node.js have no Unicorn equivalent?
Daemonization (and respawning) should be handled by a process supervisor, like supervisord/Upstart/Monit or whatever. They can do more than just 'this process died, restart it.'
Also, most of this logging code didn't need to be written:
https://github.com/indabamusic/naught/blob/master/src/log.co
Just use logrotate.