Retrieving data using an asynchronous buffer
First Claim
1. A computer implemented method, comprising:
- in response to a request for first data from a client via a first thread, determining whether a local circular buffer contains the requested first data, the local circular buffer having a head region and a tail region for identifying a head and a tail of the local circular buffer respectively, the local circular buffer arranged to wrap around itself both past the tail and past the head thus allowing reading and writing of data past the tail and past the head responsive to a data scrolling activity at the client, the local circular buffer containing a portion of a data file maintained by a server over a network;
based on a determination that the local circular buffer does not contain the requested first data, generating a second thread to the server over the network to request the first data;
determining whether a location of a previous request for data associated with a request index is related to the head region of the local circular buffer;
adjusting a file pointer of the file of the server to a location substantially corresponding to a location associated with a tail index prior to generating the second thread; and
returning the first thread to the client while waiting for a result of the second thread from the server.
2 Assignments
0 Petitions
Accused Products
Abstract
A mechanism for retrieving data over a network using an asynchronous buffer is described herein. According to one embodiment, an exemplary process includes, in response to a request for first data from a client via a first thread, determining whether a local circular buffer contains the requested first data, the local circular buffer having a head region and a tail region for identifying a head and a tail of the local circular buffer respectively, and the local circular buffer containing a portion of a data file maintained by a server over a network, generating a second thread to the server over the network to request the first data, if the local circular buffer does not contain the requested first data, and returning the first thread to the client while waiting for a result of the second thread from the server. Other methods and apparatuses are also described.
9 Citations
19 Claims
-
1. A computer implemented method, comprising:
-
in response to a request for first data from a client via a first thread, determining whether a local circular buffer contains the requested first data, the local circular buffer having a head region and a tail region for identifying a head and a tail of the local circular buffer respectively, the local circular buffer arranged to wrap around itself both past the tail and past the head thus allowing reading and writing of data past the tail and past the head responsive to a data scrolling activity at the client, the local circular buffer containing a portion of a data file maintained by a server over a network; based on a determination that the local circular buffer does not contain the requested first data, generating a second thread to the server over the network to request the first data; determining whether a location of a previous request for data associated with a request index is related to the head region of the local circular buffer; adjusting a file pointer of the file of the server to a location substantially corresponding to a location associated with a tail index prior to generating the second thread; and returning the first thread to the client while waiting for a result of the second thread from the server. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
-
-
16. A non-transitory machine-readable storage medium containing instructions that, when executed by a processor, causes the processor to perform a method for processing messages, the method comprising:
-
in response to a request for first data from a client via a first thread, determining whether a local-circular buffer contains the requested first data, the local circular buffer having a head region and a tail region for identifying a head and a tail of the local circular buffer respectively, the local circular buffer arranged to wrap around itself both past the tail and past the head thus allowing reading and writing of data past the tail and past the head responsive to a data scrolling activity at the client, the local circular buffer containing a portion of a data file maintained by a server over a network; based on a determination that the local circular buffer does not contain the requested first data, generating a second thread to the server over the network to request the first data; determining whether a location of a previous request for data associated with a request index is related to the head region of the local circular buffer; adjusting a file pointer of the file of the server to a location substantially corresponding to a location associated with a tail index prior to generating the second thread; and returning the first thread to the client while waiting for a result of the second thread from the server. - View Dependent Claims (17, 18)
-
-
19. A data processing system, comprising:
-
a processor; and a memory coupled to the processor for storing instructions, when executed from the memory, causes the processor to perform operations including; in response to a request for first data from a client via a first thread, determine whether a local circular buffer contains the requested first data, the local circular buffer having a head region and a tail region for identifying a head and a tail of the local circular buffer respectively, the local circular buffer arranged to wrap around itself both past the tail and past the head thus allowing reading and writing of data past the tail and past the head responsive to a data scrolling activity at the client, the local circular buffer containing a portion of a data file maintained by a server over a network; based on a determination that the local circular buffer does not contain the requested first data, generate a second thread to the server over the network to request the first data; determine whether a location of a previous request for data associated with a request index is related to the head region of the local circular buffer; adjust a file pointer of the file of the server to a location substantially corresponding to a location associated with a tail index prior to generating the second thread; and return the first thread to the client while waiting for a result of the second thread from the server.
-
Specification