Thursday, August 18, 2016

Managing Consistency of Immutable Models

Peter Livesey:

The first problem we ran into was stability. Core Data is notorious for crashing if one small thing goes wrong. It’s really easy as a developer to introduce race conditions very subtly which can be tricky to debug. In general, we found that approximately 50% of the crashes that we had on our Core Data applications were in some way related to Core Data itself, and these crashes were one-offs here and there. It wasn’t one big bucket that we could fix them all, making it really difficult to diagnose these issues.

[…]

The final thing for us was scalability. Facebook has talked quite a lot, a couple of years ago, about that problem, scaling Core Data. They believe that Core Data is very difficult to scale to large applications. Given that our application has hundreds of view controllers and hundreds of models, we’re terrified of this.

[…]

To accomplish all these things we wrote RocketData. RocketData is a caching and consistency solution for immutable models. It’s intended to replace Core Data or at least fulfill that role in an application. It’s written 100% in Swift, and we really like it.

He uses “model” to mean the entity objects, i.e. NSManagedObject, rather than the entity descriptions (which Core Data calls the model).

Comments RSS · Twitter

Leave a Comment