--
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 nod...@googlegroups.com
To unsubscribe from this group, send email to
--
--
There are long discussions in the Node community about what happened when we did try to use Isolates. The lack of thread level protections from things like mucking with process.*
and the fact that native modules need to add complex support for Isolates to be first class (many C level libraries deal poorly with Isolates due to them not being exactly like threads from what I understand) are fairly well discussed.
In addition things like C's abort(), and any shared memory still cause problems with Isolates.
It would be interesting to delve into these problems, but for example if you use rust the runtime has explicit knowledge of threads rather than v8 so you can reduce most of the problems with concurrency to message passing and the same problems as process.*
People who complain about threads generally do not have in depth knowledge of difficulties in doing so with Node's environment, but should feel free to look them up and discuss solutions rather than simply stating "it should have threads".
personally really like what Threads a Go Go does, but it still faces the difficulties listed above difficulties when you start to delve deep into it.
I've got some idea what Nuno is groaning about. :) Threads-a-go-go is a pretty daft silly thing.
It's certainly not the safe sane shared-nothing threading that keeps Node & JS safe. That
responsible multi-threading work was attempted in the 'isolates' branch of Node.js. I would
definitely not push the threads-a-go-go work upstream. :)
Jorge should just swallow the FUD, bend over and apologize for having proposed such a "daft silly thing" to the community!
So it is perfectly fine if someone writes:
"Threads-a-go-go is a pretty daft silly thing.
It's certainly not the safe sane shared-nothing threading that keeps Node & JS safe. That
responsible multi-threading work was attempted in the 'isolates' branch of Node.js"
BTW, the 'isolates' branch failed, probably because it was trying to do too much (put a complete node into every isolate). TAGG solves a much narrower problem: delegating CPU intensive operations to threads, and it does it in a safe and efficient way.
The problem is that we cannot even discuss anything related to threads in a rational way. There may be perfectly valid use cases for threads in node (I think that CPU intensive computations are one - you can do them in threads with C++, why not in JS?),
and there are perfectly safe and clean ways to add threads to node (and I think that TAGG is one - the "eval" situation can be improved with modules). But how can we discuss this without everyone jumping to the ceiling?
Bruno
--
--
Childish and amateurish were not my words in the first place, they were Crockford's. And, although there may have been a bit of provocation in my post, I think that the problem is real (otherwise, why would Crockford use these words?).
My expectation would have been that the topic be discussed at the technical, professional level between the different people involved. Did this ever happen? Did any member of the core team ever show any interest in what Jorge had produced?
There should be a way to discuss issues like threads without going into sarcasms and personal things.
This feature (being able to do CPU intensive stuff in JS) may not hit the sweet spot of node, which is I/O intensive apps. But it does not hurt node either; it enables something that was impossible (or much harder) to do before, and it does it with a design which is aligned with node's principles (computations being treated just like async operations). So why bash it?
These debates give me hives. Seriously, they make my skin crawl.
...
You know who almost never gets involved in these shenanigans? TJ
Holowaychuk, James Halliday, Matt Ranney, and the folks at Joyent and
LinkedIn and Voxer and Cloud9. Do you know why? Because they're too
busy getting things done
First of all, saying "I would fork node" is just an absurdly dated
thing to even say as if it's meaningful.
--
and is a huge annoyance and distraction for everyone who would like to move forward
This morning I had a chance to ask Doug, in person, to clarify what he meant by his statements about forking Node—as it turns out, his motivations aren't sinister, nor are they really outrageous.Historically, Yahoo forks technologies that it relies heavily on, eg. Unix and Apache. This allows them to iterate at their own pace and add features they want, when they want them and exclusively to meet their own internal or product based needs. As he explained to me, he simply meant that if he was asked to be the CEO of Yahoo, he would add Node to the technologies that Yahoo maintains its own fork of. Doug also noted that in this hypothetical scenario, the "YNode" code would be released as an open-source project (unlike forks of other technologies at Yahoo)Seems like way less of a big deal when you actually check sources... weird, right?
I hate TAGG because it's built around the lie that zero-copy data sharing would be at all possible. V8 just isn't built to do it, and making it so would be a monumental task. Google may be able to pull it off it they cared, but the core team can't. Jorge and Bruno don't even know where to look. Call me again when you own a billion dollar company. Or when you're reborn as a crazy Russian super hacker. Zero-copy Buffer/TypedArray sharing *may* be possible but copying binary data is even less likely (by at least an order of magniture I'd say) to be the bottleneck in your app than serialization.
In the meantime, ToString'ing a function and eval'ing it on another thread, are you kidding me? Heavy computation never takes more than a single function right?
Isolates was our (or rather, Ben and Ryan's) attempt to do whatever TAGG might achieve in a proper way, but in the end we figured out that it has no benefits over using child processes. Whatever TAGG does, you can trivially achieve the same with child processes. Ryan even wrote an example fibonacci server to demonstrate this. Obviously nobody cared because this is entirely irrelevant.
ultimately turned out to cause too much instability in node's internal functionality to justify continuing
Multi-threading, even without zero copy, would allow for faster context switching as well. Context switching is bad, process-per-thread is good and helps avoids context switching, but there is a gain even if there is not an easy zero copy benefit to be had.
Rick,
That's nice. I've been told that Yahoo does have an internal version
of Node that you can get via `yinst install ynode`, and they use it a
lot. They also pull in changes from the upstream project, and have
sent pull requests for bugs that they've fixed. None of that is
unusual or outrageous. For a company of Yahoo's size, it makes sense
to make sure that all relevant parts of their infrastructure are not
black-boxes, and they've done this in the past with many other
projects.
However, it IS a dated and wrongheaded approach, in my opinion. Yahoo
ought to do what Joyent, Cloud9, Nodejitsu, Microsoft, and others have
done, and hire a developer (or several) to work directly on the open
source libuv and node projects, in a visible way. Forking, renaming,
changing significantly, and then "giving back" is archaic in a day and
age when we can all work on the same thing together using modern tools
like git and github that make all of this completely visible. If
ynode is so great, and ought to be shared, then share it; and if it's
not, then why bother with a separate fork? Seems somewhat foolish.
But really, none of that is what I was confused about. So, he'd open
source ynode. Silly, but ok, whatever. But what's "amateurish" about
"Joyent's management of node", exactly? That's a bold claim. A
person of Douglas's stature in the JavaScript community ought not to
make such bombastic statements in a public presentation unless he's
prepared to point to some examples of amateurishness.
Imagine if I gave a talk at a conference, where I said that Mozilla's
management of the spidermonkey project was amateurish. Then, when
Brendan Eich (or whoever is the lead dev on the Spidermonkey project
at Mozilla, I don't actually know) emails me directly asking what he's
doing that is amateurish, and how I think it could be better, I do not
reply to him. I'd expect a lot of people to lose respect for me if I
did that, and I'm nowhere near Douglas's level of nerd-fame.
ps. In case it wasn't clear, the only part that I agree with is "threads have no place in JavaScript or Node".
I still am very much interested in technical discussion around this feature, know it abstractly but not deeply, and the cause of it being shelved remains shrouded in mystery.
I wasn't really addressing you—your comments were entirely reasonable. I was addressing the shit-talking dog-pile.
ps. In case it wasn't clear, the only part that I agree with is "threads have no place in JavaScript or Node".
Yes they do. I'm following this through the Google web UI. The two discussions are interleaved in a single list and I did not pay attention to the titles. Maybe Google does not like threads either :-)
I wasn't really addressing you—your comments were entirely reasonable. I was addressing the shit-talking dog-pile.I challenge you to find anything in this thread that directly shit-talks Node or Joyent. I *want* to believe this is fair and balanced discussion. Jorge got a little tweaked at one point, but still refrained from shit talking either.
ps. In case it wasn't clear, the only part that I agree with is "threads have no place in JavaScript or Node".Who is shit talking now? Why hate Rick?
There's a whole lot of over-reactionary fear to a topic some people don't like: as Isaac once insisted, "lighten up people"
> Isaac: I fully confess to being an ignorant childish distracting useless retrogressive drag on the community, and I'm sorry if this discussion in fact hurts us. Also, seek trained medical professional help.
These comments are trollish and inappropriate.
> > The problem is that this shit is decidedly *not fun* for anyone but you and Jorge and maybe a few others and is a huge annoyance and distraction for everyone who would like to move forward and have fun talking about robots and websockets. Your discussion makes this list a place for endless debates between camps that have no adoption and people having fun playing devils advocate and not a place for people to talk about real stuff they are building and problems they have.
> I humbly propose not participating in things which annoy you or you find overly distracting.
> I humbly propose not participating in things which annoy you or you find overly distracting.Mikeal was complaining about nothing except people discussing things, about feeling hurt for others talking. He deserves counter-meta-moderation, and there should be no problems with that. I unequivocally renounce any charge of trolling or inappropriateness on this front.
On Sep 19, 2012, at September 19, 20123:21 PM, rektide <rek...@voodoowarez.com> wrote:> I humbly propose not participating in things which annoy you or you find overly distracting.Mikeal was complaining about nothing except people discussing things, about feeling hurt for others talking. He deserves counter-meta-moderation, and there should be no problems with that. I unequivocally renounce any charge of trolling or inappropriateness on this front.I take issue with these discussions because they make the list a place for your favorite arguments and alienate people from asking real questions about problems they have using node.js. Of the last 100 messages to the list less than 10% are about real user problems.
You don't have to be trolling to be alienating and counterproductive, which is what i charge this conversation with.
You're also ignoring the main point Isaac has been trying to make this whole time: **that this is not how you engage with the node.js project if you want to get something in to core.**
Isaac has reiterated over and over again what you would need to do to make this productive and nobody has followed up. It appears that you prefer to have a discussion that will bear no fruit other than satisfying your own intellectual curiosity at the expense of others.
What gives Isaac hives is the endless conversations you engage in on this list without any intention of actually creating any of the change you advocate for or taking any measurable steps to do so. Sending emails to a mailing list is not how things get done in this project, if you aren't willing to accept than then you'll need to find a new project to email your ideas to.
Lighten up people
> No, Isaac. I feel pissed on here. Ack that.
Ack'ed.
Your original request for threads-in-node has been met with
explanations from me, Ben, and Paddybyers about what would need to be
done to make that happen, and what the challenges are.
There's
nothing else to discuss here.
cause[d] too much instability in node's internal functionality
You should treat this as an experiment: your goal could be to figure out why several people close to the Node project are so against a threading API,
ps. I'm really a nice guy, hopefully we can meet in person some day and we'll laugh about this.