Map reduce pattern for asynchronous file reading