I think we agree on most of these points.  I agree that I need to create a 
domain per request - I wasn't suggesting an alternative to that.  I also 
agree that domains seem to be attempting to recreate synchronous call-stack 
exception handling.  Finally, I agree that domains are (must be?) a 
superior solution to an external module for the reasons you mention.


My question boils down to this:


Suppose node were changed to remove the feature that lets domains track 
EventEmitters.  So domain.add(), .remove() and .members would all be 
removed.  The code that automatically adds new EventEmitters to the active 
domain (if there is one) would also be deleted.  Finally, suppose .bind() 
and .intercept() were also removed.

That would just leave domain.run() - plus the ability to create new domains 
and possibly nest them.

Would that be enough to effectively recreate synchronous stack-based 
exception handling?


My answer would be yes - and in fact it would remove my connection-pool 
problem altogether without any need for the 3rd-party module authors to 
change anything.

To put it another way; in what real-world circumstances would you need the 
features I just removed?

Please understand I ask this as a bit of a node noob ;)  It's not a 
criticism of domains - I would like someone to explain why I'm wrong about 
this.

-- 
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

Reply via email to