+ All Categories
Home > Software > Hazelcast 101

Hazelcast 101

Date post: 02-Dec-2014
Category:
Upload: emrah-kocaman
View: 209 times
Download: 2 times
Share this document with a friend
Description:
Introduction to the leading in-memory data grid solution Hazelcast
34
HAZELCAST 101 THE LEADING IMDG SOLUTION EXPLAINED
Transcript
Page 1: Hazelcast 101

H A Z E L C A S T 1 0 1T H E L E A D I N G I M D G S O L U T I O N E X P L A I N E D

Page 2: Hazelcast 101

E M R A H K O C A M A N @emrahkocaman

https://github.com/emrahkocaman [email protected]

About Me

!

• Oracle Certified Professional Java Programmer • 6+ years of Professional Java development • Was working on enterprise Java technologies • Software Developer at Hazelcast (since July 2014)

Page 3: Hazelcast 101

Before we begin

Page 4: Hazelcast 101

Agenda

• What is IMDG? • What is Hazelcast? • Configuring Hazelcast • Distributed World of Hazelcast • Hazelcast - Spring Framework Integration • Management Center

Page 5: Hazelcast 101

I N - M E M O R Y D ATA G R I D S

What’s IMDG?

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

Page 6: Hazelcast 101

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

Page 7: Hazelcast 101

Distributed Data-structures

• IAtomicLong • IdGenerator • Lock • CountDownLatch • Semaphore • Queue • Map • MultiMap

• Set • List • Topic • Executor • Write your own!

Page 8: Hazelcast 101

Who uses Hazelcast?

Page 9: Hazelcast 101

Use Cases

Page 10: Hazelcast 101

Raspberry Pi Cluster

Page 11: Hazelcast 101

Use Cases

• Scale your application • Data sharing • Distributed Caching • HTTP Session Replication • Hibernate 2nd Level Cache • Parallel Execution • Map-Reduce • Spring Cache Provider

Page 12: Hazelcast 101

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

Page 13: Hazelcast 101

C O N F I G U R I N G & F O R M I N G A C L U S T E R

Page 14: Hazelcast 101

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.

Page 15: Hazelcast 101

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)

Page 16: Hazelcast 101

Start Your First Nodes

Page 17: Hazelcast 101

1 / 2

How Hazelcast Works

• 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

Page 18: Hazelcast 101

2 / 3

How Hazelcast Works

New Node

Re-balance

Page 19: Hazelcast 101

3 / 3

How Hazelcast Works

A node crashes Backups restored

Recover from backupBackup for recovered data

Page 20: Hazelcast 101

Distributed Map

Page 21: Hazelcast 101

Distributed Queue

Page 22: Hazelcast 101

Distributed Topic

Page 23: Hazelcast 101

Distributed Events

Page 24: Hazelcast 101

Distributed Lock

Page 25: Hazelcast 101

1 / 2

Executor Service

Page 26: Hazelcast 101

2 / 2

Executor Service

Page 27: Hazelcast 101

Spring Integration

• Supports Spring 2.5+ • Hazelcast Namespace • Spring Cache Provider • Spring Data Integration (on the way)

Page 28: Hazelcast 101

B A S I C B E A N D E C L A R AT I O N

Spring Integration

Page 29: Hazelcast 101

H A Z E L C A S T N A M E S PA C E

Spring Integration

Page 30: Hazelcast 101

H A Z E L C A S T N A M E S PA C E

Spring Integration

Page 31: Hazelcast 101

D E C L A R AT I V E C O N F I G U R AT I O N

Spring Cache

Page 32: Hazelcast 101

A N N O TAT I O N B A S E D C O N F I G U R AT I O N

Spring Cache

Page 33: Hazelcast 101

– H E N R Y M I N T Z B E R G

“Management is, above all, a practice where art, science, and craft meet”

Page 34: Hazelcast 101

T H A N K Y O U

Q & A

@emrahkocaman, @hazelcast [email protected] [email protected] http://www.hazelcast.com http://github.com/hazelcast/hazelcast


Recommended