THE LEADING IMDG SOLUTION EXPLAINED 
HAZELCAST 101
About Me 
EMRAH KOCAMAN 
@emrahkocaman 
https://github.com/emrahkocaman 
emrahkocaman@gmail.com 
! 
• Oracle Certified Professional Java Programmer 
• 6+ years of Professional Java development 
• Was working on enterprise Java technologies 
• Software Developer at Hazelcast (since July 2014)
Before we begin
Agenda 
• What is IMDG? 
• What is Hazelcast? 
• Configuring Hazelcast 
• Distributed World of Hazelcast 
• Hazelcast - Spring Framework Integration 
• Management Center
What’s IMDG? 
IN-MEMORY DATA GRIDS 
Provide virtually unlimited processing power and 
memory as additional cluster members are added 
Expand in real time and dynamically to meet 
increasing requirements 
Increase capacity in a linear and predictable 
manner 
Leverage commodity or integrated systems that 
are easily added without complexity
What is Hazelcast? 
• The leading In Memory Data Grid 
• Highly Available Elastic Cache 
• 4.2 MBytes JAR 
• Distributed Execution Platform 
• Embedded or Client Server 
• Cloud Ready 
• Open Source - Apache License 2.0
Distributed Data-structures 
• IAtomicLong 
• IdGenerator 
• Lock 
• CountDownLatch 
• Semaphore 
• Queue 
• Map 
• MultiMap 
• Set 
• List 
• Topic 
• Executor 
• Write your own!
Who uses Hazelcast?
Use Cases
Raspberry Pi Cluster
Use Cases 
• Scale your application 
• Data sharing 
• Distributed Caching 
• HTTP Session Replication 
• Hibernate 2nd Level Cache 
• Parallel Execution 
• Map-Reduce 
• Spring Cache Provider
Features 
• Java Collection API 
• MultiMap 
• Topic 
• Java Concurrency API 
• Lock, Semaphore, CountDownLatch, ExecutorService 
• Transactions 
• Custom Serialization 
• Off-Heap Support 
• Native Clients: C#, C++, Java, REST, memcached
CONFIGURING & 
FORMING A CLUSTER
Forming A Cluster 
• Hazelcast Clusters run on JVM 
• Hazelcast discovers other instances via Multicast 
(Default) 
• Use TCP/IP lists when Multicast not possible 
• Segregate Clusters on same network via configuration 
• Hazelcast can form clusters on Amazon EC2.
Configuration 
• Hazelcast searches for hazelcast.xml on class path 
• Will use hazelcast-default.xml for everything else. 
• Hazelcast can be configured via XML,API or Spring 
• Configure Networks, Data Structures, Indexes, EC2 
• Config is locked at start-up, cannot dynamically change (feature 
coming soon)
Start Your First Nodes
How Hazelcast Works 
1 / 2 
• Multiple Partitions Per Node 
• Consistent Hashing: hash(key) % partition count 
• Option to control partitioning 
• Possibility to find key owner for every key 
• Support for Near-Caching and executions on key 
owner 
• Automatic Fault-Tolerance 
• Sync / Async Backups 
• Configurable Backup Counts
How Hazelcast Works 
2 / 3 
New Node 
Re-balance
How Hazelcast Works 
3 / 3 
A node crashes Backups restored 
Backup for recovered data Recover from backup
Distributed Map
Distributed Queue
Distributed Topic
Distributed Events
Distributed Lock
Executor Service 
1 / 2
Executor Service 
2 / 2
Spring Integration 
• Supports Spring 2.5+ 
• Hazelcast Namespace 
• Spring Cache Provider 
• Spring Data Integration (on the way)
Spring Integration 
BASIC BEAN DECLARATION
Spring Integration 
HAZELCAST NAMESPACE
Spring Integration 
HAZELCAST NAMESPACE
Spring Cache 
DECLARATIVE CONFIGURATION
Spring Cache 
ANNOTATION BASED CONFIGURATION
“Management is, above all, a practice where art, 
science, and craft meet” 
–HENRY MINTZBERG
Q & A 
THANK YOU 
@emrahkocaman, @hazelcast 
emrah@hazelcast.com 
hazelcast@googlegroups.com 
http://www.hazelcast.com 
http://github.com/hazelcast/hazelcast

Hazelcast 101

  • 1.
    THE LEADING IMDGSOLUTION EXPLAINED HAZELCAST 101
  • 2.
    About Me EMRAHKOCAMAN @emrahkocaman https://github.com/emrahkocaman emrahkocaman@gmail.com ! • Oracle Certified Professional Java Programmer • 6+ years of Professional Java development • Was working on enterprise Java technologies • Software Developer at Hazelcast (since July 2014)
  • 3.
  • 4.
    Agenda • Whatis IMDG? • What is Hazelcast? • Configuring Hazelcast • Distributed World of Hazelcast • Hazelcast - Spring Framework Integration • Management Center
  • 5.
    What’s IMDG? IN-MEMORYDATA GRIDS Provide virtually unlimited processing power and memory as additional cluster members are added Expand in real time and dynamically to meet increasing requirements Increase capacity in a linear and predictable manner Leverage commodity or integrated systems that are easily added without complexity
  • 6.
    What is Hazelcast? • The leading In Memory Data Grid • Highly Available Elastic Cache • 4.2 MBytes JAR • Distributed Execution Platform • Embedded or Client Server • Cloud Ready • Open Source - Apache License 2.0
  • 7.
    Distributed Data-structures •IAtomicLong • IdGenerator • Lock • CountDownLatch • Semaphore • Queue • Map • MultiMap • Set • List • Topic • Executor • Write your own!
  • 8.
  • 9.
  • 10.
  • 11.
    Use Cases •Scale your application • Data sharing • Distributed Caching • HTTP Session Replication • Hibernate 2nd Level Cache • Parallel Execution • Map-Reduce • Spring Cache Provider
  • 12.
    Features • JavaCollection API • MultiMap • Topic • Java Concurrency API • Lock, Semaphore, CountDownLatch, ExecutorService • Transactions • Custom Serialization • Off-Heap Support • Native Clients: C#, C++, Java, REST, memcached
  • 13.
  • 14.
    Forming A Cluster • Hazelcast Clusters run on JVM • Hazelcast discovers other instances via Multicast (Default) • Use TCP/IP lists when Multicast not possible • Segregate Clusters on same network via configuration • Hazelcast can form clusters on Amazon EC2.
  • 15.
    Configuration • Hazelcastsearches for hazelcast.xml on class path • Will use hazelcast-default.xml for everything else. • Hazelcast can be configured via XML,API or Spring • Configure Networks, Data Structures, Indexes, EC2 • Config is locked at start-up, cannot dynamically change (feature coming soon)
  • 16.
  • 17.
    How Hazelcast Works 1 / 2 • Multiple Partitions Per Node • Consistent Hashing: hash(key) % partition count • Option to control partitioning • Possibility to find key owner for every key • Support for Near-Caching and executions on key owner • Automatic Fault-Tolerance • Sync / Async Backups • Configurable Backup Counts
  • 18.
    How Hazelcast Works 2 / 3 New Node Re-balance
  • 19.
    How Hazelcast Works 3 / 3 A node crashes Backups restored Backup for recovered data Recover from backup
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
    Spring Integration •Supports Spring 2.5+ • Hazelcast Namespace • Spring Cache Provider • Spring Data Integration (on the way)
  • 28.
    Spring Integration BASICBEAN DECLARATION
  • 29.
  • 30.
  • 31.
  • 32.
    Spring Cache ANNOTATIONBASED CONFIGURATION
  • 33.
    “Management is, aboveall, a practice where art, science, and craft meet” –HENRY MINTZBERG
  • 34.
    Q & A THANK YOU @emrahkocaman, @hazelcast emrah@hazelcast.com hazelcast@googlegroups.com http://www.hazelcast.com http://github.com/hazelcast/hazelcast