10
Introduction to Async IO
In the previous chapters, we have been interacting with the network devices directly via API or other Python libraries that abstracted us from low-level interactions with a remote device. When we need to interact with multiple devices, we use loops to allow us to pragmatically execute commands. One issue that we might start to see is that the end-to-end process begins to slow down when we need to interact with many devices. The bottleneck is usually the time spent waiting between the time we send the command until we receive the proper response from the remote device. If we need to spend 5 seconds of wait time per operation, we could wait for a few minutes when we need to operate on 30 devices.
This is partially ...
Get Mastering Python Networking - Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.