2 comments

  • austin-cheney 38 minutes ago

    My best advise on this comes in two parts:

    1. Go low level, as low as your language or runtime allows.

    2. Keep things simple, where simple means few not easy.

    As a Node.js developer low level to me are net sockets, streams, and the file system. Yes there is more, but those 3 things will get you 95% of what you need. You really need to understand that when it comes to systems programming most of what you need is in the OS kernel and you do not have direct access to any of it, but it is available to you in some form via run time API. For example TCP, UDP, TLS, and more are all in the kernel. What you eventually see are payloads riding upon those protocols with their header information stripped.

    In the case of Node.js if you learn streams and pipes you can eventually figure out everything else out. A server is just an event listener on a port, IPC, or named pipe and all communications are data fragments on sockets and sockets are duplex streams. File system access is also comprised of streams and streams can share data access via pipes.

    After that its just a matter of solving for practical problems one step at a time as they come up. This is how I wrote my own HTTP and WebSocket libraries. Node ships with an excellent HTTP library, but mine is lower level so I can do other things with it. My WebSocket library can now push messages at 5,000,000 per second on a single socket including roundtrip responses. You just take it one step at a time. You find lots of challenges and break a lot of things along the way, but only because you will find new edge scenarios later that you were not currently aware of.

      sampsn 20 minutes ago

      i appreciate the write up and the insight, i will apply it, thanks!