Persistence Service data migration

2 posts / 0 new
Last post
Offline
Last seen: 4 years 2 months ago
Joined: 02/18/2020
Posts: 1
Persistence Service data migration

Hello everyone,

We are building a new adaptation application and are considering using DDS persistence service to store adaptation rather than copy xml files to each node on the network.

One concern that we have is that we expect this data to be modified between software releases (table data may be added or removed). Our application is a 24/7 application so shutting down everything is not really an option.

Any strategies for migrating data between software releases? Is there a way to wipe out the data stored by the persistence service and have a new writer publish the new version of the data for each software release?

Thanks in advance for any thoughts.

 

Howard's picture
Offline
Last seen: 1 day 6 hours ago
Joined: 11/29/2012
Posts: 571

Just saw this question...so to restate your use case:  you're using a Topic to receive configuration information on startup, and thus using Persistence Service and TRANSIENT or PERSISTENT Durability to automatically send the stored value to new applications that startup...and now you want to update the stored configuration value, overwriting what was there, whenever you have a new software release...

So, in case, you haven't figure this out on your own yet...you can configure the History QOS in the Persistence Service configuration file for the configuration Topic to only store 1 (or any number N) values for the topic.  Let's say that all of the configuration is in a single data sample.  In that case, you can set the History QOS to KEEP_LAST kind and HISTORY_DEPTH of 1 for the configuration Topic.  Then, Persistence Service would only ever store 1 value for the configuration Topic.  When the configuration needs to be changed, you would run an application that would publish the value of the new configuration.  The Persistence Service would then "overwrite" the previously stored value with the new one, and only be providing the newest/last value that it received to newly started applications that need the data.

This is pretty straightforward use of Persistence Service (have seen other project also use Persistence Service in this way).  So, wouldn't be surprised if you figured this out on your own.