skip to main content
10.1145/2166929.2166937acmconferencesArticle/Chapter ViewAbstractPublication PagesiwstConference Proceedingsconference-collections
research-article

Efficient proxies in Smalltalk

Published:23 August 2011Publication History

ABSTRACT

A proxy object is a surrogate or placeholder that controls access to another target object. Proxy objects are a widely used solution for different scenarios such as remote method invocation, future objects, behavioral reflection, object databases, inter-languages communications and bindings, access control, lazy or parallel evaluation, security, among others.

Most proxy implementations support proxies for regular objects but they are unable to create proxies for classes or methods. Proxies can be complex to install, have a significant overhead, be limited to certain type of classes, etc. Moreover, most proxy implementations are not stratified at all and there is no separation between proxies and handlers.

In this paper, we present Ghost, a uniform, light-weight and stratified general purpose proxy model and its Smalltalk implementation. Ghost supports proxies for classes or methods. When a proxy takes the place of a class it intercepts both, messages received by the class and lookup of methods for messages received by instances. Similarly, if a proxy takes the place of a method, then the method execution is intercepted too.

References

  1. J.-B. Arnaud, M. Denker, S. Ducasse, D. Pollet, A. Bergel, and M. Suen. Read-only execution for dynamic languages. In Proceedings of the 48th International Conference Objects, Models, Components, Patterns (TOOLS-Europe'10), Malaga, Spain, June 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. T. Barrett. Dynamic proxies in Java and .NET. Dr. Dobb's Journal of Software Tools, 28(7):18, 20, 22, 24, 26, July 2003.Google ScholarGoogle Scholar
  3. J. K. Bennett. The design and implementation of distributed Smalltalk. In Proceedings OOPSLA '87, ACM SIGPLAN Notices, volume 22, pages 318--330, Dec. 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. A. P. Black, S. Ducasse, O. Nierstrasz, D. Pollet, D. Cassou, and M. Denker. Pharo by Example. Square Bracket Associates, 2009.Google ScholarGoogle Scholar
  5. G. Bracha and D. Ungar. Mirrors: design principles for metalevel facilities of object-oriented programming languages. In Proceedings of the International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA'04), ACM SIGPLAN Notices, pages 331--344, New York, NY, USA, 2004. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. J. Brant, B. Foote, R. Johnson, and D. Roberts. Wrappers to the rescue. In Proceedings European Conference on Object Oriented Programming (ECOOP'98), volume 1445 of LNCS, pages 396--417. Springer-Verlag, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. P. Butterworth, A. Otis, and J. Stein. The GemStone object database management system. Commun. ACM, 34(10):64--77, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Castle dynamicproxy library. http://www.castleproject.org/dynamicproxy/index.html.Google ScholarGoogle Scholar
  9. cglib code generation library. http://cglib.sourceforge.net.Google ScholarGoogle Scholar
  10. S. Ducasse. Evaluating message passing control techniques in Smalltalk. Journal of Object-Oriented Programming (JOOP), 12(6):39--44, June 1999.Google ScholarGoogle Scholar
  11. P. Eugster. Uniform proxies for java. In Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, OOPSLA '06, pages 139--152, New York, NY, USA, 2006. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. E. Gamma, R. Helm, J. Vlissides, and R. E. Johnson. Design patterns: Abstraction and reuse of object-oriented design. In O. Nierstrasz, editor, Proceedings ECOOP '93, volume 707 of LNCS, pages 406--431, Kaiserslautern, Germany, July 1993. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Y. Hassoun, R. Johnson, and S. Counsell. Applications of dynamic proxies in distributed environments. Software Practice and Experience, 35(1):75--99, Jan. 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Oracle. java dynamic proxies. the java platform 1.5 api specification. hhttp://download.oracle.com/javase/1.5.0/docs/api/java/lang/reflect/Proxy.html.Google ScholarGoogle Scholar
  15. G. Kiczales, J. des Rivières, and D. G. Bobrow. The Art of the Metaobject Protocol. MIT Press, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. G. Kiczales, J. Lamping, A. Mendhekar, C. Maeda, C. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-Oriented Programming. In M. Aksit and S. Matsuoka, editors, Proceedings ECOOP '97, volume 1241 of LNCS, pages 220--242, Jyvaskyla, Finland, June 1997. Springer-Verlag.Google ScholarGoogle Scholar
  17. R. Koster and T. Kramp. Loadable smart proxies and native-code shipping for CORBA. In C. Linnhoff-Popien and H.-G. Hegering, editors, USM, volume 1890 of Lecture Notes in Computer Science, pages 202--213. Springer, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Linfu proxies framework. http://www.codeproject.com/KB/cs/LinFuPart1.aspx.Google ScholarGoogle Scholar
  19. P. Lipton. Java proxies for database objects. http://www.drdobbs.com/windows/184410934, 1999.Google ScholarGoogle Scholar
  20. P. L. McCullough. Transparent forwarding: First steps. In Proceedings OOPSLA '87, ACM SIGPLAN Notices, volume 22, pages 331--341, Dec. 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Apple. developer library documentation. http://developer.apple.com/library/ios/#documentation/cocoa/reference/foundation/Classes/NSProxy_Class/Reference/Reference.html.Google ScholarGoogle Scholar
  22. G. A. Pascoe. Encapsulators: A new software paradigm in Smalltalk-80. In Proceedings OOPSLA '86, ACM SIGPLAN Notices, volume 21, pages 341--346, Nov. 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. P. Pratikakis, J. Spacco, and M. Hicks. Transparent proxies for java futures. In OOPSLA '04: Proceedings of the 19th annual ACM SIGPLAN Conference on Object-oriented programming, systems, languages, and applications, pages 206--223, New York, NY, USA, 2004. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. N. Santos, P. Marques, and L. Silva. A framework for smart proxies and interceptors in RMI, 2002.Google ScholarGoogle Scholar
  25. M. Shapiro. Structure and encapsulation in distributed systems: The proxy principle. In Proceedings of the 6th International Conference on Distributed Computing Systems (ICDCS), pages 198--205, Washington, DC, 1986. IEEE Computer Society.Google ScholarGoogle Scholar
  26. T. Thai and H. Q. Lam. .NET framework essentials/T. thai, H.Q. lam., 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. T. Van Cutsem and M. S. Miller. Proxies: design principles for robust object-oriented intercession apis. SIGPLAN Not., 45:59--72, oct 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. N. Wang, K. Parameswaran, D. Schmidt, and O. Othman. The design and performance of Meta-Programming mechanisms for object request broker middleware. In Proceedings of the 6th USENIX Conference on Object-Oriented Technologies and Systems (COOTS-01), pages 103--118, Berkeley, California, 2001. USENIX Association. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. I. Welch and R. Stroud. Dalang - A reflective extension for java, Feb. 1999.Google ScholarGoogle Scholar

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in
  • Published in

    cover image ACM Conferences
    IWST '11: Proceedings of the International Workshop on Smalltalk Technologies
    August 2011
    112 pages
    ISBN:9781450310505
    DOI:10.1145/2166929

    Copyright © 2011 ACM

    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 23 August 2011

    Permissions

    Request permissions about this article.

    Request Permissions

    Check for updates

    Qualifiers

    • research-article

    Acceptance Rates

    Overall Acceptance Rate25of27submissions,93%

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader