Facebook iOS Infrastructure talk
I’d like to share this brilliant talk from Facebook regarding their experience in building Facebook app.
One of the most important problems for them was to tame model layer performance. As a part of their migration from HTML to native code, they used Core Data as a model layer for caching data (and I did the same for my Chat Tomat app). After some time as the number of models grew, the number of relations between them grew even faster, leading to exponential performance loss during startup.
The solution they came with is pretty similar to what I do in GuessMe app, the ancestor of Chat Tomat - using immutable objects stored in some plain storage like an array. The thing I liked the most from their talk is the architecture of Consistency Manager layer, notifying components about changes in related models from different components, say user’s profile picture displayed in dialogs. The component subscribes to changes for particular models, and once the other component asks Consistency Manager to update it, it gets notified about this change. Again, pretty similar to what I did for GuessMe (In my case it’s a singleton with properties such as user profile, and KVO notifications for property changes that work perfectly for models and for immutable arrays and dictionaries of them).