For the benefit of keeping and updating all modules in one place. Imagine one node.js application running on a cluster of servers. Suppose you want to update it on every server. You can't just log on to all of them and run usual "mv node_modules node_modules_`date +%s` && npm install ." because some servers could be down (not mentioning that it's a waste of time). And things like "puppet" are too complex and require some scripting.
But you can have just one fileserver and update all modules right there. After that just restart all servers one by one (restart command could be issued with a database, no need to log in), and those down servers will magically use the new version when they'll start up. I hope there's no need for synchronous interfaces because harmony generators will do the job. I wonder if fs.*Sync methods will become obsolete when generators will be stable. So anyway, the idea makes sense. But I guess remote file systems are already doing this job just fine. -- // alex 12.06.2013, 04:37, "Isaac Schlueter" <[email protected]>: > Remote script execution is not worth the hazards it introduces. > > We could, in theory, provide some synchronous TCP/HTTP interfaces, but > it would be extremely difficult to do well, and very hazardous to ever > use in production. > > And for what? A feature that is a security vulnerability waiting to > happen? Introducing all the problems that browsers have with script > tags? > > No thanks. > > Fetch the file. Then run the program locally. It's not so much of a > restriction, really. > > On Tue, Jun 11, 2013 at 2:06 PM, Aria Stewart <[email protected]> wrote: > >> On June 11, 2013 at 4:59:50 PM, [email protected] ([email protected]) >> wrote: >> >> I'm reading JavaScript on the Server Using Node.js and Express. Having just >> read the chapter on modules, it seems overly restrictive to make require() >> refer only to files. It seems to me that a hosted module server could be >> really useful in some applications. Would this be a node.js issue or >> confined to JavaScript? >> >> That's a node.js issue -- but it's one that's not easy to solve without >> making the simple cases harder. Remote modules implies asynchronous loading, >> which doesn't play nicely with the elegance of require. >> >> It's so often better to separate data from code, and while data is loaded >> asynchronously, let code be synchronous. Then you can handle the remote >> loading case by downloading first (and automating this), then executing. >> ---- >> >> Aria Stewart >> >> -- >> -- >> Job Board: http://jobs.nodejs.org/ >> Posting guidelines: >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >> You received this message because you are subscribed to the Google >> Groups "nodejs" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/nodejs?hl=en?hl=en >> >> --- >> You received this message because you are subscribed to the Google Groups >> "nodejs" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. > > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
