View Single Post
  #1 (permalink)  
Old 01-28-2005
ChMeessen ChMeessen is offline
Registered User
 
 
Join Date: Sep 2003
Location: Marseille
Posts: 11
Q on Data encoding

Hello,

I am studying the data encoding convention used in ICE and I had a few questions related to reference encoding.

1° Why using negative numbers for pointers and not same value as class id n° ? Context of use leaves no ambiguity between pointer and class id. Is this a scar of ICE data encoding evolution ?

2° The classID is an arbitrary number picked by the marshaller. This gives indeed some liberty degree, except that the value must be a strictly positive number. As shown in one example (in table 40.4 of ICE doc 2.0) and explained in the algorithm presented at page 1108, the natural strategy would be to number classes from 1 to N in the order of their serialization. This numbering rule seams perfectly deterministic. So why not making this numbering rule standard and let classID be implicitely numbered by order or serialization ? This would allow to get rid of this number in the serialized data.


3° Why choosing the "delayed object serialization" and not a serialization in place of first reference ? Is it to avoid stack overflow when marshalling very deep data structures ? Shouldn't this rationale then also apply to sequences ?


4° I am a bit confused about sequences. It looks like sequences are not treated like referenced data. What happens if two arguments of a method call are in fact referencing the same array ?From the documentation fragments I red it looks like ICE marshalling process would generate two distinct copies of the sequence. So the receiver doesn't know that these are in fact the same array. I know that we can get around this, if this happens to be a problem, by encapsulating the array in an object. But CORBA handles sequences as referenced data so it would handle shared sequences properly. What about ICE ?

Last edited by ChMeessen : 01-28-2005 at 09:46 AM.
Reply With Quote