Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/DesignDocs/221546"

(New page: <div style="margin:5px;float:right;border:1px solid #000000;padding:5px">__TOC__</div> = Design Specification: Performance and Concurrency = [http://bugs.eclipse.org/221546 ER 221546] = ...)
 
Line 13: Line 13:
 
| 2008-03-05
 
| 2008-03-05
 
| James
 
| James
| 0.1 Draft
+
| 0.1
 +
| Draft
 
|}
 
|}
  
 
= Project overview =
 
= Project overview =
  
Overview of the project/featureWhy is it desired, what are its goals.
+
This project groups several smaller performance related bug fixes and enhancements into a single unitIts' goal is the improve the performance, concurrency and scalability of the product.
 
+
Goals:
+
* goal 1
+
* goal 2
+
  
 
= Concepts =
 
= Concepts =
  
Present any concepts relevant to the feature.
+
Performance is concerned about reducing CPU usage and finding more optimal methods of processing operations.
 +
 
 +
Concurrency is concerned with reducing contention and improving multi-threaded and multi-CPU performance.
 +
 
 +
Scalability is concerned with clustering, large workloads and data.
  
 
= Requirements =
 
= Requirements =
  
The following sections will expand the goals of this project into more concrete requirements.
+
There are no specific requirements for this project; the only real requirement is to ensure that our product remains the leading high-performance persistence solution.  Areas of improvement are determined through performance comparison with other persistence products and benchmarking.
 +
 
 +
= Design Constraints =
 +
The goal of the project is to improve performance of common usage patterns.  Fringe features and usage patterns will not be specifically targeted unless found to be highly deficient.
  
 
= Functionality =
 
= Functionality =
 +
Each specific performance improvement is discussed seperately below.
  
= Design Constraints =
+
=== EntityManager.getReference() Proxies ===
 +
====Requirement====
 +
The JPA spec provides a find() and a getReference(), find should query the database for the instance, getReference should return a "proxy" stand-in for the object.  Currently getReference() does a find(), it should instead return a proxy.  This will significantly improve the performance of the operation.  The main usage of this API is to allow an object to be inserted/updated with references to other objects, without requiring to read those objects.
 +
====Design====
 +
Fetch groups will be used to build an unfetched proxy.  A new instance will be create, its' primary key set and given a fetch-group composed of its' primary key attributes.  It will be registered with the UnitOfWork.
 +
====Testing====
 +
* getReference() without weaving
 +
* getReference() outside a transaction
 +
* getReference() and access to a get method
 +
* getReference() and update to a set method
 +
* getReference() used in an update of another object
 +
* getReference() used in an insert of another object
  
= Maintainability =
+
= Testing =
 +
Both the existing performance and concurrency tests and pubic benchmarks will be used to monitor and evaluate performance improvements.
  
= GUI =
+
= API =
  
 
= Config files =
 
= Config files =
 +
 +
= GUI =
  
 
= Documentation =
 
= Documentation =
 +
* Document that EntityManager.getReference() now returns a proxy (unfetched) instance, and subsequent access may trigger an ObjectNotFoundException if the object does not exist.  Document that fetch-group weaving must enabled (the default when weaving) to allow getReference() to return a proxy, otherwise it does a find().
  
 
= Open Issues=
 
= Open Issues=
 
This section lists the open issues that are still pending that must be decided prior to fully implementing this project's requirements.
 
  
 
{|{{BMTableStyle}}
 
{|{{BMTableStyle}}
Line 60: Line 78:
  
 
= Decisions =
 
= Decisions =
 
This section lists decisions made. These are intended to document the resolution of open issues or constraints added to the project that are important.
 
  
 
{|{{BMTableStyle}}
 
{|{{BMTableStyle}}
Line 69: Line 85:
 
! Decision
 
! Decision
 
|-  
 
|-  
|
+
| 1
|
+
| getReference()
|
+
| Use fetch-groups to create a proxy.
 
|}
 
|}
  
 
= Future Considerations =
 
= Future Considerations =
 
+
Continually improve performance.
During the research for this project the following items were identified as out of scope but are captured here as potential future enhancements. If agreed upon during the review process these should be logged in the bug system.
+

Revision as of 15:25, 5 March 2008

Design Specification: Performance and Concurrency

ER 221546

Document History

Date Author Version Description & Notes
2008-03-05 James 0.1 Draft

Project overview

This project groups several smaller performance related bug fixes and enhancements into a single unit. Its' goal is the improve the performance, concurrency and scalability of the product.

Concepts

Performance is concerned about reducing CPU usage and finding more optimal methods of processing operations.

Concurrency is concerned with reducing contention and improving multi-threaded and multi-CPU performance.

Scalability is concerned with clustering, large workloads and data.

Requirements

There are no specific requirements for this project; the only real requirement is to ensure that our product remains the leading high-performance persistence solution. Areas of improvement are determined through performance comparison with other persistence products and benchmarking.

Design Constraints

The goal of the project is to improve performance of common usage patterns. Fringe features and usage patterns will not be specifically targeted unless found to be highly deficient.

Functionality

Each specific performance improvement is discussed seperately below.

EntityManager.getReference() Proxies

Requirement

The JPA spec provides a find() and a getReference(), find should query the database for the instance, getReference should return a "proxy" stand-in for the object. Currently getReference() does a find(), it should instead return a proxy. This will significantly improve the performance of the operation. The main usage of this API is to allow an object to be inserted/updated with references to other objects, without requiring to read those objects.

Design

Fetch groups will be used to build an unfetched proxy. A new instance will be create, its' primary key set and given a fetch-group composed of its' primary key attributes. It will be registered with the UnitOfWork.

Testing

  • getReference() without weaving
  • getReference() outside a transaction
  • getReference() and access to a get method
  • getReference() and update to a set method
  • getReference() used in an update of another object
  • getReference() used in an insert of another object

Testing

Both the existing performance and concurrency tests and pubic benchmarks will be used to monitor and evaluate performance improvements.

API

Config files

GUI

Documentation

  • Document that EntityManager.getReference() now returns a proxy (unfetched) instance, and subsequent access may trigger an ObjectNotFoundException if the object does not exist. Document that fetch-group weaving must enabled (the default when weaving) to allow getReference() to return a proxy, otherwise it does a find().

Open Issues

Issue # Owner Description / Notes

Decisions

Issue # Description / Notes Decision
1 getReference() Use fetch-groups to create a proxy.

Future Considerations

Continually improve performance.

Back to the top