[2629] in java-interest

home help back first fref pref prev next nref lref last post

Re: typesafe socket communication

daemon@ATHENA.MIT.EDU (David Hopwood)
Sat Oct 7 10:34:32 1995

From: David Hopwood <david.hopwood@lady-margaret-hall.oxford.ac.uk>
To: java-interest@java.sun.com
Date: Sat, 7 Oct 1995 13:32:19 +0000 (BST)
In-Reply-To: <199510062214.XAA09552@sable.ox.ac.uk> from "David Hopwood" at Oct 6, 95 11:14:49 pm

Sorry to reply to my own message, but there was a minor bug:

> > The problem that I was talking about is that anyone can make up a stream
> > of bytes that can be turned into an object. Currently we can treat object
> > references as capabilities because they are unforgable. This may not be
> > the case in your scheme.
> 
> An unguessable random number can be treated as a capability, for all
> practical purposes.
> 
> So, one way of doing this is to maintain a table which assigns a random key
> to each 'published' object. The external form of a pointer would be something
> like: (server URL, local pointer, key).
                     ^^^^^^^^^^^^^ wrong

The location of the object in memory might change due to garbage collection.
Also external pointers may last a long time (longer than the process which
initially created the object). So, you don't want to include the local pointer
in the external pointer. Instead, use something that is going to remain
constant, for example, a name, or an index into the table of published
objects: i.e. (server URL, name/index, random key).

NB. this relies on the fact that the key is independent of the name/index (or
any other guessable quantity). There is a good survey of random number
generation in RFC 1750.

Probably the easiest way to provide an interface to this would be using a
PersistentCollection. This would extend an ordinary Collection, but also
allow its members to be referred to externally (from a file, or from another
machine or address space).

When persistifying something, the programmer would specify which Persistent-
Collection any leaf pointers are to go into (a leaf pointer is a pointer that
is copied, but which points to an uncopied object).

Then, it is easy to extend the system by using different kinds of Persistent-
Collection (e.g. one that supports IIOP, or one that does distributed reference
counting or GC).

David Hopwood
david.hopwood@lmh.ox.ac.uk
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post