Facebook posts its internal C++ software library

Facebook's Folly library includes many components tuned to high-performance operations

Facebook has released a library of C++ software components used to help run its site, the social networking company announced Saturday.

By releasing this library, called Folly, Facebook will be able to release more of its internal programs as open source, because they rely on different components in this library.

"One clear bottleneck to releasing more work has been that any open sourced project needed to break dependencies on unreleased internal library code," wrote Facebook software engineer Jordan DeLong, who posted an entry on Facebook announcing the release.

Facebook engineers also announced the release at a C++ conference the company is holding Saturday at its campus at Menlo Park, California.

Facebook has relied on open-source software, such as MySQL, PHP and memcached, to run its sites. And so the company has made a point of releasing its own internal programs as open-source software as well, such as the HipHop PHP compiler and the Thrift service sharing framework.

For many of its open source releases though, Facebook developers have had to rewrite some of the functionality that was borrowed from this library. By releasing the library itself, Facebook will be able to "continue open sourcing parts of [its] stack without resorting to reinventing ... internal wheels," DeLong wrote.

Even if developers don't plan on using Facebook developed applications, they should still take a look at this library, as it includes many utilities of possible to use in other environments, DeLong said. Many of the components available in Folly run more quickly than their equivalents available elsewhere, he boasted. "Our motivation was to build components that were faster and more efficient than what we previously used," he wrote. These utilities were designed to be used in heavy production environments, across thousands of servers.

The components cover a range of functionality. One component was designed to use memory more efficiently. Another reduces contention. The AtomicHashMap utility cuts the amount of time a piece of data in memory is locked by an operation, which can slow performance and cause bottlenecks in heavily used environments. A set of string manipulation components use fewer CPU cycles than formatters in other C++ libraries, DeLong boasted.

The Folly library is posted on GitHub, and Facebook will add new components as they are written, according to DeLong.

Joab Jackson covers enterprise software and general technology breaking news for The IDG News Service. Follow Joab on Twitter at @Joab_Jackson. Joab's e-mail address is Joab_Jackson@idg.com

Join the newsletter!

Or

Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.
Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Joab Jackson

IDG News Service
Show Comments

Most Popular Reviews

Latest Articles

Resources

PCW Evaluation Team

Cate Bacon

Aruba Instant On AP11D

The strength of the Aruba Instant On AP11D is that the design and feature set support the modern, flexible, and mobile way of working.

Dr Prabigya Shiwakoti

Aruba Instant On AP11D

Aruba backs the AP11D up with a two-year warranty and 24/7 phone support.

Tom Pope

Dynabook Portégé X30L-G

Ultimately this laptop has achieved everything I would hope for in a laptop for work, while fitting that into a form factor and weight that is remarkable.

Tom Sellers

MSI P65

This smart laptop was enjoyable to use and great to work on – creating content was super simple.

Lolita Wang

MSI GT76

It really doesn’t get more “gaming laptop” than this.

Featured Content

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?