1. Field of the Invention
The present invention relates to a method, system, and program for method, system, and program for maintaining data in distributed caches.
2. Description of the Related Art
Internet users often request data from a central Internet server. One challenge Internet information providers face is the goal to maintain a timely response rate for returning information to user requests while the amount of Internet traffic and users increases at exponential rates. One solution to this need to service an increasing number of users is to maintain copies of data at different locations so user data requests are serviced from mirror servers at different geographical locations to service users most proximate to that mirror server. Other solutions involve the use of distributed caches that maintain copies of data, where a central directory is maintained to keep track of data at the distributed cache servers. The cache servers can be deployed at different points in an organization to service particular groups of client users. The central directory provides mapping to maintain information on the objects within the cache servers.
The Caching and Replication Internet Service Performance (CRISP) project has developed an Internet caching service utilizing distributed proxy caches structured as a collection of autonomous proxy servers that share their contents through a mapping service.
Notwithstanding the current uses of distributed caches to service client Web access requests, there is a continued need in the art to provide further improved techniques for servicing client network requests, such as Internet Web requests.
Provided are a method, system, and program for maintaining data in distributed caches. A copy of an object is maintained in at least one cache, wherein multiple caches may have different versions of the object, and wherein the objects are capable of having modifiable data units. Update information is maintained for each object maintained in each cache, wherein the update information for each object in each cache indicates the object, the cache including the object, and indicates whether each data unit in the object was modified. After receiving a modification to a target data unit in one target object in one target cache, the update information for the target object and target cache is updated to indicate that the target data unit is modified, wherein the update information for the target object in any other cache indicates that the target data unit is not modified.
In further implementations, after receiving the request to modify the data unit and if the update information for the target object and target cache indicate that the target data unit is modified, the received modification is applied to the data unit in the target object in the target cache.
Still further, after receiving the modification and if the update information for the target object and target cache indicate that the target data unit is not modified, a determination may be made as to whether another cache includes the target object and a most recent target data unit value. If another cache does not include the most recent target data unit value, then the modification is applied to the data unit in the target object in the target cache and the update information for the target object and target cache is updated to indicate that the target data unit is modified, wherein the update information for the target object in any other cache indicates that the data unit is not modified.
In yet further implementations, after receiving the modification and if the update information for the target object and target cache indicate that the target data unit is not modified, then a determination is made as to whether another cache includes the target object and a most recent target data unit value. If another cache includes the most recent target data unit value, then the most recent target data unit value is retrieved from the determined cache and the target object in the target cache is updated with the retrieved most recent target data unit value.
Still further, invalidation information may be maintained for each object in each cache, wherein the invalidation information for one object in one cache indicates whether each data unit in the object is valid or invalid.
Described implementations provide techniques for managing the distributed storage of data objects in a plurality of distributed caches in a manner that avoids any inconsistent data operations from being performed with respect to the data maintained in the distributed caches.
Referring now to the drawings in which like reference numbers represent corresponding parts throughout:
In the following description, reference is made to the accompanying drawings which form a part hereof and which illustrate several embodiments of the present invention. It is understood that other embodiments may be utilized and structural and operational changes may be made without departing from the scope of the present invention.
A plurality of client systems 18a, 18b, 18c, 18d, 18e, 18f, 18g include browsers 20a, 20b, 20c, 20d, 20e, 20f, 20g that communicate requests for web pages to a designated cache server 2a, 2b . . . 2n, such that the client requests may be serviced from the caches 8a, 8b . . . 8n. The client systems 18a, 18b . . . 18g may comprise any computing device known in the art, such as as a personal computer, laptop computer, workstation, mainframe, telephony device, handheld computer, server, network appliance, etc., and the browser 20a, 20b . . . 20g may comprise any program capable of requesting files over a network, such as an Internet browser program, movie player, sound player, etc., and rendering the data from such files to the user in any media format known in the art. In certain implementations, a user at the browsers 20a, 20b . . . 20g may modify or update data in the data units in the memory pages in the caches 8a, 8b . . . 8n.
The central server 4 includes a central server directory program 22 and the cache servers 2a, 2b . . . 2n each include a cache server program 24a, 24b . . . 24n to perform caching related operations. The central server directory program 22 maintains a central directory 26 maintaining information on the data units that may be updated in each memory page in each cache 8a, 8b . . . 8n. Each cache server program 24a, 24b . . . 24n also maintains a local cache directory 28a, 28b . . . 28n having entries maintaining information on the data units that may be updated in the memory pages 10a, 10b . . . 10n in local cache 8a, 8b . . . 8bn. The entries in the local cache directories 28a, 28b . . . 28n correspond to entries for the same memory pages in the central directory 26.
With respect to
If (at block 122) there is an entry in the central directory 26 for the requested page and if (at block 130) there is no entry whose update word 54a . . . 54n for the requested page, having data unit bits 54a . . . 54n (
If (at block 130) one update word 54a . . . 54n in one tuple of information for another cache server 2a, 2b . . . 2n in the entry 50 for the requested page does have one data unit bit set “on”, then the central directory server program 22 determines (at block 138) the tuple of information in the entry 50 for the requested page whose update word 54a . . . 54n has the most data unit bits set “on”. The central directory server program 22 then retrieves (at block 140) the requested page from the cache server 2a, 2b . . . 2n identified in field 52a . . . 52n of the determined tuple of information, the tuple of info having the greatest number of most recent data unit values. For each other tuple in the entry 50 for the page having an update word 54a . . . 54n with data unit bits set “on”, the central directory server program 22 would access (at block 142) the corresponding data units corresponding to the bits set “on” from the cache server 2a, 2b . . . 2n identified in field 52a . . . 52n of the tuple and add the accessed data to the corresponding data units in the retrieved page. A tuple for the entry for the retrieved page is generated (at block 144) for the requesting cache server 2a, 2b . . . 2n identifying in field 52a . . . 52n the requesting cache server and including an update word 54a . . . 54n and invalidation word 56a . . . 56n with all data unit bits set “off”. Control then proceeds to block 136 to return the retrieved page and generated tuple (or relevant parts thereof) to the requesting cache server 2a, 2b . . . 2n.
With the logic of
After providing the receiving cache server with the most recent data value (from block 222) or if the receiving cache server does have the most recent value for the target data unit (from the no branch of block 214), control proceeds to block 224 and 226 where the central directory server program 22 sets (at block 224) in the entry for the requesting cache server, the data unit bits corresponding to the target data unit in the update word 54a . . . 54n to “on” and the bits in the invalidation word 56a . . . 56n in the entry for the requesting cache server to “off”. The central directory server program 22 also sets (at block 226) the data unit bit in the invalidation words 56a . . . 56n in the tuples in the entry 50 for the target page for all other cache servers to “on”, indicating that the other cache servers have invalid data for the target data unit in their copy of the target page. The central directory server program 22 then returns (at block 228) a message to the receiving cache server to proceed with modifying the target data unit. The message may also include a message, explicit or implicit, to the requesting cache server to update the relevant bits in their validation and invalidation words for the received page to indicate that the requesting cache server has the most recent update for the data units being updated in the page. In alternative implementations, the central directory server program 22 may return the modified validation and invalidation words.
Upon receiving (at block 250 in
The described implementations provide a protocol for a distributed cache server system to allow updates to be made at one cache server by a client browser and at the same time maintain data consistency between all cache servers. This also provides a relaxed data update consistency because if the data is updated in a browser, only an invalidated data bit is set in the central directory for the remote cache servers that have a copy of the page including the data unit being modified. No information about updates is contained in the remote cache servers and browsers at the remote cache servers and clients may continue to read pages from local caches that do not have the most recent data unit values. However, if a browser receiving data from a cache server that does not have the most recent data attempts to modify a data unit, then the browser will receive the most recent data before applying the modification.
The described techniques for managing a distributed cache server system may be implemented as a method, apparatus or article of manufacture using standard programming and/or engineering techniques to produce software, firmware, hardware, or any combination thereof. The term “article of manufacture” as used herein refers to code or logic implemented in hardware logic (e.g., an integrated circuit chip, Programmable Gate Array (PGA), Application Specific Integrated Circuit (ASIC), etc.) or a computer readable medium, such as magnetic storage medium (e.g., hard disk drives, floppy disks, tape, etc.), optical storage (CD-ROMs, optical disks, etc.), volatile and non-volatile memory devices (e.g., EEPROMs, ROMs, PROMs, RAMs, DRAMs, SRAMs, firmware, programmable logic, etc.). Code in the computer readable medium is accessed and executed by a processor. The code in which preferred embodiments are implemented may further be accessible through a transmission media or from a file server over a network. In such cases, the article of manufacture in which the code is implemented may comprise a transmission media, such as a network transmission line, wireless transmission media, signals propagating through space, radio waves, infrared signals, etc. Thus, the “article of manufacture” may comprise the medium in which the code is embodied. Additionally, the “article of manufacture” may comprise a combination of hardware and software components in which the code is embodied, processed, and executed. Of course, those skilled in the art will recognize that many modifications may be made to this configuration without departing from the scope of the present invention, and that the article of manufacture may comprise any information bearing medium known in the art.
In described implementations, both an invalidation word and update word is maintained for each tuple of information in each entry in the central server. In alternative implementations, only the update word is maintained. In such implementations, to determine whether the requesting cache server has stale data, the central server would have to process the update words in tuples for the other cache servers to determine if any of the other cache servers have modified the data unit.
In the described implementations, the pages maintained in cache comprised memory pages, where multiple memory pages would store the data for a single web page accessed from a URL over the Internet. Alternatively, the memory pages in cache may comprise web pages.
In described implementations, a central server and central directory server program managed update operations to make sure that the requesting cache server received the most recent data before applying an update. In alternative implementations, the operations described as performed by the central server and central directory server program may be distributed among the cache servers to provide a distributed central directory. In such implementations where the operations performed by the central directory server program are distributed, information maintained in the update words and invalidation words at the central server would be distributed to the cache servers to allow the cache servers to perform distributed cache management operations.
In described implementations, each cache server maintained a copy of the update word for each page maintained in the cache 8a, 8b . . . 8n for the cache server 2a, 2b . . . 2n. Alternatively, the cache servers may not maintain an update word and instead handle all consistency operations through the central server.
The information described as included in the update and invalidation words may be implemented in any one or more data structures known in the art to provide the update and invalidation information. For instance, the update and invalidation information may be implemented in one or more data objects, data records in a database, entries in a table, separate objects, etc.
The pages maintained in the caches may comprise any data object type, including any type of multimedia object in which a client or user can enter or add data to modify the content of the object.
In the described implementations, there is a separate cache server coupled to each cache. The cache and cache server may be in the same enclosed unit or may be in separate units. In alternative implementations, one cache server may be coupled to multiple caches and maintain update information for the multiple coupled caches.
In described implementations, the central server downloaded pages from over the Internet. Alternatively, the central server may download pages from any network, such as an Intranet, Local Area Network (LAN), Wide Area Network (WAN), Storage Area Network (SAN), etc. Further, the cache servers may directly access the Internet to download pages.
The illustrated logic of
The foregoing description of various implementations of the invention has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed. Many modifications and variations are possible in light of the above teaching. It is intended that the scope of the invention be limited not by this detailed description, but rather by the claims appended hereto. The above specification, examples and data provide a complete description of the manufacture and use of the composition of the invention. Since many embodiments of the invention can be made without departing from the spirit and scope of the invention, the invention resides in the claims hereinafter appended.
| Number | Name | Date | Kind |
|---|---|---|---|
| 5699551 | Taylor et al. | Dec 1997 | A |
| 5784590 | Cohen et al. | Jul 1998 | A |
| 5822763 | Baylor et al. | Oct 1998 | A |
| 5933849 | Srbljic et al. | Aug 1999 | A |
| 6047357 | Bannon et al. | Apr 2000 | A |
| 6154811 | Srbljic et al. | Nov 2000 | A |
| 6256712 | Challenger et al. | Jul 2001 | B1 |
| 6269432 | Smith | Jul 2001 | B1 |
| 6405289 | Arimilli et al. | Jun 2002 | B1 |
| 6721856 | Arimilli et al. | Apr 2004 | B1 |
| Number | Date | Country | |
|---|---|---|---|
| 20040064650 A1 | Apr 2004 | US |