Oracle Coherence 3.5

Book description

Create Internet-scale applications using Oracle’s Coherence high-performance data grid with this book and eBook

  • Build scalable web sites and Enterprise applications using a market-leading data grid product
  • Design and implement your domain objects to work most effectively with Coherence and apply Domain Driven Designs (DDD) to Coherence applications
  • Leverage Coherence events and continuous queries to provide real-time updates to client applications
  • Successfully integrate various persistence technologies, such as JDBC, Hibernate, or TopLink, with Coherence
  • Filled with numerous examples that provide best practice guidance, and a number of classes you can readily reuse within your own applications

In Detail

Scalability, performance, and reliability have to be designed into an application from the very beginning, as there may be substantial cost or implementation consequences if they need to be added down the line. This indispensible book will teach you how to achieve these things using Oracle Coherence, a leading data grid product on the market.

Authored by leading Oracle Coherence authorities, this essential book will teach you how to use Oracle Coherence to build high-performance applications that scale to hundreds of machines and have no single points of failure. You will learn when and how to use Coherence features such as distributed caching, parallel processing, and real-time events within your application, and understand how Coherence fits into the overall application architecture.

Oracle Coherence provides a solid architectural foundation for scalable, high-performance and highly available enterprise applications, through features such as distributed caching, parallel processing, distributed queries and aggregations, real-time events, and the elimination of single points of failure.

However, in order to take full advantage of these features, you need to design your application for Coherence from the beginning. Based on the authors' extensive knowledge of Oracle Coherence, and how to use it in the real world, this book will provide you with all the information you need in order to leverage various Coherence features properly. It contains a collection of best practice-based solutions and mini-frameworks that will allow you to be more productive from the very beginning.

The early chapters cover basics like installation guidelines and caching topologies, before moving on to the domain model implementation guidelines, distributed queries and aggregations, parallel processing, and real-time events. Towards the end, you learn how to integrate Coherence with different persistence technologies, how to access Coherence from platforms other than Java, and how to test and debug classes and applications that depend on Coherence.

Leverage Oracle’s leading data grid solution to build massively scalable, high-performance applications

Table of contents

  1. Oracle Coherence 3.5
    1. Table of Contents
    2. Oracle Coherence 3.5
    3. Credits
    4. Foreword
      1. A word about the author
    5. About the author
    6. Acknowledgements
    7. About the co-authors
    8. About the reviewers
    9. Preface
      1. Introducing Oracle Coherence
        1. Distributed caching
        2. Distributed queries
        3. In-place and parallel processing
        4. Cache events
      2. Coherence within the Oracle ecosystem
      3. Coherence usage scenarios
      4. Oracle Coherence editions
      5. What this book covers
      6. What you need for this book
      7. Who this book is for
      8. Who this book is not for
      9. Conventions
      10. Reader feedback
      11. Customer support
        1. Errata
        2. Piracy
        3. Questions
    10. 1. Achieving Performance, Scalability, and Availability Objectives
      1. Achieving performance objectives
        1. Dealing with latency
        2. Minimizing bandwidth usage
        3. Coherence and performance
      2. Achieving scalability
        1. Stateless services do not exist
        2. Scaling a database is hard
        3. Database scale-out approaches
          1. Master-slave replication
          2. Database clustering
          3. Database sharding
        4. Return of the state
        5. Using Coherence to reduce database load
          1. Coherence and master-slave databases
          2. Coherence and database clusters
          3. Coherence and database sharding
        6. Coherence and scalability
      3. Achieving high availability
        1. Adding redundancy to the system
        2. Redundancy is not enough
        3. Coherence and availability
      4. Putting it all together
        1. Design for performance and scalability
        2. Set performance goals at each level
        3. Measure and monitor
        4. Educate your team
      5. Summary
    11. 2. Getting Started
      1. Installing Coherence
      2. What's in the box?
      3. Starting up the Coherence cluster
        1. Troubleshooting cluster start-up
          1. Multicast issues
          2. Binding issues
      4. Accessing the data grid
        1. Coherence console
          1. Creating caches
          2. Working with the cache
        2. Configuring the development environment
          1. Referencing necessary JAR files
          2. Enabling IntelliSense for configuration files
          3. Starting Coherence nodes within the IDE
          4. Creating a private cluster
        3. Configuring Coherence
          1. Operational configuration
          2. Configuring logging
          3. Configuring a private cluster
        4. Using the Coherence API
          1. The basics: NamedCache and CacheFactory
          2. The "Hello World" example
          3. Coherence API in action: Implementing the cache loader
            1. Loader design
            2. Implementing CsvSource
            3. Implementing CoherenceTarget
            4. Testing the Cache loader
      5. Testing and debugging Coherence applications
      6. Summary
    12. 3. Planning Your Caches
      1. Anatomy of a clustered cache
      2. Clustered cache topologies
        1. Replicated Cache service
          1. Read performance
          2. Write performance
          3. Data set size
            1. Coherence node size on modern JVMs
          4. Fault tolerance
          5. When to use it?
        2. Partitioned Cache service
          1. Read performance
          2. Write performance
          3. Data set size
          4. Fault tolerance
          5. When to use it?
        3. Near cache
          1. Near cache invalidation strategies
            1. None
            2. Present
            3. All
            4. Auto
          2. When to use it?
        4. Continuous Query Cache
      3. Backing maps
        1. Local cache
        2. External backing map
        3. Paged external backing map
        4. Overflow backing map
        5. Read-write backing map
        6. Partitioned backing map
      4. Cache configuration
        1. Caching schemes
          1. Distributed cache scheme
          2. Local cache scheme
          3. Near cache scheme
          4. Read-write backing map scheme
          5. Partitioned backing map
          6. Partitioned read-write backing map
        2. Cache mappings
        3. Sample cache configuration
      5. Summary
    13. 4. Implementing Domain Objects
      1. Introducing the Coherent Bank sample application
        1. Coherent Bank requirements
        2. Coherent Bank domain model
      2. Domain model building blocks
        1. Entities and aggregates
          1. Implementing entities
            1. Identity management
            2. Creating entity instances
            3. Managing entity relationships
            4. Dealing with dependencies
            5. Specifying data affinity
        2. Value objects
          1. Implementing the Money value object
          2. Value objects as identifiers
        3. Services
          1. Implementing the CurrencyConverter service
        4. Factories
        5. Repositories
      3. Implementing object serialization
        1. POF basics
        2. POF context
          1. ConfigurablePofContext
        3. Implementing serialization code
        4. PortableObject or PofSerializer?
        5. Collection serialization with POF
      4. Adding support for schema evolution
        1. Implementing Evolvable objects
        2. Implementing serialization for Evolvable objects
      5. Summary
    14. 5. Querying the Data Grid
      1. Built-in filters
      2. Value extractors
        1. Reflection extractor
        2. Other built-in value extractors
          1. IdentityExtractor
          2. ChainedExtractor and MultiExtractor
          3. PofExtractor
        3. Implementing a custom value extractor
      3. Simplifying Coherence queries
        1. Filter builder
      4. Obtaining query results
        1. Controlling query scope using data affinity
        2. Querying near cache
        3. Sorting the results
        4. Paging over query results
      5. Using indexes to improve query performance
        1. Anatomy of an Index
        2. Creating indexes
      6. Coherence query limitations
      7. Aggregators
        1. Built-in aggregators
        2. Using aggregators
        3. Implementing LookupValuesAggregator
      8. Summary
    15. 6. Parallel and In-Place Processing
      1. Entry processors
        1. In-place processing
          1. Implementing WithdrawalProcessor
        2. Cache service re-entrancy
          1. Accessing the backing map directly
        3. Built-in entry processors
          1. VersionedPut and VersionedPutAll
          2. PriorityProcessor
          3. ExtractorProcessor
          4. UpdaterProcessor
      2. Invocation service
        1. Configuring the invocation service
        2. Implementing agents
        3. Executing agents
      3. CommonJ Work Manager
        1. Work Manager API basics
          1. Defining work
          2. Scheduling work
          3. Processing the results
        2. Coherence Work Manager limitations
      4. Coherence Incubator
      5. Summary
    16. 7. Processing Data Grid Events
      1. Cache events
        1. Registering map listeners
          1. Programmatic listener registration
            1. Listening to specific events
            2. Listening for specific property changes
            3. Transforming map events
          2. Registering listeners within the cache configuration file
        2. Making any map observable
      2. Backing map events
        1. Implementing a low-balance listener
          1. AbstractBackingMapListener
          2. Low-balance listener
        2. Registering a backing map listener
      3. Map triggers
        1. Using map triggers for data validation
          1. Data validation framework
          2. Implementing validation trigger
          3. Registering map triggers
      4. Continuous query cache
        1. Observing a continuous query cache
        2. Using a continuous query cache as a substitute for a replicated cache
      5. Summary
    17. 8. Implementing the Persistence Layer
      1. Cache aside
      2. Read-through caching
      3. Implementing read through
        1. Introducing the read-write backing map
        2. Using Spring Framework with a read-write backing map
        3. Refresh ahead
          1. Using refresh ahead to pre-fetch exchange rates
        4. Additional considerations
      4. Write through
      5. Write behind
        1. Using write behind for accounts and transactions
        2. Write behind and storeAll
        3. Handling write-through/write-behind failures
          1. Cluster member failures
          2. Store failures
        4. Write behind and eviction
        5. Write behind and deletes
      6. Configuring backup with a read-write backing map
        1. Backup with read through
        2. Backup with write behind
      7. Built-in CacheStore implementations
        1. Using the Coherence JPA CacheStore
      8. Summary
    18. 9. Bridging Platform and Network Boundaries
      1. Coherence networking
      2. Coherence*Extend overview
      3. Configuring Coherence*Extend
        1. Configuring proxy servers
        2. Configuring clients
          1. Configuring remote cache scheme
          2. Mapping cache names to caches
          3. Configuring a remote invocation service
          4. Address providers
          5. Handling connection or proxy server failure
      4. Coherence*Extend limitations
        1. Explicit concurrency control
        2. Executing invocable agents via Coherence*Extend
      5. Securing proxy servers
      6. Using network filters
        1. Built-in network filters
          1. Compression filter
          2. Symmetric encryption filter
        2. Implementing a custom network filter
      7. Summary
    19. 10. Accessing Coherence from .NET
      1. .NET client configuration
        1. Coherence configuration files in .NET
          1. Operational descriptor
          2. Cache configuration
          3. POF configuration
        2. Resource loading in Coherence for .NET
          1. Resource abstraction
          2. Protocols and resource loader
        3. Approaches to .NET client configuration
          1. Convention-based configuration
          2. Explicit configuration
          3. Programmatic configuration
      2. Implementing the client application
        1. Basic Cache Operations
        2. Implementing data objects
          1. Implementing the IPortableObject interface
          2. Implementing the external serializer
        3. Executing queries
          1. Implementing filters and value extractors
            1. Implementing PropertyExtractor in C#
        4. Executing the aggregators and entry processors
        5. Listening for cache events
          1. Cache listeners
          2. Event marshalling in Windows Forms applications
          3. Continuous Query Cache
            1. Data binding with Windows Presentation Foundation (WPF)
      3. Summary
    20. 11. Accessing Coherence from C++
      1. Configuring Coherence C++
      2. Managed object model
        1. Handles, Views, and Holders
        2. Managed object creation
        3. Casting and type checking
        4. Handling exceptions
        5. Class hierarchy namespaces
      3. Implementing a Coherence C++ client application
        1. Implementing Cacheable C++ Data Objects
          1. Managed adapter
          2. Data object serialization
        2. Implementing managed classes
          1. Understanding specifications
          2. Factory methods
          3. Member variables
          4. Implementing constructors
          5. Implementing methods
          6. Implementing the PortableObject interface
          7. Implementing external serializer
        3. Executing queries
          1. Value extractors
            1. Extracting values from locally cached objects
            2. PofExtractor
            3. Implementing PropertyExtractor in C++
          2. Filters
          3. Performing a query in C++
        4. Executing aggregators and entry processors
          1. Implementing DepositProcessor in C++
        5. Listening for cache events
          1. Cache listeners
        6. Standard type integration
      4. Summary
    21. 12. The Right Tool for the Job
    22. A. Coherent Bank Sample Application
      1. Prerequisites
        1. Sun Java JDK 1.6
        2. Microsoft Visual Studio 2008
        3. Oracle Coherence 3.5.3
        4. Ant 1.7+
        5. NAnt 0.86
      2. Installation
      3. Deploying the Java Application
      4. Deploying the C++ Application
      5. Deploying the .NET Application
      6. Shutting everything down
      7. Review the code
    23. Index

Product information

  • Title: Oracle Coherence 3.5
  • Author(s): Aleksandar Seović, Mark Falco, Patrick Peralta
  • Release date: March 2010
  • Publisher(s): Packt Publishing
  • ISBN: 9781847196125