The Backend Engineering Show with Hussein Nasser cover image

When NodeJS I/O Blocks | The Backend Engineering Show

The Backend Engineering Show with Hussein Nasser

00:00

Asynchronous IO - Part One - File IO

Select poll and E-pol are based on the idea of eventing. Here are a bunch of file descriptors. Tell me whenever any of them are ready for me to read. If select returns ready, we know that reads will not block us. Else if select return not ready, our app can move on to do something else. We could have modified the read function to know up when there isn't anything in the file descriptor instead of blocking. My guess is this would have created bad pattern where the app makes a lot of unnecessary calls to the OS which will hinder performance eventually. I could argue the read calls blocks on purpose because of this particular reason. This is a suppose of the

Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner