Archived
This forum has been archived. Please start a new discussion on GitHub.
Concept question about ICE Object
OrNot
in Help Center
hi, there,
Because I have to write some documents about Ice, I now have a concept question about ICE Object:
In Ice-Document, an object is defined as :
• A single Ice object can be instantiated in a single server or, redundantly, in multiple servers. If an object has multiple simultaneous instantiations, it is still a single Ice object.
• Each Ice object has a unique object identity. An object’s identity is an identifying value that distinguishes the object from all other objects. The Ice object model assumes that object identities are globally unique, that is, no two objects within an Ice communication domain can have the same object identity.
I can not fully understand these two points together. That is, If an object has multiple simultaneous instantiations, it is still a single Ice object , then , all these instantiations will have the same identity? It seems conter-intuitive.
Hope getting a clarification.
Thanks
OrNot
Because I have to write some documents about Ice, I now have a concept question about ICE Object:
In Ice-Document, an object is defined as :
• A single Ice object can be instantiated in a single server or, redundantly, in multiple servers. If an object has multiple simultaneous instantiations, it is still a single Ice object.
• Each Ice object has a unique object identity. An object’s identity is an identifying value that distinguishes the object from all other objects. The Ice object model assumes that object identities are globally unique, that is, no two objects within an Ice communication domain can have the same object identity.
I can not fully understand these two points together. That is, If an object has multiple simultaneous instantiations, it is still a single Ice object , then , all these instantiations will have the same identity? It seems conter-intuitive.
Hope getting a clarification.
Thanks
OrNot
0
Comments
-
hi, Benard,
I think my confusion may come from codes like this:
Ice::ObjectPtr object1 = new PrinterI;
Ice::ObjectPtr object2=new PrinterI;
adapter->add(object1,
Ice::stringToIdentity("SimplePrinter"));
adapter->add(object2,
Ice::stringToIdentity("SimplePrinter2"));
PrinterI is an Object, and it's incarnations are two servants, but they have different identities. Accroding to : (1) If an object has multiple simultaneous instantiations, it is still a single Ice object. and (2) Each Ice object has a unique object identity, does it mean Object1 and Object2 should have a same
identiy ,say, SimplePrinter?
There must be some misundersandings in my mind but I can not figure it out.0 -
No, this is not correct, also not for C++. A class is a type, both in C++ and in Slice.
Have a look at this FAQ which discusses proxies, Ice objects, and servants.0
