It was clear that this architecture was not sustainable and it was time to rethink it. Ultimately, this design exacerbated the creation of nondeterministic code that was very difficult to debug or reproduce bugs. To make matters worse, News Feed utilized bidirectional data flow, stemming from its use of Apple’s de facto design pattern for Cocoa apps: Model View Controller. Objects in Core Data are mutable, and that did not lend itself well to News Feed’s multithreaded architecture. At the time, News Feed’s data models were backed by Apple’s default framework for managing data models: Core Data. Two years after Meta launched the native rewrite of the Facebook app, News Feed’s codebase began to have reliability issues. 2014: Establishing our own mobile frameworks Now, to celebrate the codebase’s 10-year anniversary, we’re shedding some light on the technical decisions behind this evolution, as well as their historical context. The app’s codebase reflects 10 years of evolution, spurred by technical decisions necessary to support the growing number of engineers working on the app, its stability, and, above all, the user experience. Without heavy caching from our build system, engineers would have to spend an entire workday waiting for the app to build.įBiOS was never intentionally architected this way.The app makes heavy use of code generation, spurred by Buck, our custom build system.There is almost zero raw usage of Apple’s SDK - everything has been wrapped or replaced by an in-house abstraction.It has dozens of dynamically loaded libraries (dylibs), and so many classes that they can’t be loaded into Xcode at once. It’s full of C++, Objective-C(++), and Swift.Since the app was rewritten in 2012, it has been worked on by thousands of engineers and shipped to billions of users, and it can support hundreds of engineers iterating on it at a time.Īfter years of iteration, the Facebook codebase does not resemble a typical iOS codebase: Facebook for iOS (FBiOS) is the oldest mobile codebase at Meta.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |