US2012260011A1PendingUtilityA1
Efficient buffered reading with a plug-in for input buffer size determination
Est. expiryAug 12, 2029(~3.1 yrs left)· nominal 20-yr term from priority
G06F 16/319
35
PatentIndex Score
0
Cited by
0
References
0
Claims
Abstract
A method of buffered reading of data is provided. A read request for data is received by a buffered reader, and in response to the read request, a main memory input buffer is partially filled with the data by the buffered reader to a predetermined amount that is less than a fill capacity of the input buffer. Corresponding computer system and program products are also provided.
Claims
exact text as granted — not AI-modified1 . A method of buffered reading of data, the method comprising:
receiving a read request from a requestor for data by a buffered reader within a data processing system, wherein an exact amount of the data needed is unknown; in response to the read request, obtaining a predetermined value for an amount of the data to be read and placed in a memory buffer, wherein the predetermined value is less than a fill capacity of the memory buffer; reading by the buffered reader the amount of the data indicated by the predetermined value; placing by the buffered reader the data read into the memory buffer; and returning the data placed in the memory buffer to the requestor.
2 . The method of claim 1 , further comprising repeating the obtaining, reading, placing and returning a predetermined number of times, wherein the predetermined number of times is more than zero up to infinity.
3 . The method of claim 2 , wherein the method is performed for a sequence of pairs of the predetermined amount and a predetermined number of times, wherein the predetermined number of times is more than zero up to infinity.
4 . (canceled)
5 . The method of claim 1 , wherein the predetermined amount comprises a number of characters.
6 . The method of claim 1 , wherein the predetermined amount comprises a number of bytes.
7 . The method of claim 1 , wherein the obtaining comprises calling by the buffered reader an object that returns the predetermined value.
8 . The method of claim 7 , further comprising disassociating the object from the buffered reader.
9 . The method of claim 8 , wherein the disassociating comprises automatically disassociating the object from the buffered reader if the predetermined amount returned by the object is invalid.
10 . The method of claim 1 , wherein the read request is for a posting list when searching an inverted index for a search term, and wherein the posting list is associated with the search term.
11 . The method of claim 1 , wherein the read request comprises a read size, and wherein if the read size is larger than the fill capacity of the memory buffer, then the reading, placing and returning are performed for the fill capacity a whole number of times equal to the read size divided by the fill capacity, and then performed for less than the fill capacity according to the predetermined value.
12 . The method of claim 11 , wherein if data for the read request remains, then the reading, placing and returning are performed for a predetermined supplemental amount until the additional data has been read.
13 . The method of claim 12 , wherein the predetermined supplemental amount is different from the predetermined value.
14 . The method of claim 13 , wherein the predetermined supplemental amount is less than the predetermined amount.
15 . A computer system for buffered reading of data, comprising:
a memory; and a processor in communication with the memory to perform a method, the method comprising:
receiving a read request from a requestor for data by a buffered reader within the computer system, wherein an exact amount of the data needed is unknown;
in response to the read request, obtaining a predetermined value for an amount of the data to be read and placed in a memory buffer, wherein the predetermined value is less than a fill capacity of the memory buffer;
reading by the buffered reader the amount of the data indicated by the predetermined value;
placing by the buffered reader the data read into the memory buffer; and
returning the data placed in the memory buffer to the requestor.
16 . The system of claim 15 , the method further comprising repeating the obtaining, reading placing and returning a predetermined number of times, wherein the predetermined number of times is more than zero up to infinity.
17 . The system of claim 16 , wherein the method is performed for a sequence of pairs of the predetermined amount and a predetermined number of times, wherein the predetermined number of times is more than zero up to infinity.
18 . (canceled)
19 . The system of claim 15 , wherein the predetermined amount comprises a number of characters.
20 . The system of claim 15 , wherein the predetermined amount comprises a number of bytes.
21 . The system of claim 15 , wherein the obtaining comprises calling by the buffered reader an object that returns the predetermined value.
22 . The system of claim 21 , further comprising disassociating the object from the buffered reader.
23 . The system of claim 22 , wherein the disassociating comprises automatically disassociating the object from the buffered reader if the predetermined amount returned by the object is invalid.
24 . The system of claim 15 , wherein the read request is for a posting list when searching an inverted index for a search term, and wherein the posting list is associated with the search term.
25 . The system of claim 15 , wherein the read request comprises a read size, and wherein if the read size is larger than the fill capacity of the memory buffer, then the reading, placing and returning are performed for the fill capacity a whole number of times equal to that read size divided by the fill capacity of, and then performed for less than the fill capacity according to the predetermined value.
26 . The system of claim 15 , wherein if additional data for the read request remains, then the reading, placing and returning are performed for a predetermined supplemental amount until the additional data has been read.
27 . The system of claim 26 , wherein the predetermined supplemental amount is different from the predetermined value.
28 . The system of claim 27 , wherein the predetermined supplemental amount is less than the predetermined amount.
29 . A program product for buffered reading of data, the program product comprising:
a physical storage medium readable by a processor and storing instructions for execution by the processor for performing a method, the method comprising:
receiving a read request from a requestor for data by a buffered reader, wherein an exact amount of the data needed is unknown; and
in response to the read request, obtaining a predetermined value for an amount of the data to be read and placed in a memory buffer, wherein the predetermined value is less than a fill capacity of the memory buffer;
reading by the buffered reader the amount of the data indicated by the predetermined value;
placing by the buffered reader the data read into the memory buffer; and
returning the data placed in the memory buffer to the requestor.
30 . The program product of claim 29 , further comprising repeating the obtaining, reading, lacing and returning a predetermined number of times, wherein the predetermined number of times is more than zero up to infinity.
31 . The program product of claim 30 , wherein the method is performed for a sequence of pairs of the predetermined amount and a predetermined number of times, wherein the predetermined number of times is more than zero up to infinity.
32 . (canceled)
33 . The program product of claim 29 , wherein the predetermined amount comprises a number of characters.
34 . The program product of claim 29 , wherein the predetermined amount comprises a number of bytes.
35 . The program product of claim 29 , wherein the obtaining comprises calling by the buffered reader an object that returns the predetermined value.
36 . The program product of claim 35 , further comprising disassociating the object from the buffered reader.
37 . The program product of claim 36 , wherein the disassociating comprises automatically disassociating the object from the buffered reader if the predetermined amount returned by the object invalid.
38 . The program product of claim 29 , wherein the read request is for a posting list when searching an inverted index for a search term, and wherein the posting list is associated with the search term.
39 . The program product of claim 29 , wherein the read request comprises a read size, and wherein if the read size is larger than the fill capacity of the memory buffer, then the reading, placing and returning are performed for the fill capacity a whole number of times equal to that read size divided by the fill capacity, and then performed for less than the fill capacity according to the predetermined value.
40 . The program product of claim 29 , wherein if additional data for the read request remains, then the reading, placing and returning are performed for a predetermined supplemental amount until the additional data has been read.
41 . The program product of claim 40 , wherein the predetermined supplemental amount is different from the predetermined value.
42 . The program product of claim 41 , wherein the predetermined supplemental amount is less than the predetermined amount.
43 . The method of claim 1 , further comprising in response to the read request, and prior to the obtaining, determining a buffer fill strategy that includes the predetermined value and is based on an approximate amount of data to be read.
44 . The method of claim 43 , further comprising repeating the obtaining, reading, placing and returning a predetermined number of times, wherein the predetermined number of times is more than zero up to infinity.
45 . The systems of claim 15 , further comprising in response to the read request, and prior to the obtaining, determining a buffer fill strategy that includes the predetermined value and is based on an approximate amount of data to be read.
46 . The system of claim 45 , further comprising repeating the obtaining, reading, placing and returning a predetermined number of times, wherein the predetermined number of times is more than zero up to infinity.
47 . The program product of claim 29 , further comprising in response to the read request, and prior to the obtaining, determining a buffer fill strategy that includes the predetermined value and is based on an approximate amount of data to be read.
48 . The program product of claim 47 , further comprising repeating the obtaining, reading, placing and returning a predetermined number of times, wherein the predetermined number of times is more than zero up to infinity.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.