• No results found

Ground up Introduction to In-Memory Data (Grids)

N/A
N/A
Protected

Academic year: 2021

Share "Ground up Introduction to In-Memory Data (Grids)"

Copied!
67
0
0

Loading.... (view fulltext now)

Full text

(1)

© 2014 Hazelcast Inc.

Ground up Introduction

to In-Memory Data (Grids)

(2)

© 2014 Hazelcast Inc.

(3)

Java Developer on a quest for scalability frameworks

Architect on low-latency projects

NoSQL practitioner

IMDG newbie

(4)

© 2014 Hazelcast Inc.

(5)
(6)

About me

Solutions Architect at Hazelcast

http://hazelcast.com/services/solutions-team/

International Java Conferences speaker

http://lanyrd.com/gamussa/

Co-author of O’Reilly’s «Enterprise Web Development»

Co-organizer of User Groups

Princeton JUG

http://www.meetup.com/NJFlex/

Hazelcast User Group NYC

http://www.meetup.com/hug-nyc/

(7)

© 2014 Hazelcast Inc.

(8)

• The In-Memory landscape

you need to know

• Distributed Data

Applications

• Making In-memory

Reliable, Scalable and

Durable

(9)

© 2014 Hazelcast Inc.

Why

(10)

© 2014 Hazelcast Inc.

(11)
(12)

Tiered Storage JVM

In-Memory

Anatomy of an Application: Tiered Data Storage

(13)

Network

Common Enterprise Application Landscape

Database

Databases DatabaseDatabases Database

Databases DatabaseDatabases

App Server Application JVM Heap App Server Application JVM Heap App Server Application JVM Heap App Server Application JVM Heap App Server Application JVM Heap App Server Application JVM Heap App Server Application JVM Heap App Server Application JVM Heap App Server Application JVM Heap App Server Application JVM Heap App Server Application JVM Heap App Server Application JVM Heap J D B C J D B C J D B C J D B C J D B C J D B C J D B C J D B C J D B C J D B C J D B C J D B C

(14)

Performance & Scalability Challenges

• JVM memory constraints

• Heap size limitations • GC pauses and tuning • Handling peak loads

• Swapping

• CPU limitations

• Limited processor power

(15)

Performance & Scalability Challenges

• Reliance on the database

• All transactions go through the database • Expensive and complex to scale

• Reliance on DBA(s) to maintain and tune

• Network I/O

• Bandwidth limitations • Latency

• State-aware cluster

(16)

Even More Common Enterprise Application Landscape

Database

Databases DatabaseDatabases Database

Databases DatabaseDatabases

Load Balancer Load Balancer Load Balancer Load Balancer

Enterprise Java Dotnet Devices Phones Tablets Web HTML5 Javascript Rich Clients Next Big Trend?

?Universal Data Transfer Solution?

(17)

© 2014 Hazelcast Inc.

(18)

Messaging Middleware

SQL DATABASES

In-Memory Computing

(19)

Why In-Memory Now?

0 17.5 35 52.5 70

Fast  Ethernet DDR  Infiniband 100  GbE

μs 0 2 4 6 8 2010 2011 2012 2013 TB 32   • 4GB 64  • 18EB

Network RAM per Commodity Server

(20)

© 2014 Hazelcast Inc.

(21)

• Cache-as-a-Service

• Application Scaling

• Database Caching

• Distributed Computing

(22)
(23)
(24)

Application Scaling

• Elastic Scalability (just add more servers and they cluster

automatically)

• Super Speeds (in-memory transaction speeds)

• High Availability (can deploy in backup pairs or even WAN

replicated)

• Fault Tolerance (no single-point-of-failure)

(25)
(26)
(27)

Reactive Clients

The clients (part of an application) enable you to do the

operations without being a member of the grid. Clients can be:

smart: this means that they immediately can send an operation

like map.get(key) to the member that owns that specific key.

dumb: it will connect to a random member in the cluster and

send requests to this member. This member then needs to send the request to the correct member.

High availability

(28)

© 2014 Hazelcast Inc.

(29)

http://www.ministryoftofu.com/2012/01/photos-upcoming-chinese-new-year-creates-backlogs-for-courier-companies/

(30)

Replication vs. Partitioning

Replication - Copying an entire dataset onto multiple servers.

Used for improving speed of access to reference records such as master data.

Partitioning - Splitting up a large monolithic dataset into

(31)
(32)
(33)
(34)
(35)

© 2014 Hazelcast Inc.

(36)

Distributed Maps

Fixed number of partitions (default 271)


Each key falls into a partition


partitionId = hash(keyData)%PARTITION_COUNT

Partition ownerships are reassigned upon membership

(37)

New Node Added

D

(38)

Migration

D

(39)

Migration

D

(40)

Migration

D

(41)

Migration

D

(42)

Migration

D

(43)

Migration

D

(44)

Migration Complete

D

A

B

C

(45)

© 2014 Hazelcast Inc.

(46)

Node Crashes

D

A

B

C

(47)

Backups are Restored

D

A

B

C

(48)

Backups are Restored

D

A

B

C

(49)

Backups are Restored

D

A

B

C

(50)

Backups are Restored

D

A

B

C

(51)

Data is Recovered from backup

D

A

B

C

(52)

Data is Recovered from backup

D

A

B

C

(53)

Backup for Recovered Data

D

A

B

C

(54)

Backup for Recovered Data

D

A

B

C

(55)

Backup for Recovered Data

D

A

B

C

(56)

All Safe

D

(57)

© 2014 Hazelcast Inc.

(58)
(59)
(60)

Durability

• Persist to or read from any external data store (SQL database,

NoSQL data stores, REST service, EIS, file, etc.)

• Durability of application data (user sessions, shopping carts,

master data, configs)

(61)
(62)

HD vs Heap

Heap:              0  MB  Native,  4000  MB  Heap,  9  Major  GC  (4900  ms),  31  Minor  GC  (4217  ms)

HD  Memory  v1:3000  MB  Native,    600  MB  Heap,  3  Major  GC  (2800  ms),  100  Minor  GC  (2018  ms)

(63)

© 2014 Hazelcast Inc.

(64)

NoSQL Landscape

(65)

© 2014 Hazelcast Inc.

(66)

Bonus!

Go to

http://hazelcast.org/t-shirts/

enter

hazelcastic

(67)

References

Related documents

Classic membership provides the comprehensive benefits of America’s best emergency road services organization.* When you make that nationwide toll-free call at any time, AAA

If an SMSF is set up with a corporate trustee structure you can add a member (eg a spouse or child) or remove a member (eg if a member dies or can no longer act as trustee) with

income to the estate since the date of death and all expenses and estate distributions.with the Probate Court and petition to be released as the personal representative of

12) If you have a living trust, be sure your assets are titled in the name of your trust and that the beneficiary on your life insurance policies is your trust. For most of our

In order for your NSB to vote on ‘Vote to all members’ ballots, your member body user administrator (MBUA) should make sure that the relevant staff from your NSB

When you come into the Bank, please bring your driver’s license or other form of photo identification, your opening deposit ($10 minimum), and the enclosed Employer Direct

Before you send the Account Close Request Form, check with your previous bank to make sure no additional forms are necessary. Ask about any penalties before you close any

disappearance or death, and that no partner, associate, executor or other responsible party capable of conducting the lawyer's affairs is known to exist, then, upon such showing,