Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Cloud sync APIs for mobile developers
Search
Leah Culver
May 06, 2014
Programming
0
160
Cloud sync APIs for mobile developers
APIDays Berlin, May 6, 2014
http://berlin.apidays.io/
Leah Culver
May 06, 2014
Tweet
Share
More Decks by Leah Culver
See All by Leah Culver
Writing stable iOS applications
leah
2
190
Idea to launch - the start of a startup
leah
1
61
Say “yes” to user feedback
leah
0
50
Intro to Dropbox APIs
leah
0
260
Working with web APIs in Swift
leah
0
80
Dropbox APIs for JavaScript developers
leah
3
1.2k
Cloud sync APIs for mobile developers
leah
1
130
App Data, Everywhere: Cross-Device Content Sharing
leah
2
720
Cloud Sync for App Developers
leah
1
97
Other Decks in Programming
See All in Programming
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
3
410
From Subtype Polymorphism To Typeclass-based Ad hoc Polymorphism- An Example
philipschwarz
PRO
0
170
役立つログに取り組もう
irof
27
8.9k
Modern Angular: Renovation for Your Applications
manfredsteyer
PRO
0
220
Dev ContainersとGitHub Codespacesの素敵な関係
ymd65536
1
130
プロジェクト新規参入者のリードタイム短縮の観点から見る、品質の高いコードとアーキテクチャを保つメリット
d_endo
1
1k
Android 15 でアクションバー表示時にステータスバーが白くなってしまう問題
tonionagauzzi
0
150
CPython 인터프리터 구조 파헤치기 - PyCon Korea 24
kennethanceyer
0
250
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.2k
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
440
推し活としてのrails new/oshikatsu_ha_iizo
sakahukamaki
3
1.8k
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.1k
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
9
680
Visualization
eitanlees
145
15k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Designing for Performance
lara
604
68k
Gamification - CAS2011
davidbonilla
80
5k
Fireside Chat
paigeccino
32
3k
Learning to Love Humans: Emotional Interface Design
aarron
272
40k
Optimizing for Happiness
mojombo
376
69k
A better future with KSS
kneath
238
17k
Git: the NoSQL Database
bkeepers
PRO
426
64k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Transcript
Cloud sync APIs for mobile developers Leah Culver, Dropbox APIDays
Berlin 2014
Dropbox “Your [digital] stuff everywhere”
Wherever you are
Safe and secure
Share with friends
• Filesystem that just works • “The magic folder” Then
• Multi-device world • Mobile filesystem? Now
Dropbox APIs for mobile apps
Core API • REST-ish, OAuth 2.0, JSON • SDKs for
Android, iOS, OS X, Python, Ruby, Java, PHP • Community-supported libraries for C#, JavaScript, Perl, etc. HTTP API for files
• List files /metadata/<root>/<path> • Upload file /files_put/<root>/<path> • Get
a thumbnail /thumbnails/<root>/<path> • Share via a link /shares/<root>/<path> Core API
Core API is great. So what now?
• Cross-platform support • Sync across devices • Offline access
(bonus!) Mobile API challenges
Sync API
Sync API • Just like Core API • Filesystem for
mobile apps • Store and sync photos, videos, etc.
• iOS, Android, OSX • Handle offline caching and syncing
• Notifications of changes • Updates in real time Sync SDKs
Image Grid Sample
None
Image Grid Sample code iOS
Initialize the filesystem
Listen for changes
Display thumbnail
Great for files… but what about data?
Sync API file system-like interface Datastore API structured data Mobile
APIs
Datastore API • Storage for structured data • Like a
NoSQL database • Stored in the user’s Dropbox • Not files!
Store data in user’s own Dropbox ! • User owns
their data • Access to files/data outside your app • Free for developers
account→datastore→table→record→field→value Datastore API
Why not files? Monolithic → inefficient syncing Opaque → conflicts
Why not files? • Clearly defined structure • More efficient
syncing • Advanced conflict resolution
Similar to Sync SDKs … • iOS, Android, OSX, JavaScript,
Python • Handles offline caching and syncing • Notifications of changes • Updates in real time
Click the Box
None
Click the Box code JavaScript
level current_level 3 state table single record field value
Initialize datastore
Click listener
Listen for changes
Display level
Offline
None
• Local changes cached when offline • Syncs changes with
server when online • Automatically merge changes Offline / online syncing
• Conflicts resolved by the client • Handled by Dropbox
SDKs Conflict resolution
More… dropbox.com/developers/blog
github.com/dropbox opensource.dropbox.com
• Cross-platform SDKs • Both files and data • Users’
own Dropbox • Handles offline access, sync, and conflict resolution TL;DL
Questions? dropbox.com/developers
[email protected]
We’re hiring!
Photos http://www.flickr.com/photos/kky/704056791/ http://www.flickr.com/photos/eulothg/5906431611/ http://www.flickr.com/photos/tambako/2844515466/ http://www.flickr.com/photos/yourdon/10018150113/ http://www.flickr.com/photos/mager/2659619029/ http://www.flickr.com/photos/ben_grey/4582294721/ http://www.flickr.com/photos/adactio/12674602864/ http://www.flickr.com/photos/coofdy/11492948263/ http://www.flickr.com/photos/arts/42217172/
http://www.flickr.com/photos/drachmann/327122302/ http://www.flickr.com/photos/evergreenkamal/395448039/ http://www.flickr.com/photos/aliaholle/5888906660/ http://www.flickr.com/photos/vinothchandar/5148046888/ http://www.flickr.com/photos/shandilee/5062466679/ http://www.flickr.com/photos/swisscan/2514879116/ http://www.flickr.com/photos/yourdon/10018150113/