Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Open Source

Rethinking the Macintosh


When considering a platform for Internet server applications, it has always been easy to overlook Apple Computer. Macs belonged on graphic designers' desktops; Linux, Solaris, and Windows NT did the heavy lifting. While innovative products like the iMac and the iPod might have earned Apple accolades from the consumer market, they did little to remedy the company's near-pariah status in the business world.

This could be changing. Recent product offerings from Apple suggest that the Cupertino, California-based workstation vendor might finally be ready to make a serious bid for a share of the server market.

Apple took its first big step with the introduction of Mac OS X, a modern operating system based on BSD Unix. It even shipped a version of the OS specifically optimized for server use, bundling it with tools like WebObjects, a sophisticated application server. Most recently, Apple announced a line of datacenter-ready hardware, beginning with the slender, rack-mountable Xserve.

But will this be enough? Does Apple's new, server-oriented product line deserve consideration as your next application- hosting platform? Or is it simply too late for Steve Jobs and company to break out of the desktop PC niche they've carved for themselves?

Not Your Father's Mac

Prior to Mac OS X, few administrators took the Macintosh seriously in the server room. Although it had continued to evolve since its introduction in 1984, by the mid-1990s the classic Mac OS was definitely showing its age.

Beginning with Windows 95, Microsoft had been steadily adding modern features to its operating systems, including memory protection and preemptive multitasking. Meanwhile, lacking even a proper kernel, the Mac OS was sluggish and crash-prone. Apple had failed to keep up with even its own innovations; though it had been shipping Macs with PowerPC processors since 1994, many core Mac OS functions remained tied to the older Motorola 68000-series CPUs.

Mac OS X wiped the slate clean. Apple's engineers wrote off much of the legacy of Macintosh hardware, focusing only on those machines with PowerPC G3 processors and later. The new OS was a complete rewrite, employing a sophisticated kernel architecture to rival that of any modern operating system. Apple's goal was to create a system that wedded Macintosh usability with unprecedented power—and in large part, Apple succeeded.

Unix Inside

The core of Mac OS X is the Mach 3.0 microkernel, developed at Carnegie-Mellon University. Apple engineers have had a long history with Mach. Prior to Mac OS X, they used the technology to create MkLinux, a microkernel version of Linux for PowerPC processors.

Linux code is subject to the GNU Public License (GPL), however, which poses problems for commercial software vendors. Rather than relying on GPLed code, Apple chose to base its new Mac OS on BSD Unix, which carries a less restrictive license. Apple engineers augmented the Mach kernel with subsystems derived from several 4.4 BSD-Lite2 implementations (including FreeBSD and NetBSD), building a foundation for the new OS that became known as Darwin.

But work didn't stop there. The Mac OS X team layered still more sophisticated APIs on top of Darwin, creating an advanced development environment rich in the kind of user-friendly features we've come to expect from Apple. These included a sophisticated graphics subsystem named Quartz; a compatibility interface for traditional Mac OS APIs called Carbon; and Cocoa, an advanced set of object-oriented APIs inherited from the NextStep/OpenStep OS, which Apple acquired in 1996.

Apple engineers are accustomed to working under strict secrecy, sharing little of their work with the outside world before the shipping date. In a rare exception to typical Apple policy, however, the company recognized the wisdom of obtaining community input on this new OS. Though the BSD license lets companies ship derivative products without including source code, in 1999 Apple turned Darwin over to the public.

Is It Open Source?

Making the leap wasn't easy. Free software advocate Richard Stallman outspokenly disapproved of early versions of the Apple Public Source License. Fortunately, most of the issues Stallman cited in his open letter criticizing Apple have since been addressed.

This isn't to say that Apple has created an operating system with an open-source developer base to rival that of Linux or FreeBSD, however. Though Apple claims over 100,000 registered Darwin developers, most of the core code—including kernel and driver development—is contributed by Apple engineers, rather than by the community at large.

This fact alone doesn't invalidate Darwin as open-source software. Similarly, Netscape employees continued to contribute the largest portion of code to the Mozilla browser, even after turning the project over to the open-source community. But remember, the Darwin distribution includes none of the graphics subsystems, flashy GUI, or higher-level APIs of Mac OS X. Apple hasn't released the source code to those packages, and probably never will.

Because so much of its value stems from Apple's closed, proprietary engineering, practical administrators will view Mac OS X chiefly as a commercial product, rather than as an open source one. Still, Apple brings many strengths to the server OS market in product and UI design.

Saving Through Simplicity

There are already several well-entrenched, fully open-source operating systems available, and several of these will run on Apple's PowerPC-based hardware. In fact, Apple doesn't market Darwin as a replacement for other plain-vanilla Unix operating systems at all. "Our value-add here is really Apple's ease-of-use," says Tom Goguen, Apple's director of server software.

Prior to joining Apple, Goguen worked for both the Solaris division at Sun Microsystems and Eazel, developers of the user-friendly Nautilus GUI shell for Linux. As he sees it, for systems administrators, time really is money. Recognizing this, Apple has poured a great deal of development effort into creating management interfaces of near idiot-proof simplicity, for both the operating system itself and its associated software.

Administrators familiar with Mac OS X as a desktop operating system will find the same consistent UI throughout the management tools included with Mac OS X Server. For example, the Server Manager control panels let administrators configure any Internet service with a single mouse click. Goguen believes this translates directly into IT cost savings. "It's not just the polish on the outside," he explains. "Those little details really matter."

To Bill Woodcock, research director for the nonprofit Internet networking consultancy Packet Clearing House, having a unified interface across Apple's product line is a clear advantage. "Maintaining two operating systems is a pain," he says. "We all know this. Sun won't give us what we want on a laptop. Apple clearly has the best laptops, so we're going to keep using them. Now we can use them with the same OS that's running on the server."

Behind the Curtain

But make no mistake, beneath the object-oriented GUI wizardry of Mac OS X beats the heart of a true-blue Unix system. For those occasions when windows, icons, and tabbed menus just won't do, Apple also provides a shell interface (tcsh is the default). Just launch the Terminal application, and the full power of the command line is yours.

Apple advertises that every copy of Mac OS X ships with the Apache Web server preinstalled. Experienced Unix admins will find that Mac OS X ships with most of their favorite tools included as well, though the GUI gives no hint of their presence. All of the essentials are here: grep, awk, sed, vi, emacs, and even Perl will run right out of the box. The number of Unix applications and utilities available on Mac OS X is growing steadily, thanks in large part to independent efforts to bring the FreeBSD Ports collection to Darwin.

The best organized of these is the Fink Project (fink.sourceforge.net), which lets Mac OS X users download its growing library of precompiled Unix tools for Darwin nearly effortlessly, using package management tools ported from Debian Linux. Even many X Windows apps can now run natively on the Mac OS X desktop, thanks to a "rootless" port of XFree86.

Porting Pitfalls

If you want to compile your own Unix utilities, Apple provides a complete set of developer tools on its Web site, free of charge. These include both GNU tools like gcc, gdb, and make, as well as Apple's own advanced, GUI-based developer environment. But porting Unix applications to the platform presents a unique set of challenges, some of which aren't immediately apparent.

For example, suppose you wanted to upgrade your Mac OS X server to run Apache 2.0 (instead of 1.3.23, the latest from Apple as of this writing). Download the stock Apache 2.0.36 tarball, and you'll be able to extract, compile, and run the server without error. However, there's a hidden catch.

Apple's HFS Extended—the preferred filesystem for Mac OS X—is case preserving, but not case-sensitive. This is a potential security problem for Apache, which uses case-sensitive access control lists. If a Webmaster were to restrict access to a file called index.html, for example, a user could still access the file as INDEX.HTML. The case-insensitive HFS Extended filesystem would return the same physical file, ignoring the restriction on the lowercase filename.

Apple has already released a patch for its version of Apache that addresses this problem. What's more, technically, there's nothing "wrong" with either the Apache code or Mac OS X. Each is behaving as expected; this is simply a unique situation related to HFS Extended. However, there's no warning at compile time to alert administrators to the problem. The lesson is to keep your eyes open, and be aware of potential pitfalls. Mac OS X is neither FreeBSD nor Linux. It's a brand-new beast altogether, with its own unique behavior.

Playing in the Majors

That's part of the problem, according to Laura Finkelstein, group marketing manager for volume systems products at Sun Microsystems. From Sun's point of view, Mac OS X is simply far too new a product to be trusted with mission-critical applications.

"I think it's a credible Unix," Finkelstein says, "but it really hasn't gained the support of the developer community, and it hasn't been bulletproofed at all to the magnitude that Solaris has. It hasn't had people running it who have the stringent requirements of Solaris." Finkelstein believes that's a risk Sun's customers just won't take.

She also points to a lack of commercial applications available for the platform. "There are a huge number of applications that have been ported to Solaris, versus the OS from Apple," she says. This means not just open-source software, but major commercial applications, too. "Solaris has been around for a long time and has been a favorite of developers," Finkelstein says.

Still, Apple's platform is beginning to win favor among developers, including some of the top enterprise software vendors. In a statement released earlier this year, Sybase vice president Dr. Raj Nathan said that his company is "committed to becoming the standard enterprise database running on Mac OS X." Oracle, too, has announced plans to port its Oracle 9i Real Application Clusters to the platform, though no schedule has been announced as of this writing. Others will doubtless follow.

Java programmers, in particular, have been watching Mac OS X, owing to Apple's stated aim of creating the world's premiere platform for Java development. So far, it has done an admirable job; every copy of Mac OS X ships with a complete Java 2 Standard Edition implementation that's optimized for the platform. Enterprise developers will have to look elsewhere for support, however. As of this writing, Apple has no plans to provide a J2EE implementation.

Apple Against the World?

So will Mac OS X eventually unseat established commercial Unix variants like Solaris, AIX, and HP/UX? Not likely. Sun's Finkelstein quickly dismisses the idea that Apple's new OS is a threat to her company's position in the Unix market. "This product isn't really coming after the traditional Sun base," she says. "It's allowing people to buy more Apples. It's not really penetrating new space."

Instead, Finkelstein sees Mac OS X and Solaris as complementary products. "Sun is always very happy to have more Unix product offerings out there," she says, "because we do believe in the openness of Unix."

And forget about Mac OS X being a "Linux killer," too. Even on Macintosh hardware, some administrators will always prefer a completely free OS to a proprietary product from Apple. "The biotech world is 100 percent open source," says Kai Staats, CEO of TerraSoft, a Linux vendor whose Yellow Dog Linux product line focuses exclusively on the PowerPC market. "Why would you port an open app to a closed OS for reduced performance and increased price?"

Quite simply, Mac OS X won't kill Linux because there's no reason for Linux to die. Instead, the two products will continue to share the Unix market on Apple's hardware—including the new Xserve rack-mount servers. "As an Apple OEM VAR, we will be pleased to offer the Xserve with Yellow Dog Linux preinstalled," says Staats.

A Seat at the Table

Although Apple is far from ready to conquer the Unix world, Mac OS X gives it the solid backing it needs to hold onto its traditional core markets, including Mac-centric workgroups, K-12 education, and academia. "[Apple isn't] going after ISPs," says Staats, "but rather research, and in particular, bioinformatics."

When the Mac was first introduced, putting an affordable, easy-to-use PC on every desktop was the goal. Today, the desktop PC is almost a commodity product, while more and more critical computing tasks rely on a server-centric model. Addressing that need is a primary focus for Apple's server products, particularly in the area of high performance computing. "All of the popular clustering software already runs on Mac OS X," says Apple's Goguen.

Recognizing the need to support a gradual migration to its platform, Apple has discarded its traditional reliance on proprietary solutions in favor of a more standards-based approach. For this new strategy, interoperability is key. "In the past, people tended to see the Mac as this closed, proprietary platform," says Alex Grossman, Apple's director of server and storage hardware. "Today, I like to think that we're the best citizen in the data center. We play well with everybody."

This commitment and Apple's traditional strengths in product and interface design are likely to win Mac OS X a growing number of converts among those looking for efficient, reasonably-priced, easy-to-use server solutions. By offering a range of well-designed hardware products, all of which run the same Unix-based OS, Apple has earned itself a unique place in today's computing market. At the very least, it's one that should not be overlooked.


Neil is senior technology editor for New Architect, and has worked with both Macs and Unix for most of the last decade. You can reach him at [email protected].



Apple's Server Hardware

A 1U rack mount server...from Apple? You got it. And like most products from the Cupertino, California-based computer maker, the new Xserve doesn't skimp on frills. "We looked at a server and we asked ourselves, what is a server?" says Alex Grossman, Apple's director of server and storage hardware. "It needs processing power, it needs I/O, and it needs storage."

The box that Grossman's team came up with has all three. With up to two CPUs, DDR RAM, Gigabit Ethernet, FireWire, and as many as four RAID-capable drives (each a master on its own IDE bus), the Xserve delivers a lot of power in a very small package. "It's the fastest Mac architecture we've ever designed," Grossman says.

The Xserve distinguishes itself through software as well. Unique to Xserve's version of Mac OS X is Server Monitor, a sophisticated GUI application that lets administrators manage whole server farms remotely. Or, if you prefer a third-party management tool like HP OpenView, Xserve also supports SNMP monitoring.

Everything about Xserve, from its sleek faceplate to the simple thumbscrews used to install it, suggests quality. It has even spawned a miniature cottage industry. Nashville, Tennessee-based Marathon Computer already has several products on the drawing board to complement Apple's server, including a monitor/keyboard console.

But to Bill Woodcock, research director for Packet Clearing House, pricing remains an issue for the Xserve. "A four-pack of Sun servers is less expensive than one Xserve," he says. For the cost, Woodcock says, he had hoped for more features, such as RAID 5 compatibility and support for larger drives.

If bigger, more robust storage is what Woodcock wants, however, he'll soon have his wish. Apple has announced plans to release a rack-mount storage unit to complement Xserve by the end of 2002. The new unit will hold up to 14 drives in a single 3U enclosure, and will support RAID 0-5 in any combination. Clearly, the era of Apple server hardware has only just begun.

—NM


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.