SlideShare a Scribd company logo
Infinispan and Enterprise Data Grid Tristan Tarrant Principal Software Engineer [email_address]  /  https://twitter.com/tristantarrant/
Infinispan: What is it ? In-memory key/value data grid
Built around java.util.ConcurrentMap interface
Easy to set-up and use Cache<String, String> cache = new DefaultCacheManager().getCache(); cache.put(“ash”, “nazg”); String v = cache.get(“ash”);
Infinispan: Clustering/1 Replication All nodes contain a copy of every entry
Good for small clusters
Maximum size is constrained by node with least memory Invalidation Values are kept locally
Updates to a key invalidate all the other nodes Distribution Entries are placed on redundant nodes in the grid
Scales to larger clusters
Size scales linearly with the number of servers
Infinispan: Clustering/2 Consistent Hash Calculated from the key
Location of data in the cluster is deterministic
Keeps RPCs low L1 Cache Remote data is proxied locally
Multiple retrievals of the same entry don't have to do RPC Grouping Uses “key group” to determine entry location
Keeps related keys together
Infinispan: Configuration Programmatic via builder-style API
Declarative via XML CacheManager manager = new DefaultCacheManager(&quot;my-config-file.xml&quot;); Cache<String, String> myCache = manager.getCache(&quot;myCache&quot;); Configuration c1 = new ConfigurationBuilder() .clustering() .l1().disable() .mode(DIST_SYNC) .hash().numOwners(2) .build(); <infinispan> <global> <transport clusterName=&quot;infinispan-cluster /> </global> <namedCache name=&quot;myCache&quot;> <clustering mode=&quot;dist&quot;> <sync/> <hash numOwners=&quot;2&quot; /> <l1 enabled=&quot;false&quot;/> </clustering> </namedCache> </infinispan>
Infinispan: Asynchronous API Normally put() and get() and remove() are synchronous They wait for RPC and Locks (and maybe cache stores) The asynchronous API returns NotifyingFutures for the above operations Events are fired on completion of the operation FutureListener nineteenEightyFive = new FutureListener() { public void futureDone(Future future) { try { future.get(); } catch (Exception e) { System.out.println(&quot;The DeLorean is still in 1955&quot;); } } }; cache.putAsync(&quot;mph&quot;, &quot;88&quot;).attachListener(nineteenEightyFive);
Infinispan: Expiration & Eviction Entries in the cache are immortal by default
Expiration (lifespan or idle time) Per cache (via configuration)
Per key (programmatically) Eviction Maximum entry cap per cache
Various strategies (FIFO, LRU, LIRS) cache.put(“ash”, “nazg”, 5, SECONDS); cache.put(“krul”, “uruk”, 5, MINUTES, 1, MINUTE);
Infinispan: Listeners Clients can register listeners for two classes of events CacheManager Node join/leave
Cache started/stopped Cache CRUD
Eviction / Passivation
Rehashing / Transaction completion Listeners are annotated POJOs  @Listener public class MyCacheListener { @CacheEntryModified public void print(CacheEntryModifiedEvent event) { System.out.println(“Something has changed in the Matrix”); } }
Infinispan: Transactions Perform “atomic” operations on multiple keys

More Related Content

PDF
Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLab
PDF
Distributed real time stream processing- why and how
PPT
Real-Time Streaming with Apache Spark Streaming and Apache Storm
PDF
Apache Storm Tutorial
PDF
Real-time streams and logs with Storm and Kafka
PPTX
Linux kernel debugging
PDF
Debugging Complex Systems - Erlang Factory SF 2015
PDF
Real-Time Analytics with Kafka, Cassandra and Storm
Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLab
Distributed real time stream processing- why and how
Real-Time Streaming with Apache Spark Streaming and Apache Storm
Apache Storm Tutorial
Real-time streams and logs with Storm and Kafka
Linux kernel debugging
Debugging Complex Systems - Erlang Factory SF 2015
Real-Time Analytics with Kafka, Cassandra and Storm

What's hot (20)

PPT
Hs java open_party
PDF
Advanced Postgres Monitoring
ODP
Using Grails to power your electric car
PDF
DTrace Topics: Introduction
PDF
Linux Profiling at Netflix
PDF
Profiling your Applications using the Linux Perf Tools
PPTX
Realtime Statistics based on Apache Storm and RocketMQ
PDF
Asynchronous, Event-driven Network Application Development with Netty
PDF
Java In-Process Caching - Performance, Progress and Pittfalls
PPTX
Am I reading GC logs Correctly?
PDF
Linux Performance Analysis: New Tools and Old Secrets
PPTX
Process scheduling
PDF
Apache Zookeeper
PDF
Infrastructure & System Monitoring using Prometheus
PDF
Lucene revolution 2011
PPTX
Contiki os timer tutorial
PDF
Real Time Data Streaming using Kafka & Storm
PDF
JavaOne 2015 Java Mixed-Mode Flame Graphs
PDF
[2C1] 아파치 피그를 위한 테즈 연산 엔진 개발하기 최종
PDF
Monitoring with Ganglia
Hs java open_party
Advanced Postgres Monitoring
Using Grails to power your electric car
DTrace Topics: Introduction
Linux Profiling at Netflix
Profiling your Applications using the Linux Perf Tools
Realtime Statistics based on Apache Storm and RocketMQ
Asynchronous, Event-driven Network Application Development with Netty
Java In-Process Caching - Performance, Progress and Pittfalls
Am I reading GC logs Correctly?
Linux Performance Analysis: New Tools and Old Secrets
Process scheduling
Apache Zookeeper
Infrastructure & System Monitoring using Prometheus
Lucene revolution 2011
Contiki os timer tutorial
Real Time Data Streaming using Kafka & Storm
JavaOne 2015 Java Mixed-Mode Flame Graphs
[2C1] 아파치 피그를 위한 테즈 연산 엔진 개발하기 최종
Monitoring with Ganglia
Ad

Viewers also liked (12)

PDF
Demtech Introduction 2011
PPTX
Ppt classificatie van_pedoseksuelen_en_verkrachters[1]
PPTX
Ppt classificatie van_pedoseksuelen_en_verkrachters[1]
PPTX
Calendario
ODP
Ppt. la vida amb internet (català)
PPTX
Ppt classificatie van_pedoseksuelen_en_verkrachters[1]
PPTX
Ppt classificatie van_pedoseksuelen_en_verkrachters[1]
PPTX
Passive voice[1]
PPTX
Wonders of Web Project: Research Tools
ODP
Treball angles
PPTX
PPTX
Malaysia Seasonal Promotion Planning
Demtech Introduction 2011
Ppt classificatie van_pedoseksuelen_en_verkrachters[1]
Ppt classificatie van_pedoseksuelen_en_verkrachters[1]
Calendario
Ppt. la vida amb internet (català)
Ppt classificatie van_pedoseksuelen_en_verkrachters[1]
Ppt classificatie van_pedoseksuelen_en_verkrachters[1]
Passive voice[1]
Wonders of Web Project: Research Tools
Treball angles
Malaysia Seasonal Promotion Planning
Ad

Similar to Infinispan @ JBUG Milano (20)

PDF
.Net Multithreading and Parallelization
PPTX
Copper: A high performance workflow engine
PPTX
Technical Overview of Apache Drill by Jacques Nadeau
PPTX
Distributed caching and computing v3.7
PPTX
Think Distributed: The Hazelcast Way
PPT
Slice: OpenJPA for Distributed Persistence
PPTX
Distributed caching-computing v3.8
PDF
Tempesta FW: a FrameWork and FireWall for HTTP DDoS mitigation and Web Applic...
PDF
Stateful streaming data pipelines
PPT
Chapter Seven(1)
PPT
Leveraging Hadoop in your PostgreSQL Environment
PPTX
Distributed Applications with Apache Zookeeper
PPTX
Simplifying Apache Cascading
PPTX
Always-on Profiling of All Linux Threads, On-CPU and Off-CPU, with eBPF & Con...
PDF
인피니스팬데이터그리드따라잡기 (@JCO 2014)
PPTX
Exploring .NET memory management - JetBrains webinar
PPT
Server side JavaScript: going all the way
PDF
Smash the Stack: Writing a Buffer Overflow Exploit (Win32)
PDF
Near Real time Indexing Kafka Messages to Apache Blur using Spark Streaming
PDF
FBTFTP: an opensource framework to build dynamic tftp servers
.Net Multithreading and Parallelization
Copper: A high performance workflow engine
Technical Overview of Apache Drill by Jacques Nadeau
Distributed caching and computing v3.7
Think Distributed: The Hazelcast Way
Slice: OpenJPA for Distributed Persistence
Distributed caching-computing v3.8
Tempesta FW: a FrameWork and FireWall for HTTP DDoS mitigation and Web Applic...
Stateful streaming data pipelines
Chapter Seven(1)
Leveraging Hadoop in your PostgreSQL Environment
Distributed Applications with Apache Zookeeper
Simplifying Apache Cascading
Always-on Profiling of All Linux Threads, On-CPU and Off-CPU, with eBPF & Con...
인피니스팬데이터그리드따라잡기 (@JCO 2014)
Exploring .NET memory management - JetBrains webinar
Server side JavaScript: going all the way
Smash the Stack: Writing a Buffer Overflow Exploit (Win32)
Near Real time Indexing Kafka Messages to Apache Blur using Spark Streaming
FBTFTP: an opensource framework to build dynamic tftp servers

Recently uploaded (20)

PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Approach and Philosophy of On baking technology
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Electronic commerce courselecture one. Pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Big Data Technologies - Introduction.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Encapsulation theory and applications.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPT
Teaching material agriculture food technology
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Modernizing your data center with Dell and AMD
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Approach and Philosophy of On baking technology
Diabetes mellitus diagnosis method based random forest with bat algorithm
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Electronic commerce courselecture one. Pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
“AI and Expert System Decision Support & Business Intelligence Systems”
Big Data Technologies - Introduction.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Encapsulation theory and applications.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Digital-Transformation-Roadmap-for-Companies.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
NewMind AI Weekly Chronicles - August'25 Week I
NewMind AI Monthly Chronicles - July 2025
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Teaching material agriculture food technology
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Modernizing your data center with Dell and AMD
Building Integrated photovoltaic BIPV_UPV.pdf

Infinispan @ JBUG Milano