Font Size: a A A

A Method Of Database Real-time Synchronization Based On Mediator Pattern

Posted on:2009-11-15Degree:MasterType:Thesis
Country:ChinaCandidate:Y HuFull Text:PDF
GTID:2178360242981290Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Heterogeneous database is the focus in the research field of the database.There are two isomerous forms from the point of data management: platformisomer and semantic isomer. Data logic representation and databaseinteroperability are the two aspects of semantic isomer. Data logicrepresentationrelatestotheuseofthedatamodel,dataschema,aswellasdatatypes (such as records, text and multimedia). For the data logic representationisomer, on the whole, there are two solutions. One is standardization ormodifying the different data patterns in a global model so as to eliminate thedifferences in the data representation. The other is to achieve thetransformation of different data representation in the premise of allowingretainingrepositoryindependenceofdatathroughsomemeans.At present, emphasis and focus of existing heterogeneous databasesynchronization schemes is different. The solutions that are provided by allmajor database vendors are closely integrated with their DBMS coretechnology, fully utilize the characteristics of their own DBMS and advantageof vendors. There are advantages in performance and integrity. But becausethe companies are closely integrated with its own database products and fewconsiderations on the specific characteristics of other DBMS, the direction ofsynchronization is very sensitive. Each schema has the premise of accordingwithcertainarchitecture orstandard, whichhas also ledtothesystem resourcerequirementsarehigherandthescopeofapplicationislimited.Thispaperpresentsamethodwhichappliesintermediarypatternofdesignpatterns to heterogeneous database synchronization. The method utilizesintermediaries to make object not need to refer to each other, to change theirinteraction characteristics amongthem independently. Consequently, solve theproblemofsensitivesynchronizationdirection. The real-time database synchronization method based on intermediarypatternusesmiddlesoftwaresystem(thatis,intermediariesintheintermediarypattern)toconnectsourceinformationsystemsandtargetinformationsystems,achieves data synchronization by transfer mode. The source informationsystems are applications which are associated with the source database, targetinformation systems are applications which are associated with the targetdatabase, through the operation of the corresponding applications to achievethe update of source database and target database. Intermediate softwaresystem can receive, store and transmit data which needs to synchronizebetween source database and target database. Data which is received byintermediate software system will first be stored in its own database. Thecontentofthedatawhichneeds tosynchronize(thecontent herereferstotableand field in the database), the format and significance of the value, etc, arepreengaged by the source database and the target database, the middlesoftwaresystemdoesnotneedtoknowthecontentsofsynchronization.The real-time database synchronization based on intermediary pattern isdividedintotwoprocesses:Updatedtheprocessthat datatransfers from thesourcedatabasetomiddlesoftware system: when the operations that the source information systemsupdate source database have not yet submitted, the source information systemsent message (in this paper, data which is packaged byagreed format is calledinformation, message will also contains some additional information,including target databases which need to synchronize, etc) to the middlesoftware systems. Intermediate software system inserts information which isafter resolution in its own database, if insert operation is successful, sourcedatabase submits update operation, or rollbacks. The sequence of insertionorderandreceiveorderinintermediatesoftwaresystemarethesame.Updated the process that data transfers from the intermediate softwaresystem to target database: intermediate software systems query the firstinserted message in their own database, search result will be stored in the application's inherent variables. Then in the database, delete the message, butbefore the submission of delete operation, intermediate software systems willsendthemessagetothetargetinformationsystems,targetinformationsystemsresolve the message by the agreed format, update target database inaccordance with the results of resolution. If the update of target database issuccessful, intermediate software systems submit the deletion operation,otherwiserollback,preparetosendonceagain.In the process of real-time database synchronization based onintermediary pattern, in order to ensure the atomicity, use the two-phasecommitprotocol. Inaddition,for"theprocessofupdatingdatafromthesourcedatabase to middle software system", there is one point that needs to clarify:the source information systems will not update the same content in sourcedatabase at each time, if the updated content which is done by sourceinformation system to source database has nothing to do with the targetdatabase(under the agreement to judge whether relate), then the data will notneed to be packed and send to middle software system, that is, intermediatesoftware system does not need to know the update operator which is done bysource database. If only a part of the updated content which is done bysourceinformation system to source database is related to target database, then thesource information systems will only need to pack contents which are relatedto target database and then send to middle software system in accordance withthe agreement. If the updated content which is done by source informationsystem to source database is the same as agreement content, the sourceinformation systems need to pack all updated content and then send to themiddlesoftwaresystems.In the real-time database synchronization method based intermediarypattern,themiddlesoftwaresystems canberoughlydividedintofourmodules:the server end (Server_DOS), the enquiry client end(APP), Agent transponder(Agent_DOS),andtheconfigurationend(ConfigureAPP).After the startup of the server end, that is Server_DOS, the middle software system can receive messages which are sent from the sourceinformation system, complete the "process of updated data from the sourcedatabase to the middle software system." In the synchronization process, theserverisalsotheserverofsourceinformationsystems.The enquiry client end, that is APP, can carry out enquiries on send stateof message, also can query detailed information of message which is receivedbymiddlesoftwaresystem.APPistheclientofServer_DOS.Agent transponder, that is Agent_DOS is a relatively independentlyoperating modules among middle software system. Agent transponder is usedto send message of middle software system database to the target informationsystem, completes the "process of updated data from the middle softwaresystem to the target database." It is the client of target information systemserver.Configure end, that is configureAPP, is completely independentlyoperating module among middle software system. It is used to configurecontents, such as IP address of target information system server, databaseinformationofmiddletransmitsystem,etc.This paper presents the real-time database synchronization method basedon intermediary pattern. Due to the use of two-phase commit protocol,guarantee the atomicity of affairs, and therefore can guarantee the completesynchronization of data. Because synchronization is achieved by middlesoftware system, guarantee the transparency between source database andtarget databases, make the sensitive of the direction of synchronizationresolved.
Keywords/Search Tags:Synchronization
PDF Full Text Request
Related items