Developing a Mobile Web-based Application with Oracle9i Lite Web-to-Go

Similar documents
Oracle Database Lite 10gR2 Technical White Paper. An Oracle White Paper June 2006

Oracle9i Application Server Architecture and Com

Enterprise Software Architecture & Design

Adding Mobile Capability to an Enterprise Application With Oracle Database Lite. An Oracle White Paper June 2007

Introduction. This course Software Architecture with Java will discuss the following topics:

Oracle Database Lite. Developer's Guide 10g (10.3.0) B

Introduction. Literature: Steelman & Murach, Murach s Java Servlets and JSP. Mike Murach & Associates Inc, 2003

Enterprise Web based Software Architecture & Design

Advanced Java Programming

Chapter 2 FEATURES AND FACILITIES. SYS-ED/ Computer Education Techniques, Inc.

Session 8. Introduction to Servlets. Semester Project

Enterprise Java and Rational Rose - Part II

Oracle 10g and IPv6 IPv6 Summit 11 December 2003

Ch04 JavaServer Pages (JSP)

Oracle CRM Gateway for Mobile Devices

Distributed Multitiered Application

X100 ARCHITECTURE REFERENCES:

INTRODUCTION TO SERVLETS AND WEB CONTAINERS. Actions in Accord with All the Laws of Nature

Lab session Google Application Engine - GAE. Navid Nikaein

Oracle Field Service/Laptop

Introduction To Web Architecture

IBM WebSphere Application Server. J2EE Programming Model Best Practices

Database Applications Recitation 6. Project 3: CMUQFlix CMUQ s Movies Recommendation System

Introduction. This course Software Architecture with Java will discuss the following topics:

ICOM 5016 Database Systems. Database Users. User Interfaces and Tools. Chapter 8: Application Design and Development.

This tutorial will teach you how to use Java Servlets to develop your web based applications in simple and easy steps.

Oracle Transparent Gateways

Oracle 10g: Build J2EE Applications

Vision of J2EE. Why J2EE? Need for. J2EE Suite. J2EE Based Distributed Application Architecture Overview. Umair Javed 1

Oracle Developer Day

Oracle ADF: The technology behind project fusion. Lynn Munsinger Principal Product Manager Application Development Tools Oracle Corporation

Servlets by Example. Joe Howse 7 June 2011

About the Authors. Who Should Read This Book. How This Book Is Organized

Security Tips in Oracle Reports Services Release 6i with Oracle Portal Release 3.0. An Oracle Technical White Paper October 2000

LAB 1 PREPARED BY : DR. AJUNE WANIS ISMAIL FACULTY OF COMPUTING UNIVERSITI TEKNOLOGI MALAYSIA

Oracle Database Mobile Server

Problems in Scaling an Application Client

Oracle Warehouse Builder 10g Runtime Environment, an Update. An Oracle White Paper February 2004

Oracle WebLogic Server 11g: Administration Essentials

Intranet Mailing System. Abstract

Customizing a Packaged Application for a J2EE Environment: A Case Study. Leslie Tierstein TopTier Consulting, Inc.

John Heimann Director, Security Product Management Oracle Corporation

Oracle Database Mobile Server

J2EE Development. Course Detail: Audience. Duration. Course Abstract. Course Objectives. Course Topics. Class Format.

Oracle Field Service/Palm TM Devices

Oracle Database Lite Reviewers Guide - Installation 10g (10.3.0) March 2007

sessionx Desarrollo de Aplicaciones en Red A few more words about CGI CGI Servlet & JSP José Rafael Rojano Cáceres

Enterprise Java Unit 1-Chapter 2 Prof. Sujata Rizal Java EE 6 Architecture, Server and Containers

Designing a Distributed System

Oracle WebLogic Server 12c: Administration I

Inside WebSphere Application Server

JDBC Today C HAPTER 1 INTRODUCTION

Introduction. Enterprise Java Instructor: Please introduce yourself Name Experience in Java Enterprise Edition Goals you hope to achieve

PeopleSoft Internet Architecture

CHAPTER 4: ARCHITECTURE AND SYSTEM DESIGN OF PROPOSED EXPERT SYSTEM: ESOA

Oracle Directory Services 11g: Administration

The ismart Suite Developing and Deploying Embedded Spatial Applications and Web Services in a Standard Enterprise IT Environment

The Basic Web Server CGI. CGI: Illustration. Web based Applications, Tomcat and Servlets - Lab 3 - CMPUT 391 Database Management Systems 4

SUN Enterprise Development with iplanet Application Server

Java Enterprise Edition

<Insert Picture Here>

Web based Applications, Tomcat and Servlets - Lab 3 -

Highly Available Forms and Reports Applications with Oracle Fail Safe 3.0

13. Databases on the Web

J2EE for Oracle Technologists

Enterprise Java Technologies (Part 1 of 3) Component Architecture. Overview of Java EE. Java Servlets

CERTIFICATION SUCCESS GUIDE ENTERPRISE ARCHITECT FOR JAVA 2 PLATFORM, ENTERPRISE EDITION (J2EE ) TECHNOLOGY

APPLICATION PROGRAMMING: MOBILE COMPUTING [ INEA00112W ] Marek Piasecki PhD Mobile Databases (W8/2013)

Oracle Developer Day

BEAWebLogic Server. Introduction to BEA WebLogic Server and BEA WebLogic Express

Cloud Computing Platform as a Service

Oracle Applications OAF, MSCA, MA and ADF. May 06, 2011

Oracle9iAS Tech nicaloverview

Enterprise Java Unit 1- Chapter 3 Prof. Sujata Rizal Introduction to Servlets

Advanced Topics in Operating Systems. Manual for Lab Practices. Enterprise JavaBeans

JOURNAL OF OBJECT TECHNOLOGY

1Z Java EE 6 Web Component Developer Certified Expert Exam Summary Syllabus Questions

Oracle Database Mobile Server, Version 12.2

Oracle 1Z Oracle9i Forms Developer: New Features.

Quick Web Development using JDeveloper 10g

Accessing EJB in Web applications

Oracle Developer Day

JAVA SERVLET. Server-side Programming INTRODUCTION

Oracle Field Service/Palm TM Devices

Analysis, Modeling, and Design (AMD) Tools Software Market Strategies, Market Opportunities, and Market Forecasts, 2001 to 2006

Teamcenter Global Services Customization Guide. Publication Number PLM00091 J

DISCLAIMER COPYRIGHT List of Trademarks

Oracle Field Sales/Laptop

Factsheet of Public Services Infrastructure (PSi) Updated on: 1st Sep 03

J2EE Interview Questions

Learn about the latest offerings in Adobe Connect. This article summarizes the new features and enhancements.

Chapter 13. Application Architecture and Modeling. McGraw-Hill/Irwin. Copyright 2007 by The McGraw-Hill Companies, Inc. All rights reserved.

3C05 - Advanced Software Engineering Thursday, April 29, 2004

Developing Java TM 2 Platform, Enterprise Edition (J2EE TM ) Compatible Applications Roles-based Training for Rapid Implementation

Servlets and JSP (Java Server Pages)

Components and Application Frameworks

1Z Oracle. Java Platform Enterprise Edition 6 Enterprise JavaBeans Developer Certified Expert

Thin Desktop - The business case for using a PC or Thin Client as the user access device in a virtualization deployment

Connecting the RISC Client to non-javascriptinterfaces

Fast Track to Java EE

Transcription:

Developing a Mobile Web-based Application with Oracle9i Lite Web-to-Go Christian Antognini Trivadis AG Zürich, Switzerland Introduction More and more companies need to provide their employees with full access to their enterprise databases when they are not directly connected to the company s network. In many cases a virtual private network over a dial-up or wireless connection can solve such a problem. Unfortunately this method doesn t provide a solution when: the needed network bandwidth is not available or is too expensive, neither a dial-up nor a wireless connection can be guaranteed at anytime and everywhere. In addition, sometimes the data is mostly read-only and therefore a remote connection is not an effective or efficient way to access it. Therefore the need for an application which can be used when the users are disconnected from the company s network is a real one. Of course such applications lead to another set of problems that must be solved! The biggest problems are the following. Since the users are working offline, the data must be replicated. This replication of readonly data is not really a problem, but when the data must also be modified by the clients the complexity increases. The users should be able to use the same application while they are working online and offline. Notice that is not a technical problem to develop such an application, but the overhead for the developers can be huge (i.e. high cost of development). The deploying and management of the application must be centralized. To effectively face up to these problems, Oracle recommends Oracle9i Lite. In this article, we will discuss the main features of this product and show a possible architecture based on one of its components. Oracle9i Lite Oracle9i Lite is not only a small footprint database system, but is a complete framework for creating mobile applications based on Oracle databases. It can be used to develop fat clients or thin clients (i.e. web-based applications). As emphasized by the title of this article, here we are interested in the latter. Therefore we will only cover the features of Web-to-Go, i.e. the component of Oracle9i Lite that enables this type of application development. Developing a Mobile Web-based Application with Oracle9i Lite Web-to-Go 1/5 May 2002

What is Web-to-Go? Web-to-Go is a framework that enables developers to create web-based applications that can be used either online (i.e. while connected to the company s network or the Internet) or offline. Therefore the main features of Web-to-Go are the following: the replication and synchronization of data used by offline clients, the development of a single application that can be run either online or offline, a central management of the application (i.e. the management of the software itself, the data and the users). The Web-to-Go applications are based on standard J2EE components like Servlets and JSPs. Presently the product is available for Windows 32, Windows CE/Pocket PC, Palm OS and EPOC. However this article only covers the Windows 32 version. Web-to-Go Three-tier Environment Client Mobile Server Database Server Browser HTTP / HTTPS HTTP Oracle9i Server Mobile Client Web Server JDBC Local Data Store Oracle9i Lite Apache Server Web-to-Go module Standalone Web-to-Go Oracle Net Central Data Store Mobile Server Repository Client Mobile Server Database Server When the user works online, only the web browser is used, i.e. each call is sent to the Mobile Server. When the user works offline, the Mobile Client Web Server is used to run the application s components that access the local database. For each user working on a specific client a local database is created. This runs the application s components used by the online users and provides seamless synchronization between the clients Oracle Lite databases and the Oracle Server. It can be integrated with an Apache server via module or it can be started standalone. The Mobile Server repository and the application data must reside in the same Oracle database. The Mobile Server repository contains the properties of the application and the application s components themselves. Note: Oracle8, Oracle8i and Oracle9i are supported on the database server (notice that Oracle9i is supported since Oracle9i Lite 5.0.1 only). Developing a Mobile Web-based Application with Oracle9i Lite Web-to-Go 2/5 May 2002

Lite Database The Lite database is used to store the data on the client when the user is working offline. Of course the schema installed within this database should be compatible with the schema installed in the company s database server. Therefore it supports the main objects that can be used with the Oracle Server database, i.e.: Tables with constraints, indexes and triggers Views Sequences Synonyms Java stored functions and procedures Users Notice that PL/SQL stored functions, procedures and packages are not supported! Of course different tools are provided to manage the database. The most important are the following: CREATEDB used to create the database MSQL command-line interface to connect a database OLLOAD command-line tool to load data from an external file into a table, or to unload (dump) data from a table to an external file Note that Oracle Net (formerly Net8 and SQL*Net) cannot be used to connect the database. Instead an ODBC interface is provided. Building Web-to-Go Applications Web-to-Go applications adhere to web standards. Therefore they are composed of static objects like HTML/GIF/JPEG files and dynamic components like Servlets, JSPs, JavaBeans and Applets. The application s components can be developed and debugged with any Java IDE. To use Web-to-Go features or to simplify development (for example to generate HTML code from database tables), some Java packages are provided. In any case, the developer is not compelled to use these packages; although it can develop standard Java components or use other libraries. Getting the connection to the database is an exception to this. In fact the applications must transparently use both databases, therefore it is not possible to carry out a standard connection. The following code shows how to get a connection in a Servlet: import oracle.lite.web.servlet.orahttpservletrequest; import java.sql.connection; public class MyServlet extends HttpServlet { public void doget(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException {... Connection connection = ((OraHttpServletRequest) request). getuserprofile().getconnection();... } } Developing a Mobile Web-based Application with Oracle9i Lite Web-to-Go 3/5 May 2002

Notice that the connection itself is a standard JDBC connection. Therefore these are the only lines of codes that are specific to Web-to-Go. Deployment The deployment must be performed with the tool WTGPACK (of course distributed with the development kit). This tool is basically used to specify which components are part of the application and which objects must be replicated between the databases. During the development the Mobile Server Repository is not used. Instead WTGPACK generates an XML configuration file. Also for this reason, a development standalone Web-to- Go server, that reads the XML configuration file, is available for development. Of course at any moment it is possible to deploy the components in the Mobile Server Repository and test them via the standard Web-to-Go server. Client Installation To perform the installation of the Mobile Client for Web-to-Go, a small (113KB) setup program must be downloaded from the Mobile Server. This program automatically downloads the necessary software and performs its installation. Notice that this installation is very compact. In fact less then 5MB are necessary for the Mobile Client Web server and the database engine. Then the first time a user connects from a specific mobile client, the application is downloaded and the data is synchronized. Data Synchronization The most important thing to notice, is that the standard Oracle replication is not used here! Instead Web-to-Go uses a model similar to publish-subscribe. During data synchronization, the mobile client uploads data changes into IN queues in the Oracle Server database. On the database server, a background process (the consolidator message generator and processor - MGP) applies the pending transactions from the IN queues to the Oracle database. The MGP is also responsible for generating new data updates for the mobile clients. These updates are stored in OUT queues from where the mobile client retrieves them during the synchronization. Notice that it is possible to upload changes into the IN queue and download updates from OUT queue even if the MGP is not running. The network load generated during data synchronization is modest. For example an update of 1000 rows in a table on the server (ca. 100KB of raw data) has generated 120KB of traffic between the client and the server. Therefore the synchronization of small amounts of data should work without problems also when the client is connected to the Internet via a 56K modem. Unfortunately only two conflict resolution methods are available, i.e. client wins and server wins. Therefore for specific conflict resolutions, triggers on the server must be implemented. Developing a Mobile Web-based Application with Oracle9i Lite Web-to-Go 4/5 May 2002

Management Management is carried out via the Mobile Server Control Center, a Web interface that enables the administrator to perform different operations like: administering the Mobile Server itself (starting/stopping MGP, view active sessions, etc.), managing the users and their privileges, managing the applications (modifying application properties, suspending/resuming an application, etc.), scheduling data synchronization jobs for specific mobile clients. Conclusion Considering the fact that standard J2EE components are used, the ease of Web-to-Go s management and client installation, the capacity of its deployment, the quality of its data synchronization and its high overall performance, this product is certainly worth considering if you have to develop of a mobile web-based application. Developing a Mobile Web-based Application with Oracle9i Lite Web-to-Go 5/5 May 2002