Acknowledging the relationship between Microsoft and the open source community has been contentious, a Microsoft official Thursday nonetheless emphasized the company's embrace of the open source paradigm, even if it was not necessarily for altruistic purposes.

The presentation by Microsoft's Stuart McKee, who holds the title of national technology officer for the United States, continued a pattern in recent years that has seen Microsoft publicly embracing the open source movement and even funding it.

[ Read InfoWorld blogger Zack Urlocker's take on Microsoft's open source glasnost. ]

"[Microsoft feels] strongly that Microsoft's success has been based on the fact that we can run a lot of diverse technologies on the Microsoft platform including open source," McKee said. Microsoft has had a "contentious" relationship with open source proponents but "things are really changing," he said.

McKee, who focuses on governmental customers for Microsoft, offered his perspectives in a keynote speech at the OSBC (Open Source Business Conference) in San Francisco.

Microsoft contributes to open source efforts, including sponsoring Linux, he said. Microsoft has contributed 20,000 lines of device driver code to the Linux kernel so Linux can run on Microsoft's Hyper-V virtualization technology, noted Robert Duffner, Microsoft director of open source strategy, who also was present at OSBC.

"To be quite honest, it's not that we're altruistic, necessarily. Our key desire is to satisfy customers. We build software for a living -- that' what we do," McKee said. "And we understand profoundly that a diverse ecosystem is absolutely critical to satisfying the needs of customers and increasingly, that ecosystem does include open source."

Among other examples of Microsoft's embrace of open source cited by McKee included the Microsoft.web site for the Microsoft Web platform, which features 23 open source applications out of a total of 25 applications. Also, Apache software, the MySQL database, and PHP all run on Microsoft's Windows Azure cloud platform, McKee said.

Microsoft in recent years has been endorsing open source via efforts such as sponsoring the Apache Foundation. The Microsoft-backed CodePlex Foundation, meanwhile, was set up last year as an effort to enable collaboration between open source communities and software companies.

Prior to McKee's appearance, David Recordon, head of open source initiatives at Facebook, stressed the emphasis on open source software on the site.

"We rely on the Varnish project. Varnish is an incredible open source cache," Recordon said. Billions of requests are served through Varnish everyday around the world on Facebook, he said.

To boost PHP performance on the site, Facebook developed an open source technology, HipHop for PHP, which transforms PHP code into highly optimized C++, said Recordon.

Facebook also uses the open source Memcached distributed memory object caching system and the MySQL database, Recordon said. Memcached, he said, "is sort of like that magic pixie dust" for scalability.

"We really use MySQL as our data store," offering data integrity, decent backup tools and reliability, Recordon said.

This story, "Microsoft says its contentious relationship with open source is changing," was originally published at InfoWorld.com. Follow the latest developments in Microsoft and open source at InfoWorld.com.