I don’t know the Scala API’s well enough to comment on your proposal, but here are some things I thought you should see.
Here are a few things I would consider adding;
#1) I have also seen file system IO run machines out of TCP/IP sockets due to open files etc;
To prevent errors like this, I am adding a concept of a IOContext/Factory to make sure my API is pooled (also NOT related to Blocking vs NonBlocking IO).
This IOContext/Factory might be something to consider in your Scala IO API suggestion. I could be made optional, for cases when you know there’s another pool preventing over usage (i.e. JDBC pool, Servlet Container (Fibers) Thread Pool, etc).
#2) A second problem I have encountered is that the Writers and Readers in Java often hide the IOStreams which creates problems when you want to co-mingle binary data and character data. For example, let’s say you want to send 7 bytes (using your own encoding scheme) and then some UTF-8 and then even more bytes (using another encoding scheme for video), etc. Just something to think about supporting. I think you already are supporting this, since you seem to expose the IOStreams. However, I haven’t spent enough time looking at your proposal to be sure.