Wikimedia Apps/Team/iOS/Database Architecture

YapDatabase
We are currently transitioning to YapDatabase. Ann open source key-value store built on top of SQLite.

Data Stores
A WMFDataStore provides access to a specific type of object in the DB. Essentially there is a WMFDataStore subclass for each collection in the database. The current plans are to to have three Data Store classes:

WMFArticleUserDataStore
Used to access WMFArticleUserData which contains user data for a given article including whether an article is in history, saved, black list, last reading position.

WMFFeedDataStore
Used to access WMFFeedSection objects and associated content. A feed section defines a section in the Explore Feed. The associated content is 1 or more search results that are used to populate the section.

WMFArticleContentDataStore
Used to access WMFArticleContent objects which contain the full HTML and metadata about an article. This is the object used to populate the article content in a web view

Propagating Changes
Changes are propagated from the datastore in 2 ways:

WMF