JPA Performance Myths -- JavaOne 2013
Upcoming SlideShare
Loading in...5
×
 

JPA Performance Myths -- JavaOne 2013

on

  • 1,178 views

Every few months, another Joe (or Jane) Shmoe decides it’s time to write an agenda-driven blog post (or presentation for a conference) that shows why a particular flavor of JPA blows all the other ...

Every few months, another Joe (or Jane) Shmoe decides it’s time to write an agenda-driven blog post (or presentation for a conference) that shows why a particular flavor of JPA blows all the other competitors out of the water. This session shows that, when properly used/tuned, the JPA implementations from the major providers (EclipseLink, Hibernate, and OpenJPA) all perform nearly the same.

Statistics

Views

Total Views
1,178
Views on SlideShare
1,178
Embed Views
0

Actions

Likes
1
Downloads
21
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

JPA Performance Myths -- JavaOne 2013 JPA Performance Myths -- JavaOne 2013 Presentation Transcript

  • © 2013 IBM Corporation Rick Curtis – Staff Software Engineer 29 September 2013 JPA Performance Myths Session ID : BOF4454
  • © 2013 IBM Corporation 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 2
  • © 2013 IBM Corporation Introduction to the speaker – Rick Curtis  Have been working in the industry for over 7 years  Committer and PMC member for the Apache OpenJPA project.  Heavily focused on performance of JPA when running inside of WebSphere Application Server. Contact info : rgcurtis@us.ibm.com  Visit the IBM booth #5112 and meet other IBM developers at JavaOne 2013 3
  • © 2013 IBM Corporation Agenda 4  Evangelism  The crux  Who wants to go fast?  Getting dirty  Outliers  TL;DL  Questions
  • © 2013 IBM Corporation Evangelism 5  Fastest JPA implementation on [the face of the Earth | ever | etc]!  Is 10x faster than other JPA solutions  Provider [x] is much [faster, scalable, etc, etc] than [y]  Anything that is claiming a new world record  General fanboy presentations Always view these with some amount of skepticism.
  • © 2013 IBM Corporation The crux 6  Lots of configuration options  Different default values  Spec compliant, yet differences in behavior
  • © 2013 IBM Corporation Who wants to go fast? 7  Depending on the provider, configure weaving  Pooling – EntityManagers, EntityManagerFactories, connections  Caching – Data cache, object cache, ReadOnly cache, query cache, sql cache, caching connections  Proper mapping / JPA usage – Developers must have some relational database knowledge – Only load the required data – Minimize database trips – Entity Graph API
  • © 2013 IBM Corporation Getting dirty 8  Understand your application inside and out  Use an SQL profiling tool to gather every SQL statement that comes from your application, and understand where each one comes from. – OpenJPA SQL Profiler – EclipseLink Profiler – Numerous commercial Hibernate tools – jdbcGrabber – google code
  • © 2013 IBM Corporation Getting dirty 9  Understand your application inside and out  Use an SQL profiling tool to gather every SQL statement that comes from your application, and understand where each one comes from.
  • © 2013 IBM Corporation Getting dirty 10  Understand your application inside and out  Use an SQL profiling tool to gather every SQL statement that comes from your application, and understand where each one comes from. – OpenJPA SQL Profiler – EclipseLink Profiler – Reference Hibernate tool – jdbcGrabber -- google  Once you are able to identify where every query comes from, then you can start to figure out where caching makes the most sense.  Break an application down into small use cases to try to optimize
  • © 2013 IBM Corporation TL;DL 11  A benchmark is a benchmark and unless your application is a benchmark, your mileage may vary  Thorough understand of an application will go many more miles than switching JPA providers.  Enabling intelligent caching in your application will show the most dramatic performance improvements  Think of the database as your enemy, you don’t want to talk to him unless you must.  If performance is your #1, #2, and #3 concern, use JDBC.
  • © 2013 IBM Corporation Help wanted 12  JPA 2.1 Roadmap -- http://openjpa.apache.org/jpa-2.1-roadmap.html  JPA 2.1 Tasks -- http://openjpa.apache.org/jpa-2.1-tasks.html
  • © 2013 IBM Corporation Questions ? 13 http://ibm.co/JavaOne2013