Over a million developers have joined DZone.

Dropbox Drops Sync and Datastore APIs, Move Your App to Open Source Sync

· Integration Zone

Visually compose APIs with easy-to-use tooling. Learn how IBM API Connect provides near-universal access to data and services both on-premises and in the cloud, brought to you in partnership with IBM.

[This article was written by J. Chris Anderson, Co-Founder and Chief Architect of Mobile at Couchbase.]

Dropbox recently announced that they are deprecating their Sync and Datastore APIs to focus instead on their Core API. While we can certainly understand the imperative to focus, that doesn’t change the position many of the developers that rely on these APIs find themselves in.

As software providers, we can definitely empathize with the Dropbox engineers, but even more so with the users leaving comments like these on the deprecation announcement:

"you just killed one of benefits you had over other companies competing in this market.” - SneakerXZ

"I cannot express how disappointed I am in this decision. I would not have gone down the Dropbox Sync path if I'd known Dropbox was going to pull the carpet out from under me.” - Steve S

"basically what you are saying is that you are not able to support syncing scenarios so its better idea to have lots of independent developers come up with their own (most probably flawed) solutions” - Antti Rantanen

If you’ve been burned by losing access to an API, suddenly the appeal of open source ecosystems is a lot more clear. In this case, consider it an opportunity to move to a more powerful stack, and one that you control.

If you want an open source full featured sync solution (with native libraries for most mobile platforms), we've put decades of engineer time into Couchbase Mobile. It has more than enough capability to replace most anything you might be using the Dropbox Datastore or Sync APIs to do. And once you’ve started using it, you’re ready to take advantage of richer features like fine grained access control, web hooks, and p2p.

Let’s look at the Dropbox API features, and see which Couchbase Mobile features you’d migrate to. In a future blog post we’ll dive into the code for some of these migrations.

Both the Sync and the Datastore APIs authenticate using the user’s Dropbox account. Couchbase Mobile uses 3rd party auth (including built-in support for Facebook login, and extensibility for integrating with your existing authentication server) so there’s no need to send users to sign up for another service.

The Dropbox Sync API is just a filesystem with operations to replace or append to binary or string files. This maps to binary attachments in Couchbase Mobile. You can learn more about attachments in the documentation, or check out this post about peer to peer photo sharing using attachments.

The Dropbox Datastore API is a JSON API, where developers can create tables and fill them with records. There is even a special record type for lists. This API is pretty cool, it’s targeted squarely at the use cases that are the sweet spot for Couchbase Mobile. That also means it isn’t hard to swap one out for the other.

One difference in data models between Dropbox Datastore and Couchbase Mobile is that with Dropbox, the developer registers conflict resolution strategies that run during sync. With Couchbase Mobile, conflict resolution can be done offline, giving developers flexibility about when and how they merge conflicting changes.

Aside from that, any code that works with records should be able to map cleanly to Couchbase Lite documents operations. Tune in to the next post in this series for an example of how easy it is.

Visually compose APIs with easy-to-use tooling. Learn how IBM API Connect provides near-universal access to data and services both on-premises and in the cloud, brought to you in partnership with IBM.

mobile,cloud,api,integration,couchbase,dropbox,json api,dropbox sync

Published at DZone with permission of Benjamin Ball. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}