## Asynchronous Programming in Rust!
Just wrapped up Chapter 4 of Asynchronous Programming in Rust on building your own event queue, and I have to say β it was a game-changer for my understanding of systems programming. Hereβs a quick breakdown of what I learned:
- **π Understanding mio's architecture:**
Understanding how mio is designed has given me the confidence to explore its repository. Now, navigating the codebase feels much less intimidating, and I know exactly what to look for.
- **π Making Syscalls on Linux:**
I explored Linux system calls at a deeper level, going through the man-page references as much as possible, building my own event queue using epoll. I created an epoll instance, registered events, and handled those events β an eye-opening experience on how epoll is designed and how its API works.
- **βοΈ Edge vs Level Triggering:**
Learning about edge-triggering and level-triggering was another key takeaway. These are low-level concepts, but their usefulness extends beyond just epoll, and having a grasp on them is incredibly valuable.
- **π Raw HTTP Requests & Non-blocking Sockets:**
I built a raw HTTP request and got firsthand experience with non-blocking sockets. One of the most interesting parts was seeing how error codes reported by the OS signal specific conditions that the developer needs to handle, and also read bytes from TcpStreams but ensure to return the read bytes even if the stream was interrupted by the OS.
- **π‘ Not All I/O is Blocking:**
Finally, I learned that not all I/O is equally "blocking." DNS resolution and file I/O behave differently, which is crucial to understand when working with asynchronous operations.
Feeling empowered to apply these insights as I continue my journey with Rust and systems programming! π»β‘
#RustLang #AsynchronousProgramming #SystemsProgramming #Linux #LearningJourney #CodingLife