Re: [nodejs] Some questions on Node's threading and scaling.

2014-12-10 Thread Aria Stewart
> On 11 Dec 2014, at 00:36, Harry Simons wrote: > > Afterthought: It will be nice if Node can support a distributed lock service > out of the box thereby making its cluster feature "more complete". Meaning, > if I can spawn, fork etc from within Node, then I should also be able to > coordinat

Re: [nodejs] Some questions on Node's threading and scaling.

2014-12-10 Thread Harry Simons
On Saturday, December 6, 2014 9:30:24 PM UTC+5:30, Aria Stewart wrote: > > > > On 6 Dec 2014, at 03:03, Harry Simons > > wrote: > > > > 2. To use multi-cores, I can have multiple Node processes, sure. But how > do I serialize/synchronize these processes when doing a set of (non-atomic) > ope

Re: [nodejs] Re: Any way to capture errors from vm.runInNewContext?

2014-12-10 Thread Jeremy Darling
Hadn't thought of wrapping the code in a domain, thanks for the idea. Will give that a try and see if it gets me closer. Trying to catch typos on a remote SSH client instead of just getting a generic Hapi error back. On Wed, Dec 10, 2014 at 9:49 PM, Andrey wrote: > no. You are only creating co

Re: [nodejs] Cluster question

2014-12-10 Thread Ω Alisson
Interesting Sam, but what if I set a flag that is checked every process.nextTick and suspends redis updates, so what's left is finishing iterating over in-memory items? On Wed, Dec 10, 2014 at 8:47 PM, Sam Roberts wrote: > >> On Monday, December 8, 2014 at 3:47 PM, Ω Alisson wrote: > >> > >> I'm

[nodejs] Re: Any way to capture errors from vm.runInNewContext?

2014-12-10 Thread Andrey
no. You are only creating context, not full sandboxed JS environment. The code is called from the same event loop and functions you have in your context are same regular functions as in the rest of the code. All possible solutions are same as for "how do I handle async errors" question. Use domai

[nodejs] Any way to capture errors from vm.runInNewContext?

2014-12-10 Thread Jeremy Darling
Is there any way to actually capture exceptions from code running vm.runInNewContext or vm.runInContext, etc...? Seems there should be an on('error') or something callback but can't find it. Wrapping the call in try/catch does't capture anything that is within an async call within the script bein

Re: [nodejs] Windows Forever Cluster Issue

2014-12-10 Thread Sam Roberts
On Tue, Dec 9, 2014 at 9:49 AM, karim elsafy wrote: > Dears, > I have an issue when I call forever module in windows, it works fine > except that my code is calling Cluster module , and I do "Cluster.fork()", > the problem is that I got 2 empty consoles opened! like the image shows(2 > because I

Re: [nodejs] Cluster question

2014-12-10 Thread Sam Roberts
>> On Monday, December 8, 2014 at 3:47 PM, Ω Alisson wrote: >> >> I'm running a Node app that fetches Redis data into another database. It´s >> using the cluster module, everything works fine but I need to ensure that >> workers will finish properly their jobs(they use BRPOP then allocate into a >>

Re: [nodejs] node.js and io.js reconciliation

2014-12-10 Thread Forrest Norvell
On Wed, Dec 10, 2014 at 12:27 AM, Ryan Schmidt wrote: > > On Dec 9, 2014, at 1:09 PM, Matt wrote: > > > I highly recommend you subscribe to nodeweekly - it's a weekly roundup > of node news where you'll at least get to hear about this stuff. > > > > http://nodeweekly.com/ > > Done. I'll point out

Re: [nodejs] node.js and io.js reconciliation

2014-12-10 Thread Ryan Schmidt
On Dec 9, 2014, at 1:09 PM, Matt wrote: > I highly recommend you subscribe to nodeweekly - it's a weekly roundup of > node news where you'll at least get to hear about this stuff. > > http://nodeweekly.com/ Done. I'll point out that this, too, is a resource that has never been mentioned here