swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Zones in Java


From: Marcus G. Daniels
Subject: Re: Zones in Java
Date: 24 Nov 1999 12:52:46 -0800
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "GR" == glen e p ropella <address@hidden> writes:

GR> Is there a way to allocate non-swarm java objects and have them
GR> kept track of via Zones? 

Not really.  In 2.0.1, anytime you pass a pure Java object to a Swarm
interface, Swarm will ensure that there is a backing proxy for that
Java object, so that Swarm can talk to it in terms of Objective
messages.  For Java Swarm instances (e.g. Discrete2d), there is a real
Objective C object underlying the Java object, and so there is no
proxy (thus the Zone is what you specify).

Proxies are stored in globalZone, and the directory that relates the
Java and Objective C objects live in globalZone.  It wouldn't be very
hard to associate proxies and parent objects (and their Zone
associations) if there was a good reason to do that.

But even if you did that, though, there would probably be a number of
objects in the model that never directly went through a Swarm
interface, and so there would be no proxies, globalZone or not.

GR> Or, alternatively, is there a zone-equivalent in java?

Well, you could track Java objects by subclassing all objects from a
class that had a constructor that had the side effect of creating a
SwarmObject that referenced the object that was being created.  In
this way the Java objects would be referenced in the population list
of the Zone of the SwarmObject placeholders.  That seems like a somewhat
obsessive thing to do, to me.

Of course, the Java runtime is garbage collected and does garbage
collections on its own terms.  There is no memory management benefit
to Zones for pure Java objects and there is no performance benefit either.
Just more complexity.

If it is migrating data from point A to point B, maybe just Java
serialization for that (perhaps calling Swarm serialization routines
in the Java input/output routines and then referencing those
resources).  Also since, Zones won't migrate code, it might be worth
looking at a Java mobile agents toolkit like Nelson Minar's Hive
(http://hive.www.media.mit.edu/projects/hive) or IBM aglets
(http://www.trl.ibm.co.jp/aglets).

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]