Oracle9i Application Server Oracle9iAS Object Caching Service for Java Developer's Guide Release 1 (v1.0.2.2) Part Number A88852-01 |
|
This chapter introduces the basic concepts for the Object Caching Service for Java and its architecture.
This chapter covers the following topics:
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:
For a programmer using the Object Caching Service for Java, information has one of three characteristics:
Hashtable
.
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.
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.
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.
Figure 1-4 shows the basic Object Caching Service for Java APIs. Figure 1-4 does not show distributed cache management.
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.
The Object Caching Service for Java provides the following features:
|
Copyright © 2001 Oracle Corporation. All Rights Reserved. |
|