Skip to main content

Automatic Prefetching by Traversal Profiling in Object Persistence Architectures

  • Conference paper

Part of the Lecture Notes in Computer Science book series (LNCS,volume 4067)

Abstract

Object persistence architectures support transparent access to persistent objects. For efficiency, many of these architectures support queries that can prefetch associated objects as part of the query result. While specifying prefetch manually in a query can significantly improve performance, correct prefetch specifications are difficult to determine and maintain, especially in modular programs. Incorrect prefetching is difficult to detect, because prefetch is only an optimization hint. This paper presents AutoFetch, a technique for automatically generating prefetch specifications using traversal profiling in object persistence architectures. AutoFetch generates prefetch specifications based on previous executions of similar queries. In contrast to previous work, AutoFetch can fetch arbitrary traversal patterns and can execute the optimal number of queries. AutoFetch has been implemented as an extension of Hibernate. We demonstrate that AutoFetch improves performance of traversals in the OO7 benchmark and can automatically predict prefetches that are equivalent to hand-coded queries, while supporting more modular program designs.

Keywords

  • Query Result
  • Related Object
  • Access Pattern
  • Query Execution
  • Type Graph

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

This work was supported by the National Science Foundation under Grant No. 0448128.

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (Canada)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Atkinson, M.P., Buneman, O.P.: Types and persistence in database programming languages. ACM Comput. Surv. 19(2), 105–170 (1987)

    CrossRef  Google Scholar 

  2. Atkinson, M.P., Daynes, L., Jordan, M.J., Printezis, T., Spence, S.: An orthogonally persistent Java. SIGMOD Record 25(4), 68–75 (1996)

    CrossRef  Google Scholar 

  3. Ball, T., Larus, J.R.: Efficient path profiling. In: International Symposium on Microarchitecture, pp. 46–57 (1996)

    Google Scholar 

  4. Bernstein, P.A., Pal, S., Shutt, D.: Context-based prefetch for implementing objects on relations. In: Proceedings of the 25th VLDB Conference (1999)

    Google Scholar 

  5. Carey, M.J., DeWitt, D.J., Naughton, J.F.: The 007 benchmark. SIGMOD Rec. 22(2), 12–21 (1993)

    CrossRef  Google Scholar 

  6. Cengija, D.: Hibernate your data. onJava.com (2004)

    Google Scholar 

  7. Cook, W.R., Rai, S.: Safe query objects: statically typed objects as remotely executable queries. In: ICSE 2005: Proceedings of the 27th international conference on Software engineering, pp. 97–106. ACM Press, New York (2005)

    CrossRef  Google Scholar 

  8. Copeland, G., Maier, D.: Making Smalltalk a database system. In: Proceedings of the 1984 ACM SIGMOD international conference on Management of data, pp. 316–325. ACM Press, New York (1984)

    CrossRef  Google Scholar 

  9. Curewitz, K.M., Krishnan, P., Vitter, J.S.: Practical prefetching via data compression. In: Proceedings of the 1993 ACM SIGMOD International Conference on Management of Data (SIGMOD 1993) (1993)

    Google Scholar 

  10. Dub, J.-A., Sapir, R., Purich, P.: Oracle Application Server TopLink application developer’s guide, 10g (9.0.4). Oracle Corporation (2003)

    Google Scholar 

  11. Fisher, J.A., Freudenberger, S.M.: Predicting conditional branch directions from previous runs of a program. In: ASPLOS-V: Proceedings of the fifth international conference on Architectural support for programming languages and operating systems, pp. 85–95. ACM Press, New York (1992)

    CrossRef  Google Scholar 

  12. Hamilton, G., Cattell, R.: JDBCTM: A Java SQL API. Sun Microsystems (1997)

    Google Scholar 

  13. Han, W.-S., Moon, Y.-S., Whang, K.-Y.: PrefetchGuide: capturing navigational access patterns for prefetching in client/server object-oriented/object-relational DBMSs. Information Sciences 152(1), 47–61 (2003)

    CrossRef  Google Scholar 

  14. Han, W.-S., Moon, Y.-S., Whang, K.-Y., Song, I.-Y.: Prefetching based on type-level access pattern in object-relational DBMSs. In: Proceedings of the 17th International Conference on Data Engineering, pp. 651–660. IEEE Computer Society Press, Los Alamitos (2001)

    Google Scholar 

  15. ISO/IEC. Information technology - database languages - SQL - part 3: Call-level interface (SQL/CLI). Technical Report 9075-3:2003, ISO/IEC (2003)

    Google Scholar 

  16. Knafla, N.: Analysing object relationships to predict page access for prefetching. In: Eighth International Workshop on Persistent Object Systems: Design, Implementation and Use, POS-8 (1998)

    Google Scholar 

  17. Lamb, C., Landis, G., Orenstein, J.A., Weinreb, D.: The ObjectStore database system. Commun. ACM 34(10), 50–63 (1991)

    CrossRef  Google Scholar 

  18. Lieberherr, K.J., Patt-Shamir, B., Orleans, D.: Traversals of object structures: Specification and efficient implementation. ACM Trans. Program. Lang. Syst. 26(2), 370–412 (2004)

    CrossRef  Google Scholar 

  19. Liskov, B., Adya, A., Castro, M., Ghemawat, S., Gruber, R., Maheshwari, U., Myers, A.C., Day, M., Shrira, L.: Safe and efficient sharing of persistent objects in Thor. In: Proceedings of the 1996 ACM SIGMOD international conference on Management of data, pp. 318–329. ACM Press, New York (1996)

    CrossRef  Google Scholar 

  20. Luk, C.-K., Mowry, T.C.: Compiler-based prefetching for recursive data structures. Architectural Support for Programming Languages and Operating Systems, 222–233 (1996)

    Google Scholar 

  21. Maier, D., Stein, J., Otis, A., Purdy, A.: Developments of an object-oriented DBMS. In: Proc. of ACM Conf. on Object-Oriented Programming, Systems, Languages and Applications, pp. 472–482 (1986)

    Google Scholar 

  22. Marquez, A., Blackburn, S., Mercer, G., Zigman, J.N.: Implementing orthogonally persistent Java. In: Proceedings of the Workshop on Persistent Object Systems (POS) (2000)

    Google Scholar 

  23. Martin, B.E.: Uncovering database access optimizations in the middle tier with TORPEDO. In: Proceedings of the 21st International Conference on Data Engineering, pp. 916–926. IEEE Computer Society Press, Los Alamitos (2005)

    Google Scholar 

  24. Matena, V., Hapner, M.: Enterprise Java Beans Specification 1.0. Sun Microsystems (1998)

    Google Scholar 

  25. Morrison, R., Connor, R., Kirby, G., Munro, D., Atkinson, M., Cutts, Q., Brown, A., Dearle, A.: The Napier88 persistent programming language and environment. In: Fully Integrated Data Environments, pp. 98–154. Springer, Heidelberg (1999)

    Google Scholar 

  26. Palmer, M., Zdonik, S.B.: Fido: A cache that learns to fetch. In: Proceedings of the 17th International Conference on Very Large Data Bases (1991)

    Google Scholar 

  27. Patterson, D.A.: Latency lags bandwith. Commun. ACM 47(10), 71–75 (2004)

    CrossRef  MathSciNet  Google Scholar 

  28. Russell, C.: Java Data Objects (JDO) Specification JSR-12. Sun Microsystems (2003)

    Google Scholar 

  29. Raible’s wiki: StrutsResume (March 2006), http://raibledesigns.com/wiki/Wiki.jsp?page=StrutsResume

  30. Venkatrao, M., Pizzo, M.: SQL/CLI – a new binding style for SQL. SIGMOD Record 24(4), 72–77 (1995)

    CrossRef  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Ibrahim, A., Cook, W.R. (2006). Automatic Prefetching by Traversal Profiling in Object Persistence Architectures. In: Thomas, D. (eds) ECOOP 2006 – Object-Oriented Programming. ECOOP 2006. Lecture Notes in Computer Science, vol 4067. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11785477_4

Download citation

  • DOI: https://doi.org/10.1007/11785477_4

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-35726-1

  • Online ISBN: 978-3-540-35727-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics