You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apps-dev@avalon.apache.org by Stefaan Nachtergaele <st...@nachtergaele.net> on 2002/07/19 15:52:39 UTC

distributed object framework with local copies...

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? 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.
Thanks,
Stefaan Nachtergaele



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: distributed object framework with local copies...

Posted by Peter Donald <pe...@apache.org>.
On Tue, 23 Jul 2002 20:27, Stefaan wrote:
> 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.

kool.

> 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. 

You may want to have a look at

http://www.javalobby.org/thread.jsp?forum=17&thread=4619

It describes a way to run RMI apps without generating stubs and thus you could 
easily do multicast or whatever via that mechanism. Rickard Oberg also 
responds to that post and you should follow the links he provides for more 
info

-- 
Cheers,

Peter Donald
---------------------------------------------------
"It is easy to dodge our responsibilities, but we 
cannot dodge the consequences of dodging our 
responsibilities." -Josiah Stamp 
--------------------------------------------------- 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


where to get all of avalon (RE: distributed object framework with local copies...)

Posted by Leo Simons <le...@apache.org>.
get yourself CVS and checkout jakarta-avalon-*. [1]

You'll be on the bleeding edge (but for the important, released parts,
like framework, ECM, logkit, you won't notice the difference as changes
to those from the release are backwards-compatible).

Quite a bit of material you'll be getting is in an alpha stage though
(like AltRMI), and it is not always clearly marked which parts are not.
We need to fix this; it is on the agenda!

[1] - http://jakarta.apache.org/site/cvsindex.html

- Leo

PS: I'm CCing this to avalon-users list as it is a general question more
people might have

On Wed, 2002-07-24 at 09:41, Stefaan wrote:
> If I do come up with something, I will surely donate it. But first things
> first. I've downloaded most of avalon in bits and pieces, some source some
> binary, and it takes a bit of puzzle work to get the pieces to work together
> because of all the refactoring that going on. I've just downloaded the
> altrmi source for the examples and wanted to use the examples with the
> binary altrmi jars I got with cornerstone binary. does'nt work because the
> example use a altrmi.client.impl.callback package which is not in the binary
> distribution....
> Anyway, my question is, what's the best strategy at this point to get one
> working copy of the whole avalon project including subprojects?
> 
> -----Original Message-----
> From: Paul Hammant [mailto:Paul_Hammant@yahoo.com]
> Sent: Wednesday, July 24, 2002 08:27
> To: Avalon Applications Developers List
> Subject: Re: distributed object framework with local copies...
> 
> 
> Leo, Stefaan,
> 
> >Hi Stefaan!
> >
> >While I don't know much about RMI or distributed software myself, there
> >are some developers around here that do, besides the near-omnipotent
> >Pete...that work on less complex stuff than HLA-style architecture (I
> >suspect they're very busy as they didn't respond to your question...).
> >
> In my case work & socializng have met leaving little gap for open source
> :-(  Must fix, will quit job soon ;-)
> 
> >You might want to look at AltRMI [1]. I haven't used it myself, but
> >there might be some code or ideas for you to rip out. If it has anything
> >of use to you, you could try contacting the developers directly or
> >putting "AltRMI" in the subjectline.
> >
> Yup it could be of use.
> 
> Methods getReadLock() , getWriteLock(), releaseReadLock() could be put in an
> interface and used in an implementation that it transported over the wire.
> AltRMI in itself is possibly too simple for your purposes.  You and Pete
> drifted off in to high computing concepts in your mails (and lost me).
> AltRMI is quite benign in many ways as it has a distrubuted gabage
> collection mechanism that does not at present rely of formal reservation or
> leasing (it is transparent).
> 
> As for mods to AltRMI, I'd prefer to see them donated back if they are
> generic enough :-)
> 
> - Paul
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: distributed object framework with local copies...

Posted by Stefaan <sn...@phreaker.net>.
If I do come up with something, I will surely donate it. But first things
first. I've downloaded most of avalon in bits and pieces, some source some
binary, and it takes a bit of puzzle work to get the pieces to work together
because of all the refactoring that going on. I've just downloaded the
altrmi source for the examples and wanted to use the examples with the
binary altrmi jars I got with cornerstone binary. does'nt work because the
example use a altrmi.client.impl.callback package which is not in the binary
distribution....
Anyway, my question is, what's the best strategy at this point to get one
working copy of the whole avalon project including subprojects?

-----Original Message-----
From: Paul Hammant [mailto:Paul_Hammant@yahoo.com]
Sent: Wednesday, July 24, 2002 08:27
To: Avalon Applications Developers List
Subject: Re: distributed object framework with local copies...


Leo, Stefaan,

>Hi Stefaan!
>
>While I don't know much about RMI or distributed software myself, there
>are some developers around here that do, besides the near-omnipotent
>Pete...that work on less complex stuff than HLA-style architecture (I
>suspect they're very busy as they didn't respond to your question...).
>
In my case work & socializng have met leaving little gap for open source
:-(  Must fix, will quit job soon ;-)

>You might want to look at AltRMI [1]. I haven't used it myself, but
>there might be some code or ideas for you to rip out. If it has anything
>of use to you, you could try contacting the developers directly or
>putting "AltRMI" in the subjectline.
>
Yup it could be of use.

Methods getReadLock() , getWriteLock(), releaseReadLock() could be put in an
interface and used in an implementation that it transported over the wire.
AltRMI in itself is possibly too simple for your purposes.  You and Pete
drifted off in to high computing concepts in your mails (and lost me).
AltRMI is quite benign in many ways as it has a distrubuted gabage
collection mechanism that does not at present rely of formal reservation or
leasing (it is transparent).

As for mods to AltRMI, I'd prefer to see them donated back if they are
generic enough :-)

- Paul





--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: distributed object framework with local copies...

Posted by Paul Hammant <Pa...@yahoo.com>.
Leo, Stefaan,

>Hi Stefaan!
>
>While I don't know much about RMI or distributed software myself, there
>are some developers around here that do, besides the near-omnipotent
>Pete...that work on less complex stuff than HLA-style architecture (I
>suspect they're very busy as they didn't respond to your question...).
>
In my case work & socializng have met leaving little gap for open source 
:-(  Must fix, will quit job soon ;-)

>You might want to look at AltRMI [1]. I haven't used it myself, but
>there might be some code or ideas for you to rip out. If it has anything
>of use to you, you could try contacting the developers directly or
>putting "AltRMI" in the subjectline.
>
Yup it could be of use.

Methods getReadLock() , getWriteLock(), releaseReadLock() could be put in an interface and used in an implementation that it transported over the wire.  AltRMI in itself is possibly too simple for your purposes.  You and Pete drifted off in to high computing concepts in your mails (and lost me).  AltRMI is quite benign in many ways as it has a distrubuted gabage collection mechanism that does not at present rely of formal reservation or leasing (it is transparent).

As for mods to AltRMI, I'd prefer to see them donated back if they are generic enough :-)

- Paul





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: distributed object framework with local copies...

Posted by Leo Simons <le...@apache.org>.
> 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.

Hi Stefaan!

While I don't know much about RMI or distributed software myself, there
are some developers around here that do, besides the near-omnipotent
Pete...that work on less complex stuff than HLA-style architecture (I
suspect they're very busy as they didn't respond to your question...).

You might want to look at AltRMI [1]. I haven't used it myself, but
there might be some code or ideas for you to rip out. If it has anything
of use to you, you could try contacting the developers directly or
putting "AltRMI" in the subjectline.

regards,

Leo Simons

[1] - http://jakarta.apache.org/avalon/excalibur/altrmi/



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: distributed object framework with local copies...

Posted by Stefaan <sn...@phreaker.net>.
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:peter@apache.org]
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:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: distributed object framework with local copies...

Posted by Peter Donald <pe...@apache.org>.
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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>