Oracle9i Application Server Oracle9iAS Object Caching Service for Java Developer's Guide
Release 1 (v1.0.2.2)

Part Number A88852-01
Go To Documentation Library
Library
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

1
Object Caching Service for Java Concepts

This chapter introduces the basic concepts for the Object Caching Service for Java and its architecture.

This chapter covers the following topics:

Where Does the Object Caching Service for Java Fit?

Electronic business (e-business) creates new performance requirements for Web sites. To carry out e-business successfully, Web sites must protect against poor response time and system outages caused by peak loads. Slow performance translates into lost revenue. High-volume Web sites try to counter this problem by adding more application servers to their existing architecture. As more users access these Web sites, more application servers need to be added. The manageability costs associated with adding application servers often outweigh the benefits.

Static caches and content distribution services can provide some relief. However, these solutions are unable to serve content that is dynamically generated.

Faced with these performance challenges, e-businesses need to invest in more cost-effective technologies and services to improve the performance of their Web sites. Oracle offers the Object Caching Service for Java to help e-businesses manage Web-site performance issues for dynamically generated content. The Object Caching Service for Java improves the performance, scalability, and availability of Web sites that run on Oracle9i Application Server.

By storing frequently accessed or expensive-to-create objects in memory or on disk, the Object Caching Service for Java eliminates the need to repeatedly create and load information within a Java program. The Object Caching Service for Java retrieves content faster and greatly reduces the load on application servers.

Figure 1-1 shows the Oracle9i Application Server cache architecture, including the following cache components:

Figure 1-1 Architecture for Object Caching Service for Java and the Oracle9i Application Server


Text description of jocdg001.gif follows
Text description of the illustration jocdg001.gif

Object Caching Service for Java Basic Architecture

For a programmer using the Object Caching Service for Java, information has one of three characteristics:

  1. Static information that never changes. The programmer handles the data efficiently using a Java Hashtable.

  2. Dynamic information that is unique. The programmer must generate data each time the information is requested.

  3. Variable information that is sometimes static and sometimes is generated. The programmer uses the Object Caching Service for Java.

    Figure 1-2 shows the basic architecture for the Object Caching Service for Java. The cache delivers information to a user process. The process could be a servlet application that generates HTML pages or any other Java application.

Figure 1-2 Object Caching Service for Java Basic Architecture


Text description of jocdg002.gif follows
Text description of the illustration jocdg002.gif

Distributed Object Management

For simplicity, availability, and performance, the Java object cache is specific to each process (object creation is not centrally controlled). However, using distributed object management, the Object Caching Service for Java provides coordination of updates and invalidations between processes. If an object is updated or invalidated in one process, it is also updated or invalidated in all other associated processes. This distributed management allows a system of processes to stay synchronized, without the overhead of centralized control.

Figure 1-3 shows the architecture for the Object Caching Service for Java, using distributed object management. The cache delivers information to a user process. The user process could be a servlet application that generates HTML pages or any other Java application. Using the distributed object management message layer, the application uses the Object Caching Service for Java to share the information across processes and between caches.

Figure 1-3 Object Caching Service for Java Distributed Architecture


Text description of jocdg003.gif follows
Text description of the illustration jocdg003.gif

How the Object Caching Service for Java Works

The Object Caching Service for Java manages Java objects within a process, across processes, or on a local disk. The Object Caching Service for Java provides a powerful, flexible, and easy-to-use service that significantly improves Java performance by managing local copies of Java objects. There are very few restrictions on the types of Java objects that can be cached or on the original source of the objects. Programmers use the Object Caching Service for Java to manage objects that, without cache access, are expensive to retrieve or to create.

The Object Caching Service for Java is easy to integrate into new and existing applications. Objects can be loaded into the object cache, using a user-defined object, the CacheLoader, and can be accessed through a CacheAccess object. The CacheAccess object supports local and distributed object management. Most of the functionality of the Object Caching Service for Java does not require administration or configuration. Advanced features support configuration using administration application programming interfaces (APIs) in the Cache class. Administration includes setting configuration options, such as naming local disk space or defining network ports. The administration features allow applications to fully integrate the Object Caching Service for Java.

Each cached Java object has a set of associated attributes that control how the object is loaded into the cache, where the object is stored, and how the object is invalidated. Cached objects are invalidated based on time or an explicit request (notification can be provided when the object is invalidated). Objects can be invalidated by group or individually.

See Also:

Chapter 2, "Working with Objects and Attributes" 

Figure 1-4 shows the basic Object Caching Service for Java APIs. Figure 1-4 does not show distributed cache management.

Figure 1-4 Object Caching Service for Java Basic APIs


Text description of jocdg004.gif follows
Text description of the illustration jocdg004.gif

Cache Organization

The Object Caching Service for Java is organized as follows:

Table 1-1 provides a summary of the constructs in the cache environment and the cache object types.

See Also:

Chapter 2, "Working with Objects and Attributes" 

Table 1-1  Cache Organizational Construct
Cache Construct  Description 

Attributes 

Functionality associated with cache regions, groups, and individual objects. Attributes affect how the Object Caching Service for Java manages objects. 

Cache region 

An organizational name space for holding collections of cache objects within Object Caching Service for Java. 

Cache subregion 

An organizational name space for holding collections of cache objects within a parent region, subregion, or group. 

Cache group 

An organizational construct used to define an association between objects. The objects within a region can be invalidated as a group. Common attributes can be associated with objects within a group. 

Memory object 

An object that is stored and accessed from memory. 

Disk object 

An object that is stored and accessed from disk. 

Pooled object 

A set of identical objects that the Object Caching Service for Java manages. The objects are checked out of the pool, used, and then returned. 

StreamAccess object 

An object that is loaded using a Java OutputStream and accessed using a Java InputStream. The object can be accessed from memory or disk, depending on the size of the object and the cache capacity. 

Object Caching Service for Java Features

The Object Caching Service for Java provides the following features:


Go to previous page Go to next page
Oracle
Copyright © 2001 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Library
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index