Tél : +41 21 312 94 15
www.octo.com
© OCTO 2015
Avenue du théâtre 7
CH-1005 Lausanne - SUISSE
Un back-end ?
On peut s’en BaaS-ser !
Romain Felden
Grégory Bataille
Our use case
Decision factors
Implementation
Operating the platform
Beyond our use case
In a nutshell
2
Agenda
Our use case
3
• Institute of Global Health
• Offline mobile application
• Stop-tabac — Stop-cannabis — Stop-alcool
• Integrate a social platform
• Mutual support
• Share experience
• Candidate app?
4
Our use case
• We are at the end of year 2013
• 1 year on the App Store (released early 2013)
• 5,000+ users
5
Our use case
Our use case
6
• Focus on UI
• Short time to market
• Small but unknown volume
• Users, posts, comments, …
7
Our use case
Our use case
8
wow
much app
so backend
• No existing data
• Simple data model design
• Easy maintenance and evolution
9
Decision factors - data
• Able to run simple jobs (CRUD)
• Will probably grow over time
• Accessible technology / language
10
Decision factors - processing
• Quick and easy deployment
• Non critical response time
• Low cost of ownership
11
Decision factors - operating
• Scalability
• Technology
• Pricing
• Vendor lock in
• Privacy
12
Decision factors - cloud ?
Decision factors - cloud ?
13
Vendor Native SDK Extra features
Facebook
Android, iOS, Windows
Phone, OS X, Windows, Unity,
JavaScript, PHP, Arduino, …
Push notifications,
analytics, crash
reporting
Google
Android, iOS,
JavaScript
Analytics (limited), own
subdomain
Microsoft
Android, iOS,
Windows, Xamarin
Push notifications,
analytics, crash
reporting
Appcelerator
JavaScript,
Android, iOS
Push notifications,
analytics
disclaimer: 2015 data
Decision factors - cloud ?
14
API calls Storage Transfer Push
30 req/s
+
1 background job
20 GB (database)
+
20 GB (files)
2 TB / month
1,000,000
recipients
100 concurrent
connections 1 GB 10 GB / month N/A
500,000 API calls
500 active devices
1 background job
20 MB (lol)
165 MB / day
(daily rollover)
1,000,000
recipients
N/A N/A N/A N/A
disclaimer: 2015 data
15
Architecture
16
SDK
REST
CLI
Cloud Code
GUI
PushStorage
Client / User Developer / Operator
Back-endFront-end
API
• First version
• iOS SDK
• CRUD
• Scheduled jobs
• Push notifications
17
Implementation - basic features
Implementation - iOS SDK
18
Implementation - iOS SDK
19
Implementation - Cloud Code
20
Implementation - Cloud Code
21
Implementation - Cloud Code
22
Implementation - Cloud Code
23
Implementation - scheduled jobs
24
Implementation - scheduled jobs
25
Implementation - push notifications
26
Implementation - push notifications
27
Implementation - push notifications
28
Implementation - push notifications
29
Implementation - the product
30
• Fast development
• Difficult to debug/test
• Expectations met
• Android port
31
Implementation - Looking back & going further
Implementation - Android SDK
32
• PFObject (iOS) vs. ParseObject (Android)
• Callbacks vs. Promises
• Caching issues
• Server development very hard to test / debug
33
Implementation - caveats
• Deployment
• Supervision
• Browsing the data
• Cost
34
Operating the platform
• Parse CLI
• Push with extra oomph
• Deploy vs. develop
35
Operating the platform - deployment
Operating the platform - deployment
36
Operating the platform - supervision
37
Operating the platform
supervision
38
Operating the platform
supervision
39
Operating the platform - supervision
40
Operating the platform - supervision
41
Operating the platform - supervision
42
Operating the platform - browsing the data
43
• Easy to browse
• Difficult to read
• Painful to update
44
Operating the platform - browsing the data
• Freemium model
• Never exceeded free rate
• Cf. supervision (API limit - 30 req/s)
45
Operating the platform - cost
• More Cloud Code (admin)
• REST API
• Dynamic website
• Local server
46
Beyond our use case
Beyond our use case - dynamic website
47
Beyond our use case - dynamic website
48
• Node wrapper
• Hooks unsupported
• https://github.com/flovilmart/parse-develop
49
Beyond our use case - local server
• Offers increased dramatically
• Mostly target startups / POCs
• Speed is a factor
• Development + Operations
50
In a nutshell

Un backend, on peut s'en BaaS-ser