Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Alexander Stigsen - Serverless in an Offline-First world

1fa9cb8c7997c8c4d3d251fb5e41f749?s=47 Realm
October 26, 2016

Alexander Stigsen - Serverless in an Offline-First world

Serverlessconf is a community led conference focused on sharing experiences building applications using serverless architectures. Serverless architectures enable developers to express their creativity and to focus on meeting user needs rather than spend time managing infrastructure and looking after servers.

Formerly a Nokia systems engineer, Alexander Stigsen is CEO & co-founder of Realm, a mobile database for iOS and Android, designed to help app developers build fast apps, faster. Realm is a YCombinator startup based in San Francisco with funding from Khosla Ventures, Scale VP, Andreessen Horowitz, Greylock, and more.

1fa9cb8c7997c8c4d3d251fb5e41f749?s=128

Realm

October 26, 2016
Tweet

Transcript

  1. Serverless in an Offline-First world ServerlessConf London 2016

  2. About me • Former mobile engineer at Nokia • 15+

    years of mobile experience • CEO & co-founder at Realm
  3. “Build Better Apps Faster”

  4. Realm Mobile Platform • Self-hostable realtime mobile backend • On-device

    cross-platform object database • Developed in the open, db fully open source • 16k+ GitHub stars, 100k+ active developers
  5. Realm is everywhere…

  6. Serverless is great!

  7. Serverless is great… • Empowers the individual developer. Allows you

    to focus on your product, rather than building out a full stack. • Build apps faster, without split between backend and frontend development • Gives you a plethora of services to integrate with.
  8. But mobile…

  9. Source: a16z Mobile internet = mobile apps Billions of Minutes

    Online (USA) 0 250 500 750 1000 1250 1500 Jun 2013 Jun 2014 Jun 2015 Desktop Mobile App Mobile Browser
  10. Mobile is different from web • Mobile networks have higher

    latency • You can lose connectivity at any time • Apps can be shutdown and restarted at any time
  11. REST is brittle and cumbersome in a mobile world •

    What happens when there is no connectivity? • Queueing? • Persistence? • What about connectivity being lost during requests? • Tokens? Do they have to be persisted in app? • Statefull services? • Ressource intensive • Need for multiple REST calls. High latency cost • Often incurs duplication of data • JSON parsing is expensive
  12. None
  13. So what can we do?

  14. Persistent Shared State Mobile Server Realtime data sync

  15. Objects as API’s Mobile Server Realtime data sync BuyObject ShoppingCart:

    → Status: nil OrderInfo: nil
  16. Objects as API’s Mobile Server Realtime data sync BuyObject ShoppingCart:

    → Status: nil OrderInfo: nil BuyObject ShoppingCart: → Status: nil OrderInfo: nil
  17. Objects as API’s Mobile Server Realtime data sync BuyObject ShoppingCart:

    → Status: nil OrderInfo: nil BuyObject ShoppingCart: → Status: nil OrderInfo: nil
  18. Objects as API’s Mobile Server Realtime data sync BuyObject ShoppingCart:

    → Status: nil OrderInfo: nil BuyObject ShoppingCart: → Status: nil OrderInfo: nil
  19. Objects as API’s Mobile Server Realtime data sync BuyObject ShoppingCart:

    → Status: “processing” OrderInfo: nil BuyObject ShoppingCart: → Status: “processing” OrderInfo: nil
  20. Objects as API’s Mobile Server Realtime data sync BuyObject ShoppingCart:

    → Status: “processing” OrderInfo: nil BuyObject ShoppingCart: → Status: “processing” OrderInfo: nil
  21. Objects as API’s Mobile Server Realtime data sync BuyObject ShoppingCart:

    → Status: “done” OrderInfo: →
  22. Objects as API’s Mobile Server Realtime data sync BuyObject ShoppingCart:

    → Status: “done” OrderInfo: → BuyObject ShoppingCart: → Status: “done” OrderInfo: →
  23. Where to use shared state • User data • Collaboration

    • API Bridge • Connectors • Push • Data collection/
 streaming
  24. Benefits for developers • Networking abstracted away. No need to

    worry about connectivity, JSON parsing, object mapping… • Unified Data Model. Same data format and reactivity on Client and Backend. • Straight line from Server to UI. Data can be bound directly to UI on Client.
  25. Summary • Mobile is different from web. High latency, unstable

    connectivity, app restarts. • API calls are brittle. Doesn't deal well with above. • Objects as the new API. Simplifies the entire stack and makes it resilient against all the mobile networking issues.
  26. Questions name@realm.io

  27. About Realm • Headquartered in San Francisco, with engineering office

    in Copenhagen • ~50 employees, experienced executive team from Nokia, Intel, Salesforce • Series B startup, $29M raised
  28. Developers Love Realm for Power, Simplicity, Ease of Use

  29. Users Expect More of Apps Today • Off-line first: They

    need apps that work well offline and when network connections are intermittent • Reactive: They expect apps that are highly responsive, with all changes immediately reflected in the UI • Real-time: They expect every user and device to stay in sync with each other in real-time • Collaborative: They want highly collaborative features and experiences within their apps • Seamless: They expect to be be able to move seamlessly from device to device
  30. Enterprise priorities • Time-to-market: Your team need to be able

    to deliver quality apps quickly and on time • Ability: With high user expectations, the team need the ability to easily add advanced features like datasync, messaging and collaboration. • Cross-platform: To reach the full audience, you need to be able to deliver apps for both iOS and Android • Standardize: To manage all the apps and reduce complexity, you want to standardize on a single platform