Mobile-First Architectures Alexander Stigsen QCon 2015 Who am I? - - PowerPoint PPT Presentation

mobile first architectures
SMART_READER_LITE
LIVE PREVIEW

Mobile-First Architectures Alexander Stigsen QCon 2015 Who am I? - - PowerPoint PPT Presentation

Mobile-First Architectures Alexander Stigsen QCon 2015 Who am I? Former Mobile Engineer from Nokia Working on mobile since 1999 Realm Currently CEO of Realm, building a modern mobile database Very biased :-) Problem Mobile


slide-1
SLIDE 1

Mobile-First Architectures

Alexander Stigsen QCon 2015

slide-2
SLIDE 2

Who am I?

  • Former Mobile Engineer from

Nokia

  • Working on mobile since 1999
  • Currently CEO of Realm,

building a modern mobile database

  • Very biased :-)

Realm

slide-3
SLIDE 3

Problem

Mobile Apps are still being build as if they were web apps from the 90s.

Realm

slide-4
SLIDE 4

Realm

slide-5
SLIDE 5

Mobile apps are still treated as dumb clients

Realm

slide-6
SLIDE 6

Why?

  • This is how (web) apps have been developed in

the last decade. So this is what developers are used to.

  • Existing API’s are designed with this mindset, so

the mobile apps has to conform.

  • Makes it easier to build both mobile and web

versions of the app.

Realm

slide-7
SLIDE 7

Drawbacks:

User Experience Connectivity Tolerance Server Cost

Realm

slide-8
SLIDE 8

User Experience

  • Users have much higher

expectations of native apps

  • Apps gets more advanced

and capable and as such need more complex data models

  • No latency or wait times

accepted

Realm

slide-9
SLIDE 9
  • Users expect apps to always work
  • The failed promise of ubiquitous

connectivity

  • Even in SF connectivity is spotty
  • Go to the countryside, still many places

with no connectivity

  • Crises or huge events often takes down

connectivity

  • Developing countries
  • Next big market
  • Low connectivity
  • Expensive data plans

Connectivity

Realm

slide-10
SLIDE 10

Escalating Server Cost

  • #1 Killer of startups
  • App may need millions of

users before being able to monetize

  • Server load scale with

number of users

  • Amazon is expensive!

Realm

slide-11
SLIDE 11

Problems with the cache approach?

  • Object access
  • Can be slow (if they have to get result from server)
  • Access to un-cached objects will not work when offline
  • Queries
  • Will be slow (as they always have to go over the network)
  • Will not work when offline
  • Mobile team is dependent on backend team to implement

features (slow iterations)

Realm

slide-12
SLIDE 12

Solution?

Realm

slide-13
SLIDE 13

Endpoint Computing

Realm

slide-14
SLIDE 14

iPhone 6

1.4 Ghz Dual-core CPU 1 GB memory 16-128 GB storage Quad-core GPU

Modern phone hardware

Realm

slide-15
SLIDE 15

Use it!

  • Primary store on phone
  • User has all his data on the device
  • Always available
  • Always instant
  • Backend is only for coordination,

backup and statistics

Realm

slide-16
SLIDE 16

data cache “smarts”

Server-First

Realm

slide-17
SLIDE 17

data cache “smarts”

Server-First

data “smarts” backup

Mobile-First

Realm

slide-18
SLIDE 18

Where does this work?

From the data perspective, there are fundamentally three kinds of apps:

Realm

  • Single user apps
  • Collaborative apps
  • Browser apps
slide-19
SLIDE 19

Single user apps

All the in the app is owned by and only accessible by a single user (but this user may have multiple devices). Examples: Mint, Expensify, Email apps…

Realm

slide-20
SLIDE 20

Collaborative apps

The user has access to a subset of a larger dataset, where parts are shared with other users. Examples: Slack, Asana, Facebook, Twitter…

Realm

slide-21
SLIDE 21

Browser apps

The user is mostly searching and browsing a larger set

  • f data created by other users.

Examples: YouTube, Tinder, Twitter…

But could probably still benefit from keeping the non-browsing data local

Realm

slide-22
SLIDE 22

Mobile Driven Design

Change of mindset for developers Start from device, building the best possible experience for the users Then let that shape the backend, rather than the other way around

Realm

slide-23
SLIDE 23

How does this affect your backend API?

Mostly One-way: Examples: email, facebook timeline, twitter stream

  • Probably not much change needed.
  • Retrieve list of changes since last update

Two-way sync Examples: collaboration, games, todo lists…

  • Much harder to implement (especially the offline case)
  • Need to handle conflicts

Call to action: we need much better synchronization tools

Realm

slide-24
SLIDE 24

Is this always the right choice?

Primarily for apps that are user-centric (which most are). Not for apps that just browse other peoples data

Realm

slide-25
SLIDE 25

Benefits of Endpoint Computing

  • Much more responsive apps
  • Works even with weak or spotty connectivity
  • Huge reduction of server load
  • Mobile team can iterate much faster

Realm

slide-26
SLIDE 26

The Next Frontier

  • Live Collaboration
  • Internet of Things
  • Virtual Reality
  • Wearables
  • Drones

Realm

slide-27
SLIDE 27

http://realm.io

Q&A