每天推送5篇优质英文文章 · By makers, for makers

运营 1446 天, 推荐好文 6,075 篇, 原创简评 1,208,730 字, 原文总阅读时间 54,320 分钟, 180,546 人订阅

用支付宝、信用卡、PayPal 请我喝杯咖啡

(原链接可能被墙了,打印成 pdf 放到这里 https://nfil.es/w/OWKCXl/) 这是今年 @Scale 上,Facebook 的这个 talk 的文字版。 Core Data 是瓶颈。 Core Data is at heart an object-relational mapper (ORM). It provides features like full normalization and synchronous consistency across multiple isolated contexts. But since the Facebook app is essentially a cache for data that lives on the server, a completely normalized representation of data wasn't needed. All of those fetch-or-creates while parsing JSON objects were resource-intensive and unnecessary. We developed our own bare-bones form of model objects guided by three principles:
  • Immutability. In this new data layer, models are completely immutable after creation.
  • Denormalized Storage. To serialize these models to disk, we chose to use NSCoding.
  • Asynchronous, Opt-In Consistency. By default, there are no consistency guarantees.
打赏 如果你觉得我推荐的这篇文章(或我写的简评)不错,对你有所启发,可以考虑请我喝杯咖啡。 感谢 158 位读者捐款了 $745.09
分享到:
Ads