

A Very Simple Network Connection with Node.js - xhrpost
http://www.io2g.com/2013/12/a-very-simple-network-connection-with.html

======
mtdewcmu
>> I'm not a TCP expert, but apparently the closing initiator (the client in
our case) should wait for acknowledgement from the other side of the
connection before dying off, see Wikipedia link above. So, I set
process.exit() to run as a callback on the close event of the client object.

This highlights one of the problems with node. You can be doing the simplest
thing and find yourself needing to deal with low-level details of TCP to make
it work properly. Now that node has shown what's possible, I think there's an
opportunity to do it better with fewer pain points.

~~~
xhrpost
I'm not a C expert either but a lot of the system modules in Node appear to be
simple JavaScript wrappers over their C counter-parts. I'm not sure if this is
necessarily a problem but rather the developers just didn't aim for a higher
level of abstraction. I think they aimed for OS abstraction and stopped there
for some of the modules.

~~~
mtdewcmu
I definitely got the feeling from toying with node that you're working at a
very low level, basically interfacing with system calls. There's not
necessarily anything wrong with that, but you have to understand that in order
to know what you're doing. It's a curious experience to be using javascript on
the one hand, and be doing extremely low-level systems programming on the
other. It would be useful to have better documentation on exactly what those
node functions do when you call them.

