Retro-compatibility

2 posts / 0 new
Last post
Offline
Last seen: 4 years 7 months ago
Joined: 02/27/2014
Posts: 6
Retro-compatibility

I'm wondering if there are something who can manage different topic version for the new version of my soft and its Topic.

 

By example :


I made a version 1.0 of my soft using a Topic A with 5 field.

If I made a new version of my soft who I called 1.1 using the same Topic A. But on this Topic, I add a new field to have finaly 6 field.

 

The new software (1.1) can be able to discute with the previous version (1.0) correctly ?

And the older soft (1.0) can be able to receive the Topic sent be the new soft (1.1) ?

 

 

Thank you,

Potoman.

 

 

rip
rip's picture
Offline
Last seen: 2 days 21 hours ago
Joined: 04/06/2012
Posts: 322

Hi,

the Extensible Types (XTypes) standard for DDS is specifically aimed at this need.  Look at http://www.omg.org/spec/DDS-XTypes/1.0/

You want either EXTENSIBLE_EXTENSIBILITY or MUTABLE_EXTENSIBILITY (but stick to EXTENSIBLE, the performance hit isn't as pervasive). For a working example, see the ShapeType.idl found in $NDDSHOME/../RTI Shapes Demo 5.1.0 and look at ShapeTypeExtended (note that the Shapes demo application will allow you to work with ShapeType and ShapeTypeExtended interchangably, such that you can publish either, and subscribe to either).

In the case where you write the old and read the new, the extended field(s) will be populated with default values, and when you write the new and read the old, the extended field data will be stripped.  Your application will always receive a type that it expects.