> > Something I've found useful, just in the error handling, umm, domain, when > processing a set of work that will result in asynchronous callbacks (e.g. > web service calls) is to
1. Save off the current domain, which is the one associated with some HTTP request. 2. Create a new domain 3. Do all the work under the control of the domain created in 2, which will process any errors 4. When all the work is done, process the resulting data (including any errors) under the control of the domain saved in step 1. Being able to use process.domain in step 1 is crucial.