Now that we have looked at why versioning happens and how we can better version our interfaces, we need to look at our distribution methods.
First, if possible, the installation mechanism should prevent non-backwards compatible interfaces from being installed. How can that happen? That's a different post :-)
Second, the interfaces should have a wrapper layer around them to allow for easier client versioning. In some cases, it could be possible to turn on the new functionality with nothing but a change to the registry. For instance, there could be a registry value describing which version of the code to use. By flipping the switch to version two, you can have the client upgraded without problem. Or if they choose not to upgrade, just install the lib and leave the switch at one. In some cases, a wrapper can insulate the client against hard coded lengths. In CORBA, it is common to use fixed length strings to gain performance. However, it is inconvienent if their lengths ever need to change. Therefore, a wrapper can be provided to transform a var length string to the proper fixed length string.
Finally, the easiest way to version is by using service oriented software. Instead of having to install on the client's site, a service can be updated as one sees fit.
Now we've looked at some ways to help the distribution of versioned objects. Join us again tomorrow: same bat time, same bat channel!
Datasource Precedents
1 day ago
No comments:
Post a Comment