Offline-designed mobile app and Enterprise API layer

How would an offline-designed mobile app interact with an entreprise API layer? Would everything go through the synching mechanism? So there would be some kind of logic on the server? Or would requests be done directly to the API layer with local storage used as a local cache? Trying to figure out how to architect this.

Our offline support is based on replication, which means the intention is that data is transferred by sync. The app server would put data in the remote (Sync Gateway) database, which then gets synced to clients (and vice versa.)

If your app talks to the server using some other API and stores the results in the database, you’re not doing anything you couldn’t also do with Core Data or SQLite — you’re just using Couchbase Lite as a local data store.

That’s not to say that your app can’t use other APIs in conjunction with Couchbase Lite; just that the data from those APIs wouldn’t go into the database. As an example, RyanAir’s flight-reservations app uses Couchbase Mobile to keep a synced database of flight schedules, but when you book a flight the reservation is made by a direct call to their servers.