By Mitch Wagner ,
Yahoo is switching from a proprietary scripting language to open source, broadening an already wide commitment to open-source computing.
Yahoo decided to use PHP instead of its previous language of choice, C++, for several reasons: to take advantage of the large, open-source developer community, and because PHP was designed for server-side Web scripting.
Also, PHP has a broad array of debugging and profiling tools, a simple and clear syntax that makes it relatively easy to program to, and performs well, said Yahoo engineer Michael Radwin in a presentation at the recent PHPcon 2002 conference.
C++ is more expensive because it has three different variants, requires training, doesn't integrate well with authoring tools and databases, and provides limited functionality, Radwin said.
"Y! is a cheap company," the presentation said. Noting the current recession, Radwin said curtly: "Can't afford to waste engineering resources."
Yahoo is using PHP for new properties, such as the remember.yahoo.com site for Sept. 11, 2002, and for internal tools, such as content management. Most Yahoo properties are integrating PHP slowly, and there are no plans to rewrite the entire site. Early adopters include PayDirect, Yahoo Classified, the personalized news page, and almost the entire travel Web site.
Yahoo has found that coding PHP requires discipline. It's easy to learn and "very easy to get some pages up quickly," but mixing application logic and presentation code is problematic, making it difficult to change the appearance of a page, Radwin said.
Open source has been integral to Yahoo's growth.
"Open-source software runs our business," he said, including Perl, Apache, FreeBSD, GCC, and the GNU toolset. Yet the company also builds its own software in-house.
The portal has 201 million unique users, 93 million of them active registered users. It gets 1.5 billion page views per day, running on 4,500 servers in 16 locations in the U.S., England, Latin America, and Asia.
The portal has 74 properties, such as mail, shopping, sports, news, games, and pets, and 25 international sites in 13 languages. The servers run 8.1 million lines of C and C++, 3 million lines of Perl, and are supported by 612 developers.
During the site's startup, in 1994-95, it ran on FreeBSD 2.1 on PC servers, running a homebrewed Web server called Filo, written with 6,767 lines of C displaying ads and using CGIs to serve up dynamic content such as searching and suggesting a site.
Later, in 1996-97, the site moved to FreeBSD 2.1 and 2.2 running Apache 1.1, using "lots of home-grown software," Radwin said. "Free stuff wouldn't scale [and was] immature."
In 1999-2000, the company moved to FreeBSD 4.1, with a few Solaris servers for Mail and Geocities. Yahoo considered and rejected alternatives to PHP.
Active Server Pages and Cold Fusion have advantages. They have rich third-party integration and professional support. But Cold Fusion has "ugly syntax," and the languages require licensing and run on Windows, which must also be licensed.
Also considered was Perl. That language supports FreeBSD, has broad libraries, and Yahoo was already using it. However, it provides poor sandboxing, leading to instability on the server, and it was not designed as a Web scripting language. Also, there are many Perl styles.
"Everyone's code looks different," which leads to collaboration problems, Radwin said.
Likewise, the company also considered and rejected Java Server Pages, servlets, and J2EE. The big surviving dot-coms like Yahoo have strong open-source commitments. Google, Amazon, and E-Trade all run on Linux.
"A lot of the people who got really interested in open source from the get-go were the new leading-edge technology companies that were willing to take a risk," said Aberdeen Group analyst Bill Claybrook. "It's not just the fact that they want to try something new; they believe they can save money."
Even when licensed from a vendor such as Red Hat, open-source software is inexpensive compared with proprietary alternatives, and Linux and FreeBSD are also highly reliable, which is important because uptime is vital to online companies.
Non-dot-com companies with legacy applications to support often use a mix of proprietary and open-source software, such as IBM WebSphere or BEA WebLogic running on Linux, said Stacey Quandt, analyst for Giga Information Group.
Broadcom seeking Sr Staff Business Analyst in San Jose, CA
CAST Software, Inc. seeking Sr Post Sales Engineer in New York, NY
Tower Hill insurance Group, Inc. seeking Programmer in Gainesville, FL
ISES, Inc. seeking C # Engineer in Bridgewater, NJ
Dell, Inc. seeking Counsel, Distribution Law, Channel Sales Division in Austin, TX
For more great jobs, career-related news, features and services, please visit our Career Center.
TechWeb's FREE e-mail newsletters deliver the news you need to come out on top.
Get definitions for more than 20,000 IT terms.
Editorial and vendor perspectives