The Architecture of Visual SourceSafe 2005

Introduction

In this article, I want to take a look at the architecture of Visual SourceSafe 2005; an important package that can be used in software development projects as a source control system.

Architecture of SourceSafe 2005

Visual Source Safe 2005 has three main components: server-side services, the repository, and the client-side applications.

The server-side services maintain one or more SourceSafe databases as well as manage service components such as the Visual SourceSafe Administration console, LAN booster service and Web services to be accessed remotely. The Visual SourceSafe Administration console is the main tool to create, configure, manage, backup and restore the databases (repositories), manage users and their privileges and configure the server services. The LAN booster service is mainly used to speed up the performance of operations when we're working in a LAN environment. And finally, the Web services are the programmatic interface for remote users who need to access the database.

The repository is the storage area for all the project resources in Visual SourceSafe. It's implemented as a file system on the SourceSafe server machine. The database is accessed by clients using the Universal Naming Convention for sharing resources, for example, \\SourceSafe_Server\SourceSafe_Database. The storage area comprises several folders, such as data, users, temp, VssWebUpload and VssWebDownload as well as files such as users.txt and srcsafe.ini.

The data folder is comprised of a series of folder names from the letters A to Z as well as labels, locks and loggedin folder containing metadata information. The Visual SourceSafe approach is this: for every file in the project, a pair of files is created in the A to Z folders. One file represents the most recent version of the file, and the other contains internal information about the operations of the user. The extension file .A or .B represents the most recent version. After a check-in operation, SourceSafe calculates the difference (the delta) between the two file versions and adds the difference to the log file; then it deletes the old file so at any time (under normal situations), there are no files with both .A and .B extensions. The label folder contains a label cache for the labels applied to projects and files in the database. The lock folder contains the locks for every file locked during update operations. The loggedin folder contains a file for each logged-in user.

The temp folder is used for older databases for temporary files while it's running.

The user folder contains a folder for each user configured to use the database, and it holds user-specific information.

The VssWebDownload folder is used a virtual directory in the IIS to download files from the SourceSafe database.

The VssWebUpload folder is used a virtual directory in the IIS to upload files to the SourceSafe database.

The Visual SourceSafe client-side components are the Visual SourceSafe Explorer and the Visual SourceSafe command line utility. The Visual SourceSafe Explorer provides a GUI to execute all the commands against the Visual SourceSafe server-side. These commands can be executed from a command line using the ss.exe command for batch processing.

Visual SourceSafe is tightly integrated with Visual Studio, allowing easy operations with projects and files. There are two plug-ins for Visual Studio: SourceSafe LAN and SourceSafe Internet. SourceSafe LAN is a plug-in for accessing Visual SourceSafe over a LAN connection. SourceSafe Internet is a plug-in used by users using Internet technologies. It's remarkable to say that you can only work with only one plug-in at a time. In order to select the appropriate plug-in, in Visual Studio, you need to navigate to "Tool" | "Options" from the main menu. Then expand the Source Control node in the Options tree, and go to the Plug-in selection to select the appropriate plug-in (see Figure 1).

sourcesafe

Figure 1

Conclusion

In this article, I've covered the architecture of Microsoft Source Safe technology. You now have an insight into this package and you can use it for your development process as your version control system.
 


Similar Articles