Sie sind auf Seite 1von 8

Oracle Lite to SQLite(Android) Synchronization through Oracle Database Mobile Server

Components
Oracle Database Server : It consists of the Database and the web application(If available) on the remote system Client System : It can be any device a mobile, a computer that connects the mobile server through api. Mobile Server : Its a middle tire server which is installed on the server in order to handle communication between server and client by listening to Api request through client

Oracle Database Mobile Server:

1.Oracle Database Mobile Server is the best way to securely connect mobile applications to Oracle Database. It is well suited for mission critical applications or any application where high performance and reliability are required. It extends the application grid to mobile devices, allowing access to enterprise data and applications in the absence of a network connection. When a network connection is available, Oracle Database Mobile Server uses data synchronization to allow reliable and secure data exchange with a back-end Oracle Database.

Oracle Database Mobile Server Architecture:

On the clientThe mobile application communicates through the Sync Server with the mobile server and uploads the changes made in the client machine. It then downloads the changes for the client that are already prepared by the mobile server. On the mobile serverA background process called the Message Generator and Processor (MGP), which runs in the same tier as the mobile server, periodically collects all the uploaded changes from many mobile users and then applies them to the server database. Next, MGP prepares changes that need to be sent to each mobile user. This step is essential because the next time the mobile user synchronizes with the mobile server, these changes can be downloaded to the client and applied to the client database.

SQ-Lite Mobile Client Here SQ-Lite Mobile Client is referred to any client application which communicates with the server implicitly using the Client Side APIS. In case of Android handset, the application is to be developed and internal communication should be handled using APIS.

When you install the SQ-Lite Mobile client, the following components are provided: Sync EngineEnables manual or automatic synchronization. Manual synchronization is initiated by the mobile application. Automatic synchronization can be enabled only on the Win32, WinCE, and Linux platforms. The Sync Engine interacts with the SQLite database to upload and download data in conjunction with the Mobile Server to synchronize the data with the Oracle database. Device Manager Agent (DM Agent)The DM Agent is only installed on Win32, WinCE, and Linux. The Mobile Server uses the DM Agent to send commands to the device and manage the mobile device. The Blackberry and Android platforms cannot be managed by the Mobile Server, so the DM Agent is not installed on these devices. Mobile applicationInteracts with the SQLite database to manage the data. Interacts with the Sync Engine to initiate a manual synchronization.

Architecture for Client with SQLite Database and SQLite Mobile Client

Data Synchronization Architecture

Synchronization Procedure

1. Step1-Synchronization is initiated on the Mobile client either by the user or from automatic synchronization Note: Some platform restriction for Synchronization:

Platform Blackberry

Automatic synchronization No

Device management through the DM Agent No

Android

No

No

Win32

Yes

Yes

WinCE Linux

Yes Yes

Yes Yes

i.e.Android does-not support automatic synchronization. It only support the manual synchronization through API. 2. Step2-Mobile client software gathers all of the client changes into a transaction and the Sync Client uploads the transaction to the Sync Server on the Mobile Server. 3. Step3-Sync Server places the transaction into the In-Queue. 4. Step4-Sync Server gathers all transactions destined for the Mobile client from the OutQueue. 5. Step5-Sync Client downloads all changes for client database. 6. Step6-Mobile client applies all changes for client database. For Android Mobile clients, if this is the first synchronization, the SQLite database is created. 7. Step7- All transactions uploaded by all Mobile clients are gathered by the MGP out of

the In-Queue. 8. Step8- The MGP executes the apply phase by applying all transactions for the Mobile clients to their respective application tables to the back-end Oracle database. The MGP commits after processing each publication.

9. Step9-MGP executes the compose phase by gathering the client data into outgoing transactions for Mobile clients. 10. Step10-MGP places the composed data for Mobile clients into the Out-Queue, waiting for the next client synchronization for the Sync Server to gather the updates to the client.

Installation Process for Oracle Database Server:

Q&A Q1. Is this Technique Bidirectional or not? Yes, Its bidirectional in nature, i.e the updates from server side is reflected in the client side and vice verse is also true.

Q2. Is it support Multiple Clients ? Yes, Multiple clients can send or receive updates from server. Q3. Does it have Automatic Synchronization? No(for Android), Server/Client do not automatically push the updates and that should be manually controlled through Synchronization APIs Q4. Can we get/use Update Event (Server Side). If yes, How? In order to automatically synchronize client mobiles, update event in server side should be used, the details of which can be found in API reference. Q5. Does Server Returns .db Instance every time to the client ? If its the first time that the client synchronizing with server, it sends the .db file instance to client. Later on it will send only updates.

Das könnte Ihnen auch gefallen