Optimising Java RMI Programs by Communication Restructuring

  • Kwok Cheung Yeung
  • Paul H. J. Kelly
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2672)

Abstract

We present an automated run-time optimisation framework that can improve the performance of distributed applications written using Java RMI whilst preserving its semantics. Java classes are modified at load-time in order to intercept RMI calls as they occur. RMI calls are not executed immediately, but are delayed for as long as possible. When a dependence forces execution of the delayed calls, the aggregated calls are sent over to the remote server to be executed in one step. This reduces network overhead and the quantity of data sent, since data can be shared between calls. The sequence of calls may be cached on the server side along with any known constants in order to speed up future calls. A remote server may also make RMI calls to another remote server on behalf of the client if necessary. Our results show that the techniques can speed up distributed programs signicantly, especially when operating across slower networks. We also discuss some of the challenges involved in maintaining program semantics, and show how the approach can be used for more ambitious optimisations in the future.

References

  1. 1.
    Paulo Sérgio Almeida. Balloon types: Controlling sharing of state in data types. In Proceedings of ECOOP’ 97, volume 1241 of Lecture Notes in Computer Science, pages 32–59. Springer, June 1997.Google Scholar
  2. 2.
    Phillip Bogle and Barbara Liskov. Reducing cross domain call overhead using batched futures. In Conference on Object-Oriented Programming Systems, Languages, and Applications,pages 341–354, Portland OR (USA), 1994.Google Scholar
  3. 3.
    R. Christ, S. L. Halter, K. Lynne, S. Meizer, S. J. Munroe, and M. Pasch. San Francisco performance: A case study in performance of large-scale Java applications. IBM Systems Journal, 39(1), 2000.Google Scholar
  4. 4.
    Markus Dahm. Byte code engineering library manual. Available from http://jakarta.apache.org/bcel/manual.html.
  5. 5.
    John Eberhard and Anand Tripathi. Efficient object caching for distributed Java RMI applications. In Middleware 2001, Proceedings, volume 2218 of Lecture Notes in Computer Science, pages 15–35. Springer, November 2001.CrossRefGoogle Scholar
  6. 6.
    David Flanagan. Java Examples in a Nutshell. O’Reilly UK, 2000.Google Scholar
  7. 7.
    Aniruddha Gokhale and Douglas C. Schmidt. Principles for optimizing CORBA internet inter-ORB protocol performance. In 31th Hawaii International Conference on System Sciences, January 1998.Google Scholar
  8. 8.
    J. Gosling, B. Joy, G. Steele, and G. Bracha. The Java Language SpecificationSecond Edition. Addison-Wesley, 2000.Google Scholar
  9. 9.
    Object Management Group. The Common Object Request Broker: Architecture and specification v2.4.2, February 2001.Google Scholar
  10. 10.
    Vijaykumar Krishnaswamy, Dan Walther, Sumeer Bhola, Ethendranath Bommaiah, George Riley, Brad Topol, and Mustaque Ahamad. Efficient implementations of Java remote method invocation (RMI). In Proc. of the 4th USENIX Conference on ObjectOriented Technologies and Systems (COOTS’98), 1998., pages 19–36, 1998.Google Scholar
  11. 11.
    Barbara Liskov and Liuba Shrira. Promises: Linguistic support for efficient asynchronous procedure calls in distributed systems. In Proceedings of the SIGPLAN’88 conference on Programming Language Design and Implementation, pages 260–267, 1988.Google Scholar
  12. 12.
    Sun Microsystems. RMI specification, available at http://java.sun.com/products/jdk/rmi/.
  13. 13.
    Christian Nester, Michael Phillippsen, and Bernhard Haumacher. A more efficient RMI for Java. In ACM 1999 Java Grande Conference, pages 152–159, June 1999.Google Scholar
  14. 14.
    Michael Philippsen, Bernhard Haumacher, and Christian Nester. More efficient serialization and RMI for Java. Concurrency: Practice and Experience, 12(7): 495–518, 2000.MATHCrossRefGoogle Scholar
  15. 15.
    R. Raje, J. William, and M. Boyles. An Asynchronous Remote Method Invocation (ARMI) mechanism for Java. Concurrency: Practice and Experience, November 1997.Google Scholar
  16. 16.
    Raja Vallee-Rai, Phong Co, Etienne Gagnon, Laurie Hendren, Patrick Lam, and Vijay Sundaresan. Soot-a Java bytecode optimization framework. In Proceedings of CASCON’ 99, pages 125–135, 1999.Google Scholar
  17. 17.
    John Whaley and Martin Rinard. Compositional pointer and escape analysis for Java programs. In Proceedings of the 14th Annual Conference on Object-Oriented Programming Systems, Languages and Applications, volume 34 of ACM SIGPLAN Notices, pages 187–206, November 1999.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Kwok Cheung Yeung
    • 1
  • Paul H. J. Kelly
    • 1
  1. 1.Department of ComputingImperial CollegeLondonUK

Personalised recommendations