Method and apparatus for reading data in distributed file system
AssigneeElectronics and Telecommunications Research Institute
InventorsSang-Min Lee, Hong-Yeon Kim, Young-Kyun Kim
Life of this patent
Estimating the term…
Abstract
Disclosed are a method and apparatus for reading data in a distributed file system in which a client and a server are separated. In the method and apparatus, a prefetching operation is performed to provide a continuous read function with high performance even in the distributed file system so that an optimum continuous read function of a local file system within the client may be effectively supported when an application program of the client requests continuous reading on a file (or chunk).
Claims13
A method of reading data in a distributed file system, the method comprising:
- generating, by a server, a context structure including a context identifier (ID) and a file descriptor (fd) for a file when a context generation request for a read target file is received from a client and transmitting the context ID to the client;
- receiving, by the server, a plurality of read requests, each read request including a context ID, a latest context request serial number, an offset indicating a requested read position, and read size information corresponding to the file;
- and
- sequentially processing, by the server, the plurality of read requests by referring to the context request serial number included in each read request,
- wherein the sequentially processing of the plurality of read requests includes:
- determining whether the read request is a reordered request by comparing a context processing request serial number included in the read request to a latest context processing number included in the context structure of the server,
- making the read request wait until processing for a request previous to the read request is completed in case that the read request is the reordered request, and
- processing the read request after processing for the previous request is completed.
A method of reading data in a distributed file system, the method comprising:
- when a context generation request including an offset and readahead size information for a read target file is received from a client,
- generating, by a server, a context structure including a context identifier (ID) and a file descriptor (fd) for a file and transmitting the context ID to the client;
- performing a readahead operation on the file based on the offset and the readahead size information included in the context generation request and transmitting data read in advance to the client;
- and
- when continuous reading on the file is requested from an application program to be executed in the client,
- transmitting, by the client, a readahead request including asynchronous readahead request size information to the server if a size of the remaining data of a readahead buffer, which has not been yet read by the application program, is less than a preset asynchronous readahead request size;
- performing, by the server receiving the readahead request, an asynchronous readahead operation with the asynchronous readahead request size on the file;
- and
- transmitting data read in advance to the client,
- wherein the readahead request further includes a context processing request serial number, and
- wherein the performing of the readahead operation includes:
- determining whether the readahead request is a reordered request by comparing a context processing request serial number included in the readahead request to a latest context processing number included in the context structure of the server;
- and
- processing the readahead request after the readahead request waits until processing for a request previous to the readahead request is completed when it is determined that the readahead request is the reordered request.
Dependencies are inferred from the claim text.