Professional Documents
Culture Documents
Agenda
What is Coherence? Demonstration Consensus How it works Code Examples Architectural Patterns
What is Coherence?
Oracle Coherence
Development Toolkit
Pure Java 1.4.2+ Libraries Pure .Net 1.1 and 2.0 (Client Libraries) No Third-Party Dependencies No Open Source Dependencies
Oracle Coherence
Provides
Container-less Clustering of Java Processes Data Structures to manage Data across a Cluster / Grid Real-Time Event Observation Listener Pattern Materialized Views of Data Parallel Queries and Aggregation Object-based Queries Parallel Data Processing Parallel Grid Processing RemoteException Free Distributed Computing Clustered JMX MAN + WAN Connectivity Client + Data Grid Deployment Models
Oracle Coherence
Some uses
Application Clustering and Reliable Data Sharing Caching state in the Application-tier Relieve load on lower-tier systems
Databases, Mainframes, Web Servers, Web Services
Scaling out application state (in the application-tier) In-Memory Http Session Management Resilient Processing Engine Temporary System of Record for Extreme Transaction Processing
Coherence Demonstration
Predictable Scalability
Cache Capacity Increases with Cluster Size Coherence Load-Balances Partitions across Cluster Point-to-Point Communication (peer to peer) No multicast required (sometimes not allowed)
Parallel Queries
Leaving a Cluster
Leaves the current cluster shutdown blocks until data is safe Failing to call shutdown results in Coherence having to detect process death/exit and recover information from another process. Death detection and recovery is automatic
CacheFactory.shutdown();
Coherence* Extensions
NamedCache nc = CacheFactory.getCache(mine); Set keys = nc.keySet(); Set entries = nc.entrySet(); boolean exists = nc.containsKey(key);
NamedCache nc = CacheFactory.getCache(stocks); nc.addMapListener(new MapListener() { public void onInsert(MapEvent mapEvent) { } public void onUpdate(MapEvent mapEvent) { } public void onDelete(MapEvent mapEvent) { } });
NamedCache nc = CacheFactory.getCache(people); Set keys = nc.keySet( new LikeFilter(getLastName, %Stone%)); Set entries = nc.entrySet( new EqualsFilter(getAge, 35));
NamedCache nc = CacheFactory.getCache(stocks); Double total = (Double)nc.aggregate( AlwaysFilter.INSTANCE, new DoubleSum(getQuantity)); Set symbols = (Set)nc.aggregate( new EqualsFilter(getOwner, Larry), new DistinctValue(getSymbol));
Aggregation constructs include; Distinct, Sum, Min, Max, Average, Having, Group By Aggregate using nonrelational data models Create your own aggregators
* Requires Enterprise Edition or above
class StockSplitProcessor extends AbstractProcessor { Object process(Entry entry) { Stock stock = (Stock)entry.getValue(); stock.quantity *= 2; entry.setValue(stock); return null; } }
Clustered Processes
Oracle Coherence
Search:
http://search.oracle.com
Search For:
Coherence
Download
http://www.oracle.com/technology/products/coherence
Support
http://forums.tangosol.com http://wiki.tangosol.com
Read More
http://www.tangosol.com/
Questions
Appendix
The preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracles products remains at the sole discretion of Oracle.