RxJava2 Schedulers #2: Breaking down the I/O Scheduler.
The I/O scheduler is perhaps one of the most popular RxJava schedulers. This could be attributed to its well-defined purpose, I/O. For any developer seeking to make a “great” app that interacts with the rest of the world, I/O is a must. Be it reading from a database, network request to even using your camera or microphone. I/O is pretty much inescapable! and as you will come to find out, can be a bit complex and not as clear cut as computation. The I/O Scheduler provides a platform to ensure you as a developer are utilizing threads to handle I/O in the most efficient way possible.
This article will address the following:
- I/O bound work
- How Operating Systems treats I/O (quite interesting if you’re not aware)
- The I/O Scheduler
- How the I/O Scheduler addresses issues posed by I/O.
Wow that’s a lot of I/O. Let’s jump in!
Note: For a short intro on Schedulers, checkout my previous article where I try to clear the air on the computation scheduler. A lot of the concepts discussed in this article either mirror or contrast those of the computation scheduler, so it may be helpful to check it out first.