Design and Implementation of a Module to Synchronize Databases Amit Hingher Reviewers: Prof. Dr....
-
Upload
leonard-lynch -
Category
Documents
-
view
226 -
download
2
Transcript of Design and Implementation of a Module to Synchronize Databases Amit Hingher Reviewers: Prof. Dr....
Design and Implementation of a Module to Synchronize Databases
Amit Hingher
Reviewers: Prof. Dr. rer. nat. habil. Andreas Heuer Prof. Dr.-Ing. Hartmut Pfüller
Advisor: Dr.-Ing. Holger Meyer
Herr Andreas Finger
Stefan Dummann (softEnergy GmbH)
Master Thesis, University Of Rostock, Germany
23rd May 2007
Master Thesis, Amit Hingher 2
Overview
Introduction
Concept
WIS-Sync - A Prototype
Conclusions & Future Work
Master Thesis, Amit Hingher 3
1. Introduction
Data Replication
Wind Information System (WIS)
Motivation
Existing Solution
Master Thesis, Amit Hingher 4
What is Data Replication? Database replication:
Process of creating and storing multiple copies of a database with the same data in different locations.
Two types of replication- Synchronous Asynchronous
Master Thesis, Amit Hingher 5
Data Synchronization Synchronization / Merge replication
Keeps the data in two or more locations up-to-date so that each repository contains identical information.
Copies data in both directions Used for disconnected environment
Master Thesis, Amit Hingher 6
WIS - Wind Information System
An innovative solution for complex analyses and monitoring of power plant data received from energy plants
GUI is provided by a Web server and can be accessed by client through a Web-Browser like IE or Mozilla
Diverse databases running on the server and client i.e. Oracle, Sybase, MySQL
Communication only possible between server and remote replicas and no “inter-replica” communication
Master Thesis, Amit Hingher 7
Motivation
LocalcopyWIS
Server
Localcopy
No communication link
Synchronize
Master Thesis, Amit Hingher 10
Why another solution ? Dumping whole DB to client
Alternative to log based capture – A middle-ware replication tool that intercepts
command stream between application and database
Synchronization tool relies entirely on transaction log
Cost of maintenance
Currently no manual interaction
Master Thesis, Amit Hingher 11
2. Concept Proposed System
WIS-Sync: A 3-Step Process
Capture process
Merge Process - Conflict Resolution
Table Filtering
Incremental progress
Manual resolution
Master Thesis, Amit Hingher 13
Golding’s Timestamp Anti-Entropy Protocol Updates are propagated via anti-entropy
sessions in which two replicas exchange the content of their logs
Master Thesis, Amit Hingher 15
Conflict Resolution - Basics A conflict is said to arise when rows with
same unique ID from the same tables are updated on different databases
Resolution option used: Server- Wins Client-Wins
Master Thesis, Amit Hingher 20
Table-Filtering
Allows user to select the tables he wants to synchronize
Provides maximum flexibility
User has full control over the system thus avoiding any unnecessary updates
Master Thesis, Amit Hingher 23
How has this research helped ? Features & Improvements
Capture Process - “direct-to-database” method Table filtering Conflict Resolution Incremental progress Manual resolution Support for heterogeneous databases
Master Thesis, Amit Hingher 25
OJB – ObJect Relational Bridge Apache (OJB) is an Object/Relational mapping tool that allows transparent persistence for Java Objects against relational
databases.
Supports the following DB’s: MSSQL MySQL Oracle MS Access PostgreSQL Informix Sybase MaxDB
Master Thesis, Amit Hingher 29
3. Conclusions
No general solution available toward synchronization
Principal goal of an update propagation strategy is to ensure internal and mutual consistency
“Direct-to-database” approach can prove to be an alternative to log-based capture
O/R Mapping can be used in scenarios where compatibility between diverse databases is needed.
Master Thesis, Amit Hingher 30
Future Work
User-friendly GUI Interface
Multiple users synchronizing
Could be implemented for a mobile as well.