Oracle Coherence 3.5
eBook: $35.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 15%!
Print + free eBook + free PacktLib access to the book: $95.98    Print cover: $59.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • 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

Book Details

Language : English
Paperback : 408 pages [ 235mm x 191mm ]
Release Date : March 2010
ISBN : 1847196128
ISBN 13 : 9781847196125
Author(s) : Aleksandar Seovic, Mark Falco, Patrick Peralta
Topics and Technologies : All Books, Enterprise Products and Platforms, Oracle Fusion Middleware, Cloud, Enterprise, Oracle

Table of Contents

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

Aleksandar Seovic

Aleksandar Seovic is a founder and Managing Director at S4HC, Inc., where he has worked in the architect role on both .NET and Java projects and has led development effort on a number of engagements for Fortune 500 clients, mostly in the pharmaceutical and financial services industries.

Aleksandar led the implementation of Oracle Coherence for .NET, a client library that allows applications written in any .NET language to access data and services provided by Oracle Coherence data grid, and was one of the key people involved in the design and implementation of Portable Object Format (POF), a platform-independent object serialization format that allows seamless interoperability of Coherence-based Java, .NET, and C++ applications.

Aleksandar frequently speaks about and evangelizes Coherence at industry conferences, Java and .NET user group events, and Coherence SIGs. He can be reached at

Mark Falco

Mark Falco is a Consulting Member of Technical Staff at Oracle. He has been part of the Coherence development team since 2005 where he has specialized in the areas of clustered communication protocols as well as the Coherence for C++ object model. Mark holds a B.S. in computer science from Stevens Institute of Technology.

Patrick Peralta

Patrick Peralta is a Senior Software Engineer for Oracle (formerly Tangosol) specializing in Coherence and middleware Java. He wears many hats in Coherence engineering, including development, training, documentation, and support. He has extensive experience in supporting and consulting customers in fields such as retail, hospitality, and finance.
As an active member of the Java developer community he has spoken at user groups and conferences across the US including Spring One and Oracle Open World. Prior to joining Oracle, Patrick was a senior developer at Symantec, working on Java/J2EE based services, web applications, system integrations, and Swing desktop clients. Patrick has a B.S. in computer science from Stetson University in Florida.

He currently maintains a blog on Coherence and other software development topics at

Sorry, we don't have any reviews for this title yet.

Code Downloads

Download the code and support files for this book.

Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Oracle Coherence 3.5 +    Oracle User Productivity Kit 3.5 =
50% Off
the second eBook
Price for both: $53.70

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Best use distributed caching to reduce the load on the backend database
  • Design and implement your domain objects to work most effectively with Coherence
  • Apply Domain Driven Design (DDD) principles to Coherence applications
  • Query and aggregate data efficiently within the Coherence grid
  • Boost application performance by executing tasks in parallel within the grid
  • Leverage Coherence events and continuous queries to provide real-time updates to client applications
  • Integrate various persistence technologies, such as JDBC, Hibernate, or TopLink, with Coherence
  • Access Coherence from .NET and C++ applications using Coherence*Extend
  • Test and debug Coherence-related code

Chapter 1, Achieving Performance, Scalability, and Availability Objectives discusses obstacles to scalability, performance, and availability and also some common approaches that are used to overcome these obstacles. It also talks about how these solutions can be improved using Coherence.

Chapter 2, Getting Started teaches you how set up Coherence correctly in a development environment, and the basics of how to access Coherence caches, both by using the supplied command-line client and programmatically.

Chapter 3, Planning Your Caches covers various cache topologies supported by Coherence and provides guidance on when to use each one and how to configure them.

Chapter 4, Implementing Domain Objects introduces the sample application we will be building throughout the book and shows you how to design your domain objects to take full advantage of Coherence.

Chapter 5, Querying the Data Grid teaches you how to use Coherence queries and aggregators to retrieve data from the cache in parallel.

Chapter 6, Parallel and In-Place Processing covers Coherence features that allow you to perform in-place or parallel processing within a data grid.

Chapter 7, Processing Data Grid Events shows you how to use powerful event mechanisms provided by Coherence.

Chapter 8, Implementing Persistence Layer discusses options for integration with various data repositories, including relational databases.

Chapter 9, Bridging Platform and Network Boundaries covers the Coherence*Extend protocol, which allows you to access a Coherence cluster from remote clients and from platforms and languages other than Java, such as .NET and C++.

Chapters 10, Accessing Coherence from .NET and Chapter 11, Accessing Coherence from C++ teach you how to access Coherence from .NET and C++ clients, respectively.

Chapter 12, The Right Tool for the Job, provides some parting thoughts and reiterates practices you should apply when building scalable applications.

Appendix, Coherent Bank Sample Application, describes how to set up the sample application that accompanies the book in your environment.

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


This title covers Coherence features progressively, from simple to more advanced topics, and provides best-practice guidance on when and how to use each.

Numerous examples are provided throughout the book that will help you become familiar with Coherence APIs. You will also be able to reuse many of the sample classes or mini-frameworks encapsulating Coherence best practice and providing missing features directly within your own applications. This should significantly increase your productivity when developing Coherence applications.

Finally, a sample application that you can download from the companion web site will show you how to use Coherence as part of the broader infrastructure stack, including Spring Framework and Hibernate, as well as how to access Coherence from a WPF-based .NET desktop application.

Who this book is for

This book is written for architects and developers responsible for the design and development of Internet or Enterprise applications (web-based or otherwise) that need to scale to support a large number of simultaneous users, while at the same time providing fast response times and high availability. The book assumes a solid knowledge of Java, and a familiarity with Domain Driven Design (DDD) is helpful.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software