Reliable database administration arrangement

Abstract: In a distributed system, such as a PBX, which uses a database for its operation, a master copy (22) of the database having a first format is stored at a central node (10) and cache copies (32) of database portions (24) but having a different format are stored at peripheral nodes (11-12). A change to the database is made to the master copy, is recorded in a change table (26) corresponding to the affected database portion, and is sent to affected peripheral nodes. At initialization, a boot copy (25) is made of each database portion by translating the database portion from the master database format to the cache copy format. Periodically thereafter, each boot copy is replaced with a new boot copy that reflects changes presently recorded in the corresponding change table. When the new boot copy is generated, the present change table contents are erased. When a peripheral node calls for a new cache copy (e.g., upon reboot), it is sent the corresponding boot copy and any changes presently recorded in the corresponding change table.

Description: This invention relates to apparatus for and methods of database administration. Distributed processing systems--ones comprising a plurality of processing entities or locations, referred to herein as nodes--often depend upon a database for their operation. Illustrative examples of such systems are a multiprocessor computer that stores operational data in a database, and a distributed switching system, such as a PBX with remote modules, that stores call processing translations in a database. To avoid known difficulties associated with using either a fully-distributed or a fully-centralized database architecture, distributed processing systems often favor a database architecture which is intermediate between the two above-mentioned extremes: one wherein a "master" copy of the database is located at one, a central, node that manages the database centrally, but where "cache" copies of portions of the database are maintained locally at the other, peripheral, nodes. The peripheral nodes then communicate with the central node to obtain database information when that information is not in the local cache copy, and when updating their cache copies. Systems of this nature are generally discussed in M-Y Lai, K-C Lee, and G. Herman, "Broadcast Database Systems", The 7th International Conference on Distributed Computing Systems , Sept. 1987, Berlin, FRG, pp. 408-415. In distributed systems making use of this database architecture, the loss by a peripheral node of its database cache copy can adversely affect system performance. Such loss occurs, for example, if the peripheral node stores the cache copy in a volatile memory, such as a semiconductor memory, and it loses power to that memory. Even if the peripheral node stores the information in nonvolatile memory, such as a disk, it may lose the cache copy due to a node or a disk malfunction that mutilates the data in the cache copy. In the event of such a loss, the peripheral node must obtain a fresh cache copy from the central node. The time spent by the central node in providing this fresh copy, and the time spent by the peripheral node in awaiting the fresh copy, is time taken away from the nodes' normal activities. In particular, when the cache copies and the master database do not have the same format, it is very time-consuming for the central node to translate the requisite database portion from "master" copy format--such as a format suitable for operator retrieval and display--into "cache" copy format--one suitable for transmission to the peripheral node and storage and use by the peripheral node. Hence, system performance suffers. It is therefore desirable to minimize the time spent in providing a peripheral node with a cache copy of the database. According to one aspect of this invention there is provided apparatus as claimed in claim 1. According to another aspect of this invention there is provided a method as claimed in claim 13. A peripheral node of a distributed system may be provided with a new cache copy of a portion of the database not directly from the master database, but from a separate, "boot", copy of a version of the cache copy that existed at some prior point in time, supplemented by a record of the changes that must be made to the boot copy to bring it up-to-date, i.e., to make it consistent with, the master database. The boot copy has the same format as the cache copy, but has a format different from that of the master database. Illustratively, generation of a boot copy involves translation of the database portion from the database's format--such as a display format--into the "cache copy" format--such as a machine-useable format. Illustratively, the apparatus may be located at a central node of a distributed system, while cache copies of the database portions are located at peripheral nodes of the system, and requests for database portions are requests by the peripheral nodes to the central node for new cache copies of the database portions. Because requests for database portions are satisfied by sending boot copies plus modifications, and not the database portions themselves, satisfaction of the requests avoids searching the master database itself for the desired portion and then translating the desired portion from master database format into the cache copy format; as mentioned above, the boot copies are "pre-translated". Hence, the requests can be satisfied with much less work, and more rapidly, thereby improving real-time response and operational efficiency. Preferably there is a storage facility, such as a table, associated with or corresponding to each database portion, and that storage facility records changes, or modifications, that have been made to the associated database portion. The arrangement responds to modifications of a database portion by making a record of the modification in the storage facility that corresponds to the modified portion. This feature avoids having to spend time searching through a common record of changes made to all database portions to select changes that were made to a particular portion. System performance is enhanced thereby. Also preferably, the arrangement occasionally generates new, updated, boot copies. The new boot copies represent the old boot copies modified with the presently-recorded modifications to the database. However, for reliability purposes, the new boot copies are preferably generated not by modifying the old boot copies, but are generated anew from the database portions by translating anew the database portions. When it generates the new boot copies, the arrangement deletes the records of the modifications to the old boot copies that are represented in the new boot copies. Preferably, the generation of the new boot copies is undertaken by the arrangement when it does not have more pressing work to do. The generation of the new boot copies therefore does not adversely impact the performance of the arrangement; what it does do is improve the performance of the requesters of new cache copies, who are saved thereby from the effort of incorporating the changes into the old boot copies themselves. These and other advantages and features of the invention will become more apparent from the following description of an illustrative embodiment of the invention considered together with the drawing. Brief Description of the Drawings FIG. 1 is a block diagram of a distributed PBX including an illustrative embodiment of the invention; FIG. 2 is flow diagram of actions of the database manager of the PBX of FIG. 1 upon system initialization; FIG. 3 is a flow diagram of database manager actions in response to a database change; FIG. 4 is a flow diagram of database manager actions taken to periodically generate new boot copies of database portions; and FIG. 5 is a flow diagram of database manager actions taken to supply system nodes with new copies of database portions. Detailed Description FIG. 1 shows a distributed telephony switching system such as a private branch exchange (PBX). The switching system comprises a central, administrative, node 10 and a plurality of peripheral, call processing, nodes 11-12 interconnected by a communication medium. Each peripheral node 11-12 is connected to customers via communication links 14 which are, for example, telephone lines or trunks. Peripheral nodes 11-12 provide conventional call processing functions for their connected customers, whereas central node 10 provides specialized system-wide functions, such as call records and billing. Such systems are well known in the art. An example thereof is the IBM multi-module 9751 CBX. Administrative node 10 includes a central administrative processor 20 connected to a non-volatile mass storage medium such as a disk 21. Processor 20 stores on disk 21 a master copy of a system management database, referred to herein as a master database 22. Database 22 includes call processing translations that peripheral nodes 11-12 need to perform their call processing functions. Database 22 is managed, i.e., controlled and maintained, by a database manager 23 program executing on processor 20. A user interface 27, such as a computer terminal, is connected to processor 20. Inter alia, interface 27 enables an operator to inform database manager 23 of changes to database 22, so that manager 23 can keep database 22 up-to-date. For example, when a new customer is connected to the system of FIG. 1, or when an old customer changes location, and hence its connection to the system, an operator informs manager 23 of these changes through interface 27, so that manager 23 may update the call processing translations in database 22 accordingly. Each peripheral node 11-12 includes a processor 30 for performing call processing functions. Each processor 30 includes a memory 31 in which it stores call processing programs and call processing translations. These translations are a part of master database 22. Because each node 11-12 serves different customers, each processor 30 typically requires different translations. Hence, the memory 31 of each processor 30 typically stores a different portion of database 22. The database portions stored in peripheral nodes 11-12 are referred to as cache copies 32 of the database portions. In the example of FIG. 1, master database 22 is shown as comprising a plurality of portions 24 designated A to Z, and each of the peripheral nodes 11-12 is shown as having a cache copy 32 of one of the portions 24, such that node 11 includes a cache copy 32 of database portion A and node 12 includes a cache copy 32 of database portion Z. Associated with each master database portion 24 is a boot copy 25 of the portion, and a change table 26. Illustratively, boot copies 25 and change tables 26 are also stored on disk 21, although they may be stored in any non-volatile memory in the system. A boot copy 25 is a copy of the cache copy 32 of the corresponding master database portion 24 which was created at some past point in time. Hence, boot copy 25 is a potentially-outdated copy that does not necessarily reflect the present, updated, contents of portion 24. A change table 26 is a stored record of all changes, updates, that have been made to a portion 24 since the corresponding boot copy 25 was created. Database manager 23 uses boot copies 25 and change tables 26--as opposed to master database portions 24--to re-create lost or mutilated cache copies 32 in peripheral nodes 11-12. The administration and use of boot copies 25 and change tables 26 is diagrammed in FIGS. 2-5. FIG. 2 shows activities of database manager 23 upon system initialization. In response to an initialization command, received at step 200, manager 23 retrieves a portion 24 of master database 22 from disk 21, at step 201. Master database 22 is stored in a format suitable for display to, and interaction with, an operator at user interface 27, not in machine-useable format. Manager 23 therefore translates the retrieved portion from the display format to a machine-useable format, at step 202. Manager 23 then sends the translated portion to a corresponding peripheral node 11-12, at step 203. The sent copy becomes the cache copy 32 at the receiving peripheral node 11-12. Manager 23 also creates a boot copy 25 of that same translated copy of master database portion 24, at step 204, by copying the translated information into a new--the boot copy--file. Furthermore, manager 23 creates and initializes--clears--a change table for that portion 24, at step 205. Manager 23 then checks whether all peripheral nodes 11-12 have been serviced, at step 206. If not, manager 23 returns to step 201 to service another node 11-12 and to provide it with a copy of its corresponding database portion. If all nodes 11-12 have been serviced, manager 23 exits, at step 207. FIG. 3 shows activities of database manager 23 upon receipt of a change to the contents of master database 22, such as from user interface 27. In response to receiving the change, at step 300, manager 23 enters the change in master database 22, thereby modifying the contents of database 22, at step 301. Manager 23 also determines which portions 24 were affected by this change, i.e., the contents of which portions 24 were modified, at step 302. Manager 23 then sends the change to the peripheral nodes 11-12 which store cache copies 32 of the affected portions 24, at step 303. The receiving nodes 11-12 enter the change in their cache copies 32. Having completed the change, manager 23 enters a record of the change in change tables 26 which correspond to portions 24 which were affected by the change, at step 304, and exits, at step 305. FIG. 4 shows activities performed by database manager 23 to update boot copies 25. Periodically--for example, upon the timing out of an operating system timer--database manager 23 is issued an interrupt indicating that it is time to update boot copies 25. This is a low-priority interrupt, and hence manager 23 may not respond to it immediately upon receiving it, at step 400. When higher-priority work has been completed, manager 23 responds to the interrupt by duplicating the first two steps 201-202 of FIG. 2 to generate a new boot copy 25 of a database portion 24, at steps 401-402, respectively. This is the functional equivalent of retrieving the contents of a change table 26 corresponding to a first database portion 24 and modifying the present boot copy 25 of the database portion 24 by making the changes indicated by the retrieved contents of change table 26, as shown in FIG. 4 by the dotted-line steps 406 and 407. However, conversion of a portion 24 into a boot copy 25 may possibly introduce error into the boot copy 25. For reliability purposes--to prevent these errors from propagating--the approach of steps 406-407 is not favored, and the approach of steps 401-402 is used instead. New boot copy 25 is caused at steps 401-402 or steps 406-407 to reflect the present, up-to-date, contents of the corresponding database portion 24. The record of the changes is no longer needed, so manager 23 erases--zeroes out--the contents of change table 26 which corresponds to the newly-updated boot copy 25, at step 403. Manager 23 then checks if all boot copies 25 have been updated, at step 404. If not, manager 23 returns to step 401 to update another boot copy 25. If all boot copies 25 have been updated, manager 23 exits, at step 405. Memories 31 of peripheral nodes 11-12 typically are volatile memories. Hence, whenever power to a memory is lost, its contents are lost. Furthermore, memories 31 illustratively have no local back-up. Hence, whenever the contents of a memory 31 become lost or mutilated, a replacement therefor is not locally available. In either case, a new cache copy 32 of the database portion contents of memory 31 must be obtained from a source of such information, which in this example is administrative node 10. FIG. 5 shows the activities performed by database manager 23 to supply a peripheral node 11-12 with a new cache copy 32 of a database portion. In response to receiving a request from a node 11-12 for a new copy of a database portion 24, at step 500, manager 23 retrieves boot copy 25 that corresponds to the requested portion 24, at step 501. Manager 23 also retrieves the contents of change table 26 that corresponds to the requested portion 24, at step 502. Manager 23 then sends the retrieved boot copy 25, and the changes to the boot copy 25 that are specified by the retrieved change table 26 contents, to the requesting node 11-12, at step 505. Manager 23 then exits, at step 504. The requesting node 11-12 receives the sent boot copy 25 and the changes, and creates therefrom a new cache copy 32. Of course, it should be understood that various changes and modifications to the illustrative embodiment described above will be apparent to those skilled in the art. For example, change tables 26 and boot copies 25 need not be stored at administrative node 10, but may be stored anywhere in the system, such as at an independent database node, or in back-up storage of call processing nodes 11-12 when such storage is provided. Also, administrative node 10 may also serve as a call processing node and have its own cache copy 32 of its corresponding database portion 24.

Claims: Apparatus including means for maintaining a database having a plurality of modifiable portions, the portions having a first format; and means for storing records of modifications made to the database portions, CHARACTERISED BY means for generating boot copies of the database portions, the boot copies having a second format; and means responsive to a request from a requester for a cache copy of a database portion, for sending to the requester the boot copy of the requested portion and the presently-stored records of modifications made to the requested portion. Apparatus as claimed in claim 1 wherein the means for generating includes means for occasionally generating a new boot copy of a database portion based on then-present contents of that portion and for deleting previously-stored records of modifications made to that portion. Apparatus as claimed in claim 1 wherein the means for generating includes means for translating the database portions from the first format to the second format. Apparatus as claimed in claim 1 wherein the means for storing includes a plurality of storage means, each corresponding with a different one of the database portions, each for storing records of modifications made to the corresponding database portion; the means for generating includes a plurality of boot copies of the database portions, each corresponding with a different one of the database portions and having a second format different from the first format, and means responsive to modification of a database portion, for making a record of the modification in the storage means corresponding to the modified database portion; and the means for sending is responsive to a request from a requester for a cache copy of a database portion, for sending to the requester the boot copy of the requested portion and the modifications presently recorded in the storage means corresponding to the requested portion. Apparatus as claimed in claim 4 wherein the means for generating includes means for occasionally generating a new boot copy of a database portion, the new boot copy reflecting modifications presently recorded in the storage means corresponding to that database portion, and for deleting from the storage means corresponding to a database portion the records of the modifications reflected in the boot copy of that database portion. Apparatus as claimed in claim 5 wherein a boot copy initially comprises an up-to-date copy of the corresponding database portion. Apparatus as claimed in claim 5 wherein the generating means includes means for translating the database portions from the first format to the second format. Apparatus as claimed in claim 4 including cache copies of the database portions, the cache copies having the second format; and means responsive to a modification of a database portion, for notifying of the modification the cache copy of the database portion. Apparatus as claimed in claim 1 including a plurality of system nodes interconnected for communications, and cache copies of the database portions located at a plurality of the nodes, the cache copies having a second format; and wherein the plurality of portions of the database are located at a first location; the means for maintaining includes means connected to the database for making changes in the database portions; the means for storing includes a plurality of storage means each corresponding with a different one of the database portions, each for storing records of changes made to the corresponding database portion; the means for generating includes a plurality of boot copies of the database portions, each corresponding with a different one of the database portions, the boot copies having the second format, means connected to the plurality of storage means and responsive to the change making means, for making a record of a change in a database portion in the storage means corresponding to the modified database portion, and for notifying of the change the node at which a cache copy of the database portion is located, and means connected to the plurality of boot copies, for occasionally regenerating a boot copy to reflect in the boot copy changes that are presently recorded in the storage means corresponding to a same database portion as the boot copy, and for deleting from that storage means the records of the changes that were reflected in the regenerated boot copy; and the means for sending includes means located at the first location and responsive to a request from a node for a new cache copy of a database portion, for sending to the requesting node the boot copy of the requested portion and the changes presently recorded in the storage means corresponding to the requested portion. Apparatus as claimed in claim 9 wherein the regenerating means includes means for translating the database portion from the first format to the second format. Apparatus as claimed in claim 9 wherein the regenerating means includes means for occasionally making changes that are presently recorded in the storage means corresponding to a database portion in the boot copy of that database portion. Apparatus as claimed in claim 9 wherein the regenerating means includes means for replacing a boot copy of a database portion with a new boot copy that is formed anew from the corresponding database portion. A method of administering a database having a plurality of modifiable portions, the portions having a first format, CHARACTERISED BY the steps of: generating boot copies of the database portions, the boot copies having a second format; modifying a database portion; storing a record of the modification; and sending to a requester the boot copy of a requested portion and the presently-stored records of modifications made to the requested portion, in response to a request from the requester for a cache copy of the database portion. A method as claimed in claim 13 wherein the step of generating includes the steps of occasionally generating a new boot copy of a database portion based on then-present contents of that portion; and deleting previously-stored records of modifications made to that portion. A method as claimed in claim 13 wherein the step of generating includes the step of translating the database portion from the first format to the second format. A method as claimed in claim 13 wherein the step of storing includes the steps of in response to the step of modifying a database portion, making a record of the modification in a storage means corresponding to the modified database portion, and selectively repeating the steps of modifying and making a record; and the step of sending includes the step of sending to the requester the boot copy of the requested portion and the modifications presently recorded in the storage means corresponding to the requested portion. A method as claimed in claim 16 wherein the step of generating includes the steps of occasionally generating a new boot copy of a database portion to reflect in the new boot copy modifications presently recorded in the storage means corresponding to that database portion; and deleting from the storage means corresponding to a database portion the records of the modifications reflected in the boot copy of that database portion. A method as claimed in claim 16 wherein the step of generating includes the step of translating each of the database portions from the first format into the second format. A method as claimed in claim 16 in an apparatus having a first node including the database and a plurality of other nodes including cache copies of the database portions, including the step of in response to modifying a database portion, notifying the node, at which a cache copy of the database portion is located, of the modification. A method as claimed in claim 16 in an apparatus having a first node including the database and a plurality of other nodes, including the steps of: initially sending cache copies of the database portions to the other nodes for storage at the other nodes; and in response to modifying a database portion, notifying the node, at which a cache copy of the database portion is located, of the modification. A method as claimed in claim 17 wherein the step of occasionally generating includes the step of occasionally modifying the boot copy of a database portion with modifications presently recorded in the storage means corresponding to that database portion. A method as claimed in claim 17 wherein the step of occasionally generating includes the step of replacing a boot copy of a database portion with a new boot copy that is formed anew from the corresponding database portion. A method as claimed in claim 17 wherein the step of occasionally generating includes the step of translating the database portion from the first format into the second format.

Inventors: BLOCK FREDERICK PETER, CHAN NORMAN CHIN-HUNG, BLOCK, FREDERICK PETER, CHAN, NORMAN CHIN-HUNG
Applicants: AT & T CORP, AT&T CORP.
Application year: 1989
Main classification: G06F17
IPC codes: G06F15, G06F13, H04Q3, G06F17, G06F12