Communications system and method including energy-efficient caching for mobile computing

Abstract: A communications system and method include an efficient cache invalidation technique which allows a computer to relocate and to disconnect without informing the server. The server partitions the entire database into a number of groups. The server also dynamically identifies recently updated objects in a group and excludes them from the group when checking the validity of the group. If these objects have already been included in the most recent invalidation broadcast, the remote computer can invalidate them in its cache before checking the group validity with the server. With the recently updated objects excluded from a group, the server can conclude that the cold objects in the group can be retained in the cache, and validate the rest of the group.

Description: BACKGROUND OF THE INVENTION FIELD OF THE INVENTION The present invention relates to communications systems and more particularly to communications systems including mobile computing systems. PRIOR ART In a mobile computing environment, a large number of battery-powered, portable machines can be used by many users to query information and database servers from various places through wireless communication channels. These mobile computers may often be disconnected for prolonged periods of time in order to conserve the battery energy. They may also frequently move from one cell to another and connect to different data servers at different times, enabling unrestricted mobility of the users. Due to the unlimited mobility, users of mobile computers can satisfy their information needs whenever and wherever they want. Generally, the bandwidth of the wireless communication channel is very limited. Thus, caching of frequently used data in a mobile computer can be an effective technique to reduce the wireless bandwidth requirement. Once caching is used, however, a cache validation strategy is needed to ensure the data cached in the mobile computer are coherent with those in the server. There are generally two different prior art approaches to cache invalidation, depending on whether or not the servers are aware of which data objects are being cached by which mobile computers. In a first prior art approach, the server maintains the cache state of each mobile computer and is called a statefull server. Cache invalidation can be done via sending an invalidation message to the appropriate mobile computers whenever an object is updated in the server. The server must also keep track of the on-off status of each mobile computer. In case a mobile computer fails, the server may lose track of the cache state of the mobile computer. Thus, a mobile computer must inform the server whenever it wants to disconnect itself or whenever it wants to move from one cell to another cell, significantly restricting the freedom and mobility of the mobile user. In a second prior art approach, the server does not keep track of the cache state of each mobile computer and is called a stateless server. It does not even know which mobile computers are currently active. Cache invalidation is typically done via periodically broadcasting an invalidation report, which contains the IDs of objects that are most recently updated. Each mobile computer listens, if active, to the report and invalidates its cache contents accordingly. However, when a mobile computer is disconnected for energy-saving purpose, it may miss many invalidation broadcasts. As a result, when it wakes up, it may have to discard the entire cache contents because it does not know whether or not some of its cached objects have been updated since it went to sleep. Discarding the entire cache content after a disconnection is very costly because most of the benefits of caching to save bandwidth requirement are lost. It is also unnecessary to discard the entire cache content because most of the cached objects in the mobile computers may be updated rather infrequently and can be salvaged even after a prolonged disconnection. To salvage some of the cached objects after a disconnection, the mobile computer can check with the server. Even though the server is stateless, it can maintain the object update history. One simple way of validity checking is to send all the IDs of its cached objects to the server. This is called simple checking (SC). However, simple checking requires a high communication overhead especially if the cache size is large. To reduce the communication overhead, the database objects in the server can be partitioned into groups and a mobile computer can check the validity of a group, instead of each individual object. If the entire group has not been updated, the group can be salvaged. However, if any object within a group has been updated, the entire group has to be discarded from the cache. This is called simple grouping (SG). In SG, if the group size is large, discarding the entire group can also be costly and unnecessary. In USENIX Summer Conference Proceedings, 6 June 1994, pages 279-289, Mummert et. al., "Large granularity cache coherence for intermittent connectivity" an implementation of a large granularity cache coherence for the Coda File System is shown. In order to summarize cache state by volume, servers maintain version stamps for each volume they store. A client caches the version stamp, establishing a callback for the volume. If the stamps match, all of the client's cached data from the volume is valid. The server grants a callback for the volume to allow the client to read the cached files without any additional communication. If the validation fails the client reverts to file callbacks. Of course, the client must ensure that version stamps are consistent with the data they represent. Document SIGMOD Record, Vol. 23, no. 2, 1 June 1994, pages 1-12, Barbara et. al., "Sleepers and workaholics: caching strategies in mobile environments" discloses a caching strategy that use invalidation reports and a stateless server. The invalidation report is broadcasted every L seconds. The invalidation report is composed by the time stamps of the latest change for items that have had updates in the last w seconds. The mobile unit listens to the report and updates the status of its cache. for each item cached, the mobile unit either purges it from the cache (when the item is reported to have changed at a time larger than the time stamp stored in the cache), or updates the cache's time stamp to the time stamp of the report (if the item was not mentioned there). This is done for every item in the cache, regardless of whether there is a pending query to this item or not. Each of the prior art caching techniques identified above have disadvantages which reduce system efficiency as a result of large communications overhead required to update the cache of a remote computer. SUMMARY OF THE INVENTION Therefore, it is an object of the present invention to allow a computer to move from one cell to another without informing a server and to disconnect from the server for saving battery energy but, when it wakes up, still retain most of its cached storage. In accordance with a preferred embodiment of the present invention a communications system and method including an efficient cache invalidation technique allows a computer to relocate and to disconnect without informing the server. The server partitions the entire database into a number of groups. The server also dynamically identifies recently updated objects in a group and excludes them from the group when checking the validity of the group. If these objects have already been included in the most recent invalidation broadcast, the remote computer can invalidate them in its cache before checking the group validity with the server. With the recently updated objects excluded from a group, the server can conclude that the cold objects in the group can be retained in the cache, and validate the rest of the group. This technique is referred to as Grouping with COld update set REtention (GCORE). GCORE is energy efficient because it allows a mobile computer to disconnect at any time to save energy and still retains most of the cache contents if they have not been updated and thus are considered to be cold update set. Moreover, it does not incur a high communication overhead by using grouping of data. In a preferred embodiment, GCORE is used to support energy-efficient caching in a remote computing system. Database objects are partitioned into a small number of groups. To retain the cold objects in a group that have not been updated, the server maintains for each group..an object update history of the past W broadcast intervals, consisting of a list of object IDs and their most recent update times, and the most recent update time of the group. Periodically, the server broadcasts an invalidation report containing the last w broadcast intervals of object update history. If a remote computer is active, it invalidates its cache entries based on the invalidation report. In case this broadcast report is the first one received since the remote computer has woken up, it also sends to the server an uplink message, containing the group ids and the timestamp of the latest broadcast report received before it became disconnected. The server checks the validity of a group by examining whether or not all the objects updated since the mobile computer becomes disconnected have been included in the latest broadcast report. After receiving the validity report from the server, the just woken-up remote computer then processes its queries initiated since it has woken up. Thus, in GCORE cache invalidation is accomplished by an asymmetrical approach where a server periodically broadcasts invalidation reports and a remote computer can check its cache validity after disconnection and reconnection. The foregoing has outlined rather broadly the features and technical advantages of the present invention in order that the detailed description of the invention that follows may be better understood. Additional features and advantages of the invention will be described hereinafter which form the subject of the claims of the invention. BRIEF DESCRIPTION OF THE DRAWING For a more complete understanding of the present invention, and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which: FIGURE 1 is a block diagram of a communications system embodying the present invention; FIGURE 2 is a flow diagram of a process for maintaining a list of data objects updated since last broadcast; FIGURE 3 is a flow diagram of a process for maintaining group update history; FIGURE 4 is a flow diagram of a process for fast checking of group validity; FIGURE 5 is a flow diagram of a process for preparing a new broadcast report; FIGURE 6 is a flow diagram of query processing by a remote computer; and FIGURE 7 is a flow diagram of group validity checking by a server. DETAILED DESCRIPTION OF A PREFERRED EMBODIMENT OF THE INVENTION Referring now to FIGURE 1, a block diagram of a communications system according to a preferred embodiment of the present invention will be described. In the following description, it is assumed that database objects are maintained on the servers 2 which are connected by a communication network 3. It is also assumed that the database is replicated on each mobile server 2. Thus, a remote computer can query the database from any wireless radio cell. Remote computers 1 can connect to one of the servers 2 by a wireless communication channel. For the purpose of cache invalidation, when a computer 1 relocates from one wireless radio cell 12, 14, 16, 18 to another cell 14, 16, 18, 12, it need not notify any of the servers 2. Queries are executed on the remote computers 1 while updates to the databases are only executed on the servers 2. In order to process queries with the more up-to-date data, queries are batched and processed right after a remote computer 1 receives a new broadcast report. Once referenced by queries, database objects are cached in the remote computers' 1 nonvolatile memory, such as hard disks (not shown) in the remote computers 1. Periodically, servers 2 broadcast invalidation reports containing the object IDs and their most recent update times. If active, a remote computer 1 then invalidates its local cache according to the invalidation report. In order to retain the benefits of caching while allowing remote computers 1 to disconnect (power off) or relocate at will, the servers 2 implement a cache invalidation technique called grouping with cold update set retention (GCORE) 4. A server 2 broadcasts an invalidation report every L units of time. Namely, invalidation reports are broadcast at ..., T - 2L, T - L and T. To implement GCORE, three important data structures are maintained by the servers 2. The first one, curlist , contains a list of pairs of (oid, time) for each distinct object updated since the last invalidation broadcast, where oid is the object identifier and time is the object update time. The second one, bcast _ report , contains the broadcast time and a list of pairs of objects updated in the most recent w broadcast intervals. The third one, grouptbl, contains an array of group entries and is used to maintain the update history for each group. The server 2 maintains the update history for each group for the most recent W broadcast intervals, where W ≥ w. The grouping function can be as simple as a modulo function where the number of objects in each group is about the same. On the other hand, the grouping function can also be different for different types of objects, resulting in different group sizes. Whatever grouping function is chosen, it must be agreed upon between the servers 2 and the remote computers 1. It is assumed that the latest broadcast time ( latest _ bcast _ time ) is kept in the nonvolatile memory (not shown) of each remote computer 1 so that after a remote computer 1 wakes up it can obtain this information. For every object updated, the server 2 executes two processes: insert _ curlist and insert_grouptbl . FIGURE 2 shows the flow chart for insert _ curlist . When object A is being updated 210, the curlist is checked to see if there is a pair that has the same object identifier as A 211. If yes, then the update time of this pair is changed to the current time 212. Otherwise, a new pair is created containing the object ID A and the current update time and is inserted at the top of curlist 213. FIGURE 3 shows the flow chart for insert _ grouptbl . When an object, for example A, is updated, 320, the corresponding group ID of object A is first computed 321. If such group ID is gid , then grouptbl[gid].time is changed to the current time. Next, all the pairs pointed to by grouptbl[gid].uplist are checked to see if any of them has the same object identifier as object A 322. If yes, then its corresponding update time is changed to the current time 324. Otherwise, a new pair is created and inserted at the top of grouptbl[gid].uplist for object A 323. Every L units of time, the server 2 broadcasts an invalidation report and updates the grouptbl accordingly. FIGURE 4 shows the flow chart of advance _ grouptbl . For each grouptbl entry i, the server removes the pairs pointed to by grouptbl[i].uplist that have update times less than T - WL, where T is the current broadcast time 430. Also, for each grouptbl[i] the total number of pairs that have update times between T - WL and T - wL is recomputed for the new broadcast time T 431. The recomputation of grouptbl[i].tot_wW is for fast checking of group validity. FIGURE 5 shows the flow chart of preparing the new broadcast report, new _ report . First, all the pairs pointed to by bcast_report.uplist that have update times less than T- wL are removed 540. After that, any pair pointed to by bcast_report.uplist that has the same object ID as that in curlist is also removed 541. Then, the entire list pointed to by curlist is inserted at the top of bcast_report.uplist, curlist is reset to NULL, and bcast_report.time is set to the current broadcast time 542. By doing so, the bcast_report will contain only the distinct object pairs that are updated in the most recent w broadcast intervals. For a remote computer 1 to process queries with up-to-date data, all the queries are batched until it receives a new broadcast report. FIGURE 6 shows the flow chart of query processing by a remote computer 1. Upon receiving a new bcast_report, the computer 1 first invalidates its cache contents based on this report 650. If this computer 1 has been disconnected and this is the first bcast-report it receives after wake up and latest_bcast_time < bcast_report.time 651, it then sends its latest_bcast_time and its group IDs to the server 2 for validity checking 652. It then waits for the validity results from the server 2 and invalidates its cache 653. Then the computer 1 processes all the queries 654. If objects cannot be found in the local cache (not shown), it sends requests to the server 254. For group validity checking, the server executes a simple process. FIGURE 7 shows the flow chart of this validity-checking process. For each grouptbl[i] 760, the server 2 checks if grouptbl[i].time < latest_bcast_time 761. If yes, then grouptbl[i] is valid 763. If not, then it further checks if grouptbl[i].tot_wW = 0 and grouptbl[i].time > ( T - WL ) 762. If yes, then grouptbl[i] is also valid 763. Otherwise, grouptbl[i] is invalid 764.

Claims: A method for reducing overhead in a communications system when maintaining data coherency between one or more servers (2) and one or more remote units (1), said one or more remote units adapted to operate in a disconnected mode, in a communications system, whereby cache invalidation at a remote unit is accomplished by an asymmetrical approach where a server (2) periodically broadcasts invalidation reports and said remote unit can check its cache validity after disconnection and reconnection, the method comprising the step of: updating data objects only on said one or more servers (2), periodically broadcasting by one of said one or more servers (2) to said one or more remote units (1) an invalidation report containing one or more objects updated during a most recent plurality of broadcast intervals, for said one or more remote units (1) to invalidate contents of caches in said one or more remote units (1) based on information contained in said invalidation report, characterized by the steps of: grouping data objects stored in said one or more servers (2) into one or more groups, whereby between said servers (2) and said remote units (1) it is agreed upon whatever grouping function is chosen; maintaining at said one or more servers for each group an object update history of a past plurality of broadcast intervals consisting of the object identifiers and their most recent update times, and the most recent update time of the group, said past plurality of broadcast intervals being greater than said most recent plurality of broadcast intervals; receiving by one of said servers (2) an uplink message from one of said remote units (1), in case a broadcast report is the first one received since said remote unit has woken up, said uplink message containing group ids and a timestamp of the latest broadcast report received by said remote unit (1) before it became disconnected; and checking by said server the validity of each group by examining whether or not all the objects updated since said remote unit (1) became disconnected have been included in the latest broadcast report, whereby said server (2) excludes said one or more objects, updated during said most recent plurality of broadcast intervals, from each group of objects when checking the validity of said group; sending a validity report to said remote unit. The method according to one of claims 1 or 2, further comprising the steps of: waiting for a next invalidation broadcast to invalidate cache entries in one of said remote units (1); and sending a time identifier of a last invalidation report received by said remote unit (1) before a most recent disconnection of said remote unit (1). The method according to one of claims 1 to 3, further comprising the step of: determining at said one or more servers a validity of a group which excludes one or more objects updated during a predetermined broadcast interval. A communications system comprising: a communications network (3); one or more servers (2) connected to said communications network (3); one or more remote units (1) adapted to operate in a disconnected mode for a period of time, and adapted to operate in communication with said one or more servers, each of said remote units comprising means responsive to an invalidation report broadcast by one of the servers for invalidating cache contents identified in the invalidation report, whereby cache invalidation is accomplished by an asymmetrical approach where the server (2) periodically broadcasts invalidation reports and a remote unit can check its cache validity after disconnection and reconnection; each of said servers (2) comprising means for storing data objects, whereby updates are only executed on said servers (2); and means for periodically broadcasting by one of said one or more servers (2) to said one or more remote units (1) an invalidation report containing one or more objects updated during a most recent plurality of broadcast intervals, for said one or more remote units (1) to invalidate contents of caches in said one or more remote units (1) based on information contained in said invalidation report, characterized by : means for grouping data objects stored in said one or more servers (2) into one or more groups, whereby between said servers (2) and said remote units (1) it is agreed upon whatever grouping function is chosen; means for maintaining at said one or more servers for each group an object update history of a past plurality of broadcast intervals consisting of the object identifiers and their most recent update times, and the most recent update time of the group, said past plurality of broadcast intervals being greater than said most recent plurality of broadcast intervals; means for receiving by one of said servers (2) an uplink message from one of said remote units (1), containing group ids and a timestamp of the latest broadcast report received by said remote unit (1) before it became disconnected, in case a broadcast report is the first one received since said remote unit has woken up; and means for checking by said server the validity of each group by examining whether or not all the objects updated since said remote unit (1) became disconnected have been included in the latest broadcast report, whereby said server (2) excludes said one or more objects, updated during said most recent plurality of broadcast intervals, from each group of objects when checking the validity of said group, means for sending a validity report to said remote unit.

Inventors: CHEN MING-SYAN, WU KUN-LUNG, YU PHILIP SHI-LUNG, CHEN, MING-SYAN, WU, KUN-LUNG, YU, PHILIP SHI-LUNG
Applicants: IBM, INTERNATIONAL BUSINESS MACHINES CORPORATION
Application year: 1995
Main classification: G06F12
IPC codes: G06F15, G06F13, G06F12, H04L29, G06F17