Posted by: ahmedashfaque | September 2, 2015

configuration & version control systems


These days distributed configuration & version control systems (CVS systems) are used on software development projects. A distributed software system means that all files and directories which need to be managed are scattered over the computers which are part of this distributed system. If this same definition holds true for distributed configuration & version control systems?

Even though these systems are named as a distributed system; however nature of these systems is different from other distributed systems. These systems have a central server and local computers and they work like a client-server system. But the main distinguishing factor for these systems is that all files residing on a local (client) system must be synchronized with the files residing on the central server.

Why files residing on a local system needs to be synchronized with the files on the central server system of any CVS system? Let us find out.

Suppose a software developer has created a new source code file and tests it on his/her local CVS system. If this file integrates neatly then it means that the software build on this local CVS system is in passed state and the build is healthy. This healthy software build is now ready to take next source code file to be integrated.

Each of the software developer can create their own source code files and keep integrating them with their local software build. But at some point of time, these separate local software builds will need to be integrated with each other to create a complete software product. This means that each software developer has been building only a component of the software product. These components need to be integrated to create the complete software product.

Integration of components is not easy. When software components are integrated then there will be many integration issues. Resolving these integration issues will be a lot of work. It will be difficult to trace which file created integration problems and which part of the source code was responsible for which integration problem.

A better way of integrating source code files is through what is known as continuous integration. In continuous integration, a software developer writes a source code file and integrates it with his/her local software build. This local software build is installed on the local part of the CVS system on the developer’s computer. If the source code file integrates fine and there are no compilation errors encountered then the developer will integrate this file with the software build on the central server. All developers keep writing source code files and integrating them with the central build. If any of the source code file creates compilation errors then this error is fixed immediately. Since compilation errors during integration are fixed for each file; fixing these errors is not a big problem. The complete software product is built on the central server one file at a time. At the same time there is no need for integration of software components later as all source code files belonging to all components are being integrated continuously.

If configuration on the local build and the central build is different then compilation errors can occur when a developer integrates a source code file on the central software build even if this same file did not create any compilation errors on the local build. Configuration of the local build and the central build can be different if for instance some other developer has checked in a file in the central build in the mean time when the first software developer was busy testing the file with his/her own local build or writing the source code file. Since the current configuration of the central build and local build is different, the file being checked in in the central build by the first developer will not integrate and the central build will fail.

To make sure that this phenomenon does not happen, the local build must be synchronized with the central build before a file could be integrated with the central build. In our case when synchronization is done, the newly added file by the second developer on the central build will also be copied in the local build of the first developer. When the local build is synchronized with the central build then compilation error will not happen on the central build if the file being integrated was successfully integrated with the local build.

Now you can realize the point we made early in this article about distributed CVS system. Even though our CVS system is distributed nevertheless each local part of the system always needs to have the same configuration as that on the central part of CVS system. That way our CVS system is actually a centralized and distributed system.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: