Real async file IO on Linux?
Avinash Lakshman
avinash.lakshman at gmail.com
Mon Aug 1 08:10:44 PDT 2011
Is this the same for AIO network I/O or is it truly asynchronous?
Avinash
On Thu, Jul 28, 2011 at 7:09 PM, Dane Foster <studdugie at gmail.com> wrote:
> I don't have a pressing need for async IO at the moment but it's one of the
> many new features of Java that I have plans to exploit in the future. If the
> nio-dev community doesn't get around to it before I need it I'll be happy to
> contribute code. So thank you very much for pointing out exactly where I
> need to begin, in the event that I actually end up needing to hack on this.
>
> Dane Foster
> CTO & Chief Architect
> Reservation Systems Online, LLC.
>
>
> On Thu, Jul 28, 2011 at 2:38 PM, Alan Bateman <Alan.Bateman at oracle.com>wrote:
>
>> **
>> Dane Foster wrote:
>>
>> Alan,
>>
>> I completely & totally agree w/ Tim. I would love to see true non
>> buffered async IO support instead of the emulation of async IO. The current
>> implementation reminds me of green threads from way back when, in that they
>> never actually addressed the issue of fully utilizing a SMP (or in today's
>> terminology, multi-core) system, it just gave the programmer the illusion
>> that it did (w/ the added cost of being slow and inefficient), in the same
>> way that the current async IO implementation is an illusion of true async
>> IO. I never said anything before because I had assumed that the emulation
>> mechanism was a fallback mechanism for when async IO support was not
>> available on a platform. I did not realize, until this thread started, that
>> platform async IO support meant the buffered case to you.
>>
>> As I said, there's nothing here to preclude supporting non-buffered I/O
>> and patches are always welcome on nio-dev. The place to plug this in is in
>> UnixChannelFactory.newAsynchronousFileChannel which can select the
>> implementation to use based on the open options. In the Windows case then it
>> already selects an implementation based on the Windows asynchronous I/O API.
>> As per prior discussions on the nio-* lists then there isn't any guarantee
>> on the alignment of direct buffers and in addition information to allow
>> applications size and get appropriately aligned file offsets would need to
>> be considered. Nothing particularly hard to implement but clearly something
>> for advanced developers.
>>
>> -Alan.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-discuss/attachments/20110801/4793c06e/attachment.html
More information about the nio-discuss
mailing list