Browse Prior Art Database

Passing Proxies as Parameters to Methods and Return Values from Methods

IP.com Disclosure Number: IPCOM000122798D
Original Publication Date: 1998-Jan-01
Included in the Prior Art Database: 2005-Apr-04
Document File: 4 page(s) / 105K

Publishing Venue

IBM

Related People

Kaminsky, D: AUTHOR [+4]

Abstract

Disclosed is a method for the use of proxy objects to enable transparent conversion of single-machine-based applications to a client-server framework. This scheme creates proxies for remote objects, which convert local method calls into Remote Method Invocation (RMI) calls. These RMI calls pass parameters by serializing them and passing the serialized data between machines. Return values from these method calls are also serialized and sent over the network. A class which is proxied in this way is considered split.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 49% of the total text.

Passing Proxies as Parameters to Methods and Return Values from Methods

      Disclosed is a method for the use of proxy objects to enable
transparent conversion of single-machine-based applications to a
client-server framework.  This scheme creates proxies for remote
objects, which convert local method calls into Remote Method
Invocation (RMI) calls.  These RMI calls pass parameters by
serializing them and passing the serialized data between machines.
Return values from these  method calls are also serialized and sent
over the network.  A class which is proxied in this way is considered
split.

With this setup, a number of issues are brought up:
  o  If a machine A is set up with FooBar as a proxy class
      instead of a real object, what happens when you want
      to send that machine an instance of the real FooBar?
      Simply sending it will not work, since your version
      of the FooBar class and A's version are different.
  o  Objects passed between machines are passed by copy.
      Maintaining single-copy semantics is time-consuming
      when there are multiple copies of an object.

      This invention disclosure proposes the generation of proxies
for objects and sending those proxies across the network instead of
sending the actual objects.

      Unlike the real object, a proxy can be sent to a machine using
that class as a proxy class without any confusion.  Using a proxy
class means that the data for the class is only stored in one place,
giving you single-copy semantics for free.

      For example, consider an application which performs matrix
manipulations and displays the results.  A user on a thin client may
want to farm out the calculation to a more powerful server.  In order
to do this, simply set the home of the Matrix class to the server.
In this case, there are many operations that may be implemented by
passing Matrix objects into a Matrix method, such as mat3 =
mat1.add(mat2). In  this case, the proxies must take care of two
operations:
  1.  Replacing the client version of mat2 (a proxy) with the
       server version (the actual mat2)
  2.  Replacing the server version of mat3 (the actual mat3)
       with the client version (a proxy)

This is what pseudocode for these routines in the proxies might look
like:
  Server Proxy
      class MatrixProxy implements MatrixInterface {
          Matrix myObject;
          ...
              MatrixInterface add(MatrixInterface m2) {
                  Matrix returnVal = myObject.add(m2.myObject);
                  return new MatrixProxy built out of returnVal;
              }
      }
  Client Proxy
      class Matrix {
          MatrixInterface serverProxy;
          ...
          Matrix add(Matrix m2) {
                  MatrixInterface returnVal =
  serverProxy.a...