Efficient proxies in Smalltalk

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.

[1]  Oscar Nierstrasz,et al.  Pharo by Example , 2010 .

[2]  Daniel G. Bobrow,et al.  Book review: The Art of the MetaObject Protocol By Gregor Kiczales, Jim des Rivieres, Daniel G. and Bobrow(MIT Press, 1991) , 1991, SGAR.

[3]  Tom Van Cutsem,et al.  Proxies: design principles for robust object-oriented intercession APIs , 2010, DLS '10.

[4]  Gilad Bracha,et al.  Mirrors: design principles for meta-level facilities of object-oriented programming languages , 2004, OOPSLA.

[5]  John K. Bennett,et al.  The design and implementation of distributed Smalltalk , 1987, OOPSLA '87.

[6]  P. Lipton JAVA PROXIES FOR DATABASE OBJECTS , 1999 .

[7]  Rainer Koster,et al.  Loadable Smart Proxies and Native-Code Shipping for CORBA , 2000, USM.

[8]  Paulo Marques,et al.  A Framework for Smart Proxies and Interceptors in RMI , 2002 .

[9]  Jacob Stein,et al.  The GemStone object database management system , 1991, CACM.

[10]  Marc Shapiro,et al.  Structure and Encapsulation in Distributed Systems: The Proxy Principle , 1986, ICDCS.

[11]  Stéphane Ducasse,et al.  Evaluating Message Passing Control Techniques in Smalltalk , 1999 .

[12]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[13]  Douglas C. Schmidt,et al.  Usenix Conference on Object-oriented Technologies and Systems (coots '01) the Design and Performance of Meta-programming Mechanisms for Object Request Broker Middleware , 2022 .

[14]  Polyvios Pratikakis,et al.  Transparent proxies for java futures , 2004, OOPSLA.

[15]  Gregor Kiczales,et al.  Aspect-oriented programming , 1996, CSUR.

[16]  Ralph E. Johnson,et al.  Design Patterns: Abstraction and Reuse of Object-Oriented Design , 1993, ECOOP.

[17]  Robert J. Stroud,et al.  Dalang - A Reflective Extension for Java , 1999 .

[18]  Steve Counsell,et al.  Applications of dynamic proxies in distributed environments , 2005, Softw. Pract. Exp..

[19]  Paul L. McCullough Transparent forwarding: First steps , 1987, OOPSLA '87.

[20]  Ralph E. Johnson,et al.  Wrappers to the Rescue , 1998, ECOOP.

[21]  Alexandre Bergel,et al.  Read-Only Execution for Dynamic Languages , 2010, TOOLS.

[22]  G. G. Stokes "J." , 1890, The New Yale Book of Quotations.

[23]  Thuan L. Thai,et al.  NET framework essentials , 2001 .

[24]  Patrick Th. Eugster,et al.  Uniform proxies for Java , 2006, OOPSLA '06.

[25]  Geoffrey A. Pascoe Encapsulators: A New Software Paradigm in Smalltalk-80 , 1986, OOPSLA.