![Page 1: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/1.jpg)
Development of concurrent services using In-Memory Data Grids
OTN Tour 2014
by Julio Lorenzo
![Page 2: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/2.jpg)
This Presentation
• Covers the basic explanation of a solution of IMDG
• Explains how it works and how it can be used within an architecture
• Shows some use cases
• Si, esta toda en ingles
![Page 3: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/3.jpg)
Agenda
• Why?
• What is?
• Brief History
• How Its Works
• Use cases
![Page 4: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/4.jpg)
Presentate Yourself!!
Hi! I’m Julio
![Page 5: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/5.jpg)
Why IMDG?
To have performance close to big data using legacies
To solve problems using traditional technology are very expensive
![Page 6: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/6.jpg)
Why IMDG?
Today, more than ever, there are many choices when it comes to storing your data
![Page 7: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/7.jpg)
Just a few years ago
• Storing – Oracle – IBM DB2 – IBM Informix – SAP Sybase – MySQL – PosgreSQL – SQL Server – Lotus Notes
• Cache – Memcached – EhCache – New Generation
• GridGain • Tangosol (aka Coherence) • Terracota
![Page 8: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/8.jpg)
![Page 9: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/9.jpg)
So..For What
Really?
The Need for Speed, In Real Time…
![Page 10: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/10.jpg)
Then, What is IMDG?
![Page 11: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/11.jpg)
In-Memory
Data Grid (IMDG)
Is a data management software, its data structure resides entirely in RAM and is distributed among multiple servers
Handle Big Data’s “big-three V’s”: velocity, Variability, Volume
![Page 12: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/12.jpg)
In Memory Data
Management
It is a IT solution to enabled to:
![Page 13: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/13.jpg)
Scale-out Computing
Every node adds their CPU and RAM to the cluster, which can be used by all nodes
![Page 14: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/14.jpg)
Resilience
Nodes can fail randomly without data loss while minimizing performance impact to running applications
(non-disruptive automated detection and recovery )
![Page 15: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/15.jpg)
Programming Model
A way for developers to easily program the cluster of machines as if it were a single machine
![Page 16: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/16.jpg)
Fast, Big Data
It enables very large data sets to be manipulated in main memory
![Page 17: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/17.jpg)
Dynamic Scalability
Nodes (computers) can dynamically join the other computers in a grid (cluster)
![Page 18: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/18.jpg)
Elastic Main
Memory
Every node adds their RAM to the cluster’s memory pool
![Page 19: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/19.jpg)
Computational Grids
Reliable jobs execution, scheduling and load balancing
![Page 20: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/20.jpg)
which products?
• Oracle Coherence
• Hazelcast
• GridGain
• GigaSpaces
• Terracotta
• Red Hat Infinispan
• VMWare Pivotal Gemfire
![Page 21: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/21.jpg)
Brief History
Cache In process caching
of Key->Value data
structure
Distribute
Cache Partitioned cache
nodes
IMDG Partitioned system
of record
IMDG.next()
![Page 22: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/22.jpg)
How It Works
![Page 23: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/23.jpg)
Kernel View
![Page 24: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/24.jpg)
Conceptual View
![Page 25: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/25.jpg)
Detail View
![Page 26: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/26.jpg)
Clustered Caching Explained Partitioned, Fault Tolerant, Self-Healing Cache
• Cluster of nodes holding % of primary data locally
• Back-up of primary data is distributed across all other nodes
• Logical view of all data from any node
• All nodes verify health of each other
• In the event a node is unhealthy, other nodes diagnose state
• Unhealthy node isolated from cluster
• Remaining nodes redistribute primary and back-up responsibilities to healthy nodes
?
![Page 27: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/27.jpg)
Caching Patterns
Cache Aside -
Developer manages cache
• Check the cache before reading from data source
• Put data into cache after reading from data source
• Evict or update cache when updating data source
Cache
DAO
![Page 28: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/28.jpg)
Caching Patterns
Read
Through/Write Through
• All data reads/writes occur through cache
• Cache miss causes load from data source automatically
• Updates to cache written synchronously to the data source
DAO Cache
![Page 29: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/29.jpg)
Caching Patterns
Write Behind
• All data writes occur through cache
• Updates to cache written asynchronously to the data source
DAO Cache
![Page 30: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/30.jpg)
Sharding
Unlimited Data and Processing
Capacity
• Data is load balanced across the data grid. • Data and processing capacity scales
linearly. • Ownership responsibilities also
partitioned. • Access and update latency are constant. • Best for large sets of frequently updated
data.
In-Memory Data Grid
Data
Applications
Process Process Process Process
Virtual Load Balancing
![Page 31: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/31.jpg)
Fault Tolerance
High
Availability
• Automatic fault tolerance management. • Backups stored on separate machine. • Even distribution of backup
responsibilities. • Configurable number of backup copies. • Once-and-only-once processing
guarantees.
In-Memory Data Grid
Data
Applications
Process Process Process Process
Virtual Load Balancing
Fault Tolerance Management
![Page 32: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/32.jpg)
Replicated Caching
Rapid Access to Reference Data
• Entire data set is replicated. • Data is stored in application ready
format. • Data access is immediate. • Updates are replicated across the
data grid. • Best for small sets of static data
In-Memory Data Grid
Process Process Process Process
Replication
Data
Applications
![Page 33: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/33.jpg)
Near Caching
Rapid Data
Access
• Blend of replicated and partitioned topologies.
• Recently used data is stored locally. • Repetitive data access is local and
immediate. • Automatically populated upon data access. • Automatic invalidation of updated data. • Scale tiers independently.
In-Memory Data Grid
Data
Process Process Process Process
Virtual Load Balancing
Application Application Application
![Page 34: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/34.jpg)
Parallel Processing
Querying,
Processing, Aggregating in the Data Grid
• Send the processing to where the data lives.
• Processing performed in parallel across the grid.
– Query the Data Grid
– Continuous Query Cache
– Parallel Processing on the Data Grid
– Map/Reduce Aggregation
• Once-and-only-once guarantees.
• Processing scales with the grid.
In-Memory Data Grid
Process Process Process Process
Application
Processing
Unit
![Page 35: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/35.jpg)
Event Notifications
Event Driven Architectures
• Grid based event notification
– Java Bean Model, key and filter based events
• “Live Objects”
– Objects can respond to own state changes
– State always recoverable
– Build complex Staged Event Driven Architectures
In-Memory Data Grid
Process Process Process Process
Application Application Application
![Page 36: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/36.jpg)
Arq Patterns
![Page 37: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/37.jpg)
Message Broker / Process
Sync
![Page 38: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/38.jpg)
Web Session
Clustering
![Page 39: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/39.jpg)
Service Bus Cache
![Page 40: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/40.jpg)
Service IMDG
![Page 41: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/41.jpg)
Some Real Life
Scenarios
![Page 42: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/42.jpg)
WebLogic and Coherence Integration Built in Out of the Box
• Administration, operations and management built into WebLogic
• Declarative scale out session management
• Cache data access with synch/asynch read /write through
• Analytics, events and compute
Coherence
WebLogic
Coherence
WebLogic
Coherence
Coherence Coherence
Coherence
Coherence
WebLogic
Coherence
WebLogic
Coherence Coherence
Coherence
WebLogic
Coherence
WebLogic
Coherence
Coherence Coherence
Coherence
Data Cache Data Cache Query/Event
Query/Event Query/Event
Query/Event
Declarative Session
Management
Persistence Caching with
Read and Write Through
Query, compute and
event
![Page 43: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/43.jpg)
• Business Experience Software
• Real Time processing • Real time analisys • Input 2000 events/s • Stored 4000
records/s
![Page 44: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/44.jpg)
Arq
![Page 45: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/45.jpg)
Design
![Page 46: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/46.jpg)
Elastic Blend
![Page 47: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/47.jpg)
Some Common Use Cases
![Page 48: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/48.jpg)
Fast, Transactional
Data Access
• Inventory management
• Financial reference data
• Real time transactional data
![Page 49: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/49.jpg)
Real Time Stream
Processing
• Fraud Detection
• Click Stream Analysis
• Real time analytics
• Continuous calculation
![Page 50: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/50.jpg)
Heavyweight Offline
Calculations
• Trade Reconciliation
• Pattern analysis and detection
• Number crunching
![Page 51: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/51.jpg)
Caching
• Database offloading
• Content heavy websites
![Page 52: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/52.jpg)
Wasup?
• IMDG is an IT solution • It can be seen as a elastic
service • Deployed Stand-Alone or
Embed • Provides build in:
– Distributed Data Cache – Process Comunication
(Queue/Topic) – Process Sync (Locks) – Process Executions (Querys,
MPP, Map/Reduce)
• Increase Performance and Scalability , Reduce bottleneks
![Page 53: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/53.jpg)
Q&A
@jlorenzocima
![Page 54: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/54.jpg)
Acknowledgment
• Uri Cohen - In-Memory Data Grids, Demystified
• Oracle Coherence - Coherence-cnt1983393.pdf
• Hazelcast - Home Site
• GridGain - Home Site
![Page 55: Development of concurrent services using In-Memory Data Grids](https://reader034.vdocuments.us/reader034/viewer/2022051311/545828d3b1af9f40378b502a/html5/thumbnails/55.jpg)