AU2007231648B2 - Method and apparatus for data processing - Google Patents

Method and apparatus for data processing Download PDF

Info

Publication number
AU2007231648B2
AU2007231648B2 AU2007231648A AU2007231648A AU2007231648B2 AU 2007231648 B2 AU2007231648 B2 AU 2007231648B2 AU 2007231648 A AU2007231648 A AU 2007231648A AU 2007231648 A AU2007231648 A AU 2007231648A AU 2007231648 B2 AU2007231648 B2 AU 2007231648B2
Authority
AU
Australia
Prior art keywords
database
serialisation
computer system
journal
entries
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
AU2007231648A
Other versions
AU2007231648A1 (en
Inventor
James Scott Tarbell
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maximum Availability Ltd
Original Assignee
Maximum Availability Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from PCT/NZ2001/000206 external-priority patent/WO2002031696A1/en
Application filed by Maximum Availability Ltd filed Critical Maximum Availability Ltd
Priority to AU2007231648A priority Critical patent/AU2007231648B2/en
Publication of AU2007231648A1 publication Critical patent/AU2007231648A1/en
Application granted granted Critical
Publication of AU2007231648B2 publication Critical patent/AU2007231648B2/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

- 1 AUSTRALIA PATENTS ACT 1990 COMPLETE SPECIFICATION FOR A STANDARD PATENT ORIGINAL Name of Applicant/s: Maximum Availability Limited Actual Inventor/s: James Scott Tarbell Address for Service is: SHELSTON IP 60 Margaret Street Telephone No: (02) 9777 1111 SYDNEY NSW 2000 Facsimile No. (02) 9241 4666 CCN: 3710000352 Attorney Code: SW Invention Title: METHOD AND APPARATUS FOR DATA PROCESSING Details of Original Application No. 2002212843 dated 01 Oct 2001 The following statement is a full description of this invention, including the best method of performing it known to me/us: File: 38783AUP01 la METHOD AND APPARATUS FOR DATA PROCESSING 5 Field of the Invention The present invention relates to a method and apparatus for data processing. More particularly, but not exclusively, the invention relates to a method and apparatus for database replication. 10 Background of the Invention In a number of data processing applications fragments of data sent from a source system must be processed into a required data format 15 on a target system. In many instances it is desired to replicate a database on a target computer system from a database on a source system. This process may involve sending journal entries from the source database to allow 20 updating of the target database. Databases may consist of one or more library, each of which contains one or more files, each file having one or more members. Each member consists of a table having one or more rows. A journal entry may contain an identifier of the library; file; file member and a row of changed data for the file member. This 25 journal entry may be used by the target computer system to update its database. It is important that database entries from a given table are updated in the correct sequence and that inter-related members are updated in the 30 correct sequence. To ensure that journal entries are properly processed a receive process of the target computer system may compare an object name (library/file/member) with a database of objects stored on the target computer system. When a matching 2 object is located the processing information associated with that object may be used to process the journal entry. The traditional approach has been to transfer journal entries, store 5 them and replicate the database utillsing a single engine. This approach is slow and complex. Reference to any prior art in this specification does not constitute an admission that such prior art forms part of the common general knowledge. It would be desirable for a database replication system to meet the following requirements: 10 I. Ensure that journal entries are serialised by database member (at a minimum), and by any user specified groupings. 2. Support an extremely large number of database apply processes 15 so that database i1O (input/output) can be easily managed. 3. Process journal entries in a way which minimises the amount of system 1/O (e.g. paging) between the time the entries are obtained from the journal and the time it is applied to the replica 20 database. 4. The functions support any type of data packets, not just journal entries, to allow for future extensions to other types of replication (e.g. object, stream files etc). 25 5. The system hides the complexity of the memory management functions from other components. It is an object of the present invention to provide a method and apparatus for information replication which meets at least some of these requirements or to at least provide the public with a useful choice.
3 DISCLOSURE OF THE INVENTION According to a first aspect of the invention there is provided a method of replicating a database from a source computer system to a target computer system comprising: i) receiving journal entries from the source computer system; and ii) allocating serialisation groups to process journal entries and update the database of the target computer system, wherein a single control program a) allocates tasks to serialisation groups to enable journal entries to be updated in a correct sequence, and b) controls the serialisation groups so each serialisation group is processed in isolation. Preferably the target computer system is a multi-processor computer system. BRIEF DESCRIPTION OF THE DRAWINGS The invention will now be described by way of example with reference to the accompanying drawings in which: Figure 1: shows a schematic diagram of a source computer system which provides journal 10 entries to a target computer system. Figure 2: is a functional diagram illustrating the processes involved in database replication at a target computer system. Figure 3: shows the mapping of storage space within the target computer system, Figure 4: shows a flow diagram illustrating the process for allocating journal entries to 15 serialisation groups. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT The following description describes a database replication method where the source and target computer systems are IBM AS/400 [THE NEXT PAGE IS PAGE 6] 6 computers operating under the OS/400 operating system. It will be appreciated that the method is applicable to other systems with appropriate modification. 5 Referring to figure 1, source system A contains a primary database 1. Primary database 1 may contain one or more library. Each library may contain one or more file. Each file may contain one or more members. Each member comprises a table having one or more rows. A unique library/file/member combination is referred to as an object. 10 When a row of any member of primary database 1 is modified a journal entry including the object name and the modified row is sent to local journal receiver 2. Local journal receiver 2 sends the journal entry via communications link 3 to a remote journal receiver 4 of a target 15 computer system B. A database replication process 5 receives the journal entries and modifies the contents of replica database 6 to maintain it in conformity with primary database 1. Referring now to figure 2 the process and apparatus for replicating 20 target database 6 of the target computer system will be described. To ensure proper replication of replica database 6, database members are updated in the replica database 6 in the same order as they are modified in the primary database 1. To achieve this a number of serialisation groups 8 are defined, Journal entries having the same 25 object name are grouped into a common serialisation group so that they are updated in the correct order. Certain database members may have relationships with other database members (joins etc) and so may be assigned to a common serialisation group to ensure all inter-related members are updated in the correct sequence. A serialisation group 30 may thus contain journal entries for a number of objects. The use of such serialisation groups enables database replication to be conducted in the appropriate sequence as well as facilitating efficient parallel processing.
7 Receive process 7 may either assign a received journal entry to a serialisation group, assign a journal entry to a default serialisation group or discard the journal entry. Serialisation group assignment is 5 performed based upon an assignment database (MXSGMBAS) and a temporary OS/400 user index object. The journal entry assignment functions are provided via an ILE service program - which allows the underlying implementation to be modified without recompile/bind of the calling functions. 10 The assignment database MXSGMBAS contains all objects, their relationship with other objects (i.e. do they need to be grouped with other objects during processing) and their required manner of processing. Assignment of a journal entry to a serialisation group 8 15 could be conducted simply by comparing the object name of each received journal entry with the assignment database MXSGMBAS and assigning the journal entry to a serialisation group based upon the associated information. However, the assignment database MXSGMBAS contains many objects and considerable processing time 20 is required to perform a database locate operation and extract the relevant processing information. According to the invention a member assignment (MBIX) index temporary object is used to store processing information for an object. This is an index of objects giving their associated serialisation group and related processing information 25 (including a link to their associated control structures). Referring now to figures 2 and 4 the serialisation group assignment will be described. When a journal entry is received in step 11 receive process 7 conducts a comparison in step 12 to see whether the object 30 is present in the MBIX index. If so, operation proceeds to step 13 and a serialisation group number and database file index (DBFIDX) is returned and processing continues within the assigned serialisation group.
8 If the object name is not stored in the MBIX index then a full object name lookup is conducted in the MXSGMBAS database 9 in step 14. If the lookup is successful then a serialisation group is returned, a 5 Database File Index (DBFIDX) is assigned which will point to the processing information stored in a dynamic array maintained by the associated serialisation group and an entry is added to the MBIX index in step 15. Each Database File Index (DBFIDX) is created simply by incrementing an index that is unique by serialisation group. 10 If a match is not achieved in step 14 then a generic name lookup is conducted in step 16. This involves a search by a library/file /*all and then by library/*all/*all. If a generic match is achieved the full name is added to the MBIX table in step 17 and processing continues in steps 15 15 and 13 as before. If no match can be achieved the journal entry is discarded in step 1 8. Accordingly, at startup, there will be no entries in the MBIX index 10. As journal entries are processed, serialisation groups and the 20 processing information for objects will be added to MBIX index 10. The serialisation group and processing information may be much more rapidly obtained from MBIX table 10 than from MXSGMBAS database 9 25 This method gives the following, significant, performance benefits: 1. The serialisation groups do not need to search for a member's related processing information. They simply maintain the processing information in a dynamic array with the Database 30 File Index as the means of access.
9 2. All operations relating to a particular member name may refer to the serialisation group and Database File Index value to uniquely identify the member (a "handle"). 5 Referring now to figure 3 the method of memory management within the target computer system will be described. Storage object space is divided up into a number of storage units SU1-SUN. Each storage unit has a storage unit header 20. The storage unit header 20 gives the number of serialisation groups which have journal entries in the storage 10 unit. Each data segment consists of a storage entry header 21 and a storage entry 22. Storage entries are aligned on 16 byte boundaries with padding blocks 23 filling any space between an entry and a 16 byte boundary. 15 Journal entries are passed on from receive process 7 for storage in a storage object space 24. The journal entries from receive process 7 are stored in storage space object 24 in blocks 22. Each journal entry 22 has an associated storage entry header 21 (or handle) which contains information as to the displacement to the next journal entry in 20 the storage unit for that serialisation group and an associated Database File Index (DBFIDX) containing the processing information for the member associated with the journal entry. The processing information is maintained in dynamic memory with the Database File Index as the means of access. 25 In normal operation journal entries are consecutively written to one storage unit until it is filled and then journal entries are written to the next available storage unit. Once writing to a storage unit has been completed journal entries may be read from the populated storage unit. 30 Partially filled storage units may be read out when system resources are not being otherwise utilised (i.e. no incoming journal entries need to be stored).
10 This approach means that memory locks are not required during reading and writing. During the writing process the receive process 7 has exclusive access to write to a storage unit. No locks are required during read operations and so journal entries may be simultaneously 5 read to their associated serialisation group. The only locking required is to decrement the value held in storage unit header 20 when the last journal entry for a serialisation group is read out. The available storage units queue (ASUQ) 25 controls the order in 10 which free storage units are utilised. ASUQ, 25 includes a last in first out (LIFO) buffer which stores addresses of free storage units. Journal entries of a serialisation group are read out of a storage unit until a null value is found in a storage entry header. As each storage entry 22 is read out the storage unit header 20 is decremented. When all journal 15 entries are read out completely from a storage unit the storage unit header 20 will be decremented to zero and the storage unit number is returned to the ASUQ and is the first storage unit re-assigned when new journal entries must be written into storage space. In this way the most recently used storage units are maintained active to reduce 20 the working set of storage units to a minimum. When all journal entries in a storage unit have been read and the storage unit is released the entire address range of the storage unit may be purged without requiring writing of data to auxiliary storage. 25 Referring again to Figure 2 the manner of processing will be further described. Control process 19 oversees the replication process and controls processing in the receive process 7 and within the serialisation groups 8. In this manner processing can be conducted within each 30 serialisation group without regard to processing within another serialisation group. By having the whole process controlled by an overarching control process 19 each serialisation group can conduct its 11 processing in isolation without regard to the complexity of the overall operation. As each serialisation group receives journal entries for a member in 5 sequence the updating of that member in the replica database 6 is sequential also. By processing linked members in a particular serialisation group processing is streamlined. When a replica database 6 is to be made a primary database partially 10 applied commits must be removed. Firstly, the control process 19 suspends receive process 7 and processing by serialisation groups 8. Control process 19 then identifies all "open" commit groups (e.g. commit IDs that have not yet received a commit or roll back journal entry). These are processed, serially, from the most recent (i.e. the 15 commit group that has the most recent journal entry) to the oldest as follows: i) a receive process of receive process 7 receives the commit group's journal entries from journal receiver 26; 20 ii) all entries are assigned to a "default" serialisation group; iii) the entries are stored in storage unit 24 in the usual manner but are linked in reverse order (i.e. the head of the list is the last entry in the storage unit, with links moving backward until the first entry in the storage unit); 25 iv) if a storage unit is filled before that commit group's entries are complete, the storage unit is pushed onto LIFO queue TLQ 27 (instead of releasing it to the default serialisation group). Then a new storage unit is allocated (as normal) and entries continue to be stored; 30 v) when the commit group's available journal entries are completely received and stored in storage units, the storage 12 units are dispatched to the default serialisation groups in LIFO order. The result being that the serialisation group receives the journal entries in reverse order (from most recent to oldest); vi) the default serialisation group processes the entries as 5 "reverse" entries (the entries include a flag to indicate that they are "reverse" entries). This results in all inserts being processed as deletes, updates being removed to their prior image and deletes being inserted etc. Only journal entries which had already been applied (e.g. during normal processing) to the 10 database are processed; vii) the default serialisation group does not perform a commit on the "reverse" entries until it receives the "data commit group" journal entry. This ensures that if a failure is encountered during the "clean-up" the database is in a known state. This 15 enables the "clean-up" to be restarted. Once all of the "open" commit groups have been "removed" the control process 19 suspends the other processes and the replica database is ready to be used as the primary database. 20 This method allows rapid "clean-up" of partially applied commits which does not require processing capability of the system to be utilised unless a secondary database does in fact have to be made a primary database. 25 The method and apparatus of the invention provide a number of advantages as follows: 1. The allocation of storage unit blocks within a storage space 30 object and control of read/writes avoids the need for locks and read/write concurrency issues.
13 2. The use of serialisation groups enables members to be updated in a serial manner and for inter-related members to be updated in correct chronology. Serialisation groups enable multiple streams of journal entries to be simultaneously processed whilst 5 processing interrelated members together. 3. The use of the MBIX index greatly reduces lookup time for each journal entry. The use of storage entry headers 21 (handles) enables the next journal entry of a serialisation group to be 10 located rapidly. 4. The use of a control process to oversee the operation of the receive process and processing within serialisation groups enables the sub-processes to process information efficiently 15 without the need to interact with other processes. 5. Simple handling of commits where secondary database is to be made primary database. 20 Where in the foregoing description reference has been made to integers or components having known equivalents then such equivalents are herein incorporated as if individually set forth. Although this invention has been described by way of example it is to 25 be appreciated that improvements and/or modifications may be made thereto without departing from the scope or spirit of the present invention.

Claims (7)

1. A method of replicating a database from a source computer system to a target computer system comprising: 5 i) receiving journal entries from the source computer system; and ii) allocating serialisation groups to process journal entries and update the database of the target computer system, wherein a single control 10 program a) allocates tasks to serialisation groups to enable journal entries to be updated in a correct sequence, and b) controls the serialisation groups so each serialisation group is processed in isolation. 15
2. A method as claimed in claim 1 wherein the target computer system implements parallel processing.
3. A method as claimed in claim 1 or claim 2 wherein. the target 20 computer system is a multi-processor computer.
4. A computer system programmed to operate according to the method of any one of the preceding claims. 25
5. A computer program adapted to carry out the method of any one of claims 1 to 3.
6. A computer readable medium containing a computer program as claimed in claim 5. 30
7. A database replicated by the method of any one of claims 1 to 3.
AU2007231648A 2000-10-09 2007-10-25 Method and apparatus for data processing Ceased AU2007231648B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
AU2007231648A AU2007231648B2 (en) 2000-10-09 2007-10-25 Method and apparatus for data processing

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
NZ50738600 2000-10-09
NZ507386 2000-10-09
PCT/NZ2001/000206 WO2002031696A1 (en) 2000-10-09 2001-10-01 Method and apparatus for data processing
AU2002212843A AU2002212843B2 (en) 2000-10-09 2001-10-01 Method and apparatus for data processing
AU2007231648A AU2007231648B2 (en) 2000-10-09 2007-10-25 Method and apparatus for data processing

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
AU2002212843A Division AU2002212843B2 (en) 2000-10-09 2001-10-01 Method and apparatus for data processing

Publications (2)

Publication Number Publication Date
AU2007231648A1 AU2007231648A1 (en) 2007-11-15
AU2007231648B2 true AU2007231648B2 (en) 2010-09-09

Family

ID=39410434

Family Applications (1)

Application Number Title Priority Date Filing Date
AU2007231648A Ceased AU2007231648B2 (en) 2000-10-09 2007-10-25 Method and apparatus for data processing

Country Status (1)

Country Link
AU (1) AU2007231648B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0420425A2 (en) * 1989-09-25 1991-04-03 International Business Machines Corporation A data processing system and method for updating a database therein
EP0724223B1 (en) * 1995-01-24 2001-07-25 Compaq Computer Corporation Remote duplicate database facility with database replication support for online line DDL operations

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0420425A2 (en) * 1989-09-25 1991-04-03 International Business Machines Corporation A data processing system and method for updating a database therein
EP0724223B1 (en) * 1995-01-24 2001-07-25 Compaq Computer Corporation Remote duplicate database facility with database replication support for online line DDL operations

Also Published As

Publication number Publication date
AU2007231648A1 (en) 2007-11-15

Similar Documents

Publication Publication Date Title
AU2002212843B2 (en) Method and apparatus for data processing
AU2002212843A1 (en) Method and apparatus for data processing
US5481722A (en) Method and apparatus for merging change control delta structure files of a source module from a parent and a child development environment
US5835908A (en) Processing multiple database transactions in the same process to reduce process overhead and redundant retrieval from database servers
US20020198899A1 (en) Method and system of database management for replica database
JP4340226B2 (en) Providing usable versions of data items
CN111797121A (en) Strong consistency query method, device and system for read-write separation architecture service system
WO2001006413A1 (en) System for accessing database tables mapped into memory for high performance data retrieval
JP2007122302A (en) Information retrieval system, index management method, and program
JPWO2005086003A1 (en) Database system
JPH06139120A (en) File updating system
US6895487B2 (en) Methods for intra-partition parallelism for inserts
US7581135B2 (en) System and method for storing and restoring a data file using several storage media
JP2002169718A (en) Continuous data storage technology
AU2007231648B2 (en) Method and apparatus for data processing
NZ537170A (en) Method and apparatus for data processing
NZ546248A (en) Method and apparatus for replicating a database
US5978810A (en) Data management system and method for storing a long record in a set of shorter keyed records
NZ546247A (en) Method and apparatus for replicating a database
JPH04199339A (en) Distributed transaction file control method for distributed processing system
Cha et al. Design and implementation of a consistent update method for multiple file replicas in a distributed file system
Chong et al. Rapid Recovery of Very Large Memory Resident Data Objects
JPH0212438A (en) Heap file system

Legal Events

Date Code Title Description
FGA Letters patent sealed or granted (standard patent)
MK14 Patent ceased section 143(a) (annual fees not paid) or expired