I completely share the opinion of billywhizz. I found myself more than one time in the position that i had to recompile node with my personal changes because some low level stuff was hidden. Of course each update broke my code. I think especially file descriptors are an essential part of unix and they also work wonders when keeping users constantly logged on as they serve as a natural unique id. It would be perfect to do stuff like ConnectionClients[socket.__fd] = socket; for example ... as the kernel already watches for uniqueness..
On Thursday, January 26, 2012 4:46:57 PM UTC+1, billywhizz wrote: > > A fair point, but it could still be exposed and not be a documented > feature. personally, i like to do a lot of work with the c++ bindings > directly and i don't expect this ever to be supported officially but > it's very frustrating when i can't do things like get at the file > descriptor for a socket or set socket options without hacking on the c+ > + source myself. > > from my own experience with .net over the years it has always been > frustrating that too much of the OS details have been hidden away by > layers and layers of wrappers which makes certain things impossible. > i'd hate to see node.js do the same thing. imho i think it will only > mean more work for the core developers down the line instead of allow > third party developers better control over the platform. > > on another note - i have experienced major memory leaks when using > async sendfile with the fd for a socket. when i use the sync version > of sendfile, there are no leaks. have you seen anything like this > yourself? i'll see if i can dig into the c++ to see what might be > causing it... > > On Jan 26, 2:59 pm, Ben Noordhuis <[email protected]> wrote: > > On Thu, Jan 26, 2012 at 15:51, billywhizz <[email protected]> wrote: > > > it's not a hack on linux - it's how things work. i can see how it > > > feels like a hack on windows as it doesn't mean anything there. i > > > can't really understand why you are so uncomfortable exposing the low > > > level features so people can hack on them. for me, that's a major > > > selling point of node.js itself... > > > > Simple. Every implementation detail that is exposed makes it harder to > > change things later on. The 0.4 to 0.6 transition was quite painful, I > > don't want something like that to happen again.
