Home About Eric Topics SourceGear

2013-04-23 10:00:00

Keep your CRUD off the Internet

Whenever I explain database sync for mobile, somebody asks, "What kinds of apps would benefit from that?"

The correct answer is: "ALL apps".

Actually, that's an exaggeration. I see no reason for my alarm clock or calculator apps to sync data with a server. Let me rephrase:

Sync is the best architecture
for apps where a database and a server are involved
.

CRUD over REST is an Anti-Pattern

Many apps today keep the data only on the server and access it using REST. This approach has some big negative consequences:

The real question is "What kinds of apps would benefit from having user interaction dependent on a wireless network with inconsistent coverage and random latency spikes?"

Your app does lots of basic database operations which are often referred to as CRUD (Create, Read, Update, Delete). These operations do not want to happen over a network. They want to happen in a database which is local, on the mobile device.

And so you need sync. In the background (so the user doesn't have to wait on it). With automatic conflict resolution.

And that's hard.

Solutions that make sync easy

Do you like SQL? If so, I invite you to look at Zumero, our database sync platform based on SQLite, the relational database software preinstalled on over a billion mobile devices.

Do you prefer NoSQL? Then I'm sure our worthy competitors over at Couchbase would be happy for you to look at Couchbase Lite.

Either way, keep your CRUD off the Internet.