BuildingProductsWithFreeBSD.pdf
(
170 KB
)
Pobierz
Building Products with FreeBSD
Joseph Koshy
The FreeBSD Project
jkoshy@FreeBSD.org
$FreeBSD: doc/en_US.ISO8859-1/articles/building-products/article.sgml,v 1.7
2006/10/16 11:59:08 keramida Exp $
FreeBSD is a registered trademark of the FreeBSD Foundation.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed
as trademarks. Where those designations appear in this document, and the FreeBSD Project was
aware of the trademark claim, the designations have been followed by the “™” or the “®” symbol.
Abstract
The FreeBSD project is a worldwide, voluntary, and collaborative project, which develops a portable and
high-quality operating system. The FreeBSD project distributes the source code for its product under a
liberal license, with the intention of encouraging the use of its code. Collaborating with the FreeBSD
project can help organizations reduce their time to market, reduce engineering costs and improve their
product quality.
This article examines the issues in using FreeBSD code in appliances and software products. It highlights
the characteristics of FreeBSD that make it an excellent substrate for product development. The article
concludes by suggesting a few “best practices” for organizations collaborating with the FreeBSD project.
1 Introduction
FreeBSD today is well-known as a high-performance server operating system. It is deployed on millions of web
servers and internet-facing hosts worldwide. FreeBSD code also forms an integral part of many products, ranging
from appliances such as network routers, firewalls, and storage devices, to personal computers. Portions of FreeBSD
have also been used in commercial shrink-wrapped software (see Section 2).
In this article we look at the FreeBSD project (http://www.FreeBSD.org/) as a software engineering resource—as a
collection of building blocks and processes which you can use to build products.
While FreeBSD’s source is distributed freely to the public, to fully enjoy the benefits of the project’s work,
organizations need to
collaborate
with the project. In subsequent sections of this article we discuss effective means
of collaboration with the project and the pitfalls that need to be avoided while doing so.
1.1 Target Audience
This document would be of interest to the following broad groups of people:
1
Building Products with FreeBSD
•
Decision makers in product companies looking at ways to improve their product quality, reduce their time to
market and lower engineering costs in the long term.
Technology consultants looking for best-practices in leveraging “open-source”.
Industry observers interested in understanding the dynamics of open-source projects.
Software developers seeking to use FreeBSD and looking for ways to contribute back.
•
•
•
1.2 Article Goals
After reading this article you should have:
•
•
•
•
An understanding of the goals of the FreeBSD Project and its organizational structure.
An overview of the available technology in the project.
An understanding of its development model and release engineering processes.
An understanding of how conventional corporate software development processes differ from that used in the
FreeBSD project.
Awareness of the communication channels used by the project and the level of transparency you can expect.
Awareness of optimal ways of working with the project—how best to reduce engineering costs, improve time to
market, manage security vulnerabilities, and preserve future compatibility with your product as the FreeBSD
project evolves.
•
•
1.3 Article Structure
The rest of the article is structured as follows:
•
Section 2 introduces the FreeBSD project, explores its organizational structure, key technologies and release
engineering processes.
Section 3 describes ways to collaborate with the FreeBSD project. It examines common pitfalls encountered by
corporates working with voluntary projects like FreeBSD.
Section 4 concludes.
•
•
2 FreeBSD as a set of building blocks
FreeBSD makes an excellent foundation on which to build products:
•
FreeBSD source code is distributed under a liberal BSD license facilitating its adoption in commercial products
[Mon2005] with minimum hassle.
The FreeBSD project has excellent engineering practices that can be leveraged.
The project offers exceptional transparency into its workings, allowing organizations using its code to plan
effectively for the future.
•
•
2
Building Products with FreeBSD
•
The culture of the FreeBSD project, carried over from the Computer Science Research Group at The University of
California, Berkeley [McKu1999-1], fosters high-quality work. Some features in FreeBSD define the state of the
art.
[GoldGab2005] examines the business reasons for using open-source in greater detail. For organizations, the benefits
of using FreeBSD components in their products include a shorter time to market, lower development costs and lower
development risks.
2.1 Building with FreeBSD
Here are a few ways organizations have used FreeBSD:
•
As an upstream source for tested code for libraries and utilities.
By being “downstream” of the project, organizations leverage the new features, bug fixes and testing that the
upstream code receives.
•
As an embedded OS (for example, for an OEM router and firewall device). In this model, organizations use a
customized FreeBSD kernel and application program set along with a proprietary management layer for their
device. OEMs benefit from new hardware support being added by the FreeBSD project upstream, and from the
testing that the base system receives.
FreeBSD ships with a self-hosting development environment that allows easy creation of such configurations.
•
As a Unix compatible environment for the management functions of high-end storage and networking devices,
running on a separate processor “blade”.
FreeBSD provides the tools for creating dedicated OS and application program images. Its implementation of a
BSD unix API is mature and tested. FreeBSD can also provide a stable cross-development environment for the
other components of the high-end device.
•
As a vehicle to get widespread testing and support from a worldwide team of developers for non-critical
“intellectual property”.
In this model, organizations contribute useful infrastructural frameworks to the FreeBSD project (for example, see
netgraph(3)). The widespread exposure that the code gets helps to quickly identify performance issues and bugs.
The involvement of top-notch developers also leads to useful extensions to the infrastructure that the contributing
organization also benefits from.
•
As a development environment supporting cross-development for embedded OSes like RTEMS
(http://www.rtems.com/) and eCOS (http://ecos.sourceware.org/).
There are many full-fledged development environments in the 20,000-strong collection of applications ported and
packaged with FreeBSD.
•
As a way to support a Unix-like API in an otherwise proprietary OS, increasing its palatability for application
developers.
Here parts of FreeBSD’s kernel and application programs are “ported” to run alongside other tasks in the
proprietary OS. The availability of a stable and well tested Unix™ API implementation can reduce the effort
needed to port popular applications to the proprietary OS. As FreeBSD ships with high-quality documentation for
its internals and has effective vulnerability management and release engineering processes, the costs of keeping
upto-date are kept low.
3
Building Products with FreeBSD
2.2 Technologies
There are a large number of technologies supported by the FreeBSD project. A selection of these are listed below:
•
A complete system that can cross-host itself for the following architectures: alpha (up to FreeBSD version 6.X),
amd64, ia64, i386, sparc64, powerpc (see build(7)).
Support for the following technologies, protocols and standards: ATA, ATAPI, ATM, Bluetooth™, CAM,
CardBus™, DHCP, DNS, EISA™, Ethernet™, FDDI, Fibre Channel, GPIB, IEEE 1394, IPv4, IPv6, IPSEC,
IPX™, ISDN, MAC, NIS, NFS, OpenSSH, OPIE, PAM, PCI™, PCMCIA, POSIX™, PnP, RAID, RPC, SATA,
SCSI, SMB, TCP, USB, VESA, VLAN, VLB, WebNFS™.
A modular symmetric multiprocessing capable kernel, with loadable kernel modules and a flexible and easy to use
configuration system.
Support for emulation of Linux™ and SVR4 binaries at near machine speeds. Support for binary Windows™
(NDIS) network drivers.
Libraries for many programming tasks: archivers, FTP and HTTP support, thread support, in addition to a full
POSIX like programming environment.
Advanced security features: Mandatory Access Control (mac(9)), jails (jail(2)), ACLs, and in-kernel cryptographic
device support.
Advanced networking features: firewall-ing, QoS management, high-performance TCP/IP networking with
support for many advanced features.
FreeBSD’s in-kernel Netgraph (netgraph(4)) framework allows kernel networking modules to be connected
together in flexible ways.
•
•
•
•
•
•
•
Support for advanced storage technologies: Fibre Channel, SCSI, software and hardware RAID, ATA and SATA.
FreeBSD supports a number of filesystems, and its native UFS2 filesystem supports soft updates, snapshots and
very large filesystem sizes (16TB per filesystem) [McKu1999].
FreeBSD’s in-kernel GEOM (geom(4)) framework allows kernel storage modules to be composed in flexible ways.
•
Over 20,000 ported applications, both commercial and open-source, managed via the FreeBSD ports collection.
2.3 Organizational Structure
FreeBSD’s organizational structure is non-hierarchical.
There are essentially two kinds of contributors to FreeBSD, general users of FreeBSD, and developers with write
access (known as
committers
in the jargon) to the source base.
There are many thousands of contributors in the first group; the vast majority of contributions to FreeBSD come from
individuals in this group. Commit rights (write access) to the repository are granted to individuals who contribute
consistently to the project. Commit rights come with additional responsibilities, and new committers are assigned
mentors to help them learn the ropes.
4
Building Products with FreeBSD
Figure 1. FreeBSD Organization
FreeBSD Users
(many)
FreeBSD Committers
(340+)
Core Team
(9)
contributions
Source Trees
src/ ports/
doc/ www/
Conflict resolution is performed by a nine member “Core Team” that is elected from the group of committers.
FreeBSD does not have “corporate” committers. Individual committers are required to take responsibility for the
changes they introduce to the code. The FreeBSD Committer’s guide
(http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/committers-guide) [ComGuide] documents the rules and
responsibilities for committers.
FreeBSD’s project model is examined in detail in [Nik2005].
2.4 FreeBSD Release Engineering Processes
FreeBSD’s release engineering processes play a major role in ensuring that its released versions are of a high quality.
At any point of time, FreeBSD’s volunteers support multiple code lines (Figure 2):
•
•
New features and disruptive code enters on the development branch, also known as the
-CURRENT
branch.
-STABLE
branches are code lines that are branched from HEAD at regular intervals. Only tested code is allowed
onto a -STABLE branch. New features are allowed once they have been tested and stabilized in the -CURRENT
branch.
-RELEASE
branches are maintained by the FreeBSD security team. Only bug fixes for critical issues are permitted
onto -RELEASE branches.
•
Figure 2. FreeBSD Release Branches
-CURRENT
4.0
4.1
5.3
5.4
6.0
...
4.11
4-STABLE
5-STABLE
6-STABLE
5
Plik z chomika:
musli_com
Inne pliki z tego folderu:
FreeBSD-Handbook.pdf
(11453 KB)
FreeBSD-ArchitectureHandbook.pdf
(1170 KB)
FreeBSD-PortersHandbook.pdf
(1284 KB)
FreeBSD-FAQ.pdf
(1016 KB)
FreeBSD-DevelopersHandbook.pdf
(1312 KB)
Inne foldery tego chomika:
articles
Zgłoś jeśli
naruszono regulamin