Thanks for the information, Peter. The project you're working on, the HLA
and the frameworks used by games engine go much further than anything I
need. Concretely, I do not need the master copy to send messages to
imitations. All I need is for a client to be able to get a lock on a remote
object, resulting in a local copy for that client. Other clients simply have
to wait to get access (depending on lock type, i.e. read/write) to the
object until the first client has released the lock.

It seems like RMI should be easily extendable to do this. A book I have
which covers RMI says that remote objects can potentially run under serveral
different communication styles, including point to point object references
(the default), replicated objects, or multicast objects. I have, however,
not been able to find anything else on this. I've been thinking about how I
could extends RMI myself.
Something like this:
public Interface LocalReplica extends Remote {

        // make local copy available on the client and read lock the remote 
object
        public void getReadLock();
        // make local copy available on the client and write lock the remote 
object
        public void getWriteLock();
        // release the read lock on the remote object
        public void releaseReadLock();
        // copy local object to server and release the write lock on the remote
object
        public void releaseWriteLock();
}
The Stub implementation of this interface would be a combination of the stub
implementation
generated by the rmic and the normal implementation of the Remote interface
on the server side.
Does this look its viable to you?
Stefaan Nachtergaele


-----Original Message-----
From: Peter Donald [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 20, 2002 06:55
To: Avalon Applications Developers List
Subject: Re: distributed object framework with local copies...


On Fri, 19 Jul 2002 23:52, Stefaan Nachtergaele wrote:
> I need a distributed object framework where objects exist remotely but
can,
> if the client so chooses, be used locally. The client could get the Object
> by calling for example getReadCopy() which would retrieve a copy of the
> object and put a read lock on it (idem for getWriteCopy). When the client
> is finished with the object he then does a releaseReadCopy() or
> releaseWriteCopy(). The releaseWriteCopy() would also make sure the
updated
> object is copied back to the server.
> This seems like a natural extension to RMI.
> Does anyone know of a framework which support this kind of behavior?

yes ... unfortunately it is not opensource and it is too ugly to be
opensource. One of the projects I am currently working on does the
following.

The "server" contains the master copy of object while the clients contain
"imitations". The "master copy" is read-write while the imitations are
read-only.

When the master copy changes messages are sent out to all the imitations and
the imitations are thus updated via this method.

We have contemplated allowing a "roaming" master copy. ie One node could
request to become "master copy" for object A. It would then be the once
accepting change requests and distributing them to all of As imitations.
However we never got around to actually implementing all of it.

We implemented synchronization of these objects. ie The network gets split
so
that network A has one master copy and network B has another master copy.
Both copies undergo changes. Unfortunately there is no generic merging
process for the master copies once the networks are joined again. We are in
the process of implementing a generic rule engine to allow buisness rules to
determine the process of merging.

The tricky part occurs when you have relationships between objects. ie The
system we are working on is resource management for fire fighters. It is
tricky when in one network the fire fighter is dispatched to a fireline at
2:00 while in the other network the fire fighter is sent home at 1:00. The
buisness rules for these sorts of situations and the coresponding changes to
the rest of the object database is sometimes staggeringly complex ;)

Anyhow, I have not seen any similar frameworks in the buisness world.
However
these frameworks are very common in military simulations and in distributed
3d games. One of the most well documented frameworks would be the US
Departments High Level Architecture (HLA) that describes how replication and
ownership of objects (and object attributes) occurs. There are quite a few
implementations of HLA but they tend to be expensive.

You should be able to get details of HLA from a web search. Unfortunately
for
games engines there is virtually no documentation or cheap examples. Most of
them are custom built for a particular environment aswell. To get a taste of
what I mean have a look at http://unreal.epicgames.com/Network.htm

Anyways I did a thesis on this stuff while in uni and can probably send you
a
bunch of links if you are interested. However I don't have them with me so
it
could be a while before I send em ;)

> Where
> would I start if I wanted to implement something like this myself. I am
> currently looking at the Avalon project and wondering (as oppossed to
> "thinking about" because I'm not quite there yet) how it could be used to
> implement this. Any suggestions welcome.

I would recomend that the replicated objects not use avalon lifecycle
interfaces or anything similar. However it may be useful you to consider
writing the replication engine as set of avalon components. If you have any
questions feel free to ask.

--
Cheers,

Peter Donald
--------------------------------
My opinions may have changed,
but not the fact that I am right
--------------------------------


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to