On Apr 10, 6:09 am, Jorge <[email protected]> wrote: > On Apr 9, 2012, at 11:51 PM, Joe Ferner wrote: > > > Many streamline like APIs use node-fibers > > <https://github.com/laverdet/node-fibers> under the covers and fibers > > requires isolates which is now deprecated and is going to be removed if it > > hasn't already. > > Isolates are *not* a feature of node, Isolates are a part of v8 and aren't > deprecated nor going to be removed. >
That is true, I stand corrected. I also assumed, incorrectly, that streamline was using fibers exclusively since it showed up in the fibers wiki and I couldn't find the source on github because there wasn't a link in npm. After glancing at the code it looks to be overriding the require statement and modifying the Javascript. > > I also think that the way it works under the covers also incurs performance > > impacts because it ends up implementing threading which is slow. > > That's funny because every process in your machine *is* a thread (at least > one thread), and nearly 100% of them have more than a thread, e.g. FYI a node > process normally uses 3 (and up to 5) threads itself. Right now in my Mac as > I write this, there are 64 processes and 270 threads running, simply because > threads are the essential building block to achieve concurrency and > parallelism: > One of node's fundamental is not to have many threads which avoids thread switching, locks, etc. Sure node has 3 threads but that is very small compared to say a Java server or a Ruby server which could have 100s. I should have said thread "like" because it is doing a type of threading (coroutines) as your code gets called it is swapping out the execution stack from a previously saved state which does have performance implications. > PastedGraphic-2.png > 41KViewDownload > > > > > If > > you like non-callback APIs I just wouldn't use node if I were you. > > And you'd only be fine until the program grows, then you'd begin to have > difficulties in understanding/following your own program's logic. > > > I like using the async library when things get complicated. > > Right, the hello world http server in nodejs.org front page doesn't need it. My main point is that if you don't like callbacks then node might not be the language for you. Adding layers just slows the performance and defeats some of the benefits to using node. You would have probably been better off just writing your app in Ruby, Java, or Dart for that matter. I would love to see real world benchmarks to prove me wrong because the idea of not having many nestings of callbacks would be nice. > -- > Jorge. -- 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
