Monday, March 26, 2007

Online Automatic Update - how ?

Have you ever thought to use a versionig system (SVN for example) to build an automatic online update mechanism ? NO ? Think again. It will work. I don't know the alternatives, I haven't look at any, but it works for me as follows:

You must pay a little little extra attention not to get conflicts (or if you get them, to overwrite them, here you must make sure you NEVER commit user settings related files) and split the update into two parts:

  • a "phisical" update mechanism (as oposed to logical) - phisical updates are where the versioning system will do all the job for you, updating files that changed and were commited by you to the update server and
  • a "logical" update mechanism (e.g. database updates at software startup, after phisical updates took place)
If you have a pretty complex folder structure and want to update only what changed, SVN (or another versioning system for that matter) will do a damn good job. Some will say it's a huge hammer for a small nail but hey ? Do you want to do it right or you want to innovate a little and go into production with something that really works ?

No comments: