Jump to content

Cluster Version control Design question


Recommended Posts

Hi All,

I have an application where I store the data in a cluster. Suppose this is my ver. 1 of the application and the cluster consists of 3 I32. and I ship this application to the customer.

 

Now for the ver 2 I want to store a string to the cluster so I updated my cluster to 3 I32 and 1 String. But this ver 2 should also be able to read ver 1. just like MS Word 2007 is able to read .doc files

 

In my design, I am stroing the version number and data(as variant) in a cluster and convert that cluster to variant and do a 'variant to flattened string' before saving it to a file.

 

I am attaching my desing protoype here so you get a better idea of what I am talking about and suggest me if you think it can be done in a better way.

 

 

Thanks,

Ritesh 

ClusterVersionControl_Design.vi

Link to comment

Ah, the "versioning data for preservation or communication with older clients" problem. You are not the only one to encounter this. 11 months ago, I released a draft of my solution to this problem. The library is complete and ready to use, although there are features that aren't there yet. I hope a new version is available within the next month or so.

https://decibel.ni.com/content/docs/DOC-24015

You may not like my solution -- it relies on classes instead of clusters for various reasons. But the patterns of usage that I establish there are based on lots of research into the data serialization mechanisms of other programming languages/libraries and various file formats. But the short answer is that this approach allows the reading and writing of older formats for arbitrary data.

 

Other libraries:

MGI: http://mooregoodideas.com/robustxml/

 

 

OpenG also has a very robust solution but I cannot find where to download it -- my Google skills have completely failed this morning. Someone else may post a link to it.

Link to comment

Just to be clear - there are already good existing solutions. You should probably just use them.

  1. The OpenG variant config VIs which AQ mentioned are great. You should see them in the list of packages after you install VIPM.
  2. The MGI VIs he linked to are also good. I haven't tried the XML variety, but the INI ones work basically the same as the OpenG VIs, with the main functional difference being that they reset everything in the file each time, where the OpenG VIs can work on existing files and only change parts of them. Both of them basically work by name - if something doesn't already exist in the saved file, they will use the default value for it.
  3. Besides AQ's experiment, LVOOP already has this magically - it keeps the change history for each class, so you can flatten a class of version X and then unflatten it when the version is X+4 and it should know automatically how to do the conversion. I'm assuming the main reason AQ didn't suggest this is that it has some issues like resetting the history if you rename the class or being completely opaque.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.