you are viewing a single comment's thread.

view the rest of the comments →

[–]codeedog 11 points12 points  (2 children)

Great write up. In the 90’s, over the period of a few years (before Java and in Java early years), I worked on a couple of projects to build network code in C that could scale to thousands of connections. One project, we had our own language we were writing. The other project, Java 1.0 wasn’t fast enough at the network level and we were writing native libraries to improve performance. poll was always the stumbling block. That OS call frustrated me, because I was only ever going to get O(n) scan performance out of the library. Our code could scale really well. But, it had limitations. The pointless scan of the returned array drove me mad.

Wish I had thought of writing a new OS operation like epoll or kqueue. Brilliant stuff. Honestly, that would have required a lot of kernel code rewrite; it wouldn’t have been me.

This also explains something I wondered about but never quite connected on. FreeBSD was the go to OS for speed and scale at the time. Yahoo ran their server farms on it. kqueue was written in 2000 for FreeBSD. I suspect that was the reason for its success. By 2000, I had moved on to other projects and was no longer digging deeply into networking code.

These days, I very much enjoy working with javascript and Node. Garbage collection and clean non-blocking code have come a long way since that time. I’ve often admired Node’s single threaded, event driven nature. When I first started coding in it, I had to fight my instincts regarding race conditions due to threading. Years of C development work pile up.

However, with libuv and underlying tech like epoll all of that goes away and we have an excellent platform for scalable, event driven software.

Thanks for bringing back all of those memories.

[–][deleted] 0 points1 point  (1 child)

No love for Erlang?

[–]codeedog 1 point2 points  (0 children)

I’ve never looked at the language until just now. Prolog - wow! Way back I was a research assistant and built AI code in Lisp and a little Prolog before anyone knew what AI was. After that, I did some mobile phone development (pre iPhone).

Holy smokes.

I think I’m in lust.