directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <>
Subject Re: OT: Psuedo Async File IO
Date Mon, 11 Apr 2005 13:25:33 GMT
Richard Wallace wrote:
> It's a definitely possibility.  I'll probably wind up still creating 
> some kind of simple wrapper framework so there can be a 
> pseudo-non-blocking implementation for platforms not supported by Matts 
> Java NBIO package (since it uses JNI).  Then you can easily switch your 
> implementation over to the Java non-blocking file IO whenever they get 
> around to adding it in Java 1.6 or 1.7 or 1.8 or whenever.
> Rich

FYI, Matt Welsh's NBIO is close to the same thing as Java NIO.  There is 
still no direct support for asynchronous File IO in that system.

The way the SEDA team worked around this issue is by using a 
RandomAccessFile, and by having a dedicated queue that would process 
messages placed into the queue.  The stage processing the messages would 
then perform the actions within its thread, and then send along any 
messages as a result from the actions.

Essentially if you want async file IO in the current Java runtimes, you 
have to farm your file access out to a separate thread.  Keep in mind 
that the separate thread doesn't have to be strictly set aside for file 
IO, it can be used for any async command that runs in the background.

View raw message