soft-shake.ch - Data grids and Data Grids

Preview:

DESCRIPTION

Galder ZAMARREÑO

Citation preview

cocktail d’expérience informatiquesGenève 3 & 4 octobre 2011

Seconde édition

Track

Auteur

Session

Java

Galder ZAMARREÑO

Data Grids vsDatabases

soft-shake.ch

Tuesday, October 11, 11

Tuesday, October 11, 11

Data Grids vs Databases

Galder ZamarreñoSenior Software Engineer

Red Hat, Inc

3rd October 2011, Soft Shake

Tuesday, October 11, 11

Galder Zamarreño

• R&D Engineer, Red Hat Inc.• Infinispan developer• 5+ years exp. with distributed data systems• Twitter: @galderz• Blog: zamarreno.com

Tuesday, October 11, 11

Agenda

• Why do we need Data Grids?• What are exactly In-memory Data Grids?• Data Grids + Databases• Data Grids without a Database• Can Data Grids replace Databases?

Tuesday, October 11, 11

Traditionally...

Store everything in a DB!

Tuesday, October 11, 11

Modern requirements

DBs not particularly good at horizontal scaling...

Tuesday, October 11, 11

One size doesn’t fill all!

DBs are not bad, but they’re not the solution to every problem either

Tuesday, October 11, 11

Data Grids

Tuesday, October 11, 11

Data Grids are not new

Mainstream traction only recent: vertical scaling needs, cheaper memory... and cloud!

Tuesday, October 11, 11

Who’s offering Data Grids?

Tuesday, October 11, 11

The Players

• Open Source: • Infinispan, EhCache, Hazelcast...

• Commercial: • Oracle Coherence, Gigaspaces, Gemfire,

IBM eXtreme Scale

Tuesday, October 11, 11

But, what are In-memory DGs?

Tuesday, October 11, 11

Definition

In-memory data structures that offer extremely fast access to data

Tuesday, October 11, 11

Maps are popular!

Normally come with a Map-like API, but often come with alternatives

Tuesday, October 11, 11

Data distribution

Store data in a subset of the grid to provide failover while being able to scale up!

Tuesday, October 11, 11

With failure in mind

Suitable for commodity hardware because they can handle failure

Tuesday, October 11, 11

Elastic

Remain available during topology changes

Tuesday, October 11, 11

Durability

More durability achieved flushing to a persistent store

Tuesday, October 11, 11

Access patterns

Embedded (client and DG in same VM) or Remote (just like DBs)

Tuesday, October 11, 11

ACID or BASE

Transactions or Eventual Consistency?

Tuesday, October 11, 11

DGs + DBs?

Tuesday, October 11, 11

Caching!

Use Data Grids as caches to enhance Database access performance!

Tuesday, October 11, 11

Can a Data Grid replace a DB?

Tuesday, October 11, 11

Reiterating benefits

Speed, scalability, cloud-friendliness...etc

Tuesday, October 11, 11

What are the Data Grid challenges?

Tuesday, October 11, 11

Access patterns

Migrating from SQL to Map or alternative APIs not easy

Tuesday, October 11, 11

Skill set

Different skill set: OO programmer vs SQL

Tuesday, October 11, 11

Application data layer

Data layer to take data collocation into account and do more validation (less strict schema)

Tuesday, October 11, 11

E.g. with a DB...

Tuesday, October 11, 11

Same with Infinispan

Tuesday, October 11, 11

Map/Reduce in detail

Tuesday, October 11, 11

Technology to bridge gap?

Tuesday, October 11, 11

What about JPA?

Hibernate OGM (Object/Grid Mapper) uses JPA to store in DGs as opposed to DBs

Tuesday, October 11, 11

Most frequent use cases for DGs?

Tuesday, October 11, 11

Use cases

• Analytic systems, i.e. financial/trading apps• XTP• Event driven apps, i.e. CEP• Clustering toolkit

Tuesday, October 11, 11

Do I see DGs as DB replacements?

Tuesday, October 11, 11

DBs are here to stay!

No. DBs are proven, mature, well understood plus, there are millions of systems out there!

Tuesday, October 11, 11

One size doesn’t fill all!

DBs are not a universal data storage system any more

Tuesday, October 11, 11

Consider Data Grids

For their speed, capabilities as data store, and cloud friendliness

Tuesday, October 11, 11

Still some way to go

More deployments and standardization (JSR-107, JSR-347)

Tuesday, October 11, 11

Questions

infinispan.org - @infinispan

speakerrate.com/galder

Tuesday, October 11, 11