On Mar 19, 2006, at 11:05, Nicholas Clark wrote:

Is the choice of implementation actually visible to a user of the API?
If "yes", where, and can we avoid it?

No.

At which point we have flexibility in
how things are actually implemented.

Yes.

I can see that emulating asynchronous ops with synchronous ops and POSIX threads is portable, whereas a platform specific AIO implementation with synchronous ops implemented atop it is likely to offer higher performance.

The I/O layers implementation allows us to have multiple different combinations. We could have sync ops + threads for one version, sync ops on top of system AIO ops for another, sync ops as system sync ops + async ops as system AIO ops for another. (My guess is that using the system sync ops for the synchronous versions will actually get better performance than wrapping synchronous versions around system AIO ops. Though, of course, the biggest hit in any I/O implementation is the I/O itself.)

If the API is strong enough, would it let us just write the first
implementation, and allow people to write platform specific optimisations
later?

Yes.

I would probably start with a sync + threads implementation, and a layer for Linux that uses the system AIO ops for the async ops (leaving the sync ops unchanged). That would give us portability and a proof-of-concept on customization.

Allison

Reply via email to