4 ms·
Wouldn't going so low-level be a bit counter-productive at this point in his learning process? I would think that playing with existing async systems like Node,
by aarongough 16y ago
Wouldn't going so low-level be a bit counter-productive at this point in his learning process? I would think that playing with existing async systems like Node, EventMachine and Twisted would be more productive in the short-term and give him a base on which to build deeper knowledge...
- mcantor 16y agoIt's not that it would be counterproductive; it's simply impenetrable. I read libev's awful homepage and perused the epoll manpage, but they don't mean anything to me--I don't have enough context for them to sink in. (Also... and I say this understanding that I am a man filled with ignorance and hubris... how relevant can libev really be, if its canonical source repo is still maintained with cvs?) But, manpages are rarely where one goes to begin learning about something... on the very first section, I am already inundated with things that mean nothing to me: what are "edge-triggered" and "level-triggered?" What does it mean to "watch" a file descriptor? I know just enough about GNU/Linux I/O to be dangerous, so I can start to build an inkling of understanding based on this information: "watching" a file descriptor is probably how we register event listeners, and "edge vs. level" is most likely a decision about when handlers receive their data. But that's about as far as I can get before I have to start descending into the terms I don't completely understand. When I find something that explains those, it will probably rely on a bunch of other terms that I must descend into, and so forth. By the time I finally recurse all the way back up to my original quest for knowledge ("What does event-driven mean?"), I will be so inundated with new information that nothing sticks! Thanks for the suggestion about Twisted, EM and Node.js... I'll have to make some time to play with them soon.
- aarongough 16y agoExactly... That is why I recommend sticking to high-level libraries and tackling a simple real-world problem to start off. Even just playing with writing some meaningful client-side JavaScript will be enough to give you more of a 'feel' for event-driven programming... It's not going to give you a huge amount of knowledge straight out but it will definitely give you enough to get you started if you decide to go further.
- jimmyjazz14 16y agoI don't believe so, unless you know exactly what asynchronous IO is and why you might need to use it then it might just seem like a more complicated method of programming. The "why" of asynchronous IO is very well explained by the C10K problem <http://www.kegel.com/c10k.html> http://www.kegel.com/c10k.html>.
- mcantor 16y agoThat link may be exactly what I need. Thank you!