Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 02-16-2005
Nis Baggesen Nis Baggesen is offline
Registered User
 
 
Join Date: Aug 2004
Location: Aarhus, Denmark
Posts: 112
Migrating objects between machines

Does Ice have any build in features that would be useful for binding to an object which might migrate between different host machines.

Specifically I have a game character object which will be controlled by a remote client. Over the course of the game this character will move between different locations, and these locations typically reside on different hosts.

Naturally the object has to do some reregistering after is has been transfered, but it would be practical if I didn't have to keep track of all the proxies that point to the object, and update them by hand.

I was thinking of seperating the communication using IceStorm, but 1) of all I didn't know what impact that might have on bandwidth (At the very least I would then be sending the information twice), 2) I don't know how useful IceStorm would be for actually controlling the remote object and 3) a few of the methds I use are currently two-way which seems incompatible with IceStorm - but I might be able to change that.

However it would be more practical if the object could somehow just reregister at the locator service, but since it would have changed adapter I don't assume that the old indirect proxies would be able to find it. I might do it using direct object registration, but I'm going to have a lot of these objects (They do have unique identites) so I don't know if that would be impractical.

mvh

Nis
Reply With Quote
  #2 (permalink)  
Old 02-16-2005
michi's Avatar
michi michi is offline
ZeroC Staff
 
Name: Michi Henning
Organization: ZeroC
Project: Ice
 
Join Date: Feb 2003
Location: Brisbane, Australia
Posts: 907
If you have control over both client and server side, an easy way to implement migration is to use classes instead of interfaces. To migrate a class instance, simply pass it as a parameter to somewhere else, where the class will be instantiated on receipt, and destroy the instance at the sender end.

Cheers,

Michi.
Reply With Quote
  #3 (permalink)  
Old 02-16-2005
seth.piezas seth.piezas is offline
Registered User
 
 
Join Date: Feb 2005
Posts: 15
Registration

So this would take care of location registration as well? No need to do anything except install a factory? (is that necessary)
Reply With Quote
  #4 (permalink)  
Old 02-17-2005
Nis Baggesen Nis Baggesen is offline
Registered User
 
 
Join Date: Aug 2004
Location: Aarhus, Denmark
Posts: 112
Well the actual migration wasn't my problem, because as you describe that is simply a matter of sending the object to the other server. The problem is more one of a 'forwarding address' so that all the clients who knew where the object _was_ are somehow informed of the objects new location. Preferably without me having to keep check of all the clients that know of the objects existence.

mvh

Nis
Reply With Quote
  #5 (permalink)  
Old 02-17-2005
benoit's Avatar
benoit benoit is online now
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,534
See this thread for a similar discussion.

Another option that you might want to consider would be to not migrate your objects at all. Migrating objects might be tricky and inefficient if you have large objects. Furthermore, if your object migrates often, the clients making requests on your object will have to retrieve the new location of your object often. The location mechanism might become a bottleneck in such a scenario...

I'm not sure I understand what you mean about using IceStorm. Can you detail a little more?

Benoit.
Reply With Quote
  #6 (permalink)  
Old 02-17-2005
Nis Baggesen Nis Baggesen is offline
Registered User
 
 
Join Date: Aug 2004
Location: Aarhus, Denmark
Posts: 112
Quote:
Originally Posted by benoit
See this thread for a similar discussion.
Thanks - I'll look into that.

Quote:
Originally Posted by benoit
Another option that you might want to consider would be to not migrate your objects at all. Migrating objects might be tricky and inefficient if you have large objects. Furthermore, if your object migrates often, the clients making requests on your object will have to retrieve the new location of your object often. The location mechanism might become a bottleneck in such a scenario...
I don't think not migrating the object is an option as the object needs to have a very close connection with the location it is running on.

Quote:
Originally Posted by benoit
I'm not sure I understand what you mean about using IceStorm. Can you detail a little more?

Benoit.
Well it was a vague idea of having topics for the object - A 'control' topic which the object would subscribe to and the client publish to (the client needs to be a server anyway, so no problem there), and a 'report' topic where the object is the publisher and the client the subscriber. When the object migrates it would simply resubscribe its new proxy to the 'control' topic, and retrieve the proxy for the 'report' topic again. While it was migrating the control commands the send by the client would be ignore at the object wasn't currently subscribing, and the object would generate any feedback on the 'report' topic. By splitting up the communication this way the object should be able to migrate without worrying about how many clients might know it, as this registration is handled by the IceStorm controller which isn't moving anywhere. Hope this made the idea a bit clearer.

This seemed reasonably elegant except for the issues mentioned above, but if htere is some basic flaw I'd be happy to hear it
Reply With Quote
  #7 (permalink)  
Old 02-17-2005
Nis Baggesen Nis Baggesen is offline
Registered User
 
 
Join Date: Aug 2004
Location: Aarhus, Denmark
Posts: 112
Quote:
Originally Posted by benoit
See this thread for a similar discussion.
That thread seemed to answer most of my questions. Thanks for bringing it to my attention. I still think I'll try out my IceStorm idea for some cases, but otherwise direct object registration seems to solve most of my concerns.

mvh

Nis
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
No sequences of objects in Ice-E? bartley Help Center 5 05-30-2006 06:44 PM
How can I get all Objects in evictor db? Yunqiao Yin Help Center 2 02-10-2006 04:21 AM
Problems migrating fron IcePack to IceGrid xdm Help Center 2 12-21-2005 12:08 PM
Objects and Proxies ganzuoni Help Center 1 06-18-2003 03:49 PM


All times are GMT -4. The time now is 06:20 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.