← concepts · the commons
non-blocking I/O
6 moment(s) that assert this concept — showing 1–6 of 6
single sourceRests on a single channel — treat as a lead, verify independently
↣ how this spread over time →Google TechTalks · youtube · en
1To achieve high-performance servers, I/O multiplexers like epoll or kqueue are used with non-blocking I/O calls.
“You use some I/O multiplexer like epoll or kqueue. You do non-blocking I/O calls. You don't share memory too much between your TCP connections and then you spawn a bunch of threads and you probably do some sort of pre-forking sort of thing so that you can accept connections on each of these threads.”
spoken · 272s · 2010-07-29
Google TechTalks · youtube · en
2Non-blocking I/O and event loops provide a way to handle high concurrency with minimal overhead and simpler reasoning compared to traditional threading.
“I like this concept because when you get notified that a file descriptor is readable and then you read some data from it and you execute some call back”
spoken · 594s · 2010-07-29
Google TechTalks · youtube · en
3The event loop and non-blocking I/O model allows handling up to 10,000 to 30,000 TCP connections or Unix sockets in a single OS thread without needing multiple core concurrency.
“basically, the first 10,000, 20,000, 30,000 TCP connections or Unix sockets or whatever”
spoken · 659s · 2010-07-29
Google TechTalks · youtube · en
4Non-blocking I/O requires careful programming to handle asynchronous operations, such as waiting for data to arrive on a socket or database results.
“Everything has to be somehow non-blocking”
spoken · 780s · 2010-07-29
Google TechTalks · youtube · en
5Interfacing with MySQL in a non-blocking model is difficult if no real non-blocking client library is available.
“you're writing something that needs to interface with MySQL, you probably aren't willing to rewrite with MySQL client”
spoken · 823s · 2010-07-29
Google TechTalks · youtube · en
6Browser JavaScript uses a single-threaded interface with non-blocking I/O, making it suitable for event-driven programming.
“browser JavaScript, importantly, is a single threaded interface, it has non-blocking I/O”
spoken · 921s · 2010-07-29