Wireless connectivity offers the promise of remote access of enterprise data for mobile users but persistent wireless connections are not always possible, practical or desirable.
The reasons are:
• Mobile user may be in an environment that does not have wireless coverage.
• Applications do not have a real time data access requirement to justify the costs of persistent wireless communications.
• The very presence of a wireless connection could compromise an application or a user's security.
Software Application Developers require an infrastructure with application services that enable the development, delivery and operation of secure, personalized applications to mobile or embedded devices.
Oracle Lite 10g is a part of Oracle's Database that extends the Oracle 10g grid environment and it makes your applications mobile. Oracle Database Lite describes a group of components that includes:
• the Lite Database,
• the Mobile Server for Data Synchronization, Life Cycle Management and
• a Rapid Application Development environment.
Oracle Database Lite is a complete solution and is more than just a small database. The Oracle Lite database included in this solution is not an abbreviated version of the Oracle database but was designed from the ground up to be used with mobile applications in small and embedded devices.
Data Synchronization
A user's data is synchronized between Oracle Lite Database and an Oracle database server. This synchronization is accomplished by invoking the Mobile sync client, mSync, which interacts with the Mobile Server. The Mobile Server uses synchronization objects such as users, publications, publication items, and subscriptions to process client and server data changes. This technique is referred to as a publish/subscribe model.
Synchronization Process
Oracle Database Lite contains a subset of data stored in the Oracle database. This subset is stored in snapshots in the Oracle Lite database. Unlike a base table, a snapshot keeps track of changes made to it in a change log. Users can make changes in the Oracle Lite database while the device is disconnected, and can synchronize with the Oracle database server when connected.
There are basically three types of publication items that can be used to define synchronization:
• fast refresh,
• complete refresh, and
• queue based.
The most common method of synchronization is a fast refresh publication item, where changes are uploaded by the client and changes for the client are downloaded.
Meanwhile, a background process called the Message Generator and Processor (MGP) periodically collects the changes uploaded by all clients and applies them to database tables. It then composes new data, ready to be downloaded to each client during the next synchronization, based on predefined subscriptions.
The following figure describes Oracle Database Lite Synchronization Process.
1. Sync moves updated rows from the client database to the In Queue and from the Out Queue to the client database...
2. MGP (Message Generator Processor) applies In Queue changes to base tables and Composes the changes from the base tables to client Out Queues.
Application in Visual Studio .Net 2005
I have developed a mobile application in Visual Studio .Net 2005 using Oracle Lite database as the mobile database and Oracle 10g as a central database. Initially, it took a lot of my time to establish the connection with Oracle Lite from VB .Net. Therefore, I decided to share it with all my fellow developers so that they don't face the same kind of problems and waste their time solving it.
So, here are the steps:
1. Make sure that you have the latest version of JDBC Driver i.e. classes12.zip
2. Open Command prompt
3. Set ClassPath as:
• Set ClassPath=E:Ora10gLitejdbclibclasses12.zip;
• Type wtgpack and press Enter. This will open packaging wizard.
4. Perform Following Steps in packaging wizard:
a. Select Create New Application Definition.
b. Select Platform.
c. Specify Application Name : (e.g. MyApplication)
d. Specify Virtual Path : (e.g. /MyApplication)
e. Specify Description : (e.g. MyApplication Application)
f. Keep other options blank and click "Next" button.
g. Click "Next" button in next window also.
h. Provide Database name in next window.
i. Click on Import button in next window and provide Database User name, Password and Database URL (e.g. MyDatabase, MyDatabase, jdbc:oracle:thin:@MyDBServerName:1521:MyDatabaseServiceName) and then click on Ok.
j. Then Select Tables for which you want to create snapshot. Click Add button and then click Close button and then click Next.
k. Click "Next" button in next window also.
l. Click Finish button.
m. Select "Publish the current Application" and click OK.
n. After getting successful message click on Exit.
5. Type http://MyDBServerName:ConfiguredPort/webtogo in explorer. And login.
(For Ex. http://SEM:82/webtogo )
6. Create the User for the publication application you created, as follows:
a. Click on Applications tab on upper left side.
b. Click on Mobile Manager.
c. Click on Host Name.
d. Click on User Tab on the upper right side.
e. Click on Add User and provide the necessary Information and then click on ok.
f. Then click on user you created.
g. Click on "Access" tab on the upper right side and select the application you created using Packaging Wizard and then click on save button.
7. Now install the necessary Mobile Client on the development PC. This client will be installed on the device when you will run the application for the first time.
8. Click on Oracle DM on the device and provide username password and server URL and click on ok button.
9. Then click on oracle msync on device. In that click on apply and then on sync button.
10. The snapshot of the database will appear on your device.
11. Enjoy coding.
About Author:
Anjum Hirani is working as Senior Software Engineer at M/s. Semaphore Info Tech Pvt. Ltd, India. He has more than 2 years of experience in software development.
He has been developing Pocket PC, Tablet Pc applications using .NET, ASP.NET, C#, VB.NET with SQL Server and ORACLE databases since last 2 years.
You can find additional info at the following links:
Click Here for more informationClick Here for more information
No hay comentarios:
Publicar un comentario