Tuesday, December 20, 2011

Version Control Systems (Source/Revision Control Systems)

                                Version Control Systems are playing an important role in software source controlling. Most of the software industry used Version Control Systems to keep their source code in a central space so that any authorized person can access to it and do the changes in source files concurrently. The main purpose of a Version Control System is to enable collaborative editing and sharing of data, and keep the older states of the software code base (keep revisions).


                    In a project with large number of remote developers, there is a big probability to accidentally overwrite each other's changes in a regular file system (Figure 1). That's how the Version Control Systems come in to the picture in order to solve this problem.

Figure 1
                          So, to avoid above problem Version Control Systems used a strategy called Lock-Modify-Unlock model (Figure 2). This repository allows only one person to change specific file at a time. To do this it is using a lock system. The user who is going to change a file must lock the file so that any other user cannot lock the file again (it means file can be read but cannot change). After he made the change and commit the file to the repository he must unlock the particular file.

Figure 2
                                   But in this model, the developing process will be unnecessarily serialized, and by mistakes some users may not unlock a file, though others are waiting for unlocking that files. As well concurrent developing of two files by different users cannot have idea of each other file which have some dependencies between them.


                  Therefore another method called Copy-Modify-Merge model (Figure 3) is used as alternative to this problem. In here, users can concurrently develop the same file and commit it by after merging the new changes in repository to the working copy (locally changed copy).

Figure 3                                                                    
                            Version Control Systems such as SVN and CVS are using the above method to file managing.Using this method user have the full control of managing codes in conflicts (overwrite some code).

                  It's possible to classify the Version Control Systems as Centralized and Distributed. Centralized Version Control Systems means there is only one repository which developers are directly deals with. But in Distributed Version Control Systems are some kind of modification of the concept of Centralized Version Control Systems. The concept is to having two levels of Source Control Systems rather than one. So that, without all ways connecting with the main  Source Control System(main repository in server), using an own Source Control System(local host) until completing any specific work (can be a story of project). So that the main repository contains only working copies of the software. As well the operations (commit, revert) are faster due to using the own Source Control System more than Centralized Control System.


Some examples for Version Control Systems are as follows.

1). CVS (Concurrent Versioning Systems)
          Older technology. Simple system for make sure files and revisions kept up to date.

2). SVN (Subversion)
          Popular Version Control System. Most of the open-source projects use SVN.

3). git
          A fast populating, open-source Distributed Version Control System.

4). Mercurial
          Open-source Distributed Version Control System. Very faster and much simpler system than 'git'.

5). Bazaar
          Distributed Version Control System with different types of workflow than other Distributed Version Control Systems.

6). LibreSource
          Web portal, with a built-in subversion repositories. Useful for manage collaborative projects.

7). Monotone
          Fairly easy to learn. Places higher value on integrity than performance.


                               I think you may have some idea on Version Control Systems. And I'm willing to have another article soon on use of Subversion client.


2 comments:

  1. Great job Chanaka. Source control systems are really important due to two facts.
    1. Enable concurrent editing
    2. Reversion

    You have nicely mentioned how the concurrent access happens. Here we can retrieve early source codes too. Which is known as reversion.
    CVS is the oldest SC system, which was developed in early 80's. But many companies are using SVN. both of these are centralized systems. But nowadays people are turning in to distributed systems like "Git"
    Most of these tools are highly compatible with famouse IDE's like Eclipse, Netbeans etc.
    But still I couldn't find a handy tool for source control in databases. There are some toole like "Redgate" where they connect current version control system data base. But they are bloody expensive.

    ReplyDelete
  2. The security at home is essential and must put all our security systemsSecurity on our site is very necessary to do safety systems to give us confidence and tranquility.
    security consulting ct.

    ReplyDelete