Results 1 to 4 of 4

Thread: ICE Serialization - Pass-By-Value versioning Question

  1. #1
    lavpatel is offline Registered User
    Name: Lav Patel
    Organization: Citigroup
    Project: MOAccounting
    Join Date
    Dec 2010
    Posts
    2

    ICE Serialization - Pass-By-Value versioning Question

    I tried searching on this but couldn't locate any post that is quite related.
    Please point me to it if you know/find a match. Otherwise I have a question about ICE serialization as below.

    One option to introduce newer fields to an existing object being sent as pass-by-value is to extend it into newer class/struct and place them in it, thereupon if server is latest and client isn't, client will receive sliced object (only of base type) and can still function with original set. Assuming server is always latest, it will always write/read all the information into/from the stream and latest clients will benefit fully from this (no slicing).

    I have a requirement to support Pass-By-Value versioning in ICE without extending the existing class/structure. Meaning, I am expecting to introduce new fields into the same existing class. If server is updated with newer class, it will write these new fields into stream and try to read from stream as well. if client isn't yet redeployed with these newly added fields in original class, it shall only read original set from stream ignoring the rest. likewise if client is new, it shall write values for these new fields which older server would ignore.

    Is this possible?

    we are using ICE 3.2.1, with both C# and Java as client and server.


    Happy New Year!

  2. #2
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,445
    Hi,

    Welcome to the forum.

    I'm afraid what you've described is not possible. If you modify the definition of a class or structure to add or remove a data member, or change the type of an existing member, you are almost certainly going to cause the receiver to fail with a marshaling exception.

    We've had requests to add support for a feature like that, but it's not currently a priority. Please contact info@zeroc.com if you'd like to sponsor such a feature.

    Note also that we only provide free support here on the forum for the most recent version of Ice.

    Best regards,
    Mark

  3. #3
    lavpatel is offline Registered User
    Name: Lav Patel
    Organization: Citigroup
    Project: MOAccounting
    Join Date
    Dec 2010
    Posts
    2
    Thanks for prompt reply.

    checking with info@zeroc.com to see if sponsorship is feasible.

  4. #4
    mathgl is offline Registered User
    Name: gelin yan
    Organization: RoundTech Research Centre
    Project: large scale vehicle tracing system
    Join Date
    Jan 2010
    Location
    HongKong
    Posts
    23
    another option is to use google proto buffer with ICE but it requires 3.4.1 or above.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Question about serialization of inherited classes
    By halfhp in forum Help Center
    Replies: 3
    Last Post: 10-19-2009, 01:30 PM
  2. Using facets for versioning
    By Oleh Babyak in forum Help Center
    Replies: 7
    Last Post: 12-15-2008, 10:06 AM
  3. How to pass complex C++ containers in ICE?
    By jvme in forum Help Center
    Replies: 1
    Last Post: 08-04-2005, 05:30 PM
  4. Replies: 2
    Last Post: 05-24-2005, 08:46 PM
  5. Object serialization in ICE
    By shantanu_k06 in forum Help Center
    Replies: 4
    Last Post: 02-17-2004, 01:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •