AutoFetch
Encyclopedia
AutoFetch is a mechanism for automatically tuning object-relational mapping
Object-relational mapping
Object-relational mapping in computer software is a programming technique for converting data between incompatible type systems in object-oriented programming languages. This creates, in effect, a "virtual object database" that can be used from within the programming language...

 queries.

Ali Ibrahim and William Cook at the University of Texas developed the idea of "AutoFetch" including an implementation for Hibernate and followed later by an implementation in Ebean
Ebean
Ebean is an object-relational mapping product written in Java. It is designed to be simpler to use and understand than JPA or JDO products.- Simple API :...

.

Improving the modularity of application code

AutoFetch uses the program state (typically the Call Stack) to classify queries.
This means that AutoFetch can tune the same query depending on HOW it was called.

For example, a Data Access API such as findCustomer(int customerId) can be tuned differently depending on the callers of the method.

Reducing the development and maintenance burden from Developers

Because AutoFetch automatically gathers the profiling information developers do not need to manually try and gather this information and apply performance optimizations to the code.

AutoFetch can monitor the object graph usage so that if the usage changes the tuning of the query can change to suit. This reduces the code maintenance issues for developers and maintains optimal performance as usage changes over time.

How it works

AutoFetch collects object graph usage when queries are executed. It collects the 'profile' information which is later used to automatically tune the query on subsequent executions. The ORM query is tuned by determining and automatically adding the correct prefetch directives for each query.

This improves the performance of the application by reducing "lazy loading". For ORMs that support partial objects AutoFetch can also tune the query by just including the properties that the application uses rather than all properties.

Future directions

AutoFetch profiling can also be used to select optimal query strategies such as "array fetching" where object graph use is known to be uneven (typically weighted to the first object graphs in a list).

This could lead to much more efficient and higher performing object graph traversal than is currently possible with current techniques employed by ORM tools.

External links

  • http://www.cs.utexas.edu/~aibrahim/autofetch/
  • http://sourceforge.net/projects/autofetch/
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK