09-12-2013 03:02 PM
I'm looking for best practices for saving objects to disk.
My use case:
I have a distributed system where I'm collecting a bunch of raw data and saving it in a .tdms file. I also have an array of satellite configuration objects that I would like to save. The satellite config objects contain information about each satellite and an array of channel config objects, which contain conversion information, serial numbers, etc. Right now we are taking the array of satellite config objects, flattenning it to XML (using the built-in LV xml schema) and then storing that as a file-level property.
the problem is:
Anytime I edit the config classes and add more information, somehow I'm breaking the mutation history and now I can't load old datafiles. When I unflatten the xml I get errors. At the moment we are still in development, so not a huge deal. We have collected any real meaningful data yet, but I foresee problems in the future.
What does anyone else do to handle this situation?
Am I going about this all wrong, as far as how I'm storing the configuration data?
Would I be better-off just to write my own mutation algorithms?
Any other thoughts?
09-12-2013 03:12 PM
09-16-2013 08:40 AM
thanks David.
I had seen that before, but apparently I missed the following bullet.
You can do load from previous and save to previous mutations in your Serializable's To Serial Form and From Serial Form. Mutations can include renaming the classes.
It seems like exactly what I'm looking for!
Sam
09-17-2013 12:05 PM
Taggart: Please keep me posted on how the library works for you. There have been a few people who have used it successfully, but they've all been people who could lean on me directly for help. I have tried to make the various options as obvious as possible, but that's not always easy. Take a look at the test VIs. Those show off most of the mutations and conversions that are possible.