Introducing Infinispan

26
Introducing Infinispan • Mircea Markus • Senior Software Engineer • Red Hat, Inc

description

Apresentação de Mircea Markus - 8º encontro PT.JUG.

Transcript of Introducing Infinispan

Page 1: Introducing Infinispan

Introducing Infinispan

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

Page 2: Introducing Infinispan

Mircea Markus

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

Page 3: Introducing Infinispan

Agenda

• What is Infinispan• API

• Key features• Three use cases• The path ahead

Page 4: Introducing Infinispan

What is Infinispan?

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

Page 5: Introducing Infinispan

Distributed data structure

Page 6: Introducing Infinispan

High availability

• Memory is volatile• Make redundant copies

• Total replication (Replication Mode)• Partial replication (Distribution Mode)

• Topology changes• Node will crash!• Re-arrange state

Page 7: Introducing Infinispan

Elasticity

• Expect• Node additions• Node removals

• Topology changes • are totally consistent• do not "stop the world"

Page 8: Introducing Infinispan

API

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

Page 9: Introducing Infinispan

Key features

• Transactions• Persistence• Map/Reduce• Querying

Page 10: Introducing Infinispan

Transactions

• JTA transactions support• XA or Synchronization based enlistment• recovery!

• Local transactions (batching)• Transactional modes

• optimistic • pessimistic

Page 11: Introducing Infinispan

Persistence/Cache Store

• Used for• durability• increased storage• warm caches

• Various implementations• jdbc, bdbje, file, cloud, remote/infinispan, cassandra

• Extensible

Page 12: Introducing Infinispan

Map/Reduce example

Page 13: Introducing Infinispan

Map/Reduce

Page 14: Introducing Infinispan

Map/Reduce

Page 15: Introducing Infinispan

Querying

• What’s in C7?

• Where is the white king?

Page 16: Introducing Infinispan

Querying

• Based on Hibernate Search/Lucene• Objects in the grid are indexed

• index management

Page 17: Introducing Infinispan

Use cases

• Local cache• Cluster of caches• Autonomous data store

• access protocols

Page 18: Introducing Infinispan

Local cache

Page 19: Introducing Infinispan

Features of a local cache

• Eviction• Expiry• Write through, write behind• Preloading• Notifications• Statistics

Page 20: Introducing Infinispan

Local cache not good enough...

Page 21: Introducing Infinispan

Cluster of caches

Page 22: Introducing Infinispan

Some limitations still

• Client is affected by cache topology changes• Shared resources• Tier management

• incompatible JVM tuning• security• garbage collection

• Non-JVM clients

Page 23: Introducing Infinispan

Cache servers

Page 24: Introducing Infinispan

Client/Server protocols

• REST• Memcached• Hotrod

• proprietary• java, python, ruby

Page 25: Introducing Infinispan

The path ahead

• 5.2• transactions performance• non-blocking state transfer• hotrod enhancements

• 6+• X-datacenter replication• eventual consistency• continuous queries

Page 26: Introducing Infinispan

Thank you!

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