On 03/14/2013 11:02 PM, Mikeal Rogers wrote:
> That's a great "oppertunity?" but it's not in line with the
> structure and goals of node.js.
>
> Node has synchronous file operations. The reason it has sync file 
> operations is that there are many cases where you actually **want**
> to stop the entire server until you get back data from the
> filesystem because you can't server **any** requests until it's
> come back. In this case, not only is a sync file operation
> required, it's actually more efficient than using an async
> operation (at least in node.js).

Is there really such a real-world use case? Example? Even with
configs, you just pull up the server after you've read the files.

> Sockets and sub processes are only non-blocking in node. That is
> by design and that design decision was a choice. Doing it another
> way based on an opinion about what you want something to *look
> like* is not recommended and will eventually cause you a lot of
> pain. If you want things to look like that it would be best not do
> use node.js, because core and the entire ecosystem are built on
> doing things the others way.
> 
> -Mikeal
> 
> On Mar 14, 2013, at 1:53PM, Sebi <[email protected] 
> <mailto:[email protected]>> wrote:
> 
>> Okay, but I think there should be an "execSync" like they do it
>> in almost every other module. My oppertunity is, that every
>> developer should have the ability to choose if he goes the async
>> or syncronously way.
>> 
>> Regards, Seb
>> 
>> Am Donnerstag, 14. März 2013 21:40:08 UTC+1 schrieb Scott
>> González:
>> 
>> There are tons of modules to help with asynchronous code.
>> https://npmjs.org/package/async <https://npmjs.org/package/async>
>> is pretty popular. If you end up in callback hell, you're
>> probably not designing your code properly. Take some time to look
>> at various modules and find one with a style that you like.
>> 
>> 
>> On Thu, Mar 14, 2013 at 4:32 PM, Sebi
>> <[email protected] <javascript:>> wrote:
>> 
>> Many functions in NodeJS have a Sync pendant to the non-blocking
>> functions. Why is there no blocking pendant in the child_process
>> module?
>> 
>> I've giving up as I tried to iterate over a directory and call 
>> for every file child.exec....
>> 
>> how should my app now, that every process completed his task? I'm
>> going to run in trouble, because to use a timer to check that
>> seems to be not a powerful resolution.
>> 
>> Think there should be a sync pendant in the core child
>> module....
>> 
>> Sometimes you're going to the "callback" hell...
>> 
>> -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: 
>> https://github.com/joyent/node/wiki/Mailing-List-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] <javascript:> To unsubscribe from this
>> group, send email to [email protected] <javascript:> 
>> For more options, visit this group at 
>> http://groups.google.com/group/nodejs?hl=en?hl=en 
>> <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] <javascript:>. For more options,
>> visit https://groups.google.com/groups/opt_out 
>> <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] <mailto:[email protected]> To
>> unsubscribe from this group, send email to 
>> [email protected] 
>> <mailto:[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] 
>> <mailto:[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.


Reply via email to