On Tuesday, November 10, 2015 at 9:31:52 PM UTC-8, Aria Stewart wrote:
>
>
> > On Nov 10, 2015, at 6:51 PM, Sean Wolfe <[email protected] 
> <javascript:>> wrote: 
> > 
> > I'm new to node, getting used to the ecosystem. One thing I've noticed 
> is that when I save changes to files, the server restarts, which takes 7-15 
> seconds each cycle. 
>
> That restarting behavior is not inherent -- that's something the server or 
> build system you're using chose. 
>
> > 
> > What sort of hotswap / hotplugging options are out there? I see 
> > 
> > https://www.npmjs.com/package/hotswap 
> > 
> > which I'm working with but haven't got working yet. Also that repo is a 
> couple years since the last commit. 
>
>
> the problem is that references to old versions can still be loaded -- it 
> will behave differently, in theory, than freshly loaded. Not a problem in 
> some cases, definitely a source of mysterious bugs in others. Any tool like 
> this is going to be very focused on particular cases, or ignoring edge 
> cases entirely. There's no general solution for how hot swapping should be 
> done. 
>
> > 
> > Is hotplugging code, ie. reloading individual changed files without 
> restarting, popular for node? Are there other npm's that I'm not finding? 
> Why isn't this supported out of the box? Also, is 7-15 seconds a long time 
> for a nodejs server? I'm guessing yes ... 
>
> Indeed: My approach has been to build smaller servers that do less (and 
> less at startup), and if possible with well defined single purposes. 
>
> npm's website starts in about 2 seconds for me, I want to get that time 
> down to 250ms at some point. That's my personal approach right now. 
>
> Aria


Very informative Aria, thanks.  

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/0053e5d3-2850-4cb8-893a-3e0eb3ccd855%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to