Sorry for - DOAG

37

Transcript of Sorry for - DOAG

Page 1: Sorry for - DOAG
Page 2: Sorry for - DOAG

2 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

Sorry for...

● Those of you who expected a talk on “Hairy Security”– François Le Droff could not join

– A shame, it was an excellent talk

● Frenchness– Accent (and general rudeness)

● Jet lagged, tired and over caffeinated– Fly back from the US on Sunday, arrived in Berlin (home) yesterday, train to Köln last

night.

– No idea what time it is right now...

● Way too may things written on the slides– But will allow you to use them as notes later on

Page 3: Sorry for - DOAG

Real life innovative way to use Infinispan within your application

Romain PelisseSoftware [email protected] Mars 2016 – Javaland

With some content borrowed from works of Jeremy Brown and Thomas Qvarnström

Page 4: Sorry for - DOAG

4 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

Naming Madness

● Red Hat Business Model– Why ?

● Clear separation from the community project● Distinguish (and allow)

– “all you can eat buffet” on the community side– from the “what we support” on the product one

● JBoss Data Grid (JDG) / Infinispan (ISPN)– Same stuff !

– JDG generally a (little) behind ISPN

– Not all in ISPN is supported in JDG

– But all you need probably is ;)

Page 5: Sorry for - DOAG

5 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

Agenda

● JBoss Data Grid – a brief overview● Use Cases – not the most common !

– UC 1 : JCache – JEE Way to NoSQL goodness.. – UC 2 : Scalable and Resilient NoSQL Storage– UC 3 : Scalable Cache Infrastructure – UC 4 : Compute Grid – UC 5 : Manageable datastore (with Data Virtualisation)

Page 6: Sorry for - DOAG

What is JBoss Data Grid ?

(in 5 minutes)

Page 7: Sorry for - DOAG

7 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

Introducing JBoss Data Grid

● Open Source based on Infinispan● Based on some ideas from

– JBoss Cache

– and Amazon Dynamo

● Map-like API● Linear scalability● High transactional throughput● Very low latency, fault tolerance

Page 8: Sorry for - DOAG

Features

Page 9: Sorry for - DOAG

9 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

Key Features / Functionality (1/2)

● Schema-less key/value store ● Querying to easily search and find objects

● Security to store and restrict access

● Memory management

● Eviction and expiration

● Warms starts and pre load

● Multiple access protocols with data compatibility

● For applications written in any language

Page 10: Sorry for - DOAG

10 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

Key Features / Functionality (2/2)

● Distributed execution and map/reduce API

– to perform large scale, in-memory computations in parallel across the cluster

● Cross-data center replication (X Site)

– for high availability, load balancing and data partitioning

● Persistent Storage

– for long time storage or to move data off memory

● Events & Notifications

● Transactions (XA & JTA) for data consistency

Page 11: Sorry for - DOAG

11 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

Standards

● JSR-107 (Temporary Caching API)– Part of EE8

● JSR-347 (Data Grids)– Led by Red Hat

● JSR-346 (CDI 1.1)– Programming model for data grids

● JSR-317 (JPA2)– Data grids form caching API for database via

JPA2

Page 12: Sorry for - DOAG

Deployment modes

Page 13: Sorry for - DOAG

13 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

Deployment Library mode

Page 14: Sorry for - DOAG

14 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

Deployment Client / server stand-alone mode

Page 15: Sorry for - DOAG

15 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

Unlock the power of JGroups

● What is JGroups ?– toolkit for reliable group communication

– low-level API● allow many tweaks on network layer

● along with inner mechanism

– Group Membership (GMS), Failure Detection (FD), ...

● JDG allows access to all of that, while providing a more higher (arguably easier) high level API

Page 16: Sorry for - DOAG

Use Case 1 – JCache

JEE Way to NoSQL !

Page 17: Sorry for - DOAG

17 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

JCache – Old standard paving the way to innovation

● What is JCache ? (JSR-107)

– An old (ancient even) JEE related specs● resurrected (and now led) by the

Infinispan community

– API close to Map

– Allow to introduce Infinispan (with all its features set) into a fully JEE compliant app !

Page 18: Sorry for - DOAG

Use Case 2 – Scalable and Resilient NoSQL Storage

Page 19: Sorry for - DOAG

19 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

● Storage for authentication information– Fast, all in memory

– Easy lookup (by key)

– Scale up (if needed), no downtime

– Resilient with async repl, or even fault tolerant with sync repl● Even more with X Site replication

Scalable and Resilient NoSQL Storage

Photo Credits: Rob Pongsajapan

Page 20: Sorry for - DOAG

20 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

Page 21: Sorry for - DOAG

21 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

Leading online newspapers company

● Over one million of concurrent users– Only with one node !

● Handles authentication across several websites– Users navigates from one newspaper to an other transparently

● High response time required● Replicates synchronously to ensure resilience● Side note :

– Got even better performance when moved to JDG ;) !

Page 22: Sorry for - DOAG

Use Case 3 – Scalable Cache Infrastructure

Page 23: Sorry for - DOAG

23 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

Scalable Cache Infrastructure

● Provide a centralized, shared cache infrastructure– All apps (web, mobile) using the same (fast) data source

– Persist on file or SGDB● Or even use as a “source of truth”

– (see use case 5)

– Scale up provided by infrastructure● Add or removes nodes as needed● Transparent for app

– X Site replication ● provides fault tolerance

Page 24: Sorry for - DOAG

24 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

Leading Japanese telecommunications conglomerate

• Business challenges and needs:– System for processing billing information couldn’t scale as their

subscriber base increased

• JDG Use-case– Use JBoss Data Grid as a primary data store (inline cache) to store

latest mobile usage information. – JDG provided superior throughput (20,000 TPS) using cost-effective

hardware.

Page 25: Sorry for - DOAG

Use Case 4 – Compute Grid

Page 26: Sorry for - DOAG

26 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

In-memory compute grid

• Process TBs of data and result fast – via in-memory distributed computing

• Compute at each node on which data resides– Distributed execution– Map/Reduce framework

• Leverage parallel computing power:– Multiple nodes of the cluster + Multiple

cores on a machine

• Automated – no control on the workload

Page 27: Sorry for - DOAG

27 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

A Large American multinational banking and financial services holding company]

• Business challenges and needs:– Liquidity Risk Management

• Use JBoss Data Grid as a a compute grid to run simulation– Data stored in heap (1TB)

– A simulation take about 10 sec

Page 28: Sorry for - DOAG

Use Case 5 – Manageable data store with JDV

Page 29: Sorry for - DOAG

29 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

Managing NoSQL data

• Limitations with NoSQL – Few (if any) management tools

● Can't edit, update, remove content

– Use with other data source information is difficult● No SQL to bind all the date

• Solution ?

– Data Virtualization !

Page 30: Sorry for - DOAG

30 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

What is JBoss Data Virt (Teiid) ?

• Data virtualization technologies– Does the same for data that virtualization is doing for hardware

● Allow to query data across data source– abstracting types and so on...

● Allow to execute a join operation on several data source !

• Works (and supported) with JDG !– Give a (sort of) SQL access to the data stored in the grid !

– Reporting ● Compute on a grid ;) !

Page 31: Sorry for - DOAG

31 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

A Word of Warning

• SGDBs does a lot for you !– Transactions

– Management

– Indexing and join

• Thus, be careful with your– Data schema

– Transactions needs (or not)

– And your (lack of) relationships

Page 32: Sorry for - DOAG

32 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

What is JBoss Data Virt (Teiid) ?

• Data virtualization technologies– Does the same for data that virtualization is doing for hardware

● Allow to query data across data source– abstracting types and so on...

● Allow to execute a join operation on several data source !

• Works (and supported) with JDG !– Give a (sort of) SQL access to the data stored in the grid !

– Reporting ● Compute on a grid ;) !

Page 33: Sorry for - DOAG

33 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

Conclusion

• JDG is a very flexible NoSQL storage, offering many use case, above the simple cache scenario– But still rocks at being a cache ;)

Page 34: Sorry for - DOAG

THANK YOU

Page 35: Sorry for - DOAG

35 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

References (1/3)

• Websites: – JBoss Data Grid product page:

http://www.redhat.com/en/technologies/jboss-middleware/data-grid

– Download at JBoss.org's : https://www.jboss.org/products/datagrid/overview/

• Red Hat JBoss Data Grid documentation & Datasheets : – Red Hat JBoss Data Grid datasheet:

http://www.redhat.com/en/resources/red-hat-jboss-data-grid-datasheet

– Documentation: https://access.redhat.com/knowledge/docs/JBoss_Data_Grid

Page 36: Sorry for - DOAG

36 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

References (2/3)

• Customer case studies: – True Breaks from Vendor Lock-In without Compromising on

Performance with Red Hat : http://www.redhat.com/en/resources/true-breaks-vendor-lock-without-compromising-performance-red-hat

Page 37: Sorry for - DOAG

37 / 37 Real life innovative way to use Infinispan within your application Javaland 2016

References (3/3)

• Whitepapers:

– Supercharge applications and achieve business agility with in-memory data grids: http://www.redhat.com/en/resources/supercharge-applications-and-achieve-business-agility-memory-data-grids

– Red Hat JBoss Data Grid, The perfect solution for big data and application performance : http://www.redhat.com/en/resources/red-hat-jboss-data-grid-perfect-solution-big-data-and-application-performance