Closed penberg closed 2 days ago
Hey @penberg, I've just read the paper on the architecture of limbo and I want to contribute to it. Do you mind expanding on the goal of this issue?
Hey @aneessh18! The idea is to hack core/io/darwin.rs
to use something like https://crates.io/crates/kqueue to submit I/O asynchronously instead of using the synchronous File::read_exact()
API.
@penberg So I've looked into the APIs offered by the kqueue lib and it seems like a library to monitor the events pertaining to a file. I wasn't able to find how to leverage kqueue to read a file asynchronously. But I was able to find enough documentation on how to read a file async using tokio. Is that appropriate ? ref: https://developer.apple.com/library/archive/documentation/Darwin/Conceptual/FSEvents_ProgGuide/KernelQueues/KernelQueues.html
@aneessh18 What you want to do is:
DarwinFile::pread()
. If the read succeeds, complete the completion and bail out; otherwise go to (3).DarwinIO::run_once()
, poll for events, when file descriptor is readable, read and complete completion.It's worth considering using https://crates.io/crates/polling crate because that gives #41 for free.
Alternative to https://github.com/penberg/limbo/issues/22