Informix Web Integration Option for Informix Dynamic...
-
Upload
phunghuong -
Category
Documents
-
view
227 -
download
2
Transcript of Informix Web Integration Option for Informix Dynamic...
Abstract
Web Integration OptionTM for Informix Dynamic ServerTM provides applica-
tion developers with the ability to generate Web-enabled applications that can
dynamically access any information stored within Informix databases. This
paper reviews the components required for developing and managing Web-
enabled database applications, and then examines how the Informix Web
Integration Option can ensure successful development and management of
these applications.
Table of Contents
Introduction 1
Web-Enabled Database Application Architecture 3
Middleware 4
Common Gateway Interface 4
Other Middleware Solutions 5
Informix’s Web Integration Option 6
Open, Robust Development Environments 6
Enhanced Manageability 7
High Performance and Scalability 7
Persistent State 8
Secure Environment 8
Browser and Server Independence 8
Informix’s Web Integration Option: Technical Overview 9
Architecture Overview 9
Application Management 10
Connection and Session Management 11
Components of the Web Integration Option 12
HTML Tag Extensions 12
Web-DB Publisher 12
Informix’s Web Integration Option API 13
Integration with Web Servers 13
Web Integration Option Advantages 14
Centralized Management 14
Object-Relational Extensions 14
Delivering Unsurpassed Performance 15
Conclusion 17
Introduction
The World Wide Web has proven to be an excellent medium for businesses
to disseminate information, both internally and externally. An external Web
site enables a company to publish marketing literature to inform and educate
customers, partners, and suppliers about its company and product offerings.
An intranet Web site lets a company distribute a wide range of company-spe-
cific information to its employees such as employee directories, sales material,
marketing plans, etc. The Web provides businesses with a low-cost delivery
mechanism for publishing a wide variety of information.
As the technology evolves, companies are beginning to utilize the Web as
a medium for their day-to-day business transactions. For example, companies
are creating interactive, customizable applications that use the Web to let cus-
tomers buy products and services. This innovative method of using the Web
not only allows companies to address existing markets through new means,
but also enter into new market segments, thus increasing business revenues
and expanding market share objectives.
To unlock the potential of the Web, Informix offers Informix Dynamic
Server and the Web Integration Option. Optimized for both publishing and
transaction-based environments, the Web Integration Option offers a set of
products and services that together with Informix Dynamic Server provide a
solution for allowing today’s businesses to create truly mission-critical Web
applications across the distributed enterprise.
Unlike all other Web solutions which store Web applications as flat files
and scripts in the file system, the Web Integration Option stores all of the
Web application content—including HTML files, Web page templates, and
multimedia content such as text, images, maps, and photos—within Informix
Dynamic Server. By storing all the Web application content within the data-
base, developers can manage the application as it grows in size and complexi-
ty, ensuring the dynamic delivery of information to users. By managing all
the content in the database, organizations can take advantage of the power of
Informix Dynamic Server—and better manage, query, and secure their Web
data.
A critical component of Informix’s Web Integration Option is the ability
to rapidly develop Web applications that can dynamically access the informa-
tion stored within any Informix database or legacy application in your enter-
prise. Informix’s Web Integration Option provides development and run-time
1
components that integrate the Web server with Informix Dynamic Server. By
utilizing this robust interface, developers can quickly and easily generate Web
applications that incorporate data retrieved dynamically from Informix
Dynamic Server.
This paper discusses in detail Informix’s Web Integration Option. It first
explores the architecture of typical Web-enabled database applications and
how Informix’s Web Integration Option can ensure successful development of
such applications.
2
Web-Enabled Database ApplicationArchitecture
To build a Web-enabled database application, the following components
are necessary:
• Web client
• Web server
• Middleware
• Database server
The Web client is a Web browser such as Netscape Navigator or
Microsoft Internet Explorer. The Web server is any HTML-based server such
as Netscape FastTrack or Enterprise Server, or Microsoft Internet Information
Server. An end user can spawn a database application through the Web
browser that communicates with the Web server through the Internet via
hypertext transport protocol (HTTP).
The middleware is responsible for managing communication and provid-
ing application services between the Web server and the database server. The
middleware software calls external programs or “scripts” that act as the “trans-
port and layout mechanism” between the Web server and the database server.
This script constructs the query, passes the query to the database, and formats
the output as an HTML page. The Web server then returns the HTML page
to the Web browser to display the information to the end user.
The database server manages the data residing within the database.
3
Web C l i en t
h t t p h t t p
I n t e rne t/ In t r ane t Web Se r ve r M idd l ewa re ( CG I ) Da taba seSe r ve r
F i g u r e 1 :
Components of
Web-Enabled
Database
Applications
Middleware
There are a number of middleware solutions in the market today. The most
popular middleware used today is the common gateway interface (CGI).
Other solutions include ISAPI from Microsoft and NSAPI from Netscape.
Common Gateway Inter face
CGI is an interface used for interfacing external applications with a Web serv-
er. Applications can use CGI as a vehicle to communicate with the database,
transmit information to the server, and receive results for display on the
client. This technique provides a simple mechanism for basic database con-
nectivity.
While CGI offers a simple way to connect to a database, it does have
some limitations. First, CGI applications are not persistent. Each time the
CGI program is accessed through the Web server the CGI program starts up,
performs its processing, then exits. Because the CGI application is restarted
with each request, the database connection must be re-established each time.
As a result, applications that require a persistent database connection have to
use complicated techniques to maintain state between client requests and
waste a lot of bandwidth trying to maintain them.
CGI also suffers from performance problems, especially in multiuser
applications where multiple database connections are required. In addition to
the persistence problem discussed above, CGI applications cannot be shared
by multiple client requests. Even if a CGI application is running when a new
request comes in, a new copy of the CGI application is started. As more con-
current requests are made, more concurrent processes are created on the serv-
er. Creating an application process for every request is time-consuming and
requires a large amount of memory. Additionally, it restricts the resources
available for the application itself, thereby slowing down performance and
increasing wait time.
Another problem with CGI is the fact that there is no language associat-
ed with it. To provide a Web application with access to a database, a develop-
er must write a script using languages such as PERL or Tcl—languages that
can lead to performance problems. Many application developers simply do
not have the knowledge or the time to create and maintain these CGI scripts
and HTML files. Most businesses do not have this expertise in house.
Finally, manageability is a key concern with CGI. Since developers have
to write separate scripts in order to connect to the database, these scripts and
files may be spread out across the network, hence become very difficult to
manage and control. Additionally, security is of a special concern. Since a
4
CGI program is executed on a company’s Web server, special precautions are
needed to ensure security. These precautions may include moving CGI pro-
grams to a special directory. This creates additional work for both program-
mers and Web masters.
Other Midd leware So lut ions
To overcome the limitations described above, both Microsoft and Netscape
came out with their own middleware solutions: Microsoft with ISAPI and
Netscape with NSAPI. These APIs provide better performance, enable devel-
opers to more easily develop complex applications, and offer better protection
and security. These solutions, however, still rely on middleware scripts to inte-
grate with the database and therefore have many of the same performance
problems as CGI.
5
Informix’s Web Integration Option
To address the limitations and the incompatibilities of CGI, NSAPI, and
ISAPI, Informix offers the Web Integration Option for Informix Dynamic
Server. The Web Integration Option lets customers maximize the potential of
the Web by allowing them to create robust Web enabled database applica-
tions. It offers state-of-the-art technology to bring high performance and
enhanced manageability. Additionally, the Web Integration Option supports
all popular Web servers, operating systems, and Web browsers, and is com-
patible with other middleware solutions such as CGI, NSAPI, and ISAPI.
Combined, these capabilities allow customers to build dynamic, interactive
applications that respond to the growing sophistication of users.
In use om over 1,000 applications, Informix’s Web Integration Option
lets developers create intelligent Web applications that incorporate data
retrieved dynamically from Informix databases. The type of data retrieved by
the application can be any datatype supported by Informix database servers,
including traditional alpha-numeric datatypes, as well as HTML pages,
images, documents, spreadsheets, presentations, maps, audio, or any user-
defined datatypes.
Informix’s Web Integration Option is based on industry-leading technol-
ogy, and delivers:
• rapid application development;
• enhanced manageability;
• open, robust development environments;
• persistent application state;
• unsurpassed performance and scalability;
• a secure environment; and
• Web browser and server independence.
Combined, these capabilities allow customers to build dynamic, intelli-
gent Web applications.
Open, Robust Deve lopment Env i ronments
Informix’s Web Integration Option provides an open development environ-
ment for creating Web applications. Unlike CGI, which requires developers
to write proprietary scripts to create Web applications, the Web Integration
Option offers two industry-standard development methods to address the dif-
ferent needs of Web application developers.
6
The first development method is ideal for Web application developers
that are publishing dynamic information on the Web. Through a small col-
lection of Informix HTML tag extensions, Web authors can create applica-
tions that dynamically construct Web page templates from Informix Dynamic
Server and present it to the end users. The Web Integration Option also lets
users create their own customized and reusable tags to perform specialized
tasks. Through the use of these HTML tags, Web authors are able to create
powerful applications quickly and easily without resorting to programming.
The second method is for applications that are more transaction-based or
client/server oriented. To extend the functionality of the application, this
method lets developers create customized Web applications through a pro-
grammatic API. The API offers a collection of basic services, such as connec-
tion and session management, that is automatically incorporated within any
customized Web applications created by the developers to ensure performance
and persistence.
Informix’s Web Integration Option supports applications developed in
many programming languages, including C, C++, and Java. This flexibility
lets developers port existing database applications to the Web, as well as
develop new Web-enabled applications using more sophisticated languages.
Enhanced Manageabi l i ty
Informix’s Web Integration Option eliminates the problems associated with
manageability by storing the entire Web application content inside the
Informix database. This ensures that developers can gain easy access to all the
content associated with the Web application, allowing them to efficiently
manage the application as it grows in size and complexity. They can also take
advantage of all database features for Web applications, including backup and
recovery, replication, data and process modeling, and ad hoc querying.
High Per formance and Sca labi l i ty
Informix’s Web Integration Option lets developers create applications that
deliver the highest performance possible. This is accomplished through the
execution of SQL statements embedded directly within the HTML pages,
providing applications with a direct access path to the database for fast data
retrieval. The Web Integration Option also includes a set of API services to
support complex Web applications that require extremely fast response times.
Unlike CGI, a copy of the application does not have to be invoked with
each client request. Web Integration Option applications can be shared
among multiple client requests to spare the system overhead of restarting the
application. The number of Web Integration Option applications started is
7
8
configurable by the administrator to meet the needs of the user load. To
ensure performance and scalability, Informix’s Web Integration Option pro-
vides a load-balancing algorithm to distribute the client requests across all the
available applications.
Tightly integrated with Informix Dynamic Server, the Web Integration
Option takes full advantage of Informix’s efficient multithreaded database
architecture and its parallel processing capabilities. Therefore, as the number
of Web database application users and the amount of Web page processing
increases, the Informix Dynamic Server will automatically scale across all
available system resources to deliver the highest performance possible.
Pers is tent S tate
Informix’s Web Integration Option provides a set of session and connection
management services to maintain a persistent database connection. When the
user starts a session by requesting the first HTML page of the application, the
Web Integration Option generates a session identifier and forks the applica-
tion. When the HTML page is returned to the Web browser, the session
identifier is also returned. This session identifier is then used when the user
requests the second and subsequent HTML pages from the application. With
the Web Integration Option, Web authors and developers do not have to
resort to creating complicated scripts in order to maintain state between
client requests.
Secure Env i ronment
The Web Integration Option offers a secure environment for developing
Web-enabled applications. This is achieved through integration with Web
server software. This integration utilizes all the native security mechanisms of
Informix Dynamic Server. You can even use existing database security
schemes, in your application.
Browser and Server Independence
Informix’s Web Integration Option offers an open architecture that is inde-
pendent from vendor-specific Web browsers and Web servers. Any Web
browser can access database applications via any Web server. Independence
from vendor-specific Web browsers is critical because the end user’s browser is
not typically under a developer’s control. Similarly, independence from the
Web server is important, to give you the flexibility to take advantage of tech-
nological innovation.
Informix’s Web Integration Option:Technical Overview
This section provides a detailed discussion of the Web Integration Option
architecture and its product components.
Arch i tec ture Overv iew
As mentioned in the previous section, the CGI architecture requires a devel-
oper to write scripts in PERL, Tc1, or C. These scripts construct the query,
pass the query to the database, and format the output into an HTML page.
Informix’s Web Integration Option eliminates the need for creating
tedious scripts. Instead, developers are provided with tools for creating intelli-
gent HTML pages directly within the database. These HTML pages, called
Application Pages (or AppPages), execute Structured Query Language (SQL)
statements dynamically, format the results inside HTML, and return the
resulting Web page to the end users. Figure 2 illustrates the architecture of
the Web Integration Option:
Figure 2 illustrates the CGI implementation of the Web Integration Option.While it can work with CGI, the Web Integration Option addresses theshortcomings of CGI previously identified.
Recall that a new CGI application must be spawned for each
client/browser connection. Typically, this extreme overhead is detrimental to
performance. To minimize this overhead, the Web Integration Option creates
a featherweight CGI process called the WebDriver. It is invoked when a URL
request is sent from the Web browser to the Web server. Upon receiving the
request, the WebDriver generates a unique session identifier and sends the
request to the Web Integration Option application.
9
Web B rowse r
h t t p h t t p
I n t e rne t/ In t r ane t Web Se r ve r Web App l i c a t i onSe r v i c e s
Da taba se
AppPage
tag tag
WebDr i ve r
Web I n t eg ra t i on
Op t i on
F i g u r e 2 :
Informix Web
Architecture
The Web Integration Option application is a persistent application that
does not terminate after each request. Developed using Informix’s Web
Integration Option API, the Web Integration Option application provides
important Web application services such as connection and session manage-
ment. Companies that need specialized application services can create
customized Web applications through the Web Integration Option API.
To ensure that all customized Web applications deliver a persistent
application environment and the highest performance possible, the Web
Integration Option API automatically incorporates all Web application
services provided by the Web Integration Option application within all
customized Web applications.
When the Web Integration Option application receives a request from
the WebDriver, it connects to the database and executes a function called
WebExplode. WebExplode executes the queries within the Web pages and
formats the subsequent results. WebExplode then returns the resulting Web
page to the WebDriver, which forwards the results to the Web browser.
Appl i cat ion Management
The Web Integration Option provides a wide range of application manage-
ment services. Informix’s Web Integration Option lets developers customize
their Web applications using information stored within a wide range of
sources, including the configuration file, the Web server environment, URLs,
HTML forms, Web application variables, and the underlying database shell.
This flexibility enables customers to easily customize applications to their
businesses without any CGI programming.
As discussed earlier, the behavior of the Web Integration Option applica-
tion is configurable. For example, the state information for client requests
should not be maintained infinitely. There is a default time-out value for
browser sessions which can be changed by an administrator. For scalability
purposes, administrators can define the number of Web Integration Option
applications to run. The WebDriver will distribute client requests across the
available Web Integration Option applications utilizing a load-balancing algo-
rithm. This load balancing provides the basis for an extremely scalable and
high-performance solution.
To further promote high performance, frequently accessed pages and
objects are cached in memory. Additionally, the WebDriver and the Web
Integration Option application provide error handling and logging capability
as well as event management.
The WebExplode function provides the services to manage the AppPages.
These services include the retrieval of AppPages and objects from the database
10
and expanding the AppPages from the embedded tags to perform special
tasks. Additionally, it also provides services for interpreting AppScript macro
language and using the included AppPage schema to manage application con-
tent such as HTML pages, documents, images, user-defined tags, etc.
Connect ion and Sess ion Management
The Web Integration Option ensures application persistence by offering a
collection of connection and session management services. Since the Web
Integration Option application is a shared application, multiple client
requests are funneled into one or more Web Integration Option applications.
The number of the Web Integration Option applications is configurable to
meet the scalability needs of applications. To track relationships between users
and applications, the WebDriver generates a unique, secure session identifier
for each client. This session identifier is used for the entire session to recog-
nize new requests from the same client and provide that information to the
Web Integration Option application.
Based on the application, the Web Integration Option application will
maintain the value of application variables and database connections from
one browser request to the next. The WebDriver and the Web Integration
Option application share the session information using a shared memory seg-
ment, much like Informix Dynamic Server uses shared memory.
11
Components of the Web IntegrationOption
Informix’s Web Integration Option provides the following components for
building Web applications:
HTML tag extensions
• Web-DB Publisher
• Web Integration Option API
• Integration with Web servers (NSAPI, ISAPI, and CGI)
HTML Tag Extens ions
Within the AppPages, developers and sophisticated Web authors can incorpo-
rate HTML tag extensions, called AppScript, to create dynamic Web applica-
tions without resorting to programming. This set of 5 tags give Web authors
a simple way to access application logic and content stored in Informix
Dynamic Server. The content can include dynamically constructed or static
HTML documents and associated multimedia content. Users benefit because
the Web Integration Option quickly extracts information from the database
for fast, personalized content delivery.
The tags that come with Informix’s Web Integration Option provide sup-
port for variables, branching logic, page format control, and SQL embedding.
Developers can use the tags provided by Informix, as well as create their own
tags to perform customized tasks. For example, Informix offers an HTML
extension tag that allows Web authors to temporarily return control from the
AppPage to the application so developers can execute specialized code in
order to achieve specific functionality, e.g. to connect to another database or
legacy application. In this way, developers have the flexibility to use the
AppPage to generate some parts of the page and use their own code for other
parts of the page.
Web-DB Pub l i sher
The Web-DB Publisher is a simple wizard which end users or administrators
can use to create Web-based reports of Informix database data. The wizard
consists of a small number of screens which walk the user through creating a
report. When executed, the report will be written in HTML format and
made available through the Web browser. These reports can be static or
12
dynamic. Dynamic reports will actually fetch values from the database when
the user accesses the report via its URL. Also, the Web-DB Publisher includes
a scheduling mechanism so that reports can be executed automatically, with-
out user intervention.
Web Integrat ion Opt ion API
High performance OLTP applications that cannot be implemented using
AppPages and HTML tag extensions alone can use the Web Integration
Option API library of C functions to ease development efforts. This set of
API services provides a framework for programmers to easily port or develop
client/server database applications on the Web. It provides a core set of ser-
vices to enable session and connection management, minimize overall devel-
opment time, and encapsulate the process of building HTML. Through this
interface, applications can establish connectivity with other distributed object
brokers such as IIOP, DCOM, and CORBA. Applications developed with
the Web Integration Option API library can utilize any programming lan-
guage such as C, C++, and Java.
In tegrat ion with Web Servers
Informix’s Web Integration Option offers optimized drivers for the Netscape
SuiteSpot Servers™ and the Microsoft Internet Information Server. This
integration enables the authorization and user authentication mechanisms to
be Informix database driven. As a result, all of the power and security of the
database can be applied, allowing for audit trails and access control over Web
server access at the object level. This allows the applications to take advantage
of rules and security mechanisms that already exist in the Informix database
application.
13
14
Informix’s Web Integration OptionAdvantages
Informix’s Web Integration Option offers the following advantages over com-
petitive products:
• Centralized management through storage of the entire Web
application content in the database and the ability to extend all database
functionality for Web applications (e.g., secure, manage, backup, recover,
and query).
• Tight integration with the Informix Dynamic Server to deliver
unsurpassed performance and scalability.
• Object-relational extensions within Informix Dynamic Server with the
Universal Data Option enable users to perform content-based queries on
Web pages.
Centra l ized Management
With Informix’s Web Integration Option, the entire Web application and
associated content is stored within the database. The content may include the
AppPages and all the multimedia content, including documents, images,
audio, video, etc. By storing the entire Web application content within the
database, developers can easily access, control, manage, backup, recover, and
query the entire Web application.
Competitive products store various components of their Web applica-
tions in distributed locations, such as within the file system or in a different
server. Decentralization of Web application content makes it difficult for
developers to determine the boundary of the application. As a result, develop-
ers waste an inordinate amount of time—that otherwise could be used for
application development—managing and tracking various application com-
ponents. They don’t get the full value of utilizing the database in the first
place, and it is very difficult for users to find the data they need.
Objec t -Re lat ional Extens ions
Informix Dynamic Server, with the Universal Data Option and Informix’s
DataBlade technology, allow customers to intelligently manage traditional
datatypes, as well as handle complex datatypes that are so common on the
Web, including video, sound, spatial, time-series, 2D and 3D, imaging, text,
and Web-based datatypes using standard SQL. By doing so, customers of
Informix Dynamic Server can fully exploit the database’s object-relational
extensions, allowing users to execute content-based queries on any type of
data stored within the database— while utilizing knowledge they already have
in their organizations.
Not only will the Web browser be able to query standard relational data,
but it will also be able to perform content-based searches on abstract
datatypes such as full text (including spreadsheets, presentations, and word
processing documents) sound clips, full-motion video, time-series, or geospa-
tial information. With Informix Dynamic Server, Universal Data Option,
customers can now create fully intelligent Web applications.
Today, competitive products lack the extensible foundation inherent to
Informix Dynamic Server. In 1991, Informix redesigned its database architec-
ture and built into the core product the foundation for extensibility. As such,
Informix competitors have to resort to inefficient approaches to extend the
capabilities of their core servers, making application development and man-
agement more difficult and costly.
Del iver ing Unsurpassed Per formance
Informix has tightly integrated the Web Integration Option with Informix
Dynamic Server. This tight integration enables Web application users to auto-
matically benefit from the performance and the scalability of Informix’s effi-
cient multithreaded database architecture. The database server’s ability to
scale across a large number of users and process a large amount of mission-
critical data is especially important given the nature of the Web environment,
where the number of users connected and the amount of data processed is
unpredictable and often quickly growing.
Unlike Informix’s Web Integration Option, many competitive products
do not provide the same high level of integration with their database server.
Some competitive products connect to the database via ODBC, hence it is
not tightly integrated with the database and cannot take advantage of the per-
formance and scalability of the database server. Other competitive products
are so tightly integrated with the Web servers such that scalability is limited
only to the scalability of the Web server. No other solution actually uses the
database to manage the Web application. They merely allow developers to put
a Web front-end on an existing client/server application.
Although a few competitive products offer integration with their databas-
es, performance may degrade as the number of connected users increases.
This is due to fundamental flaws within their database server designs. Unlike
15
Informix Dynamic Server, which manages user requests utilizing a light-
weight mechanism called threads, competitive database servers manage
requests at the operating system level. As a result, their applications cannot
support the level of performance and scalability necessary to handle large user
and processing loads.
16
Conclusion
Informix’s Web Integration Option offers customers a solution that is opti-
mized for Informix Dynamic Server. Ideal for both publishing and transac-
tion-based, and internal and external Web applications, Informix’s Web
Integration Option enables customers to create intelligent, customized Web
applications that incorporate data retrieved dynamically from Informix data-
bases. Unlike other competitive solutions, the Web Integration Option eases
the development of dynamic Web applications, by providing integrated Web
content and code management, high-performance, connectivity management,
secure access environment, and independence from Web browsers and
servers—offering customers a robust solution that not only addresses today’s
development needs, but also responds to future advancements in Web tech-
nology. In short, the Informix Web Integration Option allows you to manage
the Web for business advantage.
For more information on Web Integration Option, or any other
Informix products and services, contact your local Informix sales office or
visit the Informix Web site at www.informix.com.
17
©1997 Informix Software, Inc. The following are worldwide trademarks of Informix Software,Inc., Informix Corporation, or their subsidiaries,registered in the United States of America asindicated by “®” and in numerous countries worldwide: INFORMIX®, The Informix Logo®,IllustraTM, Dynamic Scalable ArchitectureTM DataBlade®. All other names or marks may be regis-tered trademarks or trademarks of their respective owners.
4100 Bohannon Drive
Menlo Park, California 94025
1 650 926 6300
World Wide Web: http://www.informix.com
Printed in U.S.A
. 12/97 000-21605-70
About In formixInformix Software, Inc., the world's data-base technology leader, provides innovativedatabase products that enable the world'smajor corporations to attain competitiveadvantage. Informix is widely recognized asthe technology leader for corporate com-puting environments ranging from smallworkgroups to very large parallel processingapplications. Informix's database servers,application development tools, superiorcustomer service, and strong partnershipsenable the company to be at the forefrontof major information technology solutionareas including data warehousing, OLTP,Web/content management, and distributedenterprise solutions.
For more information about Informixproducts and services, please contact thesales office nearest you, or visit us on theWeb at www.informix.com.
Regional Sales Offices
Asia/Pac i f i c65 298 1716
Canada (Toronto)416 730 9009
Europe/Midd le East/Afr i ca44 1784 422 000
Federa l703 847 2900
Japan81 3 5562 4500
Lat in Amer i ca305 265 7545
North Amer i ca800 331 1763650 926 6300
®