![]() ![]() This means that the UI’s job is to only reflect the tables in the database. Removing this extra layer in favor of using only SQLite to handle concurrency, caching and transactions meant a huge gain in time.Įvery query such as updating profile pictures in the contact list, retrieving the messages received are done by SQLite. Traditionally, sharing data across features within a program needed in-memory data caching and transaction subsystems (which meant additional loading time between transfers). A single view controller was able to handle all this necessary flexibility. ![]() As you can tell, this meant a lot of unneeded redundancy.įor the new version, Messenger’s team managed to create dynamic templates that could be driven directly by different SQLite tables, depending on what information was requested (list of names, profile pictures, groups, etc.). The app would load the appropriate screen depending on the appropriate situation. In the previous Messenger version, the code supported 40 different screen designs. Oh, and let’s not forget about the additional complexity that was avoided.īasically, if the OS did something good, they used it instead of building something custom. Not only did it reduce the size of the overall app, but it also speeded up the need to cache/load large custom-built frameworks, using the existing JSON processing library instead of building a custom one, etc. Most of the time, there are chances that the OS will provide sufficiently or even great alternatives for custom-built abstractions.Īs such, the Messenger team used the native iOS toolset to support a wide variety of application feature needs. Thus, many times there is no need for further abstractions that sit on top of the OS. Use the OSĪs operating systems are continually evolving, they provide better and better solutions for problems. They built the unified architecture around four principles: use the OS, reuse the UI, leverage SQLite database and use the server. Messenger’s engineering team got to work. It seemed there was potential in reaching significant gains in speed, lower binary size and fewer lines of code. Nonetheless, prototyping with new technologies appeared very promising. However, this is mostly the case when you use the same tools with the same technology, only applying paradigm shifts such as focusing on clean code principles. In order to sustain such massive changes, new architecture needed to be built from the ground up, which in turn meant rewriting the entire codebase (with a new client core and a new server framework).įrom experience, completely rewriting a codebase is a massive undertaking, that is not always justified, because generally, it brings only marginal benefits in efficiency. The need for hierarchized tradeoffs – keeping the existing complex features such as video calling without affecting regular usage.It needs to have a smaller download size for added benefits (such as permitting faster updates).The app needs to be a simple, lightweight utility.With this clear question in mind, they managed to elaborate a few guidelines to orient themselves by, such as: And the driving question for their vision was, how would they do it if they started all over again, from scratch? Messenger’s team decided that it was time for re-engineering the app. Not only this, but cold starts (after a fresh reboot of a device) took much too long even on devices updated to the latest iOS (not even mentioning older versions). ![]() At its peak, the app’s binary file size (size on App Store) was around 130MB – keep in mind that Apple permits binary sizes up to 200MB on cellular data, so that was a red flag for Messenger’s engineering team that they were slowly approaching the existing limit as they were adding features upon features. It’s no wonder they decided to restructure the application. Basically, they used native code where possible, reusing the UI with dynamic templates powered by SQLite and they even built a server broker to operate as a universal gateway between Messenger and its server features. Codenamed Project LightSpeed, Facebook’s Messenger got a revamp on iOS, and from a technical standpoint, it’s a feat that deserves much praise. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |