MINA devs, Would you be receptive to the idea of supporting a message-less (or bare-metal, if you like) I/O mode? Essentially, I would like MINA 3.0 to make it possible to interact directly with the underlying I/O channels bypassing the read / write data queues altogether. In other words, whenever a channel signals read / write readiness, the I/O selector thread would fire an event referring to the originating channel. The decision as to how much data can be read from or written to the channel would be left up to the I/O handler.
I am perfectly aware of downsides of this approach, which are several, but it would enable data intensive protocols such as HTTP and SMTP to manage connection memory footprint more conservatively. For instance, the protocol handler could attempt to preallocate a fixed and invariable amount memory at the connection initialization time and either succeed or fail early instead of risking the out of memory condition half way through a transaction due to the memory flooding. I understand this might be too much of a radical shift from the existing architecture, so feel free to ignore me if you find this approach incompatible with the MINA 3.0 design concepts. Oleg
