SlideShare a Scribd company logo


Data Locality, Latency and Caching: JSR-107 and the new Java Standard
 Early (Major) Problems:
 Winter 1997, high stakes problems encountered by those
Enterprises that trusted the “Web Applications are ready!”
promise.

 CASE: The week before Christmas 1997 the web-facing
OMS at www.amazon.com repeatedly crashed. Availability
was severely impacted. Millions of dollars in potential
revenue were lost. Credibility with customers damaged. Put
simply, AMAZON.com cannot go down the week before
Christmas!
 An urgent, immediate solution was required to correct legacy
application architectures so that they could reliably and
performantly operate at “Internet scale”.
Enter Caching

Technology!

Data Locality, Latency and Caching: JSR-107 and the new Java Standard
 What is at stake for Caching Solution Providers and
their Customers?
Caching technology providers had a huge incentive to deliver
a 100% sound and100% complete solution …. At Stake?
The World Wide Web as a reliable and performant
application platform.
NEEDED:
1. Accommodate application architects & developers with the capability to
rapidly implement Caching technology.
2. Offload the database (ULTRA URGENT!)
3. Scale UP (How do I make the cache‟s in-process heap scale?)
4. Scale OUT (How do I distribute my cache to multiple processes?)
5. Buffer against load variability
Data Locality, Latency and Caching: JSR-107 and the new Java Standard
A Brief History of the Data Locality &
Latency Problem

Data Locality, Latency and Caching: JSR-107 and the new Java Standard

4
 The very first data locality problem – Ma Bell
and the FCC assignment of Area Codes. 1947.
 NYC
 LA
 CHIC

212
213
312

…
 MEMPHIS 901
 RALEIGH 919

Data Locality, Latency and Caching: JSR-107 and the new Java Standard
 The Data Locality Problem
 Big Decision: How much am I willing to “pay” to have
my data as close as possible to processing resources?

Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

6
 Moving the data further away from the processing
…

P1

P2

Local Unix Kernel (IPC
Messages, Semaphores, Shared Memory)

Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

7
 A little further …

P1

P2

RDBMS

Local Client-Server

Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

8
 A little further … LAN Client Server
P1

P2

Client Host 1

Client Host 2

RDBMS

Data Server

Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

9
 And further still … WAN Client Server
P1

P2

Internet

RDBMS

Public Data Source

Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

10
 Latency Problem = Given that data is available, how fast
can I access it for processing?

Forget networked client server!! All Low-Latency apps use highly
optimized data feeds to bring the data “local”.
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

11

Latency Math ….

Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

12

Latency Physics ….
 2,000 PhD Physicists now working on Wall St.
 U.S. Colleges and Universities cannot produce nearly
enough Physics PhDs to meet Wall St. demand
 Many of these PhD Physicists are from former Soviet-Bloc
countries
 COLD-WAR priority work = building defenses that could
stop Western advances in Stealth technology (largely unsuccessful)

 POST COLD-WAR priority work = designing lowlatency, high-frequency Capital Markets trading algorithms
(very successful!)
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

13

Latency Physics ….
 Famous LL/HF Capital Markets Trading Algorithms =
 “Cherokee Nation”
 “Marco Polo”

 “Boston Shuffler”
 “Frog Pond”
 “Carnival”
 “Twilight”
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

14
 Why these names, e.g. Why “Cherokee Nation”?

Data Locality, Latency and Caching: JSR-107 and the new Java Standard

Latency Physics ….
 Bottom Line :


Great Latency iff Great
Location
 FAMOUS CASE STUDY = NYC

Carrier

Hotel
 Algorithms “check in” but … They don’t “check
out” !
(details to follow)

 http://www.carrierhotels.com/news/September200
1/60hudson.shtml
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

16
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

17
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

18
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

19
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

20
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

21
 Full story of the legend of the NYC Carrier Hotel … and
how it became the place where
 “wall street trading algorithms check in … but they don’t
check out”
 is very compellingly told here:
 http://www.ted.com/talks/kevin_slavin_how_algorithms_sh
ape_our_world.html

Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

22
 Beyond LL/HF Caching‟s Mathematics, Physics and
(dramatic) case studies we can sum up the general
definition of Caching performance in one simple
expression ratio:

 How can we best make this happen w/ Java
Caching technology?
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

23
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

24
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

25
 CAP: The simplest view of simultaneous service
guarantee capabilities and tradeoffs.
Abstract Communication Partition

DataNode
1

DataNode
2

 1. Allowing 1 or both available nodes to be UPDATED
means you lose simultaneous Consistency
 2. To guarantee simultaneous Consistency you must
make 1 node unAvailable

 3. If you want both C & A then all nodes must
communicate and synchronize, but then you gain
Partition risk (Communication could break).
Data Locality, Latency and Caching: JSR-107 and the new Java Standard
 Ben starts a “Birthday Reminder” service
 @t=1 Call Ben … put(“name”,”DOB”);
 @t=2 Call Ben … get(„name”,”DOB”);
 //lacks availability … what if 2 calls arrive at same time?
 Ben adds ex-wife to answer phones
 Call svc … put(“name”,”DOB”);
 Call svc … get(“name”,”DOB”);
 //lacks consistency … what if call
 @t=1 Ben answers = put(“name”,”DOB”)
 @t=2 call back … but ..ex-Wife answers … get(“name”,”DOB”)
fails?
 Ben & ex-Wife add coherency and synchronization protocol
 Call svc … put(“name”,”DOB”);
 Ben & ex-Wife get in fight …stop talking. //coherency sol‟n
useless!
 Call svc … get(“name”,”DOB”);
 //lacks partition tolerance

Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

27
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

28
 Protocols for Cache Replacement/Consistency
•
•
•
•
•
•
•

Belady‟s Algorithm (aka Clairvoyant)
LRU
MRU
Random
LFU
LIRRS
CLOCK – FIFO/LIFO/FILO/LILO

 Protocols for Cache Partition(Node) Health/Healing
•
•

Cardiology Protocol
Nodes obliged to produce “Heart Beat”

•

-

•

Gossip Protocol

•
•

Nodes obliged to produce “rumors” about neighboring nodes
Central “Gossip columnist” collect rumors, treats ‟illness‟ based on
Gossip credibility policy.

Central „Cardiologist‟ consumes HB pulses, treats „illness‟

Data Locality, Latency and Caching: JSR-107 and the new Java Standard

Java Caching API “Join Points” =

Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

30
Enough of the theory of Caching… on to the
standard Java Caching API …

On to JSR-107!
Before JSR-107 all Java Caching vendors provided
proprietary APIs
Caching code suffered from vendor lock-in

Just like JDBC solved this problem for the RDBMS
community, JSR-107 solves this problem for the
JCACHE community
JSR-107 completely open … not hosted on private
jcp.org EG forum. Hosted on
http://groups.google.com/group/jsr107 public EG
forum.
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

31
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

32
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

33
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

34
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

35
 (blank)

Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

36
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

37
 A JSR-107 compliant Caching implementation is
“Transactional” in 2 important (different) senses:
 1.
Compound access/mutate operations against a
Cache Entry are guaranteed to be EXCLUSIVE and
ATOMIC.
 (see javax.cache.Cache.EntryProcessor interface)
 2. Compound operations against a Cache are
guaranteed to preserve Transactional ACID properties.

 (see JTA and javax.transaction.UserTransaction
interface)

Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

38
 Important to note re: JSR-107 specification of
“Transactional” Java Caching …
 If a Java Caching provider claims to be “JSR-107
Transactions compliant”, then all of the following transactional
isolation levels are guaranteed to be available in the provider‟s
JSR-107 implementation:
 TX_READ_UNCOMMITTED
 TX_READ_COMMITTED
 TX_REPEATABLE_READ

no „Dirty Read‟ guaranteed

„Repeatable Read‟ assurance

guaranteed

 TX_SERIALIZABLE

no „Phantom Read‟ guaranteed

In other words, a 100% sound and 100% complete API
capability for managing transaction isolation is guaranteed.
CRUCIAL for Capital Markets Java Caching uses cases!!
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

39
 JSR-107 => all Java Caches now guarantee TX capabilities:

 @t=0

 @t=1

 TX_THR_1
utx.begin();

JCACHE_ENTRY
$5

mutate(credit $1)

 @t=2

 @t=3

 @t=4

 @t=5

TX_THR_2
utx.begin();

$6
$6

//more processing
utx.rollback()

val = access() //$6

$6

//more processing

$5
$5

utx.commit() //$6 ??

 // NOTE: @t=4 DIRTY_READ realized by TX_THR_2 access()
@t=2

Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

40
Can we use JSR-107 API to prevent Dirty Reads?
Of course!!
Just code TX_THR_2 like this
javax.cache.CacheManager cm = javax.cache.Caching.getCacheManager(id);
javax.cache.Cache c = cm.createCacheBuilder(“bank_cache”)
.setTransactionEnabled(
javax.cache.transaction.IsolationLevel.READ_COMMITTED,
javax.cache.transaction.Mode.LOCAL
).build();

javax.transaction.UserTransaction jsr107_utx = new JSR107ProviderJTAUserTransactionImpl(c);
jsr107_utx.begin();
try {
//process
BigDecimal cash = c.get(ACCOUNT_ID);
// @t=2 … guaranteed to BLOCK until TX_THR_1 commits/RB
//process more
jsr107_utx.commit();
} catch (Exception e) {
jsr107_utx.rollback();

}

// STILL NEEDED => OPTIMISITIC and PESSIMISTIC block policy (via API) for @t=2 DIRTY_READ

Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

41
 JSR-107 => DIRTY READ prevention

 @t=0
 @t=1

 TX_THR_1
utx.begin();

JCACHE_ENTRY
$5

mutate(credit $1)

 @t=2
 @t=3
 @t=4

 @t=5

$6
$6

//more processing
utx.rollback()

TX_THR_2
utx.begin();

val = access() //BLOCK

$6
$5

$5

val = access() //$5

 // DIRTY READ guaranteed to be PREVENTED
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

42
Can we use JSR-107 API to accommodate all TX_ISOLATION tolerances (and
intolerances) ?
 What about rare transactional use cases that have extreme TX_ISOLATION demands? E.g.
Intolerance to PHANTOM_READS? Can JSR-107 accommodate these rare (but important ) uses
cases?
 Answer = YES!!
 What about multiple, dynamic views of the same Cache with different (possibly extreme)
TX_ISOLATION demands?
 Answer = YES
 EG

common Bond Portfolio CACHE shared by both RETAIL and INSTITUTIONAL Trading desks

…





trade

trade

HY Credit
Portfolio
(3,000 bonds)







RETAIL desk
1000s of trades daily
Each trade = few millis to transact
Avg Trade = $5,000 USD
Use JSR-107
TX_READ_COMMITTED








INSTITUTIONAL desk
dozen or so trades daily
Each trade = 4-6 secs to transact
Avg Trade = $10,000,000 USD
PHANTOM_READ intolerant
Use JSR-107
TX_SERIALIZABLE

Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

43
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

44
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

45
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

46
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

47
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

48
 Fluent Builder Pattern

Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

49
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

50
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

51
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

52
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

53
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

54
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

55

Questions (?)

 Acknowledgment: Much of this PPT was taken
from Greg Luck and Cameron Purdy‟s JavaOne
2012 presentation on JSR-107 see=
 http://www.parleys.com/#st=5&id=3046
Data Locality, Latency and Caching: JSR-107 and the new Java Standard

2/15/2014

56

More Related Content

What's hot

Siebel Enterprise Data Quality for Siebel
Siebel Enterprise Data Quality for SiebelSiebel Enterprise Data Quality for Siebel
Siebel Enterprise Data Quality for Siebel
Jeroen Burgers
 
Deduplication without performance hits: Intel Xeon processor E5-2697v2-powere...
Deduplication without performance hits: Intel Xeon processor E5-2697v2-powere...Deduplication without performance hits: Intel Xeon processor E5-2697v2-powere...
Deduplication without performance hits: Intel Xeon processor E5-2697v2-powere...
Principled Technologies
 
4 supporting h base jeff, jon, kathleen - cloudera - final 2
4 supporting h base   jeff, jon, kathleen - cloudera - final 24 supporting h base   jeff, jon, kathleen - cloudera - final 2
4 supporting h base jeff, jon, kathleen - cloudera - final 2
Cloudera, Inc.
 
State of The Dolphin - May 2021
State of The Dolphin - May 2021State of The Dolphin - May 2021
State of The Dolphin - May 2021
Frederic Descamps
 
Java GC - Pause tuning
Java GC - Pause tuningJava GC - Pause tuning
Java GC - Pause tuning
ekino
 
NYC* Tech Day - New Cassandra Drivers in Depth
NYC* Tech Day - New Cassandra Drivers in DepthNYC* Tech Day - New Cassandra Drivers in Depth
NYC* Tech Day - New Cassandra Drivers in Depth
Michaël Figuière
 

What's hot (6)

Siebel Enterprise Data Quality for Siebel
Siebel Enterprise Data Quality for SiebelSiebel Enterprise Data Quality for Siebel
Siebel Enterprise Data Quality for Siebel
 
Deduplication without performance hits: Intel Xeon processor E5-2697v2-powere...
Deduplication without performance hits: Intel Xeon processor E5-2697v2-powere...Deduplication without performance hits: Intel Xeon processor E5-2697v2-powere...
Deduplication without performance hits: Intel Xeon processor E5-2697v2-powere...
 
4 supporting h base jeff, jon, kathleen - cloudera - final 2
4 supporting h base   jeff, jon, kathleen - cloudera - final 24 supporting h base   jeff, jon, kathleen - cloudera - final 2
4 supporting h base jeff, jon, kathleen - cloudera - final 2
 
State of The Dolphin - May 2021
State of The Dolphin - May 2021State of The Dolphin - May 2021
State of The Dolphin - May 2021
 
Java GC - Pause tuning
Java GC - Pause tuningJava GC - Pause tuning
Java GC - Pause tuning
 
NYC* Tech Day - New Cassandra Drivers in Depth
NYC* Tech Day - New Cassandra Drivers in DepthNYC* Tech Day - New Cassandra Drivers in Depth
NYC* Tech Day - New Cassandra Drivers in Depth
 

Similar to Data Locality, Latency and Caching: JSR-107 and the new Java JCACHE Standard

Application Delivery Networking
Application Delivery NetworkingApplication Delivery Networking
Application Delivery Networking
rjain51
 
Improving Operational Space Responsiveness
Improving Operational Space ResponsivenessImproving Operational Space Responsiveness
Improving Operational Space Responsiveness
Pat Cappelaere
 
The Very Very Latest in Database Development - Oracle Open World 2012
The Very Very Latest in Database Development - Oracle Open World 2012The Very Very Latest in Database Development - Oracle Open World 2012
The Very Very Latest in Database Development - Oracle Open World 2012
Lucas Jellema
 
The Very Very Latest In Database Development - Lucas Jellema - Oracle OpenWor...
The Very Very Latest In Database Development - Lucas Jellema - Oracle OpenWor...The Very Very Latest In Database Development - Lucas Jellema - Oracle OpenWor...
The Very Very Latest In Database Development - Lucas Jellema - Oracle OpenWor...
Getting value from IoT, Integration and Data Analytics
 
20150704 benchmark and user experience in sahara weiting
20150704 benchmark and user experience in sahara weiting20150704 benchmark and user experience in sahara weiting
20150704 benchmark and user experience in sahara weiting
Wei Ting Chen
 
DNS_Tutorial 2.pptx
DNS_Tutorial 2.pptxDNS_Tutorial 2.pptx
DNS_Tutorial 2.pptx
viditsir
 
MySQL Cluster Scaling to a Billion Queries
MySQL Cluster Scaling to a Billion QueriesMySQL Cluster Scaling to a Billion Queries
MySQL Cluster Scaling to a Billion Queries
Bernd Ocklin
 
Data Grids with Oracle Coherence
Data Grids with Oracle CoherenceData Grids with Oracle Coherence
Data Grids with Oracle Coherence
Ben Stopford
 
IT Infrastructure Through The Public Network Challenges And Solutions
IT Infrastructure Through The Public Network   Challenges And SolutionsIT Infrastructure Through The Public Network   Challenges And Solutions
IT Infrastructure Through The Public Network Challenges And Solutions
Martin Jackson
 
Deliver Big Data, Database and AI/ML as-a-Service anywhere
Deliver Big Data, Database and AI/ML as-a-Service anywhereDeliver Big Data, Database and AI/ML as-a-Service anywhere
Deliver Big Data, Database and AI/ML as-a-Service anywhere
Ravikumar Alluboyina
 
Dataservices: Processing Big Data the Microservice Way
Dataservices: Processing Big Data the Microservice WayDataservices: Processing Big Data the Microservice Way
Dataservices: Processing Big Data the Microservice Way
QAware GmbH
 
It's a Dangerous World
It's a Dangerous World It's a Dangerous World
It's a Dangerous World
MongoDB
 
Actionable Metrics at Production Scale - LSPE Meetup June 27, 2012
Actionable Metrics at Production Scale - LSPE Meetup June 27, 2012Actionable Metrics at Production Scale - LSPE Meetup June 27, 2012
Actionable Metrics at Production Scale - LSPE Meetup June 27, 2012
SOASTA
 
Apache hadoop 3.x state of the union and upgrade guidance - Strata 2019 NY
Apache hadoop 3.x state of the union and upgrade guidance - Strata 2019 NYApache hadoop 3.x state of the union and upgrade guidance - Strata 2019 NY
Apache hadoop 3.x state of the union and upgrade guidance - Strata 2019 NY
Wangda Tan
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
Josef Adersberger
 
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
QAware GmbH
 
Sanjay resume 2019_post
Sanjay resume 2019_postSanjay resume 2019_post
Sanjay resume 2019_post
Sanjay Arya
 
Containerized Hadoop beyond Kubernetes
Containerized Hadoop beyond KubernetesContainerized Hadoop beyond Kubernetes
Containerized Hadoop beyond Kubernetes
DataWorks Summit
 
The Future of Hadoop: A deeper look at Apache Spark
The Future of Hadoop: A deeper look at Apache SparkThe Future of Hadoop: A deeper look at Apache Spark
The Future of Hadoop: A deeper look at Apache Spark
Cloudera, Inc.
 
Hadoop
HadoopHadoop

Similar to Data Locality, Latency and Caching: JSR-107 and the new Java JCACHE Standard (20)

Application Delivery Networking
Application Delivery NetworkingApplication Delivery Networking
Application Delivery Networking
 
Improving Operational Space Responsiveness
Improving Operational Space ResponsivenessImproving Operational Space Responsiveness
Improving Operational Space Responsiveness
 
The Very Very Latest in Database Development - Oracle Open World 2012
The Very Very Latest in Database Development - Oracle Open World 2012The Very Very Latest in Database Development - Oracle Open World 2012
The Very Very Latest in Database Development - Oracle Open World 2012
 
The Very Very Latest In Database Development - Lucas Jellema - Oracle OpenWor...
The Very Very Latest In Database Development - Lucas Jellema - Oracle OpenWor...The Very Very Latest In Database Development - Lucas Jellema - Oracle OpenWor...
The Very Very Latest In Database Development - Lucas Jellema - Oracle OpenWor...
 
20150704 benchmark and user experience in sahara weiting
20150704 benchmark and user experience in sahara weiting20150704 benchmark and user experience in sahara weiting
20150704 benchmark and user experience in sahara weiting
 
DNS_Tutorial 2.pptx
DNS_Tutorial 2.pptxDNS_Tutorial 2.pptx
DNS_Tutorial 2.pptx
 
MySQL Cluster Scaling to a Billion Queries
MySQL Cluster Scaling to a Billion QueriesMySQL Cluster Scaling to a Billion Queries
MySQL Cluster Scaling to a Billion Queries
 
Data Grids with Oracle Coherence
Data Grids with Oracle CoherenceData Grids with Oracle Coherence
Data Grids with Oracle Coherence
 
IT Infrastructure Through The Public Network Challenges And Solutions
IT Infrastructure Through The Public Network   Challenges And SolutionsIT Infrastructure Through The Public Network   Challenges And Solutions
IT Infrastructure Through The Public Network Challenges And Solutions
 
Deliver Big Data, Database and AI/ML as-a-Service anywhere
Deliver Big Data, Database and AI/ML as-a-Service anywhereDeliver Big Data, Database and AI/ML as-a-Service anywhere
Deliver Big Data, Database and AI/ML as-a-Service anywhere
 
Dataservices: Processing Big Data the Microservice Way
Dataservices: Processing Big Data the Microservice WayDataservices: Processing Big Data the Microservice Way
Dataservices: Processing Big Data the Microservice Way
 
It's a Dangerous World
It's a Dangerous World It's a Dangerous World
It's a Dangerous World
 
Actionable Metrics at Production Scale - LSPE Meetup June 27, 2012
Actionable Metrics at Production Scale - LSPE Meetup June 27, 2012Actionable Metrics at Production Scale - LSPE Meetup June 27, 2012
Actionable Metrics at Production Scale - LSPE Meetup June 27, 2012
 
Apache hadoop 3.x state of the union and upgrade guidance - Strata 2019 NY
Apache hadoop 3.x state of the union and upgrade guidance - Strata 2019 NYApache hadoop 3.x state of the union and upgrade guidance - Strata 2019 NY
Apache hadoop 3.x state of the union and upgrade guidance - Strata 2019 NY
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
 
Sanjay resume 2019_post
Sanjay resume 2019_postSanjay resume 2019_post
Sanjay resume 2019_post
 
Containerized Hadoop beyond Kubernetes
Containerized Hadoop beyond KubernetesContainerized Hadoop beyond Kubernetes
Containerized Hadoop beyond Kubernetes
 
The Future of Hadoop: A deeper look at Apache Spark
The Future of Hadoop: A deeper look at Apache SparkThe Future of Hadoop: A deeper look at Apache Spark
The Future of Hadoop: A deeper look at Apache Spark
 
Hadoop
HadoopHadoop
Hadoop
 

Recently uploaded

Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 

Recently uploaded (20)

Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 

Data Locality, Latency and Caching: JSR-107 and the new Java JCACHE Standard

  • 1.  Data Locality, Latency and Caching: JSR-107 and the new Java Standard
  • 2.  Early (Major) Problems:  Winter 1997, high stakes problems encountered by those Enterprises that trusted the “Web Applications are ready!” promise.  CASE: The week before Christmas 1997 the web-facing OMS at www.amazon.com repeatedly crashed. Availability was severely impacted. Millions of dollars in potential revenue were lost. Credibility with customers damaged. Put simply, AMAZON.com cannot go down the week before Christmas!  An urgent, immediate solution was required to correct legacy application architectures so that they could reliably and performantly operate at “Internet scale”. Enter Caching Technology! Data Locality, Latency and Caching: JSR-107 and the new Java Standard
  • 3.  What is at stake for Caching Solution Providers and their Customers? Caching technology providers had a huge incentive to deliver a 100% sound and100% complete solution …. At Stake? The World Wide Web as a reliable and performant application platform. NEEDED: 1. Accommodate application architects & developers with the capability to rapidly implement Caching technology. 2. Offload the database (ULTRA URGENT!) 3. Scale UP (How do I make the cache‟s in-process heap scale?) 4. Scale OUT (How do I distribute my cache to multiple processes?) 5. Buffer against load variability Data Locality, Latency and Caching: JSR-107 and the new Java Standard
  • 4. A Brief History of the Data Locality & Latency Problem Data Locality, Latency and Caching: JSR-107 and the new Java Standard 4
  • 5.  The very first data locality problem – Ma Bell and the FCC assignment of Area Codes. 1947.  NYC  LA  CHIC 212 213 312 …  MEMPHIS 901  RALEIGH 919 Data Locality, Latency and Caching: JSR-107 and the new Java Standard
  • 6.  The Data Locality Problem  Big Decision: How much am I willing to “pay” to have my data as close as possible to processing resources? Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 6
  • 7.  Moving the data further away from the processing … P1 P2 Local Unix Kernel (IPC Messages, Semaphores, Shared Memory) Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 7
  • 8.  A little further … P1 P2 RDBMS Local Client-Server Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 8
  • 9.  A little further … LAN Client Server P1 P2 Client Host 1 Client Host 2 RDBMS Data Server Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 9
  • 10.  And further still … WAN Client Server P1 P2 Internet RDBMS Public Data Source Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 10
  • 11.  Latency Problem = Given that data is available, how fast can I access it for processing? Forget networked client server!! All Low-Latency apps use highly optimized data feeds to bring the data “local”. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 11
  • 12.  Latency Math …. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 12
  • 13.  Latency Physics ….  2,000 PhD Physicists now working on Wall St.  U.S. Colleges and Universities cannot produce nearly enough Physics PhDs to meet Wall St. demand  Many of these PhD Physicists are from former Soviet-Bloc countries  COLD-WAR priority work = building defenses that could stop Western advances in Stealth technology (largely unsuccessful)  POST COLD-WAR priority work = designing lowlatency, high-frequency Capital Markets trading algorithms (very successful!) Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 13
  • 14.  Latency Physics ….  Famous LL/HF Capital Markets Trading Algorithms =  “Cherokee Nation”  “Marco Polo”  “Boston Shuffler”  “Frog Pond”  “Carnival”  “Twilight” Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 14
  • 15.  Why these names, e.g. Why “Cherokee Nation”? Data Locality, Latency and Caching: JSR-107 and the new Java Standard
  • 16.  Latency Physics ….  Bottom Line :  Great Latency iff Great Location  FAMOUS CASE STUDY = NYC Carrier Hotel  Algorithms “check in” but … They don’t “check out” ! (details to follow)  http://www.carrierhotels.com/news/September200 1/60hudson.shtml Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 16
  • 17. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 17
  • 18. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 18
  • 19. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 19
  • 20. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 20
  • 21. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 21
  • 22.  Full story of the legend of the NYC Carrier Hotel … and how it became the place where  “wall street trading algorithms check in … but they don’t check out”  is very compellingly told here:  http://www.ted.com/talks/kevin_slavin_how_algorithms_sh ape_our_world.html Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 22
  • 23.  Beyond LL/HF Caching‟s Mathematics, Physics and (dramatic) case studies we can sum up the general definition of Caching performance in one simple expression ratio:  How can we best make this happen w/ Java Caching technology? Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 23
  • 24. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 24
  • 25. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 25
  • 26.  CAP: The simplest view of simultaneous service guarantee capabilities and tradeoffs. Abstract Communication Partition DataNode 1 DataNode 2  1. Allowing 1 or both available nodes to be UPDATED means you lose simultaneous Consistency  2. To guarantee simultaneous Consistency you must make 1 node unAvailable  3. If you want both C & A then all nodes must communicate and synchronize, but then you gain Partition risk (Communication could break). Data Locality, Latency and Caching: JSR-107 and the new Java Standard
  • 27.  Ben starts a “Birthday Reminder” service  @t=1 Call Ben … put(“name”,”DOB”);  @t=2 Call Ben … get(„name”,”DOB”);  //lacks availability … what if 2 calls arrive at same time?  Ben adds ex-wife to answer phones  Call svc … put(“name”,”DOB”);  Call svc … get(“name”,”DOB”);  //lacks consistency … what if call  @t=1 Ben answers = put(“name”,”DOB”)  @t=2 call back … but ..ex-Wife answers … get(“name”,”DOB”) fails?  Ben & ex-Wife add coherency and synchronization protocol  Call svc … put(“name”,”DOB”);  Ben & ex-Wife get in fight …stop talking. //coherency sol‟n useless!  Call svc … get(“name”,”DOB”);  //lacks partition tolerance Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 27
  • 28. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 28
  • 29.  Protocols for Cache Replacement/Consistency • • • • • • • Belady‟s Algorithm (aka Clairvoyant) LRU MRU Random LFU LIRRS CLOCK – FIFO/LIFO/FILO/LILO  Protocols for Cache Partition(Node) Health/Healing • • Cardiology Protocol Nodes obliged to produce “Heart Beat” • - • Gossip Protocol • • Nodes obliged to produce “rumors” about neighboring nodes Central “Gossip columnist” collect rumors, treats ‟illness‟ based on Gossip credibility policy. Central „Cardiologist‟ consumes HB pulses, treats „illness‟ Data Locality, Latency and Caching: JSR-107 and the new Java Standard
  • 30.  Java Caching API “Join Points” = Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 30
  • 31. Enough of the theory of Caching… on to the standard Java Caching API … On to JSR-107! Before JSR-107 all Java Caching vendors provided proprietary APIs Caching code suffered from vendor lock-in Just like JDBC solved this problem for the RDBMS community, JSR-107 solves this problem for the JCACHE community JSR-107 completely open … not hosted on private jcp.org EG forum. Hosted on http://groups.google.com/group/jsr107 public EG forum. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 31
  • 32. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 32
  • 33. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 33
  • 34. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 34
  • 35. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 35
  • 36.  (blank) Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 36
  • 37. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 37
  • 38.  A JSR-107 compliant Caching implementation is “Transactional” in 2 important (different) senses:  1. Compound access/mutate operations against a Cache Entry are guaranteed to be EXCLUSIVE and ATOMIC.  (see javax.cache.Cache.EntryProcessor interface)  2. Compound operations against a Cache are guaranteed to preserve Transactional ACID properties.  (see JTA and javax.transaction.UserTransaction interface) Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 38
  • 39.  Important to note re: JSR-107 specification of “Transactional” Java Caching …  If a Java Caching provider claims to be “JSR-107 Transactions compliant”, then all of the following transactional isolation levels are guaranteed to be available in the provider‟s JSR-107 implementation:  TX_READ_UNCOMMITTED  TX_READ_COMMITTED  TX_REPEATABLE_READ no „Dirty Read‟ guaranteed „Repeatable Read‟ assurance guaranteed  TX_SERIALIZABLE no „Phantom Read‟ guaranteed In other words, a 100% sound and 100% complete API capability for managing transaction isolation is guaranteed. CRUCIAL for Capital Markets Java Caching uses cases!! Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 39
  • 40.  JSR-107 => all Java Caches now guarantee TX capabilities:  @t=0  @t=1  TX_THR_1 utx.begin(); JCACHE_ENTRY $5 mutate(credit $1)  @t=2  @t=3  @t=4  @t=5 TX_THR_2 utx.begin(); $6 $6 //more processing utx.rollback() val = access() //$6 $6 //more processing $5 $5 utx.commit() //$6 ??  // NOTE: @t=4 DIRTY_READ realized by TX_THR_2 access() @t=2 Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 40
  • 41. Can we use JSR-107 API to prevent Dirty Reads? Of course!! Just code TX_THR_2 like this javax.cache.CacheManager cm = javax.cache.Caching.getCacheManager(id); javax.cache.Cache c = cm.createCacheBuilder(“bank_cache”) .setTransactionEnabled( javax.cache.transaction.IsolationLevel.READ_COMMITTED, javax.cache.transaction.Mode.LOCAL ).build(); javax.transaction.UserTransaction jsr107_utx = new JSR107ProviderJTAUserTransactionImpl(c); jsr107_utx.begin(); try { //process BigDecimal cash = c.get(ACCOUNT_ID); // @t=2 … guaranteed to BLOCK until TX_THR_1 commits/RB //process more jsr107_utx.commit(); } catch (Exception e) { jsr107_utx.rollback(); } // STILL NEEDED => OPTIMISITIC and PESSIMISTIC block policy (via API) for @t=2 DIRTY_READ Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 41
  • 42.  JSR-107 => DIRTY READ prevention  @t=0  @t=1  TX_THR_1 utx.begin(); JCACHE_ENTRY $5 mutate(credit $1)  @t=2  @t=3  @t=4  @t=5 $6 $6 //more processing utx.rollback() TX_THR_2 utx.begin(); val = access() //BLOCK $6 $5 $5 val = access() //$5  // DIRTY READ guaranteed to be PREVENTED Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 42
  • 43. Can we use JSR-107 API to accommodate all TX_ISOLATION tolerances (and intolerances) ?  What about rare transactional use cases that have extreme TX_ISOLATION demands? E.g. Intolerance to PHANTOM_READS? Can JSR-107 accommodate these rare (but important ) uses cases?  Answer = YES!!  What about multiple, dynamic views of the same Cache with different (possibly extreme) TX_ISOLATION demands?  Answer = YES  EG common Bond Portfolio CACHE shared by both RETAIL and INSTITUTIONAL Trading desks …   trade trade HY Credit Portfolio (3,000 bonds)      RETAIL desk 1000s of trades daily Each trade = few millis to transact Avg Trade = $5,000 USD Use JSR-107 TX_READ_COMMITTED       INSTITUTIONAL desk dozen or so trades daily Each trade = 4-6 secs to transact Avg Trade = $10,000,000 USD PHANTOM_READ intolerant Use JSR-107 TX_SERIALIZABLE Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 43
  • 44. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 44
  • 45. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 45
  • 46. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 46
  • 47. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 47
  • 48. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 48
  • 49.  Fluent Builder Pattern Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 49
  • 50. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 50
  • 51. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 51
  • 52. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 52
  • 53. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 53
  • 54. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 54
  • 55. Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 55
  • 56.  Questions (?)  Acknowledgment: Much of this PPT was taken from Greg Luck and Cameron Purdy‟s JavaOne 2012 presentation on JSR-107 see=  http://www.parleys.com/#st=5&id=3046 Data Locality, Latency and Caching: JSR-107 and the new Java Standard 2/15/2014 56