Oracle Essentials Oracle Database 11g (65 page)

340

|

Chapter 15: Beyond the Oracle Database

Oracle Application Server System Services

The remaining areas of Oracle Application Server capabilities provide services that affect more than one of the functional areas described in earlier sections:

• Management capabilities address the entire AS stack.

• Caching improves performance across many areas of functionality.

• AS allows for several types of clustering and load balancing for scalability and reliability.

• RFID-handling capabilities are provided via Oracle Sensor Edge Server.

The following sections describe these areas.

Management

With the Oracle Database 10
g
release, the scope of Enterprise Manager was broad-ened to encompass AS. Enterprise Manager (described in
Chapter 5)
now provides availability and performance tracking for both Oracle Application Server and the Oracle database. For instance, Enterprise Manager automatically provides information on the web pages that take the longest to serve, and it does this by mining the log files for AS, so there is virtually no impact on performance.

AS now lets you archive the configuration of an individual instance either to act as a backup before making configuration changes or to apply to any other instance.

Oracle Application Server 10
g
Release 2 added an implementation for management beans, based on the JMX standard, that provides management and deployment functionality for JavaBeans based on OC4J.

In Oracle Application Server 10
g
Release 3, Oracle introduced a new management capability with Dynamic Resource Monitor (DRM). The monitor is designed to watch resource utilization across nodes and dynamically allocate these resources, based on policies created by the system manager.

Caching

Caching is a standard concept in computing; caching speeds up the retrieval of frequently used information by saving it in a location where it can be rapidly retrieved.

In the database, this means keeping frequently used data in memory, rather than retrieving it from disk. For Reports Server, described earlier, this means saving a report rather than running it again.

Oracle Application Server includes two specific components meant to provide additional caching capabilities: Web Cache and Java Object Cache.

The idea behind Web Cache is fairly simple—maintain copies of frequently requested information in a cache so the information does not have to be retrieved every time it is requested. Web Cache works on HTML pages and parts of pages. It
Oracle Fusion Middleware

|

341

can cache either static or dynamic data and includes validation routines that you can implement to specify when the data should be refreshed. Web Cache is aware of individual user and application dependencies on data, so it automatically caches and delivers situation-specific information.

HTML code uses Edge Side Includes to indicate where partial page content goes, and Web Cache will use those directives to assemble pages with cached data. Web Cache can also cache images, audio, video, Java, and search results.

Web Cache also compresses web pages, which can speed delivery to clients. Both cache validation rules and compression rules can be implemented with regular expressions for flexibility.

Web Cache instances can be on the same node as Oracle Application Server instances, or on their own servers, as shown in
Figure 15-2.
Web Cache instances can be clustered with a load balancer or use a built-in clustering capability. This capability provides a shared distributed cache, where each cache instance is aware of the contents of the other cache instances. Web Cache can be used with Forms and Reports.

Web Cache includes a technology Oracle refers to as
surge protection
. Surge protection proactively monitors the load on each server and implements actions to prevent the servers from being overwhelmed by a spike in traffic or a denial-of-service attack.

In Oracle Application Server 10
g
, Web Cache is used to collect the data on page service times that are used by Enterprise Manager’s Application Performance Monitoring feature.

The Java Object Cache is implemented with a set of Java classes. As its name implies, this cache stores frequently used Java objects in memory or disk. Developers use a set of attributes associated with a Java object to define how an object is loaded into the cache, where an object is stored, and validation rules that specify when an object is moved out of the cache.

Clustering and load balancing

Oracle Application Server instances can be clustered together, for higher performance and availability. Youcan cluster Web Cache, Java Container, Portal, Forms Service, Report Servers (deprecated in Oracle Application Server 10
g
Release 2), or OID instances. In addition, you can use Real Application Clusters to provide clustering capabilities for the AS infrastructure or Portal. A multitier set of clusters is shown

in Figure 15-2.

mod_oc4j
, which directs requests to the Oracle Container for Java from the Oracle HTTP Server, provides load balancing across multiple instances of the Java Container, based on several different types of schemes, including varieties of random assignment, round robin, and metric-based. With Oracle Application Server 10
g
342

|

Chapter 15: Beyond the Oracle Database

OC4J

instance

OHS

OC4J

Web Cache Cluster

instance

instance

Web

OC4J

cache

instance

instance

OC4J

instance

Web

cache

OHS

OC4J

instance

instance

instance

OC4J

Web

instance

cache

instance

OC4J

instance

OHS

OC4J

instance

instance

OHS Cluster

OC4J

instance

OC4J Cluster

Figure 15-2. Multiple levels of clustering in Oracle Application Server
Release 2, an OC4J instance can host clustered and nonclustered applications at the same time.

You can implement load balancing for either stateless requests or requests that carry state. State-based load balancing is implemented with cookies and can be done either explicitly or with Java Object Cache. Oracle Java Containers are aware of nodes that share state information, so they can provide high availability for stateful load balancing by redirecting requests to a failed node to another node that shared application state with the failed node. In Oracle Application Server 10
g
, youcan create policies that can reallocate a node from one cluster to another without having to restart the cluster.

Oracle Application Server includes a high availability framework, which monitors instances for their health, informs the system of problems, and automatically attempts to restart failed instances. Each node in a cluster contains its own configuration information, so if the node containing the repository that describes the cluster becomes unavailable, the node can continue to run. Oracle HTTP Server (OHS) can rebuild the repository on a designated backup node, eliminating this potential single source of failure.

Oracle Application Server 10
g
Release 3 added a Flashback capability giving administrators the ability to revert to earlier versions of configuration and system files, and Application Server Guard used to verify and synchronize standby servers. Of course, since AS is focused on running applications rather than storing data, these functions are not nearly as complex as the similar functionality available for the database, which must support thousands of potential users.

Oracle Fusion Middleware

|

343

AS can be installed to use underlying hardware cluster functionality in what is called a
Cold Failover Cluster
. This configuration uses a shared disk attached to multiple machines. If the primary server should fail, operations fail over to a backup server.

Oracle Application Server 10
g
also supports
Active Failover Clusters
(AFCs) (although the initial release of AS 10
g
did not support this configuration in a production environment). AFCs require a load balancer in front of the active nodes, but both nodes can operate at the same time, providing scalability with high availability.

Figure 15-3 shows the differences between these two types of failover configurations.

Clients

Clients

Middle

Middle

Middle

Middle

Tier

Tier

Tier

Tier

Hardware

V. host

Load balancer

Inactive

cluster

infastructure

Active

infastructure

-OID

Hardware

OID 1

OID 2

-SSO

Active

Active

cluster

SSO 1

SSO 2

-DAS

infastructure

infastructure

DAS 1

DAS 2

-Infrastructure

node 1

node 2

DB instance 1

DB instance 2

Shared

DB instance

storage

$ORACLE_HOME

Local

Shared

Local

storage

storage

storage

Config files

Infrastructure

Config files

($0_H1)

DB files

($0_H2)

Figure 15-3. Cold Failover and Active Failover Clusters

Of course, many uses of Oracle Application Server involve multiple services, such as Java, identity management, and database access. To use clustering for high availability, you must avoid single points of failure for all of these services. This can require careful planning and multiple clustering and failover schemes.

For easier creation of clusters, AS comes with a feature called Distributed Configuration Management (DCM), which simplifies creating clones of existing nodes and redistributes J2EE components to the new node.

344

|

Chapter 15: Beyond the Oracle Database

Oracle Application Server 10
g
and newer releases also leverage a feature in the database called
failover notification
. Prior to AS 10
g
, an AS instance had to wait for a TCP/IP timeout to know that a database server node had failed. With this new release, the cluster management software for the database cluster proactively informs the AS instance of a failure, reducing failover time.

RFID handling in Oracle Sensor Edge Server

The Oracle Sensor Edge Server component of Oracle Application Server is used to process and dispatch RFID sensor information. The component captures RFID data close to the source, eliminates redundant or nonrelevant events, and forwards the appropriate events on to other processes.

Oracle SOA Suite

The Oracle SOA Suite pulls together a number of software offerings that can address issues related to a Service-Oriented Architecture (SOA), one of the hot buzzwords in the industry as of 2007.

The buzz that surrounds SOA is not there because the concepts or implementation are, for the most part, new. The core idea behind SOA is easy reuse and sharing of application functionality—a goal that organizations have been striving toward for decades. SOA reinvigorates the quest for these virtues with the new elements added by the Web.

The Web provides two key ingredients to the SOA story. First, there are new widely adopted standards such as XML and BPEL (which uses XML as its dialect). Standardization provides a common language at some levels of the application stack, reducing the overhead required for translation between applications.

Second, the Web expanded the reach of IT, in the sense that the user community breached the organizational walls that used to limit the scope of applications. When you can get valued functionality from outside your own solution set, the benefits that come from reuse and integration are correspondingly multiplied.

A Service-Oriented Architecture exposes applications, modules, and data as web services—essentially, an Application Program Interface (API) for logic and data access.

This interface can help standardize functionality and data access, which will help to overcome some of the issues that have acted as roadblocks to reuse and integration in the past.

The components of the Oracle SOA Suite are described in the following sections.

Other books

Swagger by Carl Deuker
The Shadow at the Gate by Christopher Bunn
After The Dance by Lori D. Johnson
The Delta Chain by Ian Edward
Speechless by Fielding, Kim
Chronicles of Eden - Act VI by Alexander Gordon
NF (1957) Going Home by Doris Lessing