SlideShare a Scribd company logo
1 of 54
Download to read offline
Steve Poole IBM

Fast Talking Java Meets Native Code
Important Disclaimers

THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR
INFORMATIONAL PURPOSES ONLY.
WHILST EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE
INFORMATION CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS”, WITHOUT
WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.
ALL PERFORMANCE DATA INCLUDED IN THIS PRESENTATION HAVE BEEN GATHERED IN A
CONTROLLED ENVIRONMENT. YOUR OWN TEST RESULTS MAY VARY BASED ON
HARDWARE, SOFTWARE OR INFRASTRUCTURE DIFFERENCES.
ALL DATA INCLUDED IN THIS PRESENTATION ARE MEANT TO BE USED ONLY AS A GUIDE.
IN ADDITION, THE INFORMATION CONTAINED IN THIS PRESENTATION IS BASED ON IBM’S
CURRENT PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM,
WITHOUT NOTICE.
IBM AND ITS AFFILIATED COMPANIES SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES
ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR
ANY OTHER DOCUMENTATION.
NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, OR SHALL HAVE THE
EFFECT OF:
- CREATING ANY WARRANT OR REPRESENTATION FROM IBM, ITS AFFILIATED
COMPANIES OR ITS OR THEIR SUPPLIERS AND/OR LICENSORS
Steve Poole

!
Works at IBM’s Hursley Laboratory in the UK
Involved in IBM Java VM development since before Java was 1
Currently leading IBM’s OpenJDK technical engagement
What this talk is about

“Packed Objects”
aka
“Compact Off-Heap Structures in the Java Language”
!

This technology is being developed to help address
important pressures on Java	

!

This talk focuses on how to improve Java interop to Non
Java applications
You’ll learn

“Compact Off-Heap Structures in the Java Language”
1. An overview of this technology	

2. Why we need your input and support	

3. How to get started with using this technology yourself
Part 1
Native interoperability	

Why it’s so important

C
Interoperability - why is it important?

Java is built on talking native	

!

Operating Systems	

Processor Architectures	

File Systems	

User interfaces	

Network Interfaces	

!

Java keeps the WORA 	

monsters away	

!
!
WORA - the components

JDK Java code

JVM

JIT
native

Class Library
Native code

Your JNI code

Your Java application
2013 - Not so Java-centric

JVM

JIT

Class
Library
native

Your Native code

JDK Java code

Your JNI code

Your Java application
2013 - clusters and new processors

non Java	

Runtime

High speed memory channels (RDMA etc)
Specialised Processors (GPUs etc)
2013 - Can we survive with JNI 1.1?

JIT

?
Other runtime

JVM

Class
Library

Your Native code

JDK Java code

Your JNI code

Your Java application

native
High speed memory channels (RDMA etc)
Specialised Processors (GPUs etc)

?
?
2013 - we can’t survive with JNI 1.1

• 1997 - JNI 1.1	

• Designed for independence	

• Version independence	

• Platform Independence	

• VM Independence	

• Java at the centre of the world	

• Not performance focused
Packed Objects to the rescue

• What we need is	

• To be able to share data between Java and
other runtimes with minimal overhead	


• To not require a Java centric data view	

• and share data off-heap too!	

• Can we do that? 	

• Time for a demo.
A simple demo

•
•

Screensaver style	

Rectangles moved
around the screen,
bounce off the sides…
A simple demo
Draw 100 000 random sized rectangles using SDL
!
Move them around the screen and get them to change direction if they hit the
sides

!
RGB colour elements

!

typedef struct {
int red,green,blue;
float vx,vy;
SDL_Rect rec;
float x,y;
!

} RECT;

!15

position adjustment
vectors
SDL structure contains
location , height and
width
float version of location - makes
it easier to handle different h/w
speeds
A simple demo
Draw 100 000 random sized rectangles using SDL
!
Move them around the screen and get them to change direction if they hit the
sides

!

Initialise
Per frame
Update rectangle locations
Draw rectangles with SDL
terminate
!16
More than one demo

Demo

Standard - all C code calling the
SDL graphics routines	

Mixed C and JNI. Java updates
the location of each element
Mixed C with PackedObjects Java updates the location of
each element

!17

Frames per second

number of JNI calls
per frame
Demo 1 - all C
Draw 100 000 random sized rectangles using SDL
!
Move them around the screen and get them to change direction if they hit the
sides

!

Initialise
Per frame
Update rectangle locations
Draw rectangles with SDL
terminate
!18
Results

Demo

Standard - all C code calling the
SDL graphics routines	

Mixed C and JNI. Java updates
the location of each element
Mixed C with PackedObjects Java updates the location of
each element

!19

Frames per second
20

number of JNI calls
per frame
0
Demo 2- Mixed JNI and C
Draw 100 000 random sized rectangles using SDL
!
Move them around the screen and get them to change direction if they hit the
sides

!

Initialise
Per frame
Update rectangle locations
Draw rectangles with SDL
terminate
!20
Results

Demo

Standard - all C code calling the
SDL graphics routines	

Mixed C and JNI. Java updates
the location of each element
Mixed C with PackedObjects Java updates the location of
each element

!21

Frames per second
20

number of JNI calls
per frame
0
er frame)

Results

Demo

Frames per second

Standard - all C code calling the
SDL graphics routines	


20

Mixed C and JNI. Java updates
the location of each element

11

number of JNI calls
per frame
0
200000
(~4MB per frame)

Mixed C with PackedObjects Java updates the location of
each element
200 000 JNI calls per frame.	

Copying data, validating data everytime.
AND ensuring there is no chance of
optimization by the JIT.
!22
Demo 2- Details
Draw 100 000 random sized rectangles using SDL
!
Move them around the screen and get them to change direction if they hit the
sides

!

Initialise
Per frame
Update rectangle locations
Draw rectangles with SDL
terminate
!23
Demo 2- Details
Draw 100 000 random sized rectangles using SDL
!
Move them around the screen and get them to change direction if they hit the
sides

!

for every rectangle…

C function calls Java method via JNI	

	

 passes in x,y, vx and vy (by copy)	

	

 Java method updates the rectangles new position	

	

 	

 Java native calls native method passing in	

	

 	

 new x,y, vx and vy values (by copy)	

	

 	

 C native method returns	

	

 Java method returns	

C function returns	

!24
Demo 3 - Packed Objects
Draw 100 000 random sized rectangles using SDL
!
Move them around the screen and get them to change direction if they hit the
sides

!

Initialise
Per frame
Update rectangle locations
Draw rectangles with SDL
terminate
!25
er frame)

Results

Demo

Frames per second

Standard - all C code calling the
SDL graphics routines	


20

Mixed C and JNI. Java updates
the location of each element

11

Mixed C with PackedObjects Java updates the location of
each element

!26

number of JNI calls
per frame
0
200000
(~4MB per frame)
er frame)

Results

Demo

Frames per second

number of JNI calls
per frame

Standard - all C code calling the
SDL graphics routines	

Mixed C and JNI. Java updates
the location of each element

11

200000
(~4MB per frame)

Mixed C with PackedObjects Java updates the location of
each element

!27

20

18

1
(4 bytes per frame)

0
Demo 3 - Packed Objects
Draw 100 000 random sized rectangles using SDL
!
Move them around the screen and get them to change direction if they hit the
sides

!

Initialise
Per frame
Update rectangle locations
Draw rectangles with SDL
terminate
!28
Demo 3 - Packed Objects
Draw 100 000 random sized rectangles using SDL
!
Move them around the screen and get them to change direction if they hit the
sides
!

once per frame..

Java method updates each rectangle’s position directly	

!

	

	

	

	

}
!29

for(Rectangle r: rectangles) {	

	

 r.x=r.x+r.vx; 	

	

 r.y=r.y+r.vy;	

	

 …
Today Java only speaks Java
• Getting data into and out of Java has always required some form of marshaling or
serialization process

!
• Interaction with native data structures in memory is particularly problematic
• JNI is the slowest but safest
– But you need good C / C++ knowledge
• Unsafe and NIO are faster but more challenging to use
– They both have their own programming ‘model’
• If the Java side is in control of storage layouts it’s easier
• When mapping existing native structures it’s much, much, much more difficult

!
• Ironically the JVM is completely aware of native data formats
Tomorrow, with Packed Objects..
Java will let you reference data stored like this
!

typedef struct {
int red,green,blue;
float vx,vy;
SDL_Rect rec;
float x,y;
!

} RECT;

C structure
Tomorrow, with Packed Objects..
as if it looked like this
!

!

typedef struct {

public class Rectangle {
!

int red,green,blue;
float vx,vy;
SDL_Rect rec;
float x,y;
!

int red,green,blue;
float vx,xy;
SDLRect rec;
float x,y;
!

} RECT;

C structure

}

Java structure
Tomorrow, with Packed Objects..

!

!

typedef struct {

public class Rectangle {
!

int red,green,blue;
float vx,vy;
SDL_Rect rec;
float x,y;
!

int red,green,blue;
float vx,xy;
SDLRect rec;
float x,y;

without
copying
!

} RECT;

C structure

}

Java structure
Tomorrow, with Packed Objects..

!
!!
! typedef struct {
!
int red,green,blue;
!
float vx,vy;
!
SDL_Rect rec;
!
float x,y;
!!
! } RECT;
!
!

‘C’ runtime

And off

!
!
!
public class Rectangle {
!
!
!
int red,green,blue;
!
float vx,xy;
!
heap SDLRect rec;
!
float x,y;
!
!
!
}
!
!

Java heap
Part 2
Under the covers

http://www.flickr.com/photos/mwichary/
Under the covers

!

public class Rectangle {

Let’s look at these
classes from a JVM
point of view..

!

int red,green,blue;
float vx,xy;
SDLRect rec;
float x,y;
!

}

public class SDLRect {
short x,y
int width,height
}
Under the covers

!
!
!
!
!
!
!
!
!
!
!

int red
int green
int blue
float vx
float vy
SLDRect ptr
float x
float y

Java heap

!

public class Rectangle {
!

short x
short y
int width
int height

int red,green,blue;
float vx,xy;
SDLRect rec;
float x,y;
!

}

public class SDLRect {
short x,y
int width,height
}

Java structure
!37

J
!
!
!
!
!
!
!
!
!
!
!

Questions
!
int red
int green
int blue
float vx
float vy
SLDRect ptr
float x
float y

Java heap

!38

1 - How does a JVM ‘know’
the class of these objects?
!
!
short x
short y
int width
int height

2 - What are the data format
rules for these types?
!
!

3 - When synchonizing on a
object - where is the monitor
stored?
!
!
!
!
!
!
!
!
!
!
!

int red
int green
int blue
float vx
float vy
SLDRect ptr
float x
float y

Java heap

!39

Answers

class ptr
monitor

!

class ptr
monitor
short x
short y
int width
int height

1 - How does a JVM ‘know’
the class of these objects?
Additional internal ptr
!

2 - What are the data format
rules for these types?
JVM impl specific (including
ordering)
3 - When synchonizing on a
object - where is the monitor
stored?
Additional internal field
How to add the metadata

!
!
!
!
!
!
!
!
!
!
!

class ptr
monitor
int red
int green
int blue
float vx
float vy
SLDRect ptr
float x
float y

Java heap

!40

class ptr
monitor
short x
short y
int width
int height

!
!
!
!
!
!
!
!
!
!
!

[4] red
[4] green
[4] blue
[4] vx
[4] vy
[2] rect.x
[2] rect.y
[4] rect.width
[4] rect.height
[4] x
[4] y

‘C’ runtime

No space
No space
for the extra
for the extra
Java fields -Java fields
what do we
what do we
do?
do?
Under the covers

!
!
!
!
!
!
!
!
!
!
!

Java heap

!41

!
!
!
!
!
!
!
!
!
!
!

public class Rectangle {
[4] red
[4] green
[4] blue
[4] vx
[4] vy
[2] rect.x
[2] rect.y
[4] rect.width
[4] rect.height
[4] x
[4] y

‘C’ runtime

!

int red,green,blue;
float vx,xy;
SDLRect rec;
float x,y;
}

public class SDLRect {
short x,y
int width,height
}
Under the covers

!
!
!
!
!
!
!
!
!
!
!

Java heap

!
!
!
!
!
!
!
!
!
!
!

public class Rectangle {
[4] red
[4] green
[4] blue
[4] vx
[4] vy
[2] rect.x
[2] rect.y
[4] rect.width
[4] rect.height
[4] x
[4] y

‘C’ runtime

!

int red,green,blue;
float vx,xy;
SDLRect rec;
float x,y;
}

public class SDLRect {
short x,y
int width,height
}

Rectangle r=PackedObject.newNativePackedObject(Rectangle.class,0x******);
!42
Under the covers

!
!
!
!
!
!
!
!
!
!
!

class ptr
monitor
data ptr

“r”

Java heap

!43

!
!
!
!
!
!
Constructor
!
was not !
called!
!
!
!

public class Rectangle {
[4] red
[4] green
[4] blue
[4] vx
[4] vy
[2] rect.x
[2] rect.y
[4] rect.width
[4] rect.height
[4] x
[4] y

‘C’ runtime

!

int red,green,blue;
float vx,xy;
SDLRect rec;
float x,y;
}

public class SDLRect {
short x,y
int width,height
}
Rectangle r=PackedObject.newNativePackedObject(Rectangle.class,0x******);

Under the covers

!
!
!
!
!
!
!
!
!
!
!

class ptr
monitor
data ptr

“r”

Java heap
SDLRect s=r.rect;
!
!44

!
!
!
!
!
!
!
!
!
!
!

public class Rectangle {
[4] red
[4] green
[4] blue
[4] vx
[4] vy
[2] rect.x
[2] rect.y
[4] rect.width
[4] rect.height
[4] x
[4] y

‘C’ runtime

!

int red,green,blue;
float vx,xy;
SDLRect rec;
float x,y;
}

public class SDLRect {
short x,y
int width,height
}
Rectangle r=PackedObject.newNativePackedObject(Rectangle.class,0x******);

Under the covers

!
!
!
!
!
!
!
!
!
!
!

class ptr
monitor
data ptr

“r”

“s”

class ptr
monitor
data ptr

Java heap
SDLRect s=r.rect;
!
!45

!
!
!
!
!
!
!
!
!
!
!

public class Rectangle {
[4] red
[4] green
[4] blue
[4] vx
[4] vy
[2] rect.x
[2] rect.y
[4] rect.width
[4] rect.height
[4] x
[4] y

‘C’ runtime

!

int red,green,blue;
float vx,xy;
SDLRect rec;
float x,y;
}

public class SDLRect {
short x,y
int width,height
}
Rectangle r=PackedObject.newNativePackedObject(Rectangle.class,0x******);

Under the covers

!
!
!
!
!
!
!
!
!
!
!

class ptr
monitor
data ptr

“r”

“s”

class ptr
monitor
data ptr

Java heap
SDLRect s=r.rect;
SDLRect t=r.rect;
!46

!
!
!
!
!
!
!
!
!
!
!

public class Rectangle {
[4] red
[4] green
[4] blue
[4] vx
[4] vy
[2] rect.x
[2] rect.y
[4] rect.width
[4] rect.height
[4] x
[4] y

‘C’ runtime

!

int red,green,blue;
float vx,xy;
SDLRect rec;
float x,y;
}

public class SDLRect {
short x,y
int width,height
}
Rectangle r=PackedObject.newNativePackedObject(Rectangle.class,0x******);

Under the covers

!
!
!
!
!
!
!
!
!
!
!

class ptr
monitor
data ptr

“r”

“s”

class ptr
monitor
data ptr

“t”

class ptr
monitor
data ptr

Java heap
SDLRect s=r.rect;
SDLRect t=r.rect;
!47

!
!
!
!
!
!
!
!
!
!
!

public class Rectangle {
[4] red
[4] green
[4] blue
[4] vx
[4] vy
[2] rect.x
[2] rect.y
[4] rect.width
[4] rect.height
[4] x
[4] y

‘C’ runtime

!

int red,green,blue;
float vx,xy;
SDLRect rec;
float x,y;
}

public class SDLRect {
short x,y
int width,height
}
Part 3
Truth and Consequences
Design considerations

• Off heap Packed Objects are considered to already exist so
constructors are not called.	


• Since there is limited opportunity to store the vital metadata it is
constructed when needed.	


• The assumption is that creating new objects when accessing
embedded data is confusing and dangerous.	


• How does ‘==‘ work?	

• What about synchronization?	

• The idea of ‘identityless’ objects is being discussed. 	

• Something that PackedObjects has in common with ValueTypes	

• Could you handle Objects of this style?
The way forward?

• This approach offers Java a way forward in the multi
environment world	


• Almost zero cost data interop will benefit Java when
exploiting new processors and memory systems. 	


• There are additional use cases that ‘fall out’ from this design.	

• Low cost r/w of files	

• Instant application startup 	

• Basic unmanaged memory capabilities	

• Under the covers heap usage benefits through better
control for ‘locality of reference’
Is this the right or only way?

• IBM and Oracle have been discussing these
sorts of concepts for some time	


• We need your input. How important are

these use cases to you? What’s missing, not
needed? What do you hate?	


• We are trying to keep clear of syntax

discussions at this point - it’s too early and just
distracting.
You too can use Packed Objects

• Google for “IBM Java 8 Beta”
Hard hats must be worn…

The current prototype implementation surfaces a lot of the
internals that will eventually just disappear

This approach makes it easier
for us to quickly revise the
design but means users of the
prototype have to work harder.	

!

AND	

!

it avoids syntax wars :-)
picture courtesy http://www.flickr.com/people/karen_od/
Wrap up -hopefully you now:

“Compact Off-Heap Structures in the Java Language”
1. Have a basic understanding of this technology	

2. Know why we need your input and support	

3. Know how to get started with using this technology

Thank You

More Related Content

What's hot

Everything I Ever Learned About JVM Performance Tuning @Twitter
Everything I Ever Learned About JVM Performance Tuning @TwitterEverything I Ever Learned About JVM Performance Tuning @Twitter
Everything I Ever Learned About JVM Performance Tuning @TwitterAttila Szegedi
 
Spark as the Gateway Drug to Typed Functional Programming: Spark Summit East ...
Spark as the Gateway Drug to Typed Functional Programming: Spark Summit East ...Spark as the Gateway Drug to Typed Functional Programming: Spark Summit East ...
Spark as the Gateway Drug to Typed Functional Programming: Spark Summit East ...Spark Summit
 
High Performance Python on Apache Spark
High Performance Python on Apache SparkHigh Performance Python on Apache Spark
High Performance Python on Apache SparkWes McKinney
 
Deep Learning and Recurrent Neural Networks in the Enterprise
Deep Learning and Recurrent Neural Networks in the EnterpriseDeep Learning and Recurrent Neural Networks in the Enterprise
Deep Learning and Recurrent Neural Networks in the EnterpriseJosh Patterson
 
An Introduction to JVM Internals and Garbage Collection in Java
An Introduction to JVM Internals and Garbage Collection in JavaAn Introduction to JVM Internals and Garbage Collection in Java
An Introduction to JVM Internals and Garbage Collection in JavaAbhishek Asthana
 
The Future of Real-Time in Spark
The Future of Real-Time in SparkThe Future of Real-Time in Spark
The Future of Real-Time in SparkReynold Xin
 
Persisting Your Objects In The Database World @ AlphaCSP Professional OSS Con...
Persisting Your Objects In The Database World @ AlphaCSP Professional OSS Con...Persisting Your Objects In The Database World @ AlphaCSP Professional OSS Con...
Persisting Your Objects In The Database World @ AlphaCSP Professional OSS Con...Baruch Sadogursky
 
Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Marcos García
 
Deep Learning Intro - Georgia Tech - CSE6242 - March 2015
Deep Learning Intro - Georgia Tech - CSE6242 - March 2015Deep Learning Intro - Georgia Tech - CSE6242 - March 2015
Deep Learning Intro - Georgia Tech - CSE6242 - March 2015Josh Patterson
 
.NET Fest 2018. Maarten Balliauw. Let’s refresh our memory! Memory management...
.NET Fest 2018. Maarten Balliauw. Let’s refresh our memory! Memory management....NET Fest 2018. Maarten Balliauw. Let’s refresh our memory! Memory management...
.NET Fest 2018. Maarten Balliauw. Let’s refresh our memory! Memory management...NETFest
 
JavaOne 2013: Memory Efficient Java
JavaOne 2013: Memory Efficient JavaJavaOne 2013: Memory Efficient Java
JavaOne 2013: Memory Efficient JavaChris Bailey
 
Making Sense of Spark Performance-(Kay Ousterhout, UC Berkeley)
Making Sense of Spark Performance-(Kay Ousterhout, UC Berkeley)Making Sense of Spark Performance-(Kay Ousterhout, UC Berkeley)
Making Sense of Spark Performance-(Kay Ousterhout, UC Berkeley)Spark Summit
 
Deep Dive: Memory Management in Apache Spark
Deep Dive: Memory Management in Apache SparkDeep Dive: Memory Management in Apache Spark
Deep Dive: Memory Management in Apache SparkDatabricks
 
Super Sizing Youtube with Python
Super Sizing Youtube with PythonSuper Sizing Youtube with Python
Super Sizing Youtube with Pythondidip
 
Georgia Tech cse6242 - Intro to Deep Learning and DL4J
Georgia Tech cse6242 - Intro to Deep Learning and DL4JGeorgia Tech cse6242 - Intro to Deep Learning and DL4J
Georgia Tech cse6242 - Intro to Deep Learning and DL4JJosh Patterson
 
Java Performance Monitoring & Tuning
Java Performance Monitoring & TuningJava Performance Monitoring & Tuning
Java Performance Monitoring & TuningMuhammed Shakir
 
Remote Log Analytics Using DDS, ELK, and RxJS
Remote Log Analytics Using DDS, ELK, and RxJSRemote Log Analytics Using DDS, ELK, and RxJS
Remote Log Analytics Using DDS, ELK, and RxJSSumant Tambe
 

What's hot (20)

Everything I Ever Learned About JVM Performance Tuning @Twitter
Everything I Ever Learned About JVM Performance Tuning @TwitterEverything I Ever Learned About JVM Performance Tuning @Twitter
Everything I Ever Learned About JVM Performance Tuning @Twitter
 
Spark as the Gateway Drug to Typed Functional Programming: Spark Summit East ...
Spark as the Gateway Drug to Typed Functional Programming: Spark Summit East ...Spark as the Gateway Drug to Typed Functional Programming: Spark Summit East ...
Spark as the Gateway Drug to Typed Functional Programming: Spark Summit East ...
 
High Performance Python on Apache Spark
High Performance Python on Apache SparkHigh Performance Python on Apache Spark
High Performance Python on Apache Spark
 
Deep Learning and Recurrent Neural Networks in the Enterprise
Deep Learning and Recurrent Neural Networks in the EnterpriseDeep Learning and Recurrent Neural Networks in the Enterprise
Deep Learning and Recurrent Neural Networks in the Enterprise
 
Inferno Scalable Deep Learning on Spark
Inferno Scalable Deep Learning on SparkInferno Scalable Deep Learning on Spark
Inferno Scalable Deep Learning on Spark
 
Deploying Machine Learning Models to Production
Deploying Machine Learning Models to ProductionDeploying Machine Learning Models to Production
Deploying Machine Learning Models to Production
 
An Introduction to JVM Internals and Garbage Collection in Java
An Introduction to JVM Internals and Garbage Collection in JavaAn Introduction to JVM Internals and Garbage Collection in Java
An Introduction to JVM Internals and Garbage Collection in Java
 
From I/O To RAM
From I/O To RAMFrom I/O To RAM
From I/O To RAM
 
The Future of Real-Time in Spark
The Future of Real-Time in SparkThe Future of Real-Time in Spark
The Future of Real-Time in Spark
 
Persisting Your Objects In The Database World @ AlphaCSP Professional OSS Con...
Persisting Your Objects In The Database World @ AlphaCSP Professional OSS Con...Persisting Your Objects In The Database World @ AlphaCSP Professional OSS Con...
Persisting Your Objects In The Database World @ AlphaCSP Professional OSS Con...
 
Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)
 
Deep Learning Intro - Georgia Tech - CSE6242 - March 2015
Deep Learning Intro - Georgia Tech - CSE6242 - March 2015Deep Learning Intro - Georgia Tech - CSE6242 - March 2015
Deep Learning Intro - Georgia Tech - CSE6242 - March 2015
 
.NET Fest 2018. Maarten Balliauw. Let’s refresh our memory! Memory management...
.NET Fest 2018. Maarten Balliauw. Let’s refresh our memory! Memory management....NET Fest 2018. Maarten Balliauw. Let’s refresh our memory! Memory management...
.NET Fest 2018. Maarten Balliauw. Let’s refresh our memory! Memory management...
 
JavaOne 2013: Memory Efficient Java
JavaOne 2013: Memory Efficient JavaJavaOne 2013: Memory Efficient Java
JavaOne 2013: Memory Efficient Java
 
Making Sense of Spark Performance-(Kay Ousterhout, UC Berkeley)
Making Sense of Spark Performance-(Kay Ousterhout, UC Berkeley)Making Sense of Spark Performance-(Kay Ousterhout, UC Berkeley)
Making Sense of Spark Performance-(Kay Ousterhout, UC Berkeley)
 
Deep Dive: Memory Management in Apache Spark
Deep Dive: Memory Management in Apache SparkDeep Dive: Memory Management in Apache Spark
Deep Dive: Memory Management in Apache Spark
 
Super Sizing Youtube with Python
Super Sizing Youtube with PythonSuper Sizing Youtube with Python
Super Sizing Youtube with Python
 
Georgia Tech cse6242 - Intro to Deep Learning and DL4J
Georgia Tech cse6242 - Intro to Deep Learning and DL4JGeorgia Tech cse6242 - Intro to Deep Learning and DL4J
Georgia Tech cse6242 - Intro to Deep Learning and DL4J
 
Java Performance Monitoring & Tuning
Java Performance Monitoring & TuningJava Performance Monitoring & Tuning
Java Performance Monitoring & Tuning
 
Remote Log Analytics Using DDS, ELK, and RxJS
Remote Log Analytics Using DDS, ELK, and RxJSRemote Log Analytics Using DDS, ELK, and RxJS
Remote Log Analytics Using DDS, ELK, and RxJS
 

Viewers also liked

Legal and ethical considerations redone
Legal and ethical considerations   redoneLegal and ethical considerations   redone
Legal and ethical considerations redoneNicole174
 
Garbage Collection: the Useful Parts - Martijn Verburg & Dr John Oliver (jCla...
Garbage Collection: the Useful Parts - Martijn Verburg & Dr John Oliver (jCla...Garbage Collection: the Useful Parts - Martijn Verburg & Dr John Oliver (jCla...
Garbage Collection: the Useful Parts - Martijn Verburg & Dr John Oliver (jCla...jaxLondonConference
 
Scaling Scala to the database - Stefan Zeiger (Typesafe)
Scaling Scala to the database - Stefan Zeiger (Typesafe)Scaling Scala to the database - Stefan Zeiger (Typesafe)
Scaling Scala to the database - Stefan Zeiger (Typesafe)jaxLondonConference
 
Databases and agile development - Dwight Merriman (MongoDB)
Databases and agile development - Dwight Merriman (MongoDB)Databases and agile development - Dwight Merriman (MongoDB)
Databases and agile development - Dwight Merriman (MongoDB)jaxLondonConference
 
How Hailo fuels its growth using NoSQL storage and analytics - Dave Gardner (...
How Hailo fuels its growth using NoSQL storage and analytics - Dave Gardner (...How Hailo fuels its growth using NoSQL storage and analytics - Dave Gardner (...
How Hailo fuels its growth using NoSQL storage and analytics - Dave Gardner (...jaxLondonConference
 
Bringing your app to the web with Dart - Chris Buckett (Entity Group)
Bringing your app to the web with Dart - Chris Buckett (Entity Group)Bringing your app to the web with Dart - Chris Buckett (Entity Group)
Bringing your app to the web with Dart - Chris Buckett (Entity Group)jaxLondonConference
 
How Java got its Mojo Back - James Governor (Redmonk)
How Java got its Mojo Back - James Governor (Redmonk)					How Java got its Mojo Back - James Governor (Redmonk)
How Java got its Mojo Back - James Governor (Redmonk) jaxLondonConference
 
Introducing Vert.x 2.0 - Taking polyglot application development to the next ...
Introducing Vert.x 2.0 - Taking polyglot application development to the next ...Introducing Vert.x 2.0 - Taking polyglot application development to the next ...
Introducing Vert.x 2.0 - Taking polyglot application development to the next ...jaxLondonConference
 
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...jaxLondonConference
 
Interactive media applications
Interactive media applicationsInteractive media applications
Interactive media applicationsNicole174
 
Big Events, Mob Scale - Darach Ennis (Push Technology)
Big Events, Mob Scale - Darach Ennis (Push Technology)Big Events, Mob Scale - Darach Ennis (Push Technology)
Big Events, Mob Scale - Darach Ennis (Push Technology)jaxLondonConference
 
What makes Groovy Groovy - Guillaume Laforge (Pivotal)
What makes Groovy Groovy  - Guillaume Laforge (Pivotal)What makes Groovy Groovy  - Guillaume Laforge (Pivotal)
What makes Groovy Groovy - Guillaume Laforge (Pivotal)jaxLondonConference
 
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...jaxLondonConference
 
Streams and Things - Darach Ennis (Ubiquiti Networks)
Streams and Things - Darach Ennis (Ubiquiti Networks)Streams and Things - Darach Ennis (Ubiquiti Networks)
Streams and Things - Darach Ennis (Ubiquiti Networks)jaxLondonConference
 
Big data from the LHC commissioning: practical lessons from big science - Sim...
Big data from the LHC commissioning: practical lessons from big science - Sim...Big data from the LHC commissioning: practical lessons from big science - Sim...
Big data from the LHC commissioning: practical lessons from big science - Sim...jaxLondonConference
 
How Windows 10 will change the way we use devices
How Windows 10 will change the way we use devicesHow Windows 10 will change the way we use devices
How Windows 10 will change the way we use devicesCommelius Solutions
 
45 second video proposal
45 second video proposal45 second video proposal
45 second video proposalNicole174
 
The state of the art biorepository at ILRI
The state of the art biorepository at ILRIThe state of the art biorepository at ILRI
The state of the art biorepository at ILRIAbsolomon Kihara
 
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)jaxLondonConference
 

Viewers also liked (20)

Legal and ethical considerations redone
Legal and ethical considerations   redoneLegal and ethical considerations   redone
Legal and ethical considerations redone
 
Garbage Collection: the Useful Parts - Martijn Verburg & Dr John Oliver (jCla...
Garbage Collection: the Useful Parts - Martijn Verburg & Dr John Oliver (jCla...Garbage Collection: the Useful Parts - Martijn Verburg & Dr John Oliver (jCla...
Garbage Collection: the Useful Parts - Martijn Verburg & Dr John Oliver (jCla...
 
Scaling Scala to the database - Stefan Zeiger (Typesafe)
Scaling Scala to the database - Stefan Zeiger (Typesafe)Scaling Scala to the database - Stefan Zeiger (Typesafe)
Scaling Scala to the database - Stefan Zeiger (Typesafe)
 
Databases and agile development - Dwight Merriman (MongoDB)
Databases and agile development - Dwight Merriman (MongoDB)Databases and agile development - Dwight Merriman (MongoDB)
Databases and agile development - Dwight Merriman (MongoDB)
 
How Hailo fuels its growth using NoSQL storage and analytics - Dave Gardner (...
How Hailo fuels its growth using NoSQL storage and analytics - Dave Gardner (...How Hailo fuels its growth using NoSQL storage and analytics - Dave Gardner (...
How Hailo fuels its growth using NoSQL storage and analytics - Dave Gardner (...
 
Bringing your app to the web with Dart - Chris Buckett (Entity Group)
Bringing your app to the web with Dart - Chris Buckett (Entity Group)Bringing your app to the web with Dart - Chris Buckett (Entity Group)
Bringing your app to the web with Dart - Chris Buckett (Entity Group)
 
How Java got its Mojo Back - James Governor (Redmonk)
How Java got its Mojo Back - James Governor (Redmonk)					How Java got its Mojo Back - James Governor (Redmonk)
How Java got its Mojo Back - James Governor (Redmonk)
 
Introducing Vert.x 2.0 - Taking polyglot application development to the next ...
Introducing Vert.x 2.0 - Taking polyglot application development to the next ...Introducing Vert.x 2.0 - Taking polyglot application development to the next ...
Introducing Vert.x 2.0 - Taking polyglot application development to the next ...
 
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...
 
Interactive media applications
Interactive media applicationsInteractive media applications
Interactive media applications
 
Big Events, Mob Scale - Darach Ennis (Push Technology)
Big Events, Mob Scale - Darach Ennis (Push Technology)Big Events, Mob Scale - Darach Ennis (Push Technology)
Big Events, Mob Scale - Darach Ennis (Push Technology)
 
What makes Groovy Groovy - Guillaume Laforge (Pivotal)
What makes Groovy Groovy  - Guillaume Laforge (Pivotal)What makes Groovy Groovy  - Guillaume Laforge (Pivotal)
What makes Groovy Groovy - Guillaume Laforge (Pivotal)
 
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
 
Streams and Things - Darach Ennis (Ubiquiti Networks)
Streams and Things - Darach Ennis (Ubiquiti Networks)Streams and Things - Darach Ennis (Ubiquiti Networks)
Streams and Things - Darach Ennis (Ubiquiti Networks)
 
Why other ppl_dont_get_it
Why other ppl_dont_get_itWhy other ppl_dont_get_it
Why other ppl_dont_get_it
 
Big data from the LHC commissioning: practical lessons from big science - Sim...
Big data from the LHC commissioning: practical lessons from big science - Sim...Big data from the LHC commissioning: practical lessons from big science - Sim...
Big data from the LHC commissioning: practical lessons from big science - Sim...
 
How Windows 10 will change the way we use devices
How Windows 10 will change the way we use devicesHow Windows 10 will change the way we use devices
How Windows 10 will change the way we use devices
 
45 second video proposal
45 second video proposal45 second video proposal
45 second video proposal
 
The state of the art biorepository at ILRI
The state of the art biorepository at ILRIThe state of the art biorepository at ILRI
The state of the art biorepository at ILRI
 
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
 

Similar to Packed Objects: Fast Talking Java Meets Native Code - Steve Poole (IBM)

How Java 19 Influences the Future of Your High-Scale Applications .pdf
How Java 19 Influences the Future of Your High-Scale Applications .pdfHow Java 19 Influences the Future of Your High-Scale Applications .pdf
How Java 19 Influences the Future of Your High-Scale Applications .pdfAna-Maria Mihalceanu
 
NDK Primer (AnDevCon Boston 2014)
NDK Primer (AnDevCon Boston 2014)NDK Primer (AnDevCon Boston 2014)
NDK Primer (AnDevCon Boston 2014)Ron Munitz
 
World wind java sdk in progess
World wind java sdk in progessWorld wind java sdk in progess
World wind java sdk in progessRaffaele de Amicis
 
SDVIs and In-Situ Visualization on TACC's Stampede
SDVIs and In-Situ Visualization on TACC's StampedeSDVIs and In-Situ Visualization on TACC's Stampede
SDVIs and In-Situ Visualization on TACC's StampedeIntel® Software
 
Anomaly Detection with Azure and .NET
Anomaly Detection with Azure and .NETAnomaly Detection with Azure and .NET
Anomaly Detection with Azure and .NETMarco Parenzan
 
Practicing at the Cutting Edge: Learning and Unlearning about Java Performance
Practicing at the Cutting Edge: Learning and Unlearning about Java PerformancePracticing at the Cutting Edge: Learning and Unlearning about Java Performance
Practicing at the Cutting Edge: Learning and Unlearning about Java PerformanceC4Media
 
Anomaly Detection with Azure and .net
Anomaly Detection with Azure and .netAnomaly Detection with Azure and .net
Anomaly Detection with Azure and .netMarco Parenzan
 
Java Future S Ritter
Java Future S RitterJava Future S Ritter
Java Future S Rittercatherinewall
 
Real World Single Page App - A Knockout Case Study
Real World Single Page App - A Knockout Case StudyReal World Single Page App - A Knockout Case Study
Real World Single Page App - A Knockout Case Studyhousecor
 
Web (dis)assembly
Web (dis)assemblyWeb (dis)assembly
Web (dis)assemblyShakacon
 
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...Hafez Kamal
 
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...Ambassador Labs
 
Scarlet SmallTalk
Scarlet SmallTalkScarlet SmallTalk
Scarlet SmallTalkESUG
 
Visual geometry with deep learning
Visual geometry with deep learningVisual geometry with deep learning
Visual geometry with deep learningNAVER Engineering
 

Similar to Packed Objects: Fast Talking Java Meets Native Code - Steve Poole (IBM) (20)

How Java 19 Influences the Future of Your High-Scale Applications .pdf
How Java 19 Influences the Future of Your High-Scale Applications .pdfHow Java 19 Influences the Future of Your High-Scale Applications .pdf
How Java 19 Influences the Future of Your High-Scale Applications .pdf
 
NDK Primer (AnDevCon Boston 2014)
NDK Primer (AnDevCon Boston 2014)NDK Primer (AnDevCon Boston 2014)
NDK Primer (AnDevCon Boston 2014)
 
Java vs .Net
Java vs .NetJava vs .Net
Java vs .Net
 
World wind java sdk in progess
World wind java sdk in progessWorld wind java sdk in progess
World wind java sdk in progess
 
SDVIs and In-Situ Visualization on TACC's Stampede
SDVIs and In-Situ Visualization on TACC's StampedeSDVIs and In-Situ Visualization on TACC's Stampede
SDVIs and In-Situ Visualization on TACC's Stampede
 
Sadiq786
Sadiq786Sadiq786
Sadiq786
 
Java1 in mumbai
Java1 in mumbaiJava1 in mumbai
Java1 in mumbai
 
Anomaly Detection with Azure and .NET
Anomaly Detection with Azure and .NETAnomaly Detection with Azure and .NET
Anomaly Detection with Azure and .NET
 
Practicing at the Cutting Edge: Learning and Unlearning about Java Performance
Practicing at the Cutting Edge: Learning and Unlearning about Java PerformancePracticing at the Cutting Edge: Learning and Unlearning about Java Performance
Practicing at the Cutting Edge: Learning and Unlearning about Java Performance
 
Anomaly Detection with Azure and .net
Anomaly Detection with Azure and .netAnomaly Detection with Azure and .net
Anomaly Detection with Azure and .net
 
Java Future S Ritter
Java Future S RitterJava Future S Ritter
Java Future S Ritter
 
Real World Single Page App - A Knockout Case Study
Real World Single Page App - A Knockout Case StudyReal World Single Page App - A Knockout Case Study
Real World Single Page App - A Knockout Case Study
 
Java By Sai NagaVenkata BuchiBabu Manepalli
Java By Sai NagaVenkata BuchiBabu ManepalliJava By Sai NagaVenkata BuchiBabu Manepalli
Java By Sai NagaVenkata BuchiBabu Manepalli
 
Java By Sai NagaVenkata BuchiBabu Manepalli
Java By Sai NagaVenkata BuchiBabu ManepalliJava By Sai NagaVenkata BuchiBabu Manepalli
Java By Sai NagaVenkata BuchiBabu Manepalli
 
Web (dis)assembly
Web (dis)assemblyWeb (dis)assembly
Web (dis)assembly
 
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
NanoSec Conference 2019: Code Execution Analysis in Mobile Apps - Abdullah Jo...
 
Understanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual MachineUnderstanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual Machine
 
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
 
Scarlet SmallTalk
Scarlet SmallTalkScarlet SmallTalk
Scarlet SmallTalk
 
Visual geometry with deep learning
Visual geometry with deep learningVisual geometry with deep learning
Visual geometry with deep learning
 

More from jaxLondonConference

Conflict Free Replicated Data-types in Eventually Consistent Systems - Joel J...
Conflict Free Replicated Data-types in Eventually Consistent Systems - Joel J...Conflict Free Replicated Data-types in Eventually Consistent Systems - Joel J...
Conflict Free Replicated Data-types in Eventually Consistent Systems - Joel J...jaxLondonConference
 
JVM Support for Multitenant Applications - Steve Poole (IBM)
JVM Support for Multitenant Applications - Steve Poole (IBM)JVM Support for Multitenant Applications - Steve Poole (IBM)
JVM Support for Multitenant Applications - Steve Poole (IBM)jaxLondonConference
 
What You Need to Know About Lambdas - Jamie Allen (Typesafe)
What You Need to Know About Lambdas - Jamie Allen (Typesafe)What You Need to Know About Lambdas - Jamie Allen (Typesafe)
What You Need to Know About Lambdas - Jamie Allen (Typesafe)jaxLondonConference
 
Java Testing With Spock - Ken Sipe (Trexin Consulting)
Java Testing With Spock - Ken Sipe (Trexin Consulting)Java Testing With Spock - Ken Sipe (Trexin Consulting)
Java Testing With Spock - Ken Sipe (Trexin Consulting)jaxLondonConference
 
The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...
The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...
The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...jaxLondonConference
 
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...jaxLondonConference
 
Exploring the Talend unified Big Data toolset for sentiment analysis - Ben Br...
Exploring the Talend unified Big Data toolset for sentiment analysis - Ben Br...Exploring the Talend unified Big Data toolset for sentiment analysis - Ben Br...
Exploring the Talend unified Big Data toolset for sentiment analysis - Ben Br...jaxLondonConference
 
The Curious Clojurist - Neal Ford (Thoughtworks)
The Curious Clojurist - Neal Ford (Thoughtworks)The Curious Clojurist - Neal Ford (Thoughtworks)
The Curious Clojurist - Neal Ford (Thoughtworks)jaxLondonConference
 
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)jaxLondonConference
 
Put your Java apps to sleep? Find out how - John Matthew Holt (Waratek)
Put your Java apps to sleep? Find out how - John Matthew Holt (Waratek)Put your Java apps to sleep? Find out how - John Matthew Holt (Waratek)
Put your Java apps to sleep? Find out how - John Matthew Holt (Waratek)jaxLondonConference
 
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...jaxLondonConference
 
Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...
Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...
Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...jaxLondonConference
 
Little words of wisdom for the developer - Guillaume Laforge (Pivotal)
Little words of wisdom for the developer - Guillaume Laforge (Pivotal)Little words of wisdom for the developer - Guillaume Laforge (Pivotal)
Little words of wisdom for the developer - Guillaume Laforge (Pivotal)jaxLondonConference
 
Large scale, interactive ad-hoc queries over different datastores with Apache...
Large scale, interactive ad-hoc queries over different datastores with Apache...Large scale, interactive ad-hoc queries over different datastores with Apache...
Large scale, interactive ad-hoc queries over different datastores with Apache...jaxLondonConference
 
Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...
Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...
Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...jaxLondonConference
 
Practical Performance: Understand the Performance of Your Application - Chris...
Practical Performance: Understand the Performance of Your Application - Chris...Practical Performance: Understand the Performance of Your Application - Chris...
Practical Performance: Understand the Performance of Your Application - Chris...jaxLondonConference
 

More from jaxLondonConference (17)

Conflict Free Replicated Data-types in Eventually Consistent Systems - Joel J...
Conflict Free Replicated Data-types in Eventually Consistent Systems - Joel J...Conflict Free Replicated Data-types in Eventually Consistent Systems - Joel J...
Conflict Free Replicated Data-types in Eventually Consistent Systems - Joel J...
 
JVM Support for Multitenant Applications - Steve Poole (IBM)
JVM Support for Multitenant Applications - Steve Poole (IBM)JVM Support for Multitenant Applications - Steve Poole (IBM)
JVM Support for Multitenant Applications - Steve Poole (IBM)
 
What You Need to Know About Lambdas - Jamie Allen (Typesafe)
What You Need to Know About Lambdas - Jamie Allen (Typesafe)What You Need to Know About Lambdas - Jamie Allen (Typesafe)
What You Need to Know About Lambdas - Jamie Allen (Typesafe)
 
Java Testing With Spock - Ken Sipe (Trexin Consulting)
Java Testing With Spock - Ken Sipe (Trexin Consulting)Java Testing With Spock - Ken Sipe (Trexin Consulting)
Java Testing With Spock - Ken Sipe (Trexin Consulting)
 
The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...
The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...
The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...
 
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
 
Exploring the Talend unified Big Data toolset for sentiment analysis - Ben Br...
Exploring the Talend unified Big Data toolset for sentiment analysis - Ben Br...Exploring the Talend unified Big Data toolset for sentiment analysis - Ben Br...
Exploring the Talend unified Big Data toolset for sentiment analysis - Ben Br...
 
The Curious Clojurist - Neal Ford (Thoughtworks)
The Curious Clojurist - Neal Ford (Thoughtworks)The Curious Clojurist - Neal Ford (Thoughtworks)
The Curious Clojurist - Neal Ford (Thoughtworks)
 
TDD at scale - Mash Badar (UBS)
TDD at scale - Mash Badar (UBS)TDD at scale - Mash Badar (UBS)
TDD at scale - Mash Badar (UBS)
 
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
 
Put your Java apps to sleep? Find out how - John Matthew Holt (Waratek)
Put your Java apps to sleep? Find out how - John Matthew Holt (Waratek)Put your Java apps to sleep? Find out how - John Matthew Holt (Waratek)
Put your Java apps to sleep? Find out how - John Matthew Holt (Waratek)
 
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
 
Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...
Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...
Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...
 
Little words of wisdom for the developer - Guillaume Laforge (Pivotal)
Little words of wisdom for the developer - Guillaume Laforge (Pivotal)Little words of wisdom for the developer - Guillaume Laforge (Pivotal)
Little words of wisdom for the developer - Guillaume Laforge (Pivotal)
 
Large scale, interactive ad-hoc queries over different datastores with Apache...
Large scale, interactive ad-hoc queries over different datastores with Apache...Large scale, interactive ad-hoc queries over different datastores with Apache...
Large scale, interactive ad-hoc queries over different datastores with Apache...
 
Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...
Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...
Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...
 
Practical Performance: Understand the Performance of Your Application - Chris...
Practical Performance: Understand the Performance of Your Application - Chris...Practical Performance: Understand the Performance of Your Application - Chris...
Practical Performance: Understand the Performance of Your Application - Chris...
 

Recently uploaded

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Recently uploaded (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Packed Objects: Fast Talking Java Meets Native Code - Steve Poole (IBM)

  • 1. Steve Poole IBM Fast Talking Java Meets Native Code
  • 2. Important Disclaimers THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY. WHILST EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. ALL PERFORMANCE DATA INCLUDED IN THIS PRESENTATION HAVE BEEN GATHERED IN A CONTROLLED ENVIRONMENT. YOUR OWN TEST RESULTS MAY VARY BASED ON HARDWARE, SOFTWARE OR INFRASTRUCTURE DIFFERENCES. ALL DATA INCLUDED IN THIS PRESENTATION ARE MEANT TO BE USED ONLY AS A GUIDE. IN ADDITION, THE INFORMATION CONTAINED IN THIS PRESENTATION IS BASED ON IBM’S CURRENT PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM, WITHOUT NOTICE. IBM AND ITS AFFILIATED COMPANIES SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION. NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, OR SHALL HAVE THE EFFECT OF: - CREATING ANY WARRANT OR REPRESENTATION FROM IBM, ITS AFFILIATED COMPANIES OR ITS OR THEIR SUPPLIERS AND/OR LICENSORS
  • 3. Steve Poole ! Works at IBM’s Hursley Laboratory in the UK Involved in IBM Java VM development since before Java was 1 Currently leading IBM’s OpenJDK technical engagement
  • 4. What this talk is about “Packed Objects” aka “Compact Off-Heap Structures in the Java Language” ! This technology is being developed to help address important pressures on Java ! This talk focuses on how to improve Java interop to Non Java applications
  • 5. You’ll learn “Compact Off-Heap Structures in the Java Language” 1. An overview of this technology 2. Why we need your input and support 3. How to get started with using this technology yourself
  • 6. Part 1 Native interoperability Why it’s so important C
  • 7. Interoperability - why is it important? Java is built on talking native ! Operating Systems Processor Architectures File Systems User interfaces Network Interfaces ! Java keeps the WORA monsters away ! !
  • 8. WORA - the components JDK Java code JVM JIT native Class Library Native code Your JNI code Your Java application
  • 9. 2013 - Not so Java-centric JVM JIT Class Library native Your Native code JDK Java code Your JNI code Your Java application
  • 10. 2013 - clusters and new processors non Java Runtime High speed memory channels (RDMA etc) Specialised Processors (GPUs etc)
  • 11. 2013 - Can we survive with JNI 1.1? JIT ? Other runtime JVM Class Library Your Native code JDK Java code Your JNI code Your Java application native High speed memory channels (RDMA etc) Specialised Processors (GPUs etc) ? ?
  • 12. 2013 - we can’t survive with JNI 1.1 • 1997 - JNI 1.1 • Designed for independence • Version independence • Platform Independence • VM Independence • Java at the centre of the world • Not performance focused
  • 13. Packed Objects to the rescue • What we need is • To be able to share data between Java and other runtimes with minimal overhead • To not require a Java centric data view • and share data off-heap too! • Can we do that? • Time for a demo.
  • 14. A simple demo • • Screensaver style Rectangles moved around the screen, bounce off the sides…
  • 15. A simple demo Draw 100 000 random sized rectangles using SDL ! Move them around the screen and get them to change direction if they hit the sides ! RGB colour elements ! typedef struct { int red,green,blue; float vx,vy; SDL_Rect rec; float x,y; ! } RECT; !15 position adjustment vectors SDL structure contains location , height and width float version of location - makes it easier to handle different h/w speeds
  • 16. A simple demo Draw 100 000 random sized rectangles using SDL ! Move them around the screen and get them to change direction if they hit the sides ! Initialise Per frame Update rectangle locations Draw rectangles with SDL terminate !16
  • 17. More than one demo Demo Standard - all C code calling the SDL graphics routines Mixed C and JNI. Java updates the location of each element Mixed C with PackedObjects Java updates the location of each element !17 Frames per second number of JNI calls per frame
  • 18. Demo 1 - all C Draw 100 000 random sized rectangles using SDL ! Move them around the screen and get them to change direction if they hit the sides ! Initialise Per frame Update rectangle locations Draw rectangles with SDL terminate !18
  • 19. Results Demo Standard - all C code calling the SDL graphics routines Mixed C and JNI. Java updates the location of each element Mixed C with PackedObjects Java updates the location of each element !19 Frames per second 20 number of JNI calls per frame 0
  • 20. Demo 2- Mixed JNI and C Draw 100 000 random sized rectangles using SDL ! Move them around the screen and get them to change direction if they hit the sides ! Initialise Per frame Update rectangle locations Draw rectangles with SDL terminate !20
  • 21. Results Demo Standard - all C code calling the SDL graphics routines Mixed C and JNI. Java updates the location of each element Mixed C with PackedObjects Java updates the location of each element !21 Frames per second 20 number of JNI calls per frame 0
  • 22. er frame) Results Demo Frames per second Standard - all C code calling the SDL graphics routines 20 Mixed C and JNI. Java updates the location of each element 11 number of JNI calls per frame 0 200000 (~4MB per frame) Mixed C with PackedObjects Java updates the location of each element 200 000 JNI calls per frame. Copying data, validating data everytime. AND ensuring there is no chance of optimization by the JIT. !22
  • 23. Demo 2- Details Draw 100 000 random sized rectangles using SDL ! Move them around the screen and get them to change direction if they hit the sides ! Initialise Per frame Update rectangle locations Draw rectangles with SDL terminate !23
  • 24. Demo 2- Details Draw 100 000 random sized rectangles using SDL ! Move them around the screen and get them to change direction if they hit the sides ! for every rectangle… C function calls Java method via JNI passes in x,y, vx and vy (by copy) Java method updates the rectangles new position Java native calls native method passing in new x,y, vx and vy values (by copy) C native method returns Java method returns C function returns !24
  • 25. Demo 3 - Packed Objects Draw 100 000 random sized rectangles using SDL ! Move them around the screen and get them to change direction if they hit the sides ! Initialise Per frame Update rectangle locations Draw rectangles with SDL terminate !25
  • 26. er frame) Results Demo Frames per second Standard - all C code calling the SDL graphics routines 20 Mixed C and JNI. Java updates the location of each element 11 Mixed C with PackedObjects Java updates the location of each element !26 number of JNI calls per frame 0 200000 (~4MB per frame)
  • 27. er frame) Results Demo Frames per second number of JNI calls per frame Standard - all C code calling the SDL graphics routines Mixed C and JNI. Java updates the location of each element 11 200000 (~4MB per frame) Mixed C with PackedObjects Java updates the location of each element !27 20 18 1 (4 bytes per frame) 0
  • 28. Demo 3 - Packed Objects Draw 100 000 random sized rectangles using SDL ! Move them around the screen and get them to change direction if they hit the sides ! Initialise Per frame Update rectangle locations Draw rectangles with SDL terminate !28
  • 29. Demo 3 - Packed Objects Draw 100 000 random sized rectangles using SDL ! Move them around the screen and get them to change direction if they hit the sides ! once per frame.. Java method updates each rectangle’s position directly ! } !29 for(Rectangle r: rectangles) { r.x=r.x+r.vx; r.y=r.y+r.vy; …
  • 30. Today Java only speaks Java • Getting data into and out of Java has always required some form of marshaling or serialization process ! • Interaction with native data structures in memory is particularly problematic • JNI is the slowest but safest – But you need good C / C++ knowledge • Unsafe and NIO are faster but more challenging to use – They both have their own programming ‘model’ • If the Java side is in control of storage layouts it’s easier • When mapping existing native structures it’s much, much, much more difficult ! • Ironically the JVM is completely aware of native data formats
  • 31. Tomorrow, with Packed Objects.. Java will let you reference data stored like this ! typedef struct { int red,green,blue; float vx,vy; SDL_Rect rec; float x,y; ! } RECT; C structure
  • 32. Tomorrow, with Packed Objects.. as if it looked like this ! ! typedef struct { public class Rectangle { ! int red,green,blue; float vx,vy; SDL_Rect rec; float x,y; ! int red,green,blue; float vx,xy; SDLRect rec; float x,y; ! } RECT; C structure } Java structure
  • 33. Tomorrow, with Packed Objects.. ! ! typedef struct { public class Rectangle { ! int red,green,blue; float vx,vy; SDL_Rect rec; float x,y; ! int red,green,blue; float vx,xy; SDLRect rec; float x,y; without copying ! } RECT; C structure } Java structure
  • 34. Tomorrow, with Packed Objects.. ! !! ! typedef struct { ! int red,green,blue; ! float vx,vy; ! SDL_Rect rec; ! float x,y; !! ! } RECT; ! ! ‘C’ runtime And off ! ! ! public class Rectangle { ! ! ! int red,green,blue; ! float vx,xy; ! heap SDLRect rec; ! float x,y; ! ! ! } ! ! Java heap
  • 35. Part 2 Under the covers http://www.flickr.com/photos/mwichary/
  • 36. Under the covers ! public class Rectangle { Let’s look at these classes from a JVM point of view.. ! int red,green,blue; float vx,xy; SDLRect rec; float x,y; ! } public class SDLRect { short x,y int width,height }
  • 37. Under the covers ! ! ! ! ! ! ! ! ! ! ! int red int green int blue float vx float vy SLDRect ptr float x float y Java heap ! public class Rectangle { ! short x short y int width int height int red,green,blue; float vx,xy; SDLRect rec; float x,y; ! } public class SDLRect { short x,y int width,height } Java structure !37 J
  • 38. ! ! ! ! ! ! ! ! ! ! ! Questions ! int red int green int blue float vx float vy SLDRect ptr float x float y Java heap !38 1 - How does a JVM ‘know’ the class of these objects? ! ! short x short y int width int height 2 - What are the data format rules for these types? ! ! 3 - When synchonizing on a object - where is the monitor stored?
  • 39. ! ! ! ! ! ! ! ! ! ! ! int red int green int blue float vx float vy SLDRect ptr float x float y Java heap !39 Answers class ptr monitor ! class ptr monitor short x short y int width int height 1 - How does a JVM ‘know’ the class of these objects? Additional internal ptr ! 2 - What are the data format rules for these types? JVM impl specific (including ordering) 3 - When synchonizing on a object - where is the monitor stored? Additional internal field
  • 40. How to add the metadata ! ! ! ! ! ! ! ! ! ! ! class ptr monitor int red int green int blue float vx float vy SLDRect ptr float x float y Java heap !40 class ptr monitor short x short y int width int height ! ! ! ! ! ! ! ! ! ! ! [4] red [4] green [4] blue [4] vx [4] vy [2] rect.x [2] rect.y [4] rect.width [4] rect.height [4] x [4] y ‘C’ runtime No space No space for the extra for the extra Java fields -Java fields what do we what do we do? do?
  • 41. Under the covers ! ! ! ! ! ! ! ! ! ! ! Java heap !41 ! ! ! ! ! ! ! ! ! ! ! public class Rectangle { [4] red [4] green [4] blue [4] vx [4] vy [2] rect.x [2] rect.y [4] rect.width [4] rect.height [4] x [4] y ‘C’ runtime ! int red,green,blue; float vx,xy; SDLRect rec; float x,y; } public class SDLRect { short x,y int width,height }
  • 42. Under the covers ! ! ! ! ! ! ! ! ! ! ! Java heap ! ! ! ! ! ! ! ! ! ! ! public class Rectangle { [4] red [4] green [4] blue [4] vx [4] vy [2] rect.x [2] rect.y [4] rect.width [4] rect.height [4] x [4] y ‘C’ runtime ! int red,green,blue; float vx,xy; SDLRect rec; float x,y; } public class SDLRect { short x,y int width,height } Rectangle r=PackedObject.newNativePackedObject(Rectangle.class,0x******); !42
  • 43. Under the covers ! ! ! ! ! ! ! ! ! ! ! class ptr monitor data ptr “r” Java heap !43 ! ! ! ! ! ! Constructor ! was not ! called! ! ! ! public class Rectangle { [4] red [4] green [4] blue [4] vx [4] vy [2] rect.x [2] rect.y [4] rect.width [4] rect.height [4] x [4] y ‘C’ runtime ! int red,green,blue; float vx,xy; SDLRect rec; float x,y; } public class SDLRect { short x,y int width,height }
  • 44. Rectangle r=PackedObject.newNativePackedObject(Rectangle.class,0x******); Under the covers ! ! ! ! ! ! ! ! ! ! ! class ptr monitor data ptr “r” Java heap SDLRect s=r.rect; ! !44 ! ! ! ! ! ! ! ! ! ! ! public class Rectangle { [4] red [4] green [4] blue [4] vx [4] vy [2] rect.x [2] rect.y [4] rect.width [4] rect.height [4] x [4] y ‘C’ runtime ! int red,green,blue; float vx,xy; SDLRect rec; float x,y; } public class SDLRect { short x,y int width,height }
  • 45. Rectangle r=PackedObject.newNativePackedObject(Rectangle.class,0x******); Under the covers ! ! ! ! ! ! ! ! ! ! ! class ptr monitor data ptr “r” “s” class ptr monitor data ptr Java heap SDLRect s=r.rect; ! !45 ! ! ! ! ! ! ! ! ! ! ! public class Rectangle { [4] red [4] green [4] blue [4] vx [4] vy [2] rect.x [2] rect.y [4] rect.width [4] rect.height [4] x [4] y ‘C’ runtime ! int red,green,blue; float vx,xy; SDLRect rec; float x,y; } public class SDLRect { short x,y int width,height }
  • 46. Rectangle r=PackedObject.newNativePackedObject(Rectangle.class,0x******); Under the covers ! ! ! ! ! ! ! ! ! ! ! class ptr monitor data ptr “r” “s” class ptr monitor data ptr Java heap SDLRect s=r.rect; SDLRect t=r.rect; !46 ! ! ! ! ! ! ! ! ! ! ! public class Rectangle { [4] red [4] green [4] blue [4] vx [4] vy [2] rect.x [2] rect.y [4] rect.width [4] rect.height [4] x [4] y ‘C’ runtime ! int red,green,blue; float vx,xy; SDLRect rec; float x,y; } public class SDLRect { short x,y int width,height }
  • 47. Rectangle r=PackedObject.newNativePackedObject(Rectangle.class,0x******); Under the covers ! ! ! ! ! ! ! ! ! ! ! class ptr monitor data ptr “r” “s” class ptr monitor data ptr “t” class ptr monitor data ptr Java heap SDLRect s=r.rect; SDLRect t=r.rect; !47 ! ! ! ! ! ! ! ! ! ! ! public class Rectangle { [4] red [4] green [4] blue [4] vx [4] vy [2] rect.x [2] rect.y [4] rect.width [4] rect.height [4] x [4] y ‘C’ runtime ! int red,green,blue; float vx,xy; SDLRect rec; float x,y; } public class SDLRect { short x,y int width,height }
  • 48. Part 3 Truth and Consequences
  • 49. Design considerations • Off heap Packed Objects are considered to already exist so constructors are not called. • Since there is limited opportunity to store the vital metadata it is constructed when needed. • The assumption is that creating new objects when accessing embedded data is confusing and dangerous. • How does ‘==‘ work? • What about synchronization? • The idea of ‘identityless’ objects is being discussed. • Something that PackedObjects has in common with ValueTypes • Could you handle Objects of this style?
  • 50. The way forward? • This approach offers Java a way forward in the multi environment world • Almost zero cost data interop will benefit Java when exploiting new processors and memory systems. • There are additional use cases that ‘fall out’ from this design. • Low cost r/w of files • Instant application startup • Basic unmanaged memory capabilities • Under the covers heap usage benefits through better control for ‘locality of reference’
  • 51. Is this the right or only way? • IBM and Oracle have been discussing these sorts of concepts for some time • We need your input. How important are these use cases to you? What’s missing, not needed? What do you hate? • We are trying to keep clear of syntax discussions at this point - it’s too early and just distracting.
  • 52. You too can use Packed Objects • Google for “IBM Java 8 Beta”
  • 53. Hard hats must be worn… The current prototype implementation surfaces a lot of the internals that will eventually just disappear This approach makes it easier for us to quickly revise the design but means users of the prototype have to work harder. ! AND ! it avoids syntax wars :-) picture courtesy http://www.flickr.com/people/karen_od/
  • 54. Wrap up -hopefully you now: “Compact Off-Heap Structures in the Java Language” 1. Have a basic understanding of this technology 2. Know why we need your input and support 3. Know how to get started with using this technology Thank You