Introducing Infinispan




• Mircea Markus
• Senior Software Engineer
• Red Hat, Inc
Mircea Markus



• R&D Engineer, Red Hat Inc.
• Twitter: @mirceamarkus
• Blog: mirceamarkus.blogspot.com
Agenda


• What is Infinispan
• API
• Key features
• Three use cases
• The path ahead
What is Infinispan?


•   Distributed, in memory, data structure
•   Highly available
•   Elastic
•   Open source
Distributed data structure
High availability

• Memory is volatile
• Make redundant copies
  • Total replication (Replication Mode)
  • Partial replication (Distribution Mode)
• Topology changes
  • Node will crash!
  • Re-arrange state
Elasticity
• Expect
  • Node additions
  • Node removals
• Topology changes
  • are totally consistent
  • do not "stop the world"
API

•   Key-value store
•   java.util.concurrent.ConcurrentHashMap
•   JSR-107 compliant
•   CDI support
Key features

•   Transactions
•   Persistence
•   Map/Reduce
•   Querying
Transactions

• JTA transactions support
  • XA or Synchronization based enlistment
  • recovery!
• Local transactions (batching)
• Transactional modes
  • optimistic
  • pessimistic
Persistence/Cache Store

• Used for
  • durability
  • increased storage
  • warm caches
• Various implementations
  • jdbc, bdbje, file, cloud, remote/infinispan, cassandra
• Extensible
Map/Reduce example
Map/Reduce
Map/Reduce
Querying



• What’s in C7?


• Where is the white king?
Querying



• Based on Hibernate Search/Lucene
• Objects in the grid are indexed
  • index management
Use cases


• Local cache
• Cluster of caches
• Autonomous data store
  • access protocols
Local cache
Features of a local cache
•   Eviction
•   Expiry
•   Write through, write behind
•   Preloading
•   Notifications
•   Statistics
Local cache not good enough...
Cluster of caches
Some limitations still

• Client is affected by cache topology changes
• Shared resources
• Tier management
  • incompatible JVM tuning
  • security
  • garbage collection
• Non-JVM clients
Cache servers
Client/Server protocols

• REST
• Memcached
• Hotrod
  • proprietary
  • java, python, ruby
The path ahead
• 5.2
  • transactions performance
  • non-blocking state transfer
  • hotrod enhancements
• 6+
  • X-datacenter replication
  • eventual consistency
  • continuous queries
Thank you!

•   infinispan.blogspot.com
•   @infinispan
•   mirceamarkus.blogspot.com
•   @mirceamarkus

Introducing Infinispan