Perforce
Encyclopedia
Perforce is a commercial, proprietary, centralized revision control
Revision control
Revision control, also known as version control and source control , is the management of changes to documents, programs, and other information stored as computer files. It is most commonly used in software development, where a team of people may change the same files...

 system developed by Perforce Software, Inc.

Architecture

Perforce is a client/server system.
The server manages a central database
Database
A database is an organized collection of data for one or more purposes, usually in digital form. The data are typically organized to model relevant aspects of reality , in a way that supports processes requiring this information...

 and a master repository of file
Computer file
A computer file is a block of arbitrary information, or resource for storing information, which is available to a computer program and is usually based on some kind of durable storage. A file is durable in the sense that it remains available for programs to use after the current program has finished...

 versions.
Users work on files in local client workspace
Workspace
Workspace is a term used in various branches of engineering and economic development.-Business development:Workspace refers to small premises provided, often by local authorities or economic development agencies, to help new businesses to establish themselves...

s, and submit changed files together in changelists. Communication from client to the server is via
any of a number of clients (user interface
User interface
The user interface, in the industrial design field of human–machine interaction, is the space where interaction between humans and machines occurs. The goal of interaction between a human and a machine at the user interface is effective operation and control of the machine, and feedback from the...

s) (see below).
Client
Client (computing)
A client is an application or system that accesses a service made available by a server. The server is often on another computer system, in which case the client accesses the service by way of a network....

 and server
Server (computing)
In the context of client-server architecture, a server is a computer program running to serve the requests of other programs, the "clients". Thus, the "server" performs some computational task on behalf of "clients"...

 communicate via TCP/IP using
a proprietary RPC
Remote procedure call
In computer science, a remote procedure call is an inter-process communication that allows a computer program to cause a subroutine or procedure to execute in another address space without the programmer explicitly coding the details for this remote interaction...

 and streaming protocol.

Database

The Perforce database is proprietary, preconfigured, and self-installed.
It stores system-related metadata
Metadata
The term metadata is an ambiguous term which is used for two fundamentally different concepts . Although the expression "data about data" is often used, it does not apply to both in the same way. Structural metadata, the design and specification of data structures, cannot be about data, because at...


(file state, file attributes, branching and merging history,
changelists, change descriptions, users, groups, labels, etc.).
Files are identified by namespace (i.e., by OS-neutral filenames).
File content itself is not stored in the database.
MD5
MD5
The MD5 Message-Digest Algorithm is a widely used cryptographic hash function that produces a 128-bit hash value. Specified in RFC 1321, MD5 has been employed in a wide variety of security applications, and is also commonly used to check data integrity...

 hashes of file content are stored in the database,
however, and can be used to verify repository file integrity.

Database tables are stored as binary files.
Checkpoints and journals are written as text files
that can be compressed and offloaded.
A database that has been corrupted by hardware failure or other catastrophe
can be recovered from the most recent journal and checkpoint.
Administrators must plan for disaster recovery by configuring database
journaling and setting up regular checkpoints.

File repository

Versioned file content is stored in a master directory hierarchy whose top levels are called "depots".
Text file revisions are stored as RCS
Revision Control System
The Revision Control System is a software implementation of revision control that automates the storing, retrieval, logging, identification, and merging of revisions. RCS is useful for text that is revised frequently, for example programs, documentation, procedural graphics, papers, and form...

 deltasAlthough text file revisions are stored as RCS deltas in the repository, Perforce does not use the RCS system
Revision Control System
The Revision Control System is a software implementation of revision control that automates the storing, retrieval, logging, identification, and merging of revisions. RCS is useful for text that is revised frequently, for example programs, documentation, procedural graphics, papers, and form...

 to manage files.
and binary file revisions are stored in their entirety.

The encoding used for text files in the repository is either ASCII
ASCII
The American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text...

 or Unicode
Unicode
Unicode is a computing industry standard for the consistent encoding, representation and handling of text expressed in most of the world's writing systems...

, depending on Perforce server configuration. Repository files are not encrypted. Revisions that are branches or copies of other revisions are virtual copies within the repository. All revisions are preserved by default; limits can be set on the number of revisions preserved. Obsolete revisions and files can be purged by the administrator. Repository files must be included in regular system backups.

Clients

Clients to the Perforce system fall into roughly four categories:
command
Command (computing)
In computing, a command is a directive to a computer program acting as an interpreter of some kind, in order to perform a specific task. Most commonly a command is a directive to some kind of command line interface, such as a shell....

, GUI
Gui
Gui or guee is a generic term to refer to grilled dishes in Korean cuisine. These most commonly have meat or fish as their primary ingredient, but may in some cases also comprise grilled vegetables or other vegetarian ingredients. The term derives from the verb, "gupda" in Korean, which literally...

,
web
World Wide Web
The World Wide Web is a system of interlinked hypertext documents accessed via the Internet...

, and plugin.

The basic command interface is P4, the command-line client.
P4 can be used in any command shell
Shell (computing)
A shell is a piece of software that provides an interface for users of an operating system which provides access to the services of a kernel. However, the term is also applied very loosely to applications and may include any software that is "built around" a particular component, such as web...

 or script
Scripting language
A scripting language, script language, or extension language is a programming language that allows control of one or more applications. "Scripts" are distinct from the core code of the application, as they are usually written in a different language and are often created or at least modified by the...

.
It produces human-readable
Human-readable
A human-readable medium or human-readable format is a representation of data or information that can be naturally read by humans.In computing, human-readable data is often encoded as ASCII or Unicode text, rather than presented in a binary representation...

 output by default, but can also produce tag
Tag (metadata)
In online computer systems terminology, a tag is a non-hierarchical keyword or term assigned to a piece of information . This kind of metadata helps describe an item and allows it to be found again by browsing or searching...

ged text output, marshalled Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

 output, and marshalled Ruby
Ruby (programming language)
Ruby is a dynamic, reflective, general-purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features. Ruby originated in Japan during the mid-1990s and was first developed and designed by Yukihiro "Matz" Matsumoto...

 output.
Native C++ and Java APIs to the Perforce client commands are also available,
as are Lua, Perl
Perl
Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. Since then, it has undergone many changes and revisions and become widely popular...

, Python, PHP, Objective-C, and Ruby extensions built upon the C++ API.
The command interfaces support the system's complete client functionality and
can be used with OS-native filename
Filename
The filename is metadata about a file; a string used to uniquely identify a file stored on the file system. Different file systems impose different restrictions on length and allowed characters on filenames.A filename includes one or more of these components:...

 syntax as well as with
Perforce's OS-neutral filename syntax.

Two GUI clients are available for users,
the cross-platform
Cross-platform
In computing, cross-platform, or multi-platform, is an attribute conferred to computer software or computing methods and concepts that are implemented and inter-operate on multiple computer platforms...

, Qt
Qt (toolkit)
Qt is a cross-platform application framework that is widely used for developing application software with a graphical user interface , and also used for developing non-GUI programs such as command-line tools and consoles for servers...

-based P4V,
and the Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

-only P4Win.
Both support the majority of end-user operations.
An administration GUI client, P4Admin, supports a subset of administrative operations. P4Admin, like P4V, is cross-platform
Cross-platform
In computing, cross-platform, or multi-platform, is an attribute conferred to computer software or computing methods and concepts that are implemented and inter-operate on multiple computer platforms...

 and Qt
Qt (toolkit)
Qt is a cross-platform application framework that is widely used for developing application software with a graphical user interface , and also used for developing non-GUI programs such as command-line tools and consoles for servers...

-based. P4V and P4Admin can be extended with applets written in JavaScript and HTML.

A web interface is provided by P4Web,
a program that is both a Perforce client and
a stand-alone HTTP daemon
Daemon (computer software)
In Unix and other multitasking computer operating systems, a daemon is a computer program that runs as a background process, rather than being under the direct control of an interactive user...

.
P4Web can be run as a shared web server
Web server
Web server can refer to either the hardware or the software that helps to deliver content that can be accessed through the Internet....

 to provide read-only access to
the Perforce file repository and metadata.
It can also be run on a user's machine, enabling web browser
Web browser
A web browser is a software application for retrieving, presenting, and traversing information resources on the World Wide Web. An information resource is identified by a Uniform Resource Identifier and may be a web page, image, video, or other piece of content...

s to become
the interface to client operations on the local machine.

The plugin interfaces are behind-the-scenes programs that
integrate Perforce client functionality into third-party software.
Perforce plugins are available for
desktop environments, software development
Software development
Software development is the development of a software product...

 tools,
digital asset
Digital asset
A digital asset is any item of text or media that has been formatted into a binary source that includes the right to use it. A digital file without the right to use it is not an asset. Digital assets are categorised in three major groups which may be defined as textual content , images and...

 development tools,
software build
Software build
In the field of computer software, the term software build refers either to the process of converting source code files into standalone software artifact that can be run on a computer, or the result of doing so...

 tools, code review
Code review
Code review is systematic examination of computer source code. It is intended to find and fix mistakes overlooked in the initial development phase, improving both the overall quality of software and the developers' skills...

 systems, defect tracking
Defect tracking
In engineering, defect tracking is the process of finding defects in a product , and making new versions of the product that fix the defects...

 systems,
office automation
Office Automation
Office automation refers to the varied computer machinery and software used to digitally create, collect, store, manipulate, and relay office information needed for accomplishing basic tasks. Raw data storage, electronic transfer, and the management of electronic business information comprise the...

 tools, SQL
SQL
SQL is a programming language designed for managing data in relational database management systems ....

 clients, and FTP clients.

Features

  • Complete file and metadata history
  • Full revision history for branched, renamed, moved, copied, and deleted files
  • Three-way text file merging; merge tracking and re-merge prevention; common ancestor detection
  • Graphical diff
    Diff
    In computing, diff is a file comparison utility that outputs the differences between two files. It is typically used to show the changes between one version of a file and a former version of the same file. Diff displays the changes made per line for text files. Modern implementations also...

    ing, merging, and offline/online reconciliation tools
  • Graphical file content history and branch history viewers
  • Graphical administrative interface
  • Image thumbnails
  • Centralized, access-controlled repository with support for distributed revision control (see below)
  • Changelists -- changed files can be grouped together and tracked as logical changesPerforce changelists are similar to what other revision control systems refer to as changesets.
  • Atomic commit
    Atomic commit
    An atomic commit is an operation in which a set of distinct changes is applied as a single operation. If the changes are applied then the atomic commit is said to have succeeded. If there is a failure before the atomic commit can be completed then all of the changes completed in the atomic commit...

    s -- the server assures that changelists are committed in their entirety
  • Shelving -- users can save and restore work in progress for code reviews or task switching
  • Support for ASCII, Unicode
    Unicode
    Unicode is a computing industry standard for the consistent encoding, representation and handling of text expressed in most of the world's writing systems...

    , binary, symbolic link
    Symbolic link
    In computing, a symbolic link is a special type of file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution. Symbolic links were already present by 1978 in mini-computer operating systems from DEC and Data...

     (on Unix), Mac-specific, and UTF-16 files
  • Support for internationalization and localization
    Internationalization and localization
    In computing, internationalization and localization are means of adapting computer software to different languages, regional differences and technical requirements of a target market...

  • Support for RCS
    Revision Control System
    The Revision Control System is a software implementation of revision control that automates the storing, retrieval, logging, identification, and merging of revisions. RCS is useful for text that is revised frequently, for example programs, documentation, procedural graphics, papers, and form...

    -style keyword expansion
  • File compression for repository storage and network transfer
  • Multi-platform, cross-platform—single Unix or Windows server can support clients on any OS
  • Server-side event triggers
  • Programmable command line client and API
  • SDK
    Software development kit
    A software development kit is typically a set of software development tools that allows for the creation of applications for a certain software package, software framework, hardware platform, computer system, video game console, operating system, or similar platform.It may be something as simple...

     for integrating with external systems (e.g., defect tracking)
  • Change notification by RSS; support for email change notifications
  • Replication of files and metadata
  • Broker for implementing local policies, restricting available commands, or redirecting commands to alternative servers.
  • Archiving files to reclaim server disk space

Concurrency model

The Perforce system offers a hybrid of merge and lock concurrency models.Comparison of revision control software
Comparison of revision control software
The following is a comparison of revision control software. The following tables includes general and technical information for notable revision control and software configuration management software.- General information :Table Explanation...

 describes concurrency models in these terms.
As with similar systems, users do not have to lock files in order to work on them and are required to resolve concurrent, committed changes before submitting their work. Users may optionally lock files to assure that they won't have to resolve concurrent changes.

However, the Perforce model is slightly different from those of similar systems in that users are expected to let the system know in advance which files they intend to change, even if they don't mean to lock them. Giving advance notice puts files in a pending changelist that can be submitted to the server. It also enables the system to alert other users working on the same files. Thus users can tell when they are working in parallel and can take the opportunity to coordinate with one another before making changes that could otherwise be difficult to merge.

Perforce enforces this advanced notification requirement loosely by setting read-only permission on workspace files as it fetches them from the repository. Users can bypass the requirement, by choice or by necessity (when working offline, for example), simply by hijacking file permissions and modifying files as they see fit. It is up to the user, in these cases, to remember to use Perforce to reconcile offline work and put hijacked files in a pending changelist so they can be submitted. (It is also up to users to leave hijacked files writable after changing them. A read-only file that is not in a pending changelist is assumed by Perforce to be a candidate for update by replacement.)

Branching and merging

A file is uniquely identified by its complete filename, e.g.,
//depot/trunk/src/item.cpp.
Any non-deleted revision of a file can be branched.
Perforce uses inter-file branching, wherein branching creates a new file with a new name.
For example, my/index.php may be branched into
your/index.php and each file may then evolve independently.
Repository paths are typically designated as containers for branched sets of files.
For example, files in the //depot/trunk path may be branched as a set
into a new //depot/rel1.0 path, resulting in two sets of files
evolving independently and between which changes can be merged.

In Perforce the operation that merges changes from one branch
to another is called integration.
Integration propagates changes from a set of donor files into a set of
corresponding target files;
optional branch views can store customized donor-target mappings.
By default, integration propagates all outstanding donor changes.
Donor changes can be limited or cherry-picked by changelist,
date, label, filename, or filename pattern-matching,
The system records all integrations, uses them to select common ancestors
for file merging, and does not by default perform redundant or unnecessary
integrations.

Merging is actually only one of three possible outcomes of an integration.
The others are ignoring (aka "blocking") and copying (aka "promoting").
Merging is used to keep one set of files up to date with another.
For example, a development branch may be kept up to date with its
trunk through repeated merging.
Ignoring disqualifies changes in one set of files from future integration
into another.
It is often used when a development branch must be
up to date with, and yet divergent from, its trunk.
Copying is typically used to promote the content of an up-to-date
development branch into a trunk.

Branching also supports renamed and moved files.
The 'move' command branches originals to new files and deletes the originals.
A branched file is no different from an added file;
branched files are peers, not offshoots, of their originals.
The system keeps track of file origins, however,
and refers to them when displaying the history of renamed files.

Distributed revision control

Perforce has two mechanisms for achieving distributed revision control;
these mechanisms can be used independently or in combination.
The first is a proxy server that caches frequently read versions
in order to reduce file access times for remote users.
This mechanism accommodates closed development organizations
where a centrally controlled file repository and a universally accessible database are desired.

The second mechanism, known as remote depots, lets users
connected to one server access file versions managed by other servers.
With remote depots, each organization has control of its own server
and makes parts or all of its repository visible to other servers.
This mechanism is used for loosely coupled development organizations
where a peer-to-peer
Peer-to-peer
Peer-to-peer computing or networking is a distributed application architecture that partitions tasks or workloads among peers. Peers are equally privileged, equipotent participants in the application...

 approach is desired.

Access control and security

The Perforce server stores file content in a master repository that, when properly installed, is inaccessible to users.
User access to files is controlled by one or more Perforce superuser
Superuser
On many computer operating systems, the superuser is a special user account used for system administration. Depending on the operating system, the actual name of this account might be: root, administrator or supervisor....

s.
A range of file access protection levels can be granted.
Protections can be set for repository file paths
Path (computing)
A path, the general form of a filename or of a directory name, specifies a unique location in a file system. A path points to a file system location by following the directory tree hierarchy expressed in a string of characters in which path components, separated by a delimiting character, represent...

,
users
User (computing)
A user is an agent, either a human agent or software agent, who uses a computer or network service. A user often has a user account and is identified by a username , screen name , nickname , or handle, which is derived from the identical Citizen's Band radio term.Users are...

, groups
Group (computing)
In computing, the term group generally refers to a grouping of users. In principle, users may belong to none, one, or many groups The primary purpose of user groups is to simplify access control to computer systems.Suppose a computer science department has a network which is shared by students and...

, and IP address
IP address
An Internet Protocol address is a numerical label assigned to each device participating in a computer network that uses the Internet Protocol for communication. An IP address serves two principal functions: host or network interface identification and location addressing...

 subnets
Subnetwork
A subnetwork, or subnet, is a logically visible subdivision of an IP network. The practice of dividing a network into subnetworks is called subnetting....

.
The server can maintain an audit log of client access events
for SOX
Sarbanes-Oxley Act
The Sarbanes–Oxley Act of 2002 , also known as the 'Public Company Accounting Reform and Investor Protection Act' and 'Corporate and Auditing Accountability and Responsibility Act' and commonly called Sarbanes–Oxley, Sarbox or SOX, is a United States federal law enacted on July 30, 2002, which...

 and other compliance requirements.

User authentication is controlled by the Perforce system administrator.
Password strength
Password strength
Password strength is a measure of the effectiveness of a password in resisting guessing and brute-force attacks. In its usual form, it estimates how many trials an attacker who does not have direct access to the password would need, on average, to guess it correctly...

 is configurable; ticket
Ticket (IT security)
In IT Security, a ticket is a number generated by a network server for a client, which can be delivered to itself, or a different server as a means of authentication or proof of authorization, and cannot easily be forged. This usage of the word originated with MIT's Kerberos protocol in the 1980s...

-based
authentication can be configured as well.
Triggers (custom scripts or programs that run at predefined events)
can be set on many but not all Perforce user commands
and used to extend user authentication (with LDAP or SSO
Single sign-on
Single sign-on is a property of access control of multiple related, but independent software systems. With this property a user logs in once and gains access to all systems without being prompted to log in again at each of them...

, for example),
to block or allow user commands, and to constrain or normalize file modifications.
Triggers are run by the Perforce server and do not have access to client machines or workspaces.

Perforce, like most version control systems, does not encrypt file content in the master repository or on user machines.
Nor does it encrypt file content sent over the network; a tunneling protocol
Tunneling protocol
Computer networks use a tunneling protocol when one network protocol encapsulates a different payload protocol...

 like VPN or SSH
Secure Shell
Secure Shell is a network protocol for secure data communication, remote shell services or command execution and other secure network services between two networked computers that it connects via a secure channel over an insecure network: a server and a client...

 must be used to secure network transfers.
Full use of file protection, authentication, and tunneling is required to secure Perforce-managed content.

The Perforce client is completely trusting the server, including writing arbitrary files anywhere in the local filesystem, and therefore running arbitrary code from the server. That means the server has complete control over the client user's account, including reading and writing and sending all non-source code files of the user. In environments where the Perforce server is managed by a third party, this poses a significant threat to the client's security and privacy. This is by design and the vendor does not intend to fix this problem.

Availability, release cycle and supported platforms

Free downloads of Perforce server, client, and
plugin software are available from Perforce Software's website.

Server and client software is typically released twice a
year
as pre-built executable
Executable
In computing, an executable file causes a computer "to perform indicated tasks according to encoded instructions," as opposed to a data file that must be parsed by a program to be meaningful. These instructions are traditionally machine code instructions for a physical CPU...

s for Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

,
Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

, Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

, Solaris, FreeBSD
FreeBSD
FreeBSD is a free Unix-like operating system descended from AT&T UNIX via BSD UNIX. Although for legal reasons FreeBSD cannot be called “UNIX”, as the direct descendant of BSD UNIX , FreeBSD’s internals and system APIs are UNIX-compliant...

, and other operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s.

Licensing and terms of use

Use of the Perforce server is unrestricted for up to two users and five workspaces, or unlimited users and up to 1,000 files, without a license.
A license must be purchased for more users or workspaces; licenses may be purchased in perpetuity or on a subscription basis.
Free licenses are available for open source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...

 software development,
school or classroom projects, and trial/evaluation periods.
Use of Perforce client and plugin software is unrestricted, as is
online access to Perforce technical documentation.

Adoption

As of May 2010, Perforce is licensed to more than 320,000 Perforce users at 5,000 organizations.

See also

  • List of revision control software
  • Comparison of revision control software
    Comparison of revision control software
    The following is a comparison of revision control software. The following tables includes general and technical information for notable revision control and software configuration management software.- General information :Table Explanation...

  • Perforce Jam
    Perforce Jam
    Perforce Jam is an open-source build system developed by Christopher Seiwald of Perforce Software. It can be used as a replacement for make. Its primary feature is its ability to express build patterns in an imperative language which supports structured namespaces and simple lists...


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK