Title: Systems for E-Business
1Systems for E-Business
- Integration and Optimization on the Web
2Major Issues
- Majority of organizations are faced with a number
of major issues - Address Web application development
- Address Web applications scalability and
reliability - Address Web applications integration
- Provide framework for Web application integration
- Integrate Web and back-end applications
- Move from Web-sites to Web applications to Web
transactions - Selecting the right enabling technologies for Web
application development and Integration - CORBA, MTS/COM, Commercial Web Application
Servers, Object Transaction Monitors, EJB etc - Enterprise Application Integration and Web
Enterprise Application Integration are key - (W)EAI Middleware?
3Web Integration Requirements
- Web Server Integration
- Enterprise Middleware Integration
- Application Development Integration
- Integrating back-end databases
- Intelligent Data Transformation
- Leveraging legacy applications
4Different Views on Database Integration on the Web
- 1 DBMS/Web Integration Integrate the relational
database into the e-commerce/web architecture by
providing a Web-interface to database access and
supporting transactions on the Web - 2 Defragmentation Integrate multiple different
data sources and applications into the e-commerce
architecture - 3 Function Extension to create new interactive
Composite Applications with a Web interface - to the user the applications appears to be a new
Web applications but behind the scenes, it may
invoke one or more mainframe or UNIX/NT
applications and databases - Out-of-Scope Data Consistency Management This
is the ability to provide consistency of data
stored in physically disparate databases. DBMS
replication as well as message queuing middleware
can be used to develop application-specific
synchronization processes
5Database Integration and Optimization
- Prerequisites CORBA and JEB
6CORBA Architecture
7Java Enterprise APIs
8Client Protocols...
- HTTP
- Hypertext Transfer Protocol
- Intended for stateless text transfer
- Applets, Active Server Pages
- Some vendors put tags into the html stream
- resolve at the server to calls to application
code running under the application server. - RMI
- Remote Method Invocation
- Originally intended for Java-only application
distribution - Java-to-Java
- Objects passed by value
- As an API over IIOP
- Objects passed by reference
9Client protocols ...
- IIOP
- Internet Inter-Orb Protocol (OMG/CORBA)
- Intended for CORBA-compliant application
distribution
10Database Integration and Optimization
- E-architectures for Database Integration
11Web Integration Technologies vs Web Integration
Patterns
High
Middleware
Web
Ext
.(at the client)
Object
Web-Enabled
Transaction
Message
Monitors
Brokers
Host Web
Functional
Servers
Complexity
Web
Web
Terminal
Web
Web
Application
Emulators
Integration
Screen
Servers
Servers
Scrapers
Low
Function
Defragmentation
GUI-ification
User Interface
Extension
Redesign
Web Enablement Pattern
Source Gartner Group, December 10, 1998
12Web Integration(1) via Web Application
Servers(WAS)
Examples IBM WebPhere Oracle Application
Server BEA WebLogic Netscape Application Server
Web Browser
HTML
WAS
RDBMS
Web Browser
Apps
Apps
HTML
Apps
Apps
Web Browser
Business Logic
Wrappers
HTML
13Web Application Servers Fill the Gap
WWW
Middleware
- TP Monitors
- CORBA OTM
- Messaging
- Database Integration
- Legacy Application Integration
- ERP Integration
- Universal client
- Stateless
- No transactions
- Weak persistence
- Simple applications
Web Servers Web Application Servers Firewalls/Secu
rity
14Web Application Servers Fill the Gap
- State/session management
- Transaction management
- Scalability and high performance
- Robustness and manageability
- Enhanced security
- Persistence
- Most important provide necessary integration
with back-end infrastructure
15Web Application Servers Fill the Gap
- Web Application Servers (WAS) have to perform
multiple roles - Host business logic
- Make it accessible
- Scalability, integrity, security, responsiveness
- Integrated management
- Comprehensive run-time
- Well defined integration points
- Provide a single and consolidated application
- development environment
- Foundation for EC
16Web Application Server Provide
- Web Application Servers can host a variety of
applications including Java applications, C
applications, Visual Basic etc. - Integration with back-end infrastructure and
middleware - CORBA, MOM and other types of middleware
- Enterprise Resource Planning Applications
(Peoplesoft, SAP, Baan etc) - Legacy Applications
- CICS, IMS, Legacy Databases
17Generic Web Application Server Architecture
Firewall
Integrated Development Environment
Web Server
HTTP
CGI,NSAPI,ISAPI
Client Component
Legacy Applications via CICS, IMS, MQSeries
Load Balancing
Internet
HTML
HTTP
Security
HTML Java
Extranet
IIOP
Management
Client/Server applications (C, C)
Java
Intranet
IIOP
18WebLogic - Product Architecture
Java MS COM Client Apps
WebLogic Server
19Common Application Server Components
- Web Server APIs
- NSAPI, ISAPI, CGI, Servlets
- Application Manager
- Hosts Application Logic
- Cgi-bin programs, Java objects, Java Servlets
etc. - Manage application instances
- Web Transaction Manager
- Manage Web based Transactions
- Database Interaction Manager
- Database connection management
- Database connection pooling
- Results caching etc
- Session/State Manager
- Manages state/session information
20Generic Web Application Server Functionality
Web Application Server
EnterpriseAdapters
Data storeAdapters
MiddlewareAdapters
Business Logic
StateMgmt.
SessionMgmt.
WorkloadMgmt.
ProcessMgmt.
RulesEngine
Web Server
Presentation Logic, HTML Page Server
Web Browser
21WAS Application Server Products
- Secant Extreme Server
- Bluestone Sapphire/Web
- Gemstone J
- Sun NetDynamics
- BEA WebLogic Server
- Oracle Application Server
- Sybase Enterprise Application Server
- Netscape Application Server
- IBM WebSphere
- Silverstream Software SilverStream
- Novera Jbusiness
- Persistence PowerTier
- Progress Apptivity
- Inprise Application Server
- Forte SynerJ
- Apple WebObjects
- Information Builders Parlay
22Web Integration(2) via Web-Enabled Message Brokers
Web Browser
HTML
RDBMS
Web Browser
Flow Control Transfor- mation Manage-ment
Apps
Apps
HTML
Apps
Apps
Web Browser
HTML
23Web Application Servers vs. OTMs
- Web Application Server strength
- Integrated development tools for Web-based
applications - Some provide rich set of classes / frameworks
- Address specific requirements of Web-based
applications (e.g. state session management) - OTM strength
- Support for distributed transactions (ACID
properties) - Proven scalability
- 24 x 7 availability
- Most WAS vendors focus on Java/EJB - OTMs provide
wider choice of language support and runtime
environments
24Combining Web Application Servers and OTMs
NetworkComputing (NC)Clients
CGI
WebServer
WebBrowser NetscapeorInternetExplorer
NSAPI/ISAPI
Servlets
ObjectTransactionMonitor(OTM)
WAS
WASApp
GUIClients
25Web Application Server vs. OTM Evolution
WAS
OTM
Web Security
Back-end Security
Web Server Integration
Middleware Integration
HTML
Failover/ Recovery
Scalability
Java
Result Caching
IIOP
Auditing Logging
State Management
Transactions
Session Management
Availability
26Basic 3-tier CGI/HTTP Client/Server Architecture
HTTP Server
Web Browser
Internet
HTML docs
HTTP
HTML
HTTP
RDBMS
SQL API
CGI/ ISAPI
RDBMS
Apps
SQL API
Tier 2 Application Logic
Tier 1 GUI
Tier 3 Data
27Integrating Back-end Databases
Web browser
Web server
document report spreadsheet image audio video anim
ation
static content
CGI NSAPI ISAPI
dynamic content
Database Gateway
Web Server-side Gateway
Multi media data
- Universal data access
- Universal and uniform access to diverse data
sources - not just the popular relational databases
- It is estimated that 65 of corporate data are
not stored in relational databases
28Basic 3-tier CGI/HTTP Architecture
HTTP Server
Order/Entry database
Web Browser
Internet
HTML docs
Order pizza
HTML
Order pizza
Warehouse database
Order pizza
Pizza can be delivered _at_ 1915, but were out of
olives
Can order be fulfilled?
CGI
Workforce Scheduling database
Apps
When can pizza be delivered?
Tier 1
Tier 2
Tier 3
29Basic 3-tier CORBA/Java Client/Server Architecture
Internet
WAS
Web Browser
CORBA IIOP
RDBMS
CORBA
CORBA ORB
HTML Java
CORBA IIOP
JDBC
Server Objects
Tier 2 Application Logic
Tier 1 GUI
Tier 3 Data
30Basic 3-tier CORBA/Java Client/Server Architecture
RDBMS Type A
HTTP Server
(1) Get HTML Page
HTML docs
SQL API
CGI/ ISAPI
Web Browser
(2) Get Applet
RDBMS Type B
Apps
SQL API
HTML/ Java
CORBA Server
(3) Load Applet (4) Invoke CORBA
CORBA
CORBA ORB
(5) CORBA IIOP
RDBMS Type C
JDBC
Server Objects
Tier 2 Application Logic
Tier 1 GUI
Tier 3 Data
31Basic 3-tier CGI/HTTP and CORBA Client/Server
Architecture
RDBMS
CORBA Server which interprets HTTP
Web Browser
Internet
HTML docs
HTTP
HTTP
SQL API
CGI/ ISAPI
HTML
RDBMS
Apps
SQL API
CORBA IIOP
Web Browser
CORBA
CORBA IIOP
CORBA ORB
RDBMS
HTML/ Java
JDBC
Server Objects
Tier 2 Application Logic
Tier 1 GUI
Tier 3 Data
32HTTP/CGI versus Java/CORBA ORBs
33Predictions on Java/CORBA Integration
- More than 80 percent of large enterprises will
use COM and some aspect of CORBA or IIOP
somewhere in their enterprise applications by
2001 (0.8 probability) - COM will be functionally complete as an OTM by
1999 and mature enough to support demanding,
mainstream, mission-critical applications by 2001
(0.7 probability) - By 2002, the CORBA and Enterprise JavaBeans
programming models will evolve into a common
multilingual programming model Enterprise Beans
(0.8 probability)
34Database Integration and Optimization
- Architectures for Database Middlware
35SQL Middleware Models
- Single vendor option
- Common SQL Interface option
- Open SQL Gateway option
- Federated Databases
36Integrated Single Vendor
HTML docs
HTTP Server
(1) Get HTML Page
Web Browser
(2) Get Applet
HTML/ Java
CORBA Server
(3) Load Applet (4) Invoke CORBA
Server Object
Server Object
Server Object
CORBA ORB
Sybase Server
(5) CORBA IIOP
dblib
OpenClient
FAP
Driver
Driver
Protocol
Protocol
TCP/ IP
37Middleware Solution1 Common SQL Interface
HTML docs
HTTP Server
(1) Get HTML Page
Dbms Server A
FAP A FAP B FAP C
Web Browser
(2) Get Applet
Driver A
CORBA ORB
Protocol
Server Object
Server Object
Server Object
HTML/ Java
CORBA Server
(3) Load Applet (4) Invoke CORBA
JDBC / ODBC
Driver A
Driver B
Driver C
(5) CORBA IIOP
Protocol
Dbms Server C
Driver C
Protocol
38Middleware Solution 2 Open SQL Gateway
HTML docs
HTTP Server
(1) Get HTML Page
Dbms Server A
Gateway FAP
Gateway Server
Web Browser
(2) Get Applet
CORBA ORB
Protocol
Server Objects
Server Objects
HTML/ Java
Dbms Server B
CORBA Server
(3) Load Applet (4) Invoke CORBA
Common SQL API
Gateway Server
Gateway Driver
Protocol
(5) CORBA IIOP
Protocol
Dbms Server C
Gateway Server
Protocol
39Middleware Solution 3 The Ideal World
HTTP Server
(1) Get HTML Page
Dbms Server A
Standard SQL FAP
Protocol
Web Browser
(2) Get Applet
CORBA ORB
HTML/ Java
Appl
Appl
Dbms Server B
CORBA Server
(3) Load Applet (4) Invoke CORBA
Common SQL API
Protocol
Global Query Control
(5) CORBA IIOP
Standard SQL Driver
Protocol
Dbms Server C
Protocol
40ODBC Architecture
Appl
Appl
Appl
Key Points
- ODBC is a Microsoft extension of the SQL Access
Groups CLI - It provides the possibility for writing
DBMS-independent C code - A Driver Manager is used to ensure that the right
DBMS-driver is loaded automatically at database
connect time - An ODBC driver must provide at the very least
ANSI SQL89 functionality - ODBC 2.0 defines 61 API calls divided into
- Core (DB connection, execution, commit, rollback,
results handling, exception handling) - Level 1 (access to metadata, BLOBs, driver
specific functions) - Level 2 (cursor support)
- ODBC is an example of a CLI that supports
non-relational sources e.g. MS Excel
spreadsheets. - JDBC support transactions against a DBMS (
ODBC API
ODBC Driver Manager
Service provider API
Sybase Driver
Oracle Driver
MS SQL Driver
ESQL/DRDA
NetLib
SQLNet
TCP/IP
DB2
Sybase
Oracle
41JDBC Architecture
Java Appl
Java Appl
Java Appl
Key Points
- JDBC is a SQL CLI written entirely in Java
- It provides the possibility for writing
DBMS-independent Java code - A Driver Manager is used to ensure that the right
DBMS-driver is loaded automatically at database
connect time - JDBC drivers are ODBC-bridged or native
- A JDBS driver must provide at the very least ANSI
SQL92 Emtry Level functionality - JDBC Interfaces are divided into
- JDBC Core
- Java Language Extensions
- Java Utility Extensions
- SQL Metadata
- JDBC support transactions against a DBMS (commit,
rollback, auto commit) - JDBC does not support 2-phase commit against
multiple databases
JDBC API
JDBC Driver Manager
Service provider API
JDBC-ODBC Driver
Driver to Sybase
Driver to Oracle
ODBC Driver
NetLib
SQLNet
Protocol
MS SQL Server
Sybase
Oracle
42Database Integration and Optimization
43JDBC Scenario 1 Invoking a SQL Query
JDBC Driver Manager
Client
Connection
getConnection
Statement
createStatement
ResultSet
executeQuery
next
getInt
getString
close
close
44JDBC Scenario 2 Invoking a Prepared Command
Driver Manager
Client
Connection
getConnection
PreparedStatement
prepareStatement
setAutoCommit
setInt
setShort
executeUpdate
commit
close
close
45JDBC Scenario 3 Invoking a Stored Procedure
JDBC Driver Manager
Client
Connection
getConnection
CallableStatement
prepareCall
registerOutputParameter
registerOutputParameter
execute
getXXX
close
close
46JDBC 2-tier
HTML
Dbms Server
JDBC Driver Manager
Dbms Server
Driver
Driver
Tier 1 Client
Tier 2 DBMS
47JDBC 3-tier (a)
HTML
Driver
Dbms Server
ORB
ORB
JDBC Driver Manager
Dbms Server
Driver
Tier 3 DBMS
Tier 2 JDBC Server
Tier 1 Client
48JDBC 3-tier (b)
HTML
Driver
Dbms Server
ORB
ORB
JDBC Driver Manager
Driver
Dbms Server
Server Objects
Tier 3 DBMS
Tier 2 Web Server
Tier 1 Client
49Datbase Integration and Optimization
- OTM Characteristics - Transactions on the Web
50Object Management Architecture
Horizontal Interfaces
Vertical Domain Interfaces
Compound Docs Object Linking
Common Facilities
Application Objects
Object Request Broker
Lifecycle Event Naming Persistence Transactions Co
ncurrency
Externalization Security Licensing Relationship Tr
ader Messaging Notifications
CORBAServices
51Interface Definition Language
- The Key Idea
- Separate Interface from Implementation
- An Interface is a contract between a client and a
server - What is CORBA client and CORBA Server?
- The contract is specified in Interface Definition
Language (IDL) - IDL is a specification language, NOT a
programming language - IDL describes only interfaces, not
implementations - IDL can be mapped to a variety of programming
languages such as C, JAVA, Smalltalk, C, Ada,
Cobol, etc. - IDL also provides Standard Abstractions for
Middleware Services
52Focus On Middleware Services
Standard IDL based interfaces for Classic
Middleware Services
Object Request Broker
Trans- actions
Trading
Lifecycle
Naming
Security
Messaging
Events
53Interface Definition Language
- Interface Definition Language (IDL) is a
contractual, declarative language that specifies
object interfaces. - IDL defines interfaces that object speaks
- IDL is a description of the functionality that
object has. It typically specifies the attributes
and operations belonging to that interface, as
well as their signatures. - Interfaces contain operations
- An operations signature includes the type of
in and out parameters, the type of return
value, and exceptions that may be thrown by the
operation.
54Interface Definition Language
- IDL provides operating system and programming
language independent interfaces to all services
and components that use CORBA. - NOT a programming language.
- IDL is part of the design process.
- IDL is part of the development process.
55IDL - The Key to Integration
The key to the Software Bus
C
Smalltalk
Implementation is Hidden
Smalltalk
Ada
C
Java
ActiveX
IDL interface
Java
Service or Contract-oriented View
56CORBA Interoperability
VisiBroker
Component Broker
Orbix
Solaris
HP-UX
Alpha NT
MVS
COBOL
S/Talk
Ada
IIOP
Java
VC
NT
JavaOS
IRIX
AIX
DAIS
VisiBroker
M3
Orbix
57CORBA Interoperability
- Internet Inter-ORB Protocol
- Provides on-the-wire interoperability between
- CORBA ORBs
- Java programs using RMI
- RMI over IIOP
58CORBA and the Net
AIX
Windows NT
CORBA Object C
Excel
CalculationEngine object
CalculateYield Curve ()
CalculateSwap ()
CORBA
ORB
ORB
Calculation Engine Object CalculateYield Curve
() CalculateSwap ()
IIOP
Shared Object C
Netscape Navigator
ORB
CalculateYield Curve () CalculateSwap ()
59Web Application Development with CORBA
- Write specification for each CORBA object using
IDL - Use the CORBA compiler to generate Stubs and
Skeletons - Write the client application code
- Write the server objects code(i.e. Servants)
- Write a container( i.e. Main) that the Servants
can reside in - Compile and link the Server and the client
- Deploy
- Run
IDL
CORBA Compile
Stubs
Skels
Client
Servants
C Compile Link
C Compile Link
Client
Server
60Web Naming
- Web Naming is a URL based naming scheme that
allows Object References to be associated with
URLs and use standard URL resolution to retrieve
object references. - Leverages the ubiquity of the Web to bootstrap
CORBA object location. - Can be used in conjunction with CORBA Naming
- A Web Naming interface called Resolver provides
the Web Naming functionality. - Web Naming powerful for CORBA-enabled Applets.
- Server implementations register a IOR with a Web
Server using the PUT HTTP method and store the
IOR in the Web Servers document root. - Clients retrieve the IOR associated with a URL
using HTTP.
61Development Tools for Web and CORBA
- Symantec Visual Café
- Inprise JBuilder
- IBM Visual Age
62Commercial CORBA Products
- IONA Technologies Orbix and OrbixWeb
- PeerLogic/ICL DAIS
- Inprise VisiBroker for C and Java
- BEA WebLogic Enterprise (formerly M3)
- C and Java bindings are available
- IONA Technologies OrbixOTM
- PeerLogic/ICL DAIS
- BEA WebLogic Enterprise
- Inprise VisiBroker ITS
63Support for CORBAServices
WebLogic Enterprise
Orbix
DAIS
VisiBroker
Trader
?
?
?
(Tuxedo based)
Naming
?
?
?
?
(DCE based)
(Tuxedo based)
Security
?
?
?
Events
?
Events
?
?
?
(Tuxedo based)
Transactions
?
?
?
(Encina)
?
Notification
64State and Session Management
- Need to maintain state between multiple user
interactions - Optimized customer interaction experience through
site personalization - Web site tracking
- Techniques available to maintain state include
- Client-side storage of state
- Server-side storage of state information
- files or databases
- Combination of both
- cleanup synchronization issue
- A session-identifier needs to passed between
the browser and the server application
65Web-Based Transactions
- Web based transactions should allow the grouping
of HTTP requests as part of one task. - URL range or specific pages
- Web middleware should support Web transactions
- Server-Based Transactions
- Traditional ACID transactions
- TP Monitor, DBMS
- Object Transaction Service (OTS) vs. Enterprise
Java Beans (EJB) - A legacy integration issue
66Web transactions
- HTTP is stateless i.e. has no memory of previous
requests - Since HTTP makes it difficult to maintain context
among different invocations of the database,
other means for providing transactional context
are required - Developers are using various approaches to
overcome this problem (e.g. by passing cookies or
hidden HTML fields containing the clients
sessions and transaction ids back to the client,
e.g. Oracle Application Server)
- A client/server transaction is inherently a
session in which the following occurs - Start a session on the DBMS server by logging in
with name and password - Issue a BEGIN TRANS command
- Issue one or more SQL INSERT, DELETE or UPDATE
statements - Issue a SQL COMMIT or ROLLBACK statement
- End the session by logging out or disconnecting
67X/Open Distributed Transaction Processing Model
Application (AP)
TX (Java Transaction Service)
RM API (JDBC)
XATMI, TxRPC
Resource Manager (RM)
Transaction Manager (TM)
Communcations Resource Manager (CRM)
XA
XA (Java Transaction API)
68X/Open DTP and Java Services
Java servlet
Java Transaction Service (JTS)
JDBC
XATMI, TxRPC
X/Open Resource Manager
Transaction Manager (TM)
Communcations Resource Manager (CRM)
XA
Java Transaction API (JTA)
69OMG Object Transaction Services (OTS)
Transactional Client
RM API (SQL)
TX
XATMI, TxRPC
Recoverable Server
Transaction Service
Communcations Resource Manager (CRM)
XA
XA
70Model Interoperability OTS versus DTP
Transactional Application (AP)
TX (Object Transaction Services)
JDBC
XATMI, TxRPC
Resource Manager (RM)
Transactional Server (Coordinator Terminator)
Communcations Resource Manager (CRM)
XA
XA (Java Transaction API)
71Model Interoperability
New Application (Objects)
Exsiting Application (X/Open)
ORB
Transactional Client
Transactional Object
X/Open Resource Manager
RM API
X/Open Server
CM API
XA
Transaction Services
Transaction Manager
72OTS versus X/Open TX Interfaces
TX Interface
OTS
- tx_open( )
- tx_close( )
- tx_begin( )
- tx_rollback( )
- tx_commit( )
- tx_set_transaction_control()
- tx_set_transaction_timeout()
- No equivalent
- No equivalent
- Currentbegin()
- Currentrollback()
- Currentcommit()
- No equivalent
- Currentset_timeout()
73OTS versus X/Open AX Interfaces
- xa_start( )
- ax_reg( )
- xa_end( )
- ax_unreg( )
- xa_prepare( )
- xa_commit( )
- xa_rollback( )
- xa_recover( )
- No equivalent
- xa_forget( )
- Receiverreceived_request()
- Currentresume()
- Receiversending_reply()
- Resourceprepare()
- Resourcecommit()
- Resourcerollback()
- No equivalent
- Resourceforget()
74Database Integration and Optimization
75Tuning JDBC
- Connection Pools - multiplexing clients on
pre-allocated database connections (e.g.
weblogic.Admin class create_pool method) - Cached connections - reuse database connections
for clients - Caching results data in web server or in JDBC
Server - Use of stored procedures or prepared commands
- Let a transaction service handle transaction
context on behalf of transactional client - Let a server object handle JDBC sessions on
behalf of client saves message overhead across
firewalls and web servers