Object-Oriented Data Synchronization for Mobile Database over Mobile Ad-hoc

  • Published on

  • View

  • Download

Embed Size (px)


2008 International Symposium on Information Science and Engieering

Object-Oriented Data Synchronization for Mobile Database over Mobile Ad-hoc NetworksYang Li, Xuejie Zhang, Yun Gao School of Information Science and Engineering Yunnan University Kunming, China lymagic@yahoo.cn

AbstractData synchronization provides a feasible solution for improving data accessibility and consistency in mobile database systems. Flexible and efcient data synchronization, however, remains a challenging problem in mobile database applications over mobile ad-hoc networks(MANET). This paper proposes a novel ObjectOriented Data Synchronization(OODS) schema in mobile database systems, for providing a exible and efcient data synchronization service to applications running over MANET. OODS employs Publication/Subscription mode and DB4O as the database engine. Subscribers can recognize update of publishing schema automatically. On publishers, publishing schema and conict solutions can be user-dened or inherited from the schema inheritance tree. Sample data were congured to conduct performance evaluation over Bluetooth Piconet. The obtained results indicated the efciency and feasibility of the schema and its potential for synchronizing data in mobile database over MANET.

chronization is always a complex and pivotal part in mobile database systems, because it guarantees data consistency, improves data availability and decrease query response delay. The data synchronization system maintains the consistency of multiple local databases in different mobile nodes so that each node can access local data instead of remote ones[4, 10]. In this way, synchronization can signicantly improve distributed applications availability, reliability and scalability. Data synchronization technology for mobile database has been broadly researched and a number of data synchronization systems have been developed, such as: RDA and Merge Replication(MR) technology[8, 5] based on Microsoft SQL Server with SQL CE, Mobile Sync technology[11] based on Oracle Database with Oracle Lite and other technologies[2, 3, 12]. These technologies or systems have some disadvantages that make them unsuitable for mobile databases in MANET. First, they are designed for classical mobile database architecture[2], illustrated in Figure 1, they work well to synchronize data between mobile database and enterprise-level large-scale relational databases. While, in MANET, however, mobile nodes such as PDAs and Smartphones, have limited power and storage resource, which must be taken into consideration when designing a data synchronization system, because mobile nodes cannot run a large-scale RDBMS. Figure 2 shows the architecture of mobile database in MANET. Second, mobile applications usually need complex and compound data types, which are less supported in relational databases[9]. Third, impedance mismatch problem between object-oriented and relational models will bring additional development difculties and worsen efciency. In this paper, we propose a novel data synchronization system for mobile databases, called Object-Oriented Data Synchronization (OODS), for providing an efcient and exible data synchronization service in MANET. OODS133

1. IntroductionA mobile ad-hoc network(MANET)[7] is used to provide an instant wireless communication environment without any preexisting infrastructure. In MANET, an autonomous collection of mobile nodes communicate over relatively bandwidth constrained wireless links, the network topology may change rapidly and unpredictably over time, mobile nodes have limited battery power and storage resources. Consequently, data accessibility is much limited in this dynamic wireless communication environment than wired ones. One possible method to solve this problem is to use mobile databases(MDB)[4] which provide a uniform data accessing interface for mobile applications. Data syn978-0-7695-3494-7/08 $25.00 2008 IEEE DOI 10.1109/ISISE.2008.19

Authorized licensed use limited to: Chaitanya Bharathi Institute of Technology. Downloaded on November 24, 2009 at 00:24 from IEEE Xplore. Restrictions apply.

uses DB4O[6] as database engine. DB4O is a pure objectoriented embedded database and also open-source software. OODS adopts Publication/Subscription mode[8], it treats everything as an object. Publishing schema is dened as a Class and can be inherited by new publishing schema. This paper is organized as follows. Section 2 describes the OODS schema. Section 3 presents our implementation and experimental results of OODS, respectively. Section 4 summarizes this paper and outlines our future work. Finally, section 5 gives an acknowledgement.

Figure 1. Classical architecture of MDB

and equally. Mobile nodes are divided into two roles: publisher and subscriber, as shown in Figure 2, a cluster header is often chosen as publisher while cluster members as subscribers, because cluster header usually has more powerful CPU, energy and storage resource. A publisher can also be a subscriber in upper cluster networks, only if it is a cluster member in the upper cluster. In OODS, everything is an object, including our applications, data records and publications. Data and Publications are both stored in the publishers local database, so that, publication object and data have a uniform access and management interface. To simplify publishing management, each publication can have many subscribers. These subscribers make a group to share one publication object. This is also accord with the real application scenario in which a few mobile nodes usually have the same business logic or computing work. A publication has the denition of publishing strategies for a subscriber group while each subscriber in the group can has its own data lters to reduce database les size. Figure 3 illustrates the architecture of OODS. It is designed with two parts: publisher and subscriber, they communicate over WiFi, Bluetooth, or other wireless ad-hoc network protocols which support TCP link.

Figure 2. MDB architecture in MANET

2. Object-Oriented Data Synchronization2.1. System overviewMobile applications must be scalable and easy-updated to catch up with changefully business logic. Publication/Subscription framework satises this requirement well[8]. When the business logic has changed, only publishing schema has to be changed instead of redeploying updated application copies on a number of mobile nodes, each subscriber can synchronize hotspot data according to new publishing schema. So, we employ Publication/Subscription mode in OODS. In a MANET, each mobile node maintains a local DB4O database independently Figure 3. OODS architecture On the publisher, mobile application can access publisher database directly or as a subscriber through the Publisher-Agent. The core part is Pub-Update module which is in charge of publishing schema managing, conict resolving and subscriber group managing. Publisher must authenticate each subscriber, so an access control list is maintained by Subscriber Group Manager object which also cooperates with Schema Manager to authenticate coming-in subscribers. When many subscribers update the same data object, conicts will occur, Schema Manager object mes-


Authorized licensed use limited to: Chaitanya Bharathi Institute of Technology. Downloaded on November 24, 2009 at 00:24 from IEEE Xplore. Restrictions apply.

sages to Conict Resolver object which resolves the conicts according to predened strategies. Schema Manager denes and maintains every publishing schema with the help of Subscriber Group Manager and Conict Resolver, it also communicates with Publisher-Agent for publishing data objects to subscribers. On the subscribers, mobile applications access their local database when they are off line. Once they go back to the network or up to date data are required, data synchronization starts. Subscriber-Agent rst sends a subscribe request to the Publisher-Agent. Then the publisher responses subscribers with their publishing schema instead of dataset, which unlike other synchronizing technologies such as MR that sends data directly to the subscribers. This design strategy eases the burden on publishers, because their limited hardware resources and they may have to deal with many synchronizing jobs at the same time. OODS puts part of the synchronizing works onto the subscribers. When the subscribers receives publishing schema which is an object, they compare with the old schema to nd changes. If the schema has changed, Subscriber-Agent will request a snapshot dataset according to the new schema, otherwise, only an increment-update dataset will be requested. When the required data objects arrived, Data Filter only saves interested data according to use-dened strategies to reduce the database les size.

ferent synchronizing strategies have to be satised.

Figure 4. Class diagrams of PubSchema & Subscriber

Publishing schema management is the core part of publishing process. It affects applications efciency and determines what dataset will be published. Figure 5 illustrates the activity diagram of schema management.

2.2. Publishing schema managementIn OODS, publishing schema is dened as a Class PubSchema; every publishing denition is an instance of that class. In this way, schema management can use object-oriented technologies, such as: inheriting from other schema to form a new publishing denition, encapsulating control data together with override conict resolving functions, etc. Furthermore, publishing denitions can be stored in database like other data objects, which simplies updating, sending and persisting processes. Subscribers are also dened as objects of Class Subscriber. Figure 4 shows the class diagrams of PubSchema and Subscriber. Property SuberList holds a subscriber list; it is associated with a group of Subscriber objects that contain authentication information of each subscriber who subscribes this publication. This authentication information helps ensure the subscribers identity. Property ClassList holds publishing class list, these classes are included in this publication, i.e. only subscribers in the SuberList can subscribe objects of classes in the ClassList. Methods UpdateSuberList(IList) and UpdateClassList(IList) are used to maintain SuberList and ClassList, respectively. To judge whether a data object is required to be synchronized, method IsRequireSync(object) will be called, it will be override if dif-

Figure 5. Activity diagram of schema manage

When establishing a publishing schema initially, the schema manager requests subscribers information from subscriber-group manager and then creates a subscriber list. A pub-class list is also created according to publishing strategies. Now, schema manager uses the two lists to establish pub-objects and stores them into the DB4O database. When publishing schema has to be modied, schema manager rstly searches for the pub-object and fetch it into main memory from database. Since publication is also an object, search process uses the SELECT operation provided by DB4O engine. Next, schema manager updates the objects subscriber list and class list through its two methods: UpdateSuberList() and UpdateClassList(). At last, schema manager stores the modied object back into the database.


Authorized licensed use limited to: Chaitanya Bharathi Institute of Technology. Downloaded on November 24, 2009 at 00:24 from IEEE Xplore. Restrictions apply.

2.3. Synchronization process

In OODS, like other data synchronizing technology, the data synchronization process is launched by subscribers. OODS provides three data synchronization modes: uploadsync, download-sync and bi-sync, which three support different application scenarios. (1) Upload-sync is suitable for data collection centralized business logic. In this mode, subscribers only submit their data update to the publisher and the latter synchronizes its local data after conict resolving. (2) Download-sync is more efcient when therere a mount of query operations in business logic. This time, the Subscriber-Agent sends a request for synchronizing data with its identity. Publisher-Agent checks the authentication information by sending a message to the schema manager. If the identity conrmed, schema manager will search for the pub-object that subscribed by the subscriber in database and then send the pub-object to the subscriber through Publisher-Agent. Then, publisher continues to serve other subscribers in the subscribe-queue until a data request is ready in the data-request-queue. In this way, many synchronization processes are parallel in the application layer, which improves OODSs throughput. When subscriber receives the pub-object, it checks whether the object are updated. OODS deal with this work by using object version number. If the current version number of the pub-object is greater than the old one, it is considered to be updated and Subscriber-Agent will prepare a new data-request according to new version pub-object and send it to publisher. Otherwise, Subscriber-Agent only sends a data-request for increment update dataset accord with previous pub-object. (3) Bi-sync is the combination of upload and download synchronizing modes. Figure 6 shows the sequence diagram of bi-sync process. This mode is a trade off between upload and download modes, it is more convenient in compound environments in which both query and modifying operations are necessary. After a subscriber verifying the pubobjects update status, the upload synchronizing process begins, the updated dataset is sent to publisher with the status ag. Then download synchronizing process starts according to the status ag, i.e. that ag decide which download modes is chosen, snapshot or increment.

Figure 6. Sequence diagram of Bi-sync

3.1. Experimental environmentOur testing mobile application contains seven mobile nodes, one as publisher and the others as subscribers; each of them is a HP iPAQ rx4240 Pocket PC with 400MH CPU, 64MB SDRAM and 128MB ROM. They are running the Windows Mobile 5.0 operating system. Their embedded Bluetooth 2.0 + EDR (3MB/s) adapters are used to establish a Piconet due to the advantages (low price, energysaving, anti-jamming, scalability, exibility) of Bluetooth technology[7]. OODS and the experimental mobile application are both implemented by C# programming language with Microsoft .NET Compact Framework, because they have the best compatibility and efciency on Windows operating systems. To avoid impedance mismatch problem between object-oriented and relational models, the DB4O database engine is involved. It works as a dynamic link library and its APIs are used to interact with it. Deploy publishing module and subscribing parts of the experimental application onto publisher and subscribers, respectively. The schema of testing database is shown in Table 1. It is designed into an object-oriented database, but we illustrate it in tabl...