SlideShare une entreprise Scribd logo
1  sur  52
Télécharger pour lire hors ligne
Introducing

Realm Mobile Platform
Build Better Apps Faster!
.
Christian Melchior
@chrmelchior
About Realm
• Headquartered in San Francisco, with engineering office
in Copenhagen
• ~50 employees
• Series B startup, $29M raised
Realm Mobile Database
• On-device cross-platform object database
• Launched July 2014
• Developed in the open, fully open source
• 16K+ GitHub stars, 100K+ active developers
Developers Love Realm for Power, Simplicity, Ease of Use
Apps of Every Type, 1.000.000.000+ installs
Realm Mobile Platform
Users Expect More of Apps Today
• Offline 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 able to move seamlessly from device to device
The Apps You Want To Make
The AppYou Can Make
Price
Synchronisation is HARD
Deadlines
Crossplatform concerns
Backend team to busy
The Realm Mobile Platform
Realm Mobile DatabaseRealm Object Server
Real-time data sync
DemoRealmTasks - https://github.com/realm/RealmTasks
Realm
Mobile
Database
Real-time Sync
Realm
Object
Server
SDK
SDKSDK
Sync

Engine
Dashboard
Auth
System
Encryption Layer
What is it?
Access
Control Full DB access
Data connectors
Object Store
SD
SDK
SDK
Enterprise
Feature
Event
Framework
Developer 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 data sync, 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
REST is working great
for the web! 

Why change?
jp@realm.io
The Reality With REST
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?
• State-full services?
• Resource intensive
• Need for multiple REST calls. High latency cost
• Often incurs duplication of data
• JSON parsing is expensive
Delivers Key Mobile Solutions
• Eliminates network challenges
• Simplifies data architecture
• Unlocks existing infrastructure
SDK
1
2
• Offline-first
• Full database on the device
• Queries run locally
• Writes apply immediately
• Reactive architecture keeps UI up-to-date
• Automatic sync happens in the background
• Resilient to any network conditions
Eliminate Network Challenges
Objects as API’s
MobileServer
Realtime data sync
BuyObject
ShoppingCart: →
Status: nil
OrderInfo: nil
Objects as API’s
MobileServer
Realtime data sync
BuyObject
ShoppingCart: →
Status: nil
OrderInfo: nil
BuyObject
ShoppingCart: →
Status: nil
OrderInfo: nil
Objects as API’s
MobileServer
Realtime data sync
BuyObject
ShoppingCart: →
Status: nil
OrderInfo: nil
BuyObject
ShoppingCart: →
Status: nil
OrderInfo: nil
Objects as API’s
MobileServer
Realtime data sync
BuyObject
ShoppingCart: →
Status: nil
OrderInfo: nil
BuyObject
ShoppingCart: →
Status: nil
OrderInfo: nil
Objects as API’s
MobileServer
Realtime data sync
BuyObject
ShoppingCart: →
Status: “processing”
OrderInfo: nil
BuyObject
ShoppingCart: →
Status: “processing”
OrderInfo: nil
Objects as API’s
MobileServer
BuyObject
ShoppingCart: →
Status: “done”
OrderInfo: →
Realtime data sync
Objects as API’s
MobileServer
Realtime data sync
BuyObject
ShoppingCart: →
Status: “done”
OrderInfo: →
BuyObject
ShoppingCart: →
Status: “done”
OrderInfo: →
Delivers Key Mobile Solutions
• Eliminates network challenges
• Simplifies data architecture
• Unlocks existing infrastructure
Typical Application Data Flow
Native object
JSON
Native object
SQL
Native object
JSON
Native object
SQLite SQLite
• It’s just objects

on the device and on the server
• Objects are live,

they update—automatically and
immediately—in response to changes
• Not an ORM,

the database is the data model
• Easier for developers 

to build, change, maintain
• Reduce code complexity

via unified data format; cross-platform
• Encrypted at rest & transitObjects all the way down
Simplify Data Architecture
Delivers Key Mobile Solutions
• Eliminates network challenges
• Simplifies data architecture
• Unlocks existing infrastructure
Legacy Systems Hold Back Mobile
XML JSON
RESTSOAP
/facilities /departments
{"facility": "west-1A",
"departments": [
{"type": "manufacturing"},
{"type": "operations"}]
}
<?xml version="1.0" encoding="UTF-8" ?>
<root>
<department>manufacturing</department>
<facilities>west-1A</facilities>
</root>
Unlock Existing Infrastructure
DC9WP
Coupon:
Coupon:
DC9WP
coupon.code = DC9WP
coupon.isValid = true
1
2
3
• Bridge legacy APIs
• Shift complexity to backend
• Node.js SDK
• Identical object interface
• Full database capabilities
• Apply changes to push data
• Event framework
• Listen and respond to changes from clients
• Pass along data to other systems or databases
• Supports custom authentication
The code centric view
Realm is an object database
Create native objects that map
directly to the database.
// Define you model class by extending RealmObject
public class Dog extends RealmObject {
public String name; // fields can also be private of course
public int age = 1; // default values
}
public class Person extends RealmObject {
@PrimaryKey
public long id;
public String name; // support for custom logic in accessors
public RealmList<Dog> dogs; // declare one-to-many relationships
}
Perform complex queries across
your object graph
RealmResults<User> result2 = realm.where(User.class)
.equalTo("name", "John")
.or()
.equalTo("name", "Peter")
.findAll();
RealmResults<User> result = realm.where(User.class).findAll();
result = result.sort("age"); // Sort ascending
result = result.sort("age", Sort.DESCENDING);
All changes occur in transactions
offering ACID compliance
// Obtain a Realm instance
Realm realm = Realm.getDefaultInstance();
realm.beginTransaction();
Book cheeseBook = realm.createObject(Book.class);
cheeseBook.title = "Gouda Recipes";
cheeseBook.id = 1;
realm.commitTransaction();
But Realm objects have a
special capability…
Realm objects live-update in
response to changes
RealmResults<Dog> puppies = realm.where(Dog.class).lessThan("age", 2);
puppies.length(); // => 0
realm.beginTransaction();
Dog myDog = realm.createObject(Dog.class);
myDog.name = "Rex";
myDog.age = 1;
realm.commitTransaction();
puppies.length(); // => 1
Realm is a live object database
Realm is an object database
Listen for live object changes
to simplify your architecture
RealmResults<Person> persons = realm.where(Person.class).findAll();
persons.addChangeListener(new RealmChangeListener() {
@Override
public void onChange(RealmResults<Person> change) {
// ... do something with the updates (UI, etc.) ...
}
});
Now imagine if these live-updates
came from remote changes?
Realm Object Server synchronizes
object changes in real-time.
Server-side Realms
Device-side Realms
Realm Object Server
Real-time Sync
Push object changes server-side
instantly via Node.js interface
Authenticating a user
SyncCredentials me = SyncCredentials.usernamePassword(username, password, true);
String authURL = "http://my.realm-auth-server.com:9080/auth";
SyncUser user = SyncUser.login(me, authURL);
Open a Realm instance
and get ready for
synchronization
RealmConfiguration conf = new RealmConfiguration.Builder().build();
String serverURL = "realm://my.realm-server.com/~/default";
SyncConfiguration conf = new SyncConfiguration.Builder(user, serverURL).build();
Realm realm = Realm.getInstance(conf);
// Any changes made to this Realm will be synced across all devices!
Conflicts will occur!
How do you handle them?
Conflict Resolution
• Operational Transform
• Well-known documented solution.
• Guarantee convergence.
• At field level
• Delete always wins
• Last write wins
• Inserts in Lists are ordered by time
• https://realm.io/docs/realm-object-server/#conflict-resolution
Trigger server-side functions based
on data changes across Realms
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.
vs.
Questions?
@chrmelchior
cm@realm.io
Build Better Apps Faster!
Ressources
• RealmTasks https://github.com/realm/
RealmTasks
• Realm Mobile Platform https://realm.io/
products/realm-mobile-platform/
• Realm Java https://realm.io/docs/java/latest/
• More demos https://github.com/realm-demos

Contenu connexe

Tendances

Tendances (20)

CQRS + ES with Scala and Akka
CQRS + ES with Scala and AkkaCQRS + ES with Scala and Akka
CQRS + ES with Scala and Akka
 
Being RDBMS Free -- Alternate Approaches to Data Persistence
Being RDBMS Free -- Alternate Approaches to Data PersistenceBeing RDBMS Free -- Alternate Approaches to Data Persistence
Being RDBMS Free -- Alternate Approaches to Data Persistence
 
URLSession Reloaded
URLSession ReloadedURLSession Reloaded
URLSession Reloaded
 
Akka Revealed: A JVM Architect's Journey From Resilient Actors To Scalable Cl...
Akka Revealed: A JVM Architect's Journey From Resilient Actors To Scalable Cl...Akka Revealed: A JVM Architect's Journey From Resilient Actors To Scalable Cl...
Akka Revealed: A JVM Architect's Journey From Resilient Actors To Scalable Cl...
 
Building an aws sdk for Perl - Granada Perl Workshop 2014
Building an aws sdk for Perl - Granada Perl Workshop 2014Building an aws sdk for Perl - Granada Perl Workshop 2014
Building an aws sdk for Perl - Granada Perl Workshop 2014
 
Lessons from the Trenches - Building Enterprise Applications with RavenDB
Lessons from the Trenches - Building Enterprise Applications with RavenDBLessons from the Trenches - Building Enterprise Applications with RavenDB
Lessons from the Trenches - Building Enterprise Applications with RavenDB
 
Paws - Perl AWS SDK Update - November 2015
Paws - Perl AWS SDK Update - November 2015Paws - Perl AWS SDK Update - November 2015
Paws - Perl AWS SDK Update - November 2015
 
"Frameworks in 2015" Андрей Листочкин
"Frameworks in 2015" Андрей Листочкин"Frameworks in 2015" Андрей Листочкин
"Frameworks in 2015" Андрей Листочкин
 
NoSQL design pitfalls with Java
NoSQL design pitfalls with JavaNoSQL design pitfalls with Java
NoSQL design pitfalls with Java
 
How to Build a Big Data Application: Serverless Edition
How to Build a Big Data Application: Serverless EditionHow to Build a Big Data Application: Serverless Edition
How to Build a Big Data Application: Serverless Edition
 
How to Build a Big Data Application: Serverless Edition
How to Build a Big Data Application: Serverless EditionHow to Build a Big Data Application: Serverless Edition
How to Build a Big Data Application: Serverless Edition
 
Benchmarking at Parse
Benchmarking at ParseBenchmarking at Parse
Benchmarking at Parse
 
Building Codealike: a journey into the developers analytics world
Building Codealike: a journey into the developers analytics worldBuilding Codealike: a journey into the developers analytics world
Building Codealike: a journey into the developers analytics world
 
CocoaHeads PDX 2014 01 23 : CoreData and iCloud Improvements iOS7 / OSX Maver...
CocoaHeads PDX 2014 01 23 : CoreData and iCloud Improvements iOS7 / OSX Maver...CocoaHeads PDX 2014 01 23 : CoreData and iCloud Improvements iOS7 / OSX Maver...
CocoaHeads PDX 2014 01 23 : CoreData and iCloud Improvements iOS7 / OSX Maver...
 
A (XPages) developers guide to Cloudant - MeetIT
A (XPages) developers guide to Cloudant - MeetITA (XPages) developers guide to Cloudant - MeetIT
A (XPages) developers guide to Cloudant - MeetIT
 
Crafting Evolvable Api Responses
Crafting Evolvable Api ResponsesCrafting Evolvable Api Responses
Crafting Evolvable Api Responses
 
Jumpstart: Introduction to Atlas, Highlighting Enterprise Features
Jumpstart: Introduction to Atlas, Highlighting Enterprise FeaturesJumpstart: Introduction to Atlas, Highlighting Enterprise Features
Jumpstart: Introduction to Atlas, Highlighting Enterprise Features
 
Lightbend Fast Data Platform
Lightbend Fast Data PlatformLightbend Fast Data Platform
Lightbend Fast Data Platform
 
Advanced RxJS: Animations
Advanced RxJS: AnimationsAdvanced RxJS: Animations
Advanced RxJS: Animations
 
(SDD424) Simplifying Scalable Distributed Applications Using DynamoDB Streams...
(SDD424) Simplifying Scalable Distributed Applications Using DynamoDB Streams...(SDD424) Simplifying Scalable Distributed Applications Using DynamoDB Streams...
(SDD424) Simplifying Scalable Distributed Applications Using DynamoDB Streams...
 

En vedette

Scaling Diameter for LTE
Scaling Diameter for LTEScaling Diameter for LTE
Scaling Diameter for LTE
AcmePacket
 

En vedette (20)

Realm: Building a mobile database
Realm: Building a mobile databaseRealm: Building a mobile database
Realm: Building a mobile database
 
Realm of the Mobile Database: an introduction to Realm
Realm of the Mobile Database: an introduction to RealmRealm of the Mobile Database: an introduction to Realm
Realm of the Mobile Database: an introduction to Realm
 
Why realm?
Why realm?Why realm?
Why realm?
 
Realm database
Realm databaseRealm database
Realm database
 
Trifork iBeacon Demo Lunch Talk
Trifork iBeacon Demo Lunch TalkTrifork iBeacon Demo Lunch Talk
Trifork iBeacon Demo Lunch Talk
 
Painless Persistence with Realm
Painless Persistence with RealmPainless Persistence with Realm
Painless Persistence with Realm
 
Realm - Phoenix Mobile Festival
Realm - Phoenix Mobile FestivalRealm - Phoenix Mobile Festival
Realm - Phoenix Mobile Festival
 
Painless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldPainless Persistence in a Disconnected World
Painless Persistence in a Disconnected World
 
파크히어 Realm 사용 사례
파크히어 Realm 사용 사례파크히어 Realm 사용 사례
파크히어 Realm 사용 사례
 
Diameter Overview
Diameter OverviewDiameter Overview
Diameter Overview
 
Scaling Diameter for LTE
Scaling Diameter for LTEScaling Diameter for LTE
Scaling Diameter for LTE
 
Policy and Charging Control - LTE / HSPA / EPC ‘knowledge nuggets’
Policy and Charging Control - LTE / HSPA / EPC ‘knowledge nuggets’Policy and Charging Control - LTE / HSPA / EPC ‘knowledge nuggets’
Policy and Charging Control - LTE / HSPA / EPC ‘knowledge nuggets’
 
Lte epc trial experience
Lte epc trial experienceLte epc trial experience
Lte epc trial experience
 
Introduction to Diameter: The Evolution of Signaling
Introduction to Diameter: The Evolution of SignalingIntroduction to Diameter: The Evolution of Signaling
Introduction to Diameter: The Evolution of Signaling
 
What is PCRF? – Detailed PCRF architecture and functioning
What is PCRF? – Detailed PCRF architecture and functioningWhat is PCRF? – Detailed PCRF architecture and functioning
What is PCRF? – Detailed PCRF architecture and functioning
 
Docker Networking & Swarm Mode Introduction
Docker Networking & Swarm Mode IntroductionDocker Networking & Swarm Mode Introduction
Docker Networking & Swarm Mode Introduction
 
Introduction to Diameter Protocol - Part1
Introduction to Diameter Protocol - Part1Introduction to Diameter Protocol - Part1
Introduction to Diameter Protocol - Part1
 
Introction to docker swarm
Introction to docker swarmIntroction to docker swarm
Introction to docker swarm
 
NashTech - Azure IoT Solutions on Microsoft Azure
NashTech - Azure IoT Solutions on Microsoft AzureNashTech - Azure IoT Solutions on Microsoft Azure
NashTech - Azure IoT Solutions on Microsoft Azure
 
Realm 코딩카페 - 이종찬
Realm   코딩카페 - 이종찬Realm   코딩카페 - 이종찬
Realm 코딩카페 - 이종찬
 

Similaire à Introduction to Realm Mobile Platform

Netflix0SS Services on Docker
Netflix0SS Services on DockerNetflix0SS Services on Docker
Netflix0SS Services on Docker
Docker, Inc.
 
Ibm cloud nativenetflixossfinal
Ibm cloud nativenetflixossfinalIbm cloud nativenetflixossfinal
Ibm cloud nativenetflixossfinal
aspyker
 
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
QAware GmbH
 

Similaire à Introduction to Realm Mobile Platform (20)

MongoDB .local Bengaluru 2019: Realm: The Secret Sauce for Better Mobile Apps
MongoDB .local Bengaluru 2019: Realm: The Secret Sauce for Better Mobile AppsMongoDB .local Bengaluru 2019: Realm: The Secret Sauce for Better Mobile Apps
MongoDB .local Bengaluru 2019: Realm: The Secret Sauce for Better Mobile Apps
 
Develop in ludicrous mode with azure serverless
Develop in ludicrous mode with azure serverlessDevelop in ludicrous mode with azure serverless
Develop in ludicrous mode with azure serverless
 
Couchbase Mobile on Android
Couchbase Mobile on AndroidCouchbase Mobile on Android
Couchbase Mobile on Android
 
MongoDB World 2019: REST-less Mobile Apps: Why Offline-first and Sync Matters...
MongoDB World 2019: REST-less Mobile Apps: Why Offline-first and Sync Matters...MongoDB World 2019: REST-less Mobile Apps: Why Offline-first and Sync Matters...
MongoDB World 2019: REST-less Mobile Apps: Why Offline-first and Sync Matters...
 
React.js at Cortex
React.js at CortexReact.js at Cortex
React.js at Cortex
 
Netflix0SS Services on Docker
Netflix0SS Services on DockerNetflix0SS Services on Docker
Netflix0SS Services on Docker
 
Ibm cloud nativenetflixossfinal
Ibm cloud nativenetflixossfinalIbm cloud nativenetflixossfinal
Ibm cloud nativenetflixossfinal
 
Convertigo Mobile Application Development platform for Enterprises
Convertigo Mobile Application Development platform for EnterprisesConvertigo Mobile Application Development platform for Enterprises
Convertigo Mobile Application Development platform for Enterprises
 
DevOps in the Amazon Cloud – Learn from the pioneersNetflix suro
DevOps in the Amazon Cloud – Learn from the pioneersNetflix suroDevOps in the Amazon Cloud – Learn from the pioneersNetflix suro
DevOps in the Amazon Cloud – Learn from the pioneersNetflix suro
 
AWS for Java Developers workshop
AWS for Java Developers workshopAWS for Java Developers workshop
AWS for Java Developers workshop
 
Leapfrog into Serverless - a Deloitte-Amtrak Case Study | Serverless Confere...
Leapfrog into Serverless - a Deloitte-Amtrak Case Study | Serverless Confere...Leapfrog into Serverless - a Deloitte-Amtrak Case Study | Serverless Confere...
Leapfrog into Serverless - a Deloitte-Amtrak Case Study | Serverless Confere...
 
Social Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech DaySocial Photos - My presentation at Microsoft Tech Day
Social Photos - My presentation at Microsoft Tech Day
 
Introduction to Azure DocumentDB
Introduction to Azure DocumentDBIntroduction to Azure DocumentDB
Introduction to Azure DocumentDB
 
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
Stephane Lapointe, Frank Boucher & Alexandre Brisebois: Les micro-services et...
 
Getting Started with Docker - Nick Stinemates
Getting Started with Docker - Nick StinematesGetting Started with Docker - Nick Stinemates
Getting Started with Docker - Nick Stinemates
 
Flare - tech-intro-for-paris-hackathon
Flare - tech-intro-for-paris-hackathonFlare - tech-intro-for-paris-hackathon
Flare - tech-intro-for-paris-hackathon
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
 
Meteor + React
Meteor + ReactMeteor + React
Meteor + React
 
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5
 

Dernier

Dernier (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Introduction to Realm Mobile Platform

  • 1. Introducing
 Realm Mobile Platform Build Better Apps Faster! . Christian Melchior @chrmelchior
  • 2. About Realm • Headquartered in San Francisco, with engineering office in Copenhagen • ~50 employees • Series B startup, $29M raised
  • 3. Realm Mobile Database • On-device cross-platform object database • Launched July 2014 • Developed in the open, fully open source • 16K+ GitHub stars, 100K+ active developers
  • 4. Developers Love Realm for Power, Simplicity, Ease of Use
  • 5. Apps of Every Type, 1.000.000.000+ installs
  • 7. Users Expect More of Apps Today • Offline 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 able to move seamlessly from device to device
  • 8. The Apps You Want To Make
  • 9. The AppYou Can Make Price Synchronisation is HARD Deadlines Crossplatform concerns Backend team to busy
  • 10. The Realm Mobile Platform Realm Mobile DatabaseRealm Object Server Real-time data sync
  • 12. Realm Mobile Database Real-time Sync Realm Object Server SDK SDKSDK Sync
 Engine Dashboard Auth System Encryption Layer What is it? Access Control Full DB access Data connectors Object Store SD SDK SDK Enterprise Feature Event Framework
  • 13. Developer 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 data sync, 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
  • 14. REST is working great for the web! 
 Why change? jp@realm.io
  • 16. 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? • State-full services? • Resource intensive • Need for multiple REST calls. High latency cost • Often incurs duplication of data • JSON parsing is expensive
  • 17. Delivers Key Mobile Solutions • Eliminates network challenges • Simplifies data architecture • Unlocks existing infrastructure
  • 18. SDK 1 2 • Offline-first • Full database on the device • Queries run locally • Writes apply immediately • Reactive architecture keeps UI up-to-date • Automatic sync happens in the background • Resilient to any network conditions Eliminate Network Challenges
  • 19. Objects as API’s MobileServer Realtime data sync BuyObject ShoppingCart: → Status: nil OrderInfo: nil
  • 20. Objects as API’s MobileServer Realtime data sync BuyObject ShoppingCart: → Status: nil OrderInfo: nil BuyObject ShoppingCart: → Status: nil OrderInfo: nil
  • 21. Objects as API’s MobileServer Realtime data sync BuyObject ShoppingCart: → Status: nil OrderInfo: nil BuyObject ShoppingCart: → Status: nil OrderInfo: nil
  • 22. Objects as API’s MobileServer Realtime data sync BuyObject ShoppingCart: → Status: nil OrderInfo: nil BuyObject ShoppingCart: → Status: nil OrderInfo: nil
  • 23. Objects as API’s MobileServer Realtime data sync BuyObject ShoppingCart: → Status: “processing” OrderInfo: nil BuyObject ShoppingCart: → Status: “processing” OrderInfo: nil
  • 24. Objects as API’s MobileServer BuyObject ShoppingCart: → Status: “done” OrderInfo: → Realtime data sync
  • 25. Objects as API’s MobileServer Realtime data sync BuyObject ShoppingCart: → Status: “done” OrderInfo: → BuyObject ShoppingCart: → Status: “done” OrderInfo: →
  • 26. Delivers Key Mobile Solutions • Eliminates network challenges • Simplifies data architecture • Unlocks existing infrastructure
  • 27. Typical Application Data Flow Native object JSON Native object SQL Native object JSON Native object SQLite SQLite
  • 28. • It’s just objects
 on the device and on the server • Objects are live,
 they update—automatically and immediately—in response to changes • Not an ORM,
 the database is the data model • Easier for developers 
 to build, change, maintain • Reduce code complexity
 via unified data format; cross-platform • Encrypted at rest & transitObjects all the way down Simplify Data Architecture
  • 29. Delivers Key Mobile Solutions • Eliminates network challenges • Simplifies data architecture • Unlocks existing infrastructure
  • 30. Legacy Systems Hold Back Mobile XML JSON RESTSOAP /facilities /departments {"facility": "west-1A", "departments": [ {"type": "manufacturing"}, {"type": "operations"}] } <?xml version="1.0" encoding="UTF-8" ?> <root> <department>manufacturing</department> <facilities>west-1A</facilities> </root>
  • 31. Unlock Existing Infrastructure DC9WP Coupon: Coupon: DC9WP coupon.code = DC9WP coupon.isValid = true 1 2 3 • Bridge legacy APIs • Shift complexity to backend • Node.js SDK • Identical object interface • Full database capabilities • Apply changes to push data • Event framework • Listen and respond to changes from clients • Pass along data to other systems or databases • Supports custom authentication
  • 33. Realm is an object database
  • 34. Create native objects that map directly to the database. // Define you model class by extending RealmObject public class Dog extends RealmObject { public String name; // fields can also be private of course public int age = 1; // default values } public class Person extends RealmObject { @PrimaryKey public long id; public String name; // support for custom logic in accessors public RealmList<Dog> dogs; // declare one-to-many relationships }
  • 35. Perform complex queries across your object graph RealmResults<User> result2 = realm.where(User.class) .equalTo("name", "John") .or() .equalTo("name", "Peter") .findAll(); RealmResults<User> result = realm.where(User.class).findAll(); result = result.sort("age"); // Sort ascending result = result.sort("age", Sort.DESCENDING);
  • 36. All changes occur in transactions offering ACID compliance // Obtain a Realm instance Realm realm = Realm.getDefaultInstance(); realm.beginTransaction(); Book cheeseBook = realm.createObject(Book.class); cheeseBook.title = "Gouda Recipes"; cheeseBook.id = 1; realm.commitTransaction();
  • 37. But Realm objects have a special capability…
  • 38. Realm objects live-update in response to changes RealmResults<Dog> puppies = realm.where(Dog.class).lessThan("age", 2); puppies.length(); // => 0 realm.beginTransaction(); Dog myDog = realm.createObject(Dog.class); myDog.name = "Rex"; myDog.age = 1; realm.commitTransaction(); puppies.length(); // => 1
  • 39. Realm is a live object database Realm is an object database
  • 40. Listen for live object changes to simplify your architecture RealmResults<Person> persons = realm.where(Person.class).findAll(); persons.addChangeListener(new RealmChangeListener() { @Override public void onChange(RealmResults<Person> change) { // ... do something with the updates (UI, etc.) ... } });
  • 41. Now imagine if these live-updates came from remote changes?
  • 42. Realm Object Server synchronizes object changes in real-time. Server-side Realms Device-side Realms Realm Object Server Real-time Sync
  • 43. Push object changes server-side instantly via Node.js interface
  • 44. Authenticating a user SyncCredentials me = SyncCredentials.usernamePassword(username, password, true); String authURL = "http://my.realm-auth-server.com:9080/auth"; SyncUser user = SyncUser.login(me, authURL);
  • 45. Open a Realm instance and get ready for synchronization RealmConfiguration conf = new RealmConfiguration.Builder().build(); String serverURL = "realm://my.realm-server.com/~/default"; SyncConfiguration conf = new SyncConfiguration.Builder(user, serverURL).build(); Realm realm = Realm.getInstance(conf); // Any changes made to this Realm will be synced across all devices!
  • 46. Conflicts will occur! How do you handle them?
  • 47. Conflict Resolution • Operational Transform • Well-known documented solution. • Guarantee convergence. • At field level • Delete always wins • Last write wins • Inserts in Lists are ordered by time • https://realm.io/docs/realm-object-server/#conflict-resolution
  • 48. Trigger server-side functions based on data changes across Realms
  • 49. 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.
  • 50. vs.
  • 52. Ressources • RealmTasks https://github.com/realm/ RealmTasks • Realm Mobile Platform https://realm.io/ products/realm-mobile-platform/ • Realm Java https://realm.io/docs/java/latest/ • More demos https://github.com/realm-demos