SlideShare a Scribd company logo
MongoDB Mobile
Bringing the Power of MongoDB to Your Device
This presentation contains “forward-looking statements” within the meaning of Section 27A of the Securities Act of 1933,
as amended, and Section 21E of the Securities Exchange Act of 1934, as amended. Such forward-looking statements are
subject to a number of risks, uncertainties, assumptions and other factors that could cause actual results and the timing of
certain events to differ materially from future results expressed or implied by the forward-looking statements. Factors that
could cause or contribute to such differences include, but are not limited to, those identified our filings with the Securities
and Exchange Commission. You should not rely upon forward-looking statements as predictions of future events.
Furthermore, such forward-looking statements speak only as of the date of this presentation.
In particular, the development, release, and timing of any features or functionality described for MongoDB products
remains at MongoDB’s sole discretion. This information is merely intended to outline our general product direction and it
should not be relied on in making a purchasing decision nor is this a commitment, promise or legal obligation to deliver
any material, code, or functionality. Except as required by law, we undertake no obligation to update any forward-looking
statements to reflect events or circumstances after the date of such statements.
Safe Harbor Statement
Matt Lord
Senior Product Manager
@mattalord
We've Come a Long Way
Mobile is becoming not only the new
digital hub, but also the bridge to the
physical world. That’s why mobile will
affect more than just your digital
operations — it will transform your
entire business.
Thomas Husson, Vice President and Principal
Analyst at Forrester Research
Mobile
Is Transforming Everything
A Complete Data Platform
Geographically distributed backend services
• MongoDB Atlas
• Point and click active/active global clusters
• Effortless HA, DR, and low-latency access
• MongoDB Stitch, Serverless Platform
• Automatic scaling based on request volume
• Stitch Query Anywhere
• Stitch Functions
• Stitch Triggers
• Stitch Mobile Sync (coming soon)
Geographically distributed frontend services
• MongoDB Mobile
• IoT and edge devices
• iOS and Android apps
• Supporting local offline storage
Stitch provides a seamless bridge between them
MongoDB Mobile
The Full Stack
Your Mobile Application
• iOS and Android devices
• Leveraging the power of MongoDB everywhere
• Allowing you to focus on building your GREAT THING
MongoDB Stitch SDK
• Access to MongoDB Stitch services from Android and iOS
• New Stitch Interfaces for on-device (local) storage
• Synchronization between local and remote
MongoDB Mobile Drivers
• Swift for iOS, Java for Android
• Existing drivers, extended to support local storage
MongoDB Mobile Database
• A lite version of MongoDB as a library
• C language interface to the library
• Fully passive, no background threads or tasks
MongoDB Mobile Storage Engine
• K/V storage on top of SQLite
• Very small disk footprint and minimal memory usage
• Energy efficient
Platform Details
Operating System OS Details CPUs Devices
iOS, tvOS 10.2+ ARM64
x86_64 (simulators)
Apple, Inc.
Android 7.0/Nougat+ x86_64
armeabi-v7a
arm64-v8a
Any vendor
(by ABI)
Linux TBD x86_64 Any vendor
macOS 10.10+ x86_64 Apple, Inc.
The Full Stack
Stitch SDK
Packages the entire mobile stack together
Stitches the frontend and backend together
• End-to-end Mobile SDK
• API for local storage
• API for remote Stitch service invocation
• API for syncing between local and remote
• Provides a transparent bridge for applications
iOS SDK: https://github.com/mongodb/stitch-ios-sdk/
Android SDK: https://github.com/mongodb/stitch-android-sdk/
final StitchAppClient client = Stitch.getDefaultAppClient();
final MongoClient mongoClient = client.getServiceClient(LocalMongoDbService.ClientFactory);
MongoCollection<Document> items =
mongoClient.getDatabase(TodoItem.TODO_LIST_DATABASE).getCollection(TodoItem.TODO_LI
ST_COLLECTION);
public void updateChecked(final ObjectId itemId, final boolean isChecked) {
final Document updateDoc = new Document("$set", new Document(TodoItem.CHECKED_KEY,
isChecked));
if (isChecked) {
updateDoc.append("$currentDate", new Document(TodoItem.DONE_DATE_KEY, true));
} else {
updateDoc.append("$unset", new Document(TodoItem.DONE_DATE_KEY, ""));
}
items.updateOne(new Document(TodoItem.ID_KEY, itemId), updateDoc);
...
}
private List<TodoItem> getItems() {
final ArrayList<TodoItem> todoItems = new ArrayList<>();
for (final Document doc : items.find()) {
if (TodoItem.isTodoItem(doc)) {
final TodoItem item = new TodoItem(doc);
todoItems.add(item);
}
}
return todoItems;
}
The Full Stack
Mobile Drivers
Existing drivers for the given language
• With a few extensions
• Open a local storage instance
• Close a local storage instance
• Support today for Swift, Java, and C
• Others created based on demand
Can be tested directly
• Swift: https://github.com/mongodb/swift-mongo-mobile/
• Java:
http://central.maven.org/maven2/org/mongodb/mongodb-
driver-embedded/
import MongoMobile
…
let client = MongoMobile.create(settings: MongoClientSettings [ dbPath:
"test-path" ])
let coll = try client.db("test").collection("foo")
let insertResult = try coll.insertOne([ "test": 42 ])
let findResult = try coll.find([ "_id": insertResult!.insertedId ])
let docs = Array(findResult)
…
* Complete example
The Full Stack
Mobile Database
Lite version of MongoDB formed into a library
• C ABI
• Auth, Replication, Sharding, etc. removed
• Supports only the mobile storage engine
• Passive: no background threads
• Light: disk, memory, energy
C Interface
• Low level
• Drivers are extended to invoke it
Availability
• Builds out of MongoDB 4.0+ community tree
• Pre-built binary packages for mobile targets
lib = mongo_embedded_v1_lib_init (&params, status);
instance = mongo_embedded_v1_instance_create (lib,
params.yaml_config, status);
client = mongo_embedded_v1_mongoc_client_create (instance);
collection = mongoc_client_get_collection (client, "iot_test",
"sensor_data");
insert = bson_new ();
BSON_APPEND_UTF8 (insert, "message", "Hey there!");
BSON_APPEND_UTF8 (insert, "from", "Matt Lord);
mongoc_collection_insert_one (collection, insert, NULL, NULL, &error);
query = bson_new ();
cursor = mongoc_collection_find_with_opts (collection, query, NULL,
NULL);
while (mongoc_cursor_next(cursor, &doc)) {
str = bson_as_canonical_extended_json (doc, NULL);
printf ("%sn", str);
bson_free (str);
}
* Complete example
The Full Stack
Mobile Storage Engine
Leverages SQLite as a K/V store
• Maintaining full MongoDB Query Language support
• Single SQLite database called “mobile”
• Table names follow the WiredTiger filesystem / dictionary
naming convention
• Every entity you create
• database, collection, index, …
Can be tested with standard MongoDB
./buildscripts/scons.py mongod --mobile-se=on
./build/opt/mongo/mongod --storageEngine=mobile
sqlite> .database
main: /.../mobile.sqlite
sqlite> .tables
_mdb_catalog index-1-1419396644176400596
collection-0-1419396644176400596 index-1-9204882299253173129
collection-0-9204882299253173129
sqlite> select sql from sqlite_master where name='collection-0-
9204882299253173129';
CREATE TABLE "collection-0-6881873531296038739"(rec_id INT, data
BLOB, PRIMARY KEY(rec_id))
sqlite> select sql from sqlite_master where name='index-1-
9204882299253173129';
CREATE TABLE "index-1-9204882299253173129"(key BLOB PRIMARY
KEY, value BLOB)
sqlite> select * from `collection-0-9204882299253173129`;
rec_id data
---------- ----------
1 2
What’s Next
Stitch Mobile Sync
Example Setup
Steps for Sync
1. Define Sync + Conflict Handlers on a collection
2. Add Documents to be synced
3. Application manages local documents
4. Stitch then syncs state with the backend automatically
• Bi-directional synchronization
// Initialize your application, then configure Synced collections
Stitch.initializeDefaultAppClient('<your-app-id>').then(() => {
tripsColl.configureSync(trip_conflict, trip_change, trip_error);
...
});
// Find all trips that should be synced and ensure they’re synced
tripsColl.find({user: stitch.}).toArray().then(trips =>{
tripsColl.syncMany(trips)
});
...
tripsColl.sync().update({trip_id:currTripId},{meal_choice:
selectedMeal});
...
Coming Soon!
Stitch Mobile Sync
Example Usage
Stitch Syncs data when online on a per operation basis
Uses 3 client-side event responders
• ChangeListener
• ConflictHandler
• ErrorListener
Handlers receive all local/remote changes
// On changes to the remote document the trip_change handler is
called
function trip_change(changeEvent){
...
if(updatedFields.keys().includes(“Gate”)){
setStatusBarUpdate(“Gate Changed”, tripID, gate);
}
...
}
// On a conflict, the trip_conflict handler is called
function trip_conflict(localDoc, remoteDoc){
newStatus = remoteDoc;
for(key in remoteDoc.keys()){
if(localDoc[key] != remoteDoc[key] &&
isLocalPreferred(key)){
newStatus[key] = localDoc[key]
}
}
// Returning a document from the handler will attempt to write it
return newStatus;
};
Coming Soon!
Licensing,
Pricing, and
Support
Subject to Change
Roadmap
Subject to Change
Into the
Future…
Source: Star Wars Tales: Into the Great Unknown (2004) (Dark Horse Comics)
Thank You!

More Related Content

What's hot

Tutorial: Building Your First App with MongoDB Stitch
Tutorial: Building Your First App with MongoDB StitchTutorial: Building Your First App with MongoDB Stitch
Tutorial: Building Your First App with MongoDB Stitch
MongoDB
 
MongoDB .local Chicago 2019: Using MongoDB Transactions to Implement Cryptogr...
MongoDB .local Chicago 2019: Using MongoDB Transactions to Implement Cryptogr...MongoDB .local Chicago 2019: Using MongoDB Transactions to Implement Cryptogr...
MongoDB .local Chicago 2019: Using MongoDB Transactions to Implement Cryptogr...
MongoDB
 
Responsive & Responsible: Implementing Responsive Design at Scale
Responsive & Responsible: Implementing Responsive Design at ScaleResponsive & Responsible: Implementing Responsive Design at Scale
Responsive & Responsible: Implementing Responsive Design at Scale
scottjehl
 
[MongoDB.local Bengaluru 2018] Keynote
[MongoDB.local Bengaluru 2018] Keynote[MongoDB.local Bengaluru 2018] Keynote
[MongoDB.local Bengaluru 2018] Keynote
MongoDB
 
Performance and Security Enhancements in MongoDB's BI Connector
Performance and Security Enhancements in MongoDB's BI ConnectorPerformance and Security Enhancements in MongoDB's BI Connector
Performance and Security Enhancements in MongoDB's BI Connector
MongoDB
 
MongoDB for Developers
MongoDB for DevelopersMongoDB for Developers
MongoDB for Developers
Ciro Donato Caiazzo
 
MongoDB .local Chicago 2019: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local Chicago 2019: From SQL to NoSQL -- Changing Your MindsetMongoDB .local Chicago 2019: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local Chicago 2019: From SQL to NoSQL -- Changing Your Mindset
MongoDB
 
[MongoDB.local Bengaluru 2018] Introduction to MongoDB Stitch
[MongoDB.local Bengaluru 2018] Introduction to MongoDB Stitch[MongoDB.local Bengaluru 2018] Introduction to MongoDB Stitch
[MongoDB.local Bengaluru 2018] Introduction to MongoDB Stitch
MongoDB
 
MongoDB Mobile
MongoDB Mobile MongoDB Mobile
MongoDB Mobile
MongoDB
 
MongoDB Stitch Tutorial
MongoDB Stitch TutorialMongoDB Stitch Tutorial
MongoDB Stitch Tutorial
MongoDB
 
MongoDB Stitch Introduction
MongoDB Stitch IntroductionMongoDB Stitch Introduction
MongoDB Stitch Introduction
MongoDB
 
[MongoDB.local Bengaluru 2018] Jumpstart: Introduction to Schema Design
[MongoDB.local Bengaluru 2018] Jumpstart: Introduction to Schema Design[MongoDB.local Bengaluru 2018] Jumpstart: Introduction to Schema Design
[MongoDB.local Bengaluru 2018] Jumpstart: Introduction to Schema Design
MongoDB
 
MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying Mon...
MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying Mon...MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying Mon...
MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying Mon...
MongoDB
 
MongoDB .local Paris 2020: Tout savoir sur le moteur de recherche Full Text S...
MongoDB .local Paris 2020: Tout savoir sur le moteur de recherche Full Text S...MongoDB .local Paris 2020: Tout savoir sur le moteur de recherche Full Text S...
MongoDB .local Paris 2020: Tout savoir sur le moteur de recherche Full Text S...
MongoDB
 
Managing Cloud Security Design and Implementation in a Ransomware World
Managing Cloud Security Design and Implementation in a Ransomware WorldManaging Cloud Security Design and Implementation in a Ransomware World
Managing Cloud Security Design and Implementation in a Ransomware World
MongoDB
 
Query in Couchbase. N1QL: SQL for JSON
Query in Couchbase.  N1QL: SQL for JSONQuery in Couchbase.  N1QL: SQL for JSON
Query in Couchbase. N1QL: SQL for JSON
Keshav Murthy
 
Micronaut Http Client
Micronaut Http ClientMicronaut Http Client
Micronaut Http Client
James Kleeh
 
Firebase-ized your mobile app
Firebase-ized  your mobile appFirebase-ized  your mobile app
Firebase-ized your mobile app
Matteo Bonifazi
 
Webinar: User Data Management with MongoDB
Webinar: User Data Management with MongoDBWebinar: User Data Management with MongoDB
Webinar: User Data Management with MongoDB
MongoDB
 
Visualizing Mobile Broadband with MongoDB
Visualizing Mobile Broadband with MongoDBVisualizing Mobile Broadband with MongoDB
Visualizing Mobile Broadband with MongoDBMongoDB
 

What's hot (20)

Tutorial: Building Your First App with MongoDB Stitch
Tutorial: Building Your First App with MongoDB StitchTutorial: Building Your First App with MongoDB Stitch
Tutorial: Building Your First App with MongoDB Stitch
 
MongoDB .local Chicago 2019: Using MongoDB Transactions to Implement Cryptogr...
MongoDB .local Chicago 2019: Using MongoDB Transactions to Implement Cryptogr...MongoDB .local Chicago 2019: Using MongoDB Transactions to Implement Cryptogr...
MongoDB .local Chicago 2019: Using MongoDB Transactions to Implement Cryptogr...
 
Responsive & Responsible: Implementing Responsive Design at Scale
Responsive & Responsible: Implementing Responsive Design at ScaleResponsive & Responsible: Implementing Responsive Design at Scale
Responsive & Responsible: Implementing Responsive Design at Scale
 
[MongoDB.local Bengaluru 2018] Keynote
[MongoDB.local Bengaluru 2018] Keynote[MongoDB.local Bengaluru 2018] Keynote
[MongoDB.local Bengaluru 2018] Keynote
 
Performance and Security Enhancements in MongoDB's BI Connector
Performance and Security Enhancements in MongoDB's BI ConnectorPerformance and Security Enhancements in MongoDB's BI Connector
Performance and Security Enhancements in MongoDB's BI Connector
 
MongoDB for Developers
MongoDB for DevelopersMongoDB for Developers
MongoDB for Developers
 
MongoDB .local Chicago 2019: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local Chicago 2019: From SQL to NoSQL -- Changing Your MindsetMongoDB .local Chicago 2019: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local Chicago 2019: From SQL to NoSQL -- Changing Your Mindset
 
[MongoDB.local Bengaluru 2018] Introduction to MongoDB Stitch
[MongoDB.local Bengaluru 2018] Introduction to MongoDB Stitch[MongoDB.local Bengaluru 2018] Introduction to MongoDB Stitch
[MongoDB.local Bengaluru 2018] Introduction to MongoDB Stitch
 
MongoDB Mobile
MongoDB Mobile MongoDB Mobile
MongoDB Mobile
 
MongoDB Stitch Tutorial
MongoDB Stitch TutorialMongoDB Stitch Tutorial
MongoDB Stitch Tutorial
 
MongoDB Stitch Introduction
MongoDB Stitch IntroductionMongoDB Stitch Introduction
MongoDB Stitch Introduction
 
[MongoDB.local Bengaluru 2018] Jumpstart: Introduction to Schema Design
[MongoDB.local Bengaluru 2018] Jumpstart: Introduction to Schema Design[MongoDB.local Bengaluru 2018] Jumpstart: Introduction to Schema Design
[MongoDB.local Bengaluru 2018] Jumpstart: Introduction to Schema Design
 
MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying Mon...
MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying Mon...MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying Mon...
MongoDB Europe 2016 - Who’s Helping Themselves To Your Data? Demystifying Mon...
 
MongoDB .local Paris 2020: Tout savoir sur le moteur de recherche Full Text S...
MongoDB .local Paris 2020: Tout savoir sur le moteur de recherche Full Text S...MongoDB .local Paris 2020: Tout savoir sur le moteur de recherche Full Text S...
MongoDB .local Paris 2020: Tout savoir sur le moteur de recherche Full Text S...
 
Managing Cloud Security Design and Implementation in a Ransomware World
Managing Cloud Security Design and Implementation in a Ransomware WorldManaging Cloud Security Design and Implementation in a Ransomware World
Managing Cloud Security Design and Implementation in a Ransomware World
 
Query in Couchbase. N1QL: SQL for JSON
Query in Couchbase.  N1QL: SQL for JSONQuery in Couchbase.  N1QL: SQL for JSON
Query in Couchbase. N1QL: SQL for JSON
 
Micronaut Http Client
Micronaut Http ClientMicronaut Http Client
Micronaut Http Client
 
Firebase-ized your mobile app
Firebase-ized  your mobile appFirebase-ized  your mobile app
Firebase-ized your mobile app
 
Webinar: User Data Management with MongoDB
Webinar: User Data Management with MongoDBWebinar: User Data Management with MongoDB
Webinar: User Data Management with MongoDB
 
Visualizing Mobile Broadband with MongoDB
Visualizing Mobile Broadband with MongoDBVisualizing Mobile Broadband with MongoDB
Visualizing Mobile Broadband with MongoDB
 

Similar to MongDB Mobile: Bringing the Power of MongoDB to Your Device

MongoDB.local Seattle 2019: MongoDB Mobile: Bringing the Power of MongoDB to ...
MongoDB.local Seattle 2019: MongoDB Mobile: Bringing the Power of MongoDB to ...MongoDB.local Seattle 2019: MongoDB Mobile: Bringing the Power of MongoDB to ...
MongoDB.local Seattle 2019: MongoDB Mobile: Bringing the Power of MongoDB to ...
MongoDB
 
Faites évoluer votre accès aux données avec MongoDB Stitch
Faites évoluer votre accès aux données avec MongoDB StitchFaites évoluer votre accès aux données avec MongoDB Stitch
Faites évoluer votre accès aux données avec MongoDB Stitch
MongoDB
 
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 
We don’t need no stinkin app server! Building a Two-Tier Mobile App
We don’t need no stinkin app server! Building a Two-Tier Mobile AppWe don’t need no stinkin app server! Building a Two-Tier Mobile App
We don’t need no stinkin app server! Building a Two-Tier Mobile App
Pat Patterson
 
Ch-Ch-Ch-Ch-Changes: Taking Your MongoDB Stitch Application to the Next Level...
Ch-Ch-Ch-Ch-Changes: Taking Your MongoDB Stitch Application to the Next Level...Ch-Ch-Ch-Ch-Changes: Taking Your MongoDB Stitch Application to the Next Level...
Ch-Ch-Ch-Ch-Changes: Taking Your MongoDB Stitch Application to the Next Level...
MongoDB
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
Chun-Kai Wang
 
MongoDB Mobile: Bringing the Power of MongoDB to Your Device
MongoDB Mobile: Bringing the Power of MongoDB to Your DeviceMongoDB Mobile: Bringing the Power of MongoDB to Your Device
MongoDB Mobile: Bringing the Power of MongoDB to Your Device
Matt Lord
 
MongoDB.local Austin 2018: Ch-Ch-Ch-Ch-Changes: Taking Your MongoDB Stitch A...
MongoDB.local Austin 2018:  Ch-Ch-Ch-Ch-Changes: Taking Your MongoDB Stitch A...MongoDB.local Austin 2018:  Ch-Ch-Ch-Ch-Changes: Taking Your MongoDB Stitch A...
MongoDB.local Austin 2018: Ch-Ch-Ch-Ch-Changes: Taking Your MongoDB Stitch A...
MongoDB
 
MongoDB.local Atlanta: Modern Data Backup and Recovery from On-Premises to th...
MongoDB.local Atlanta: Modern Data Backup and Recovery from On-Premises to th...MongoDB.local Atlanta: Modern Data Backup and Recovery from On-Premises to th...
MongoDB.local Atlanta: Modern Data Backup and Recovery from On-Premises to th...
MongoDB
 
04 objective-c session 4
04  objective-c session 404  objective-c session 4
04 objective-c session 4
Amr Elghadban (AmrAngry)
 
React Native for multi-platform mobile applications
React Native for multi-platform mobile applicationsReact Native for multi-platform mobile applications
React Native for multi-platform mobile applications
Matteo Manchi
 
Xamarin devdays 2017 - PT - connected apps
Xamarin devdays 2017 - PT - connected appsXamarin devdays 2017 - PT - connected apps
Xamarin devdays 2017 - PT - connected apps
Alexandre Marreiros
 
Plone FSR
Plone FSRPlone FSR
Plone FSR
fulv
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 MongoDB SoCal 2020: MongoDB Atlas Jump Start MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB
 
Spring Data MongoDB 介紹
Spring Data MongoDB 介紹Spring Data MongoDB 介紹
Spring Data MongoDB 介紹
Kuo-Chun Su
 
Easing offline web application development with GWT
Easing offline web application development with GWTEasing offline web application development with GWT
Easing offline web application development with GWT
Arnaud Tournier
 
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStore
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStoreDeveloping Offline Mobile Apps with Salesforce Mobile SDK SmartStore
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStore
Tom Gersic
 
企業應用行動化開發架構
企業應用行動化開發架構企業應用行動化開發架構
企業應用行動化開發架構
湯米吳 Tommy Wu
 
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJSMeteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS
Julio Antonio Mendonça de Marins
 

Similar to MongDB Mobile: Bringing the Power of MongoDB to Your Device (20)

MongoDB.local Seattle 2019: MongoDB Mobile: Bringing the Power of MongoDB to ...
MongoDB.local Seattle 2019: MongoDB Mobile: Bringing the Power of MongoDB to ...MongoDB.local Seattle 2019: MongoDB Mobile: Bringing the Power of MongoDB to ...
MongoDB.local Seattle 2019: MongoDB Mobile: Bringing the Power of MongoDB to ...
 
Faites évoluer votre accès aux données avec MongoDB Stitch
Faites évoluer votre accès aux données avec MongoDB StitchFaites évoluer votre accès aux données avec MongoDB Stitch
Faites évoluer votre accès aux données avec MongoDB Stitch
 
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
 
We don’t need no stinkin app server! Building a Two-Tier Mobile App
We don’t need no stinkin app server! Building a Two-Tier Mobile AppWe don’t need no stinkin app server! Building a Two-Tier Mobile App
We don’t need no stinkin app server! Building a Two-Tier Mobile App
 
Ch-Ch-Ch-Ch-Changes: Taking Your MongoDB Stitch Application to the Next Level...
Ch-Ch-Ch-Ch-Changes: Taking Your MongoDB Stitch Application to the Next Level...Ch-Ch-Ch-Ch-Changes: Taking Your MongoDB Stitch Application to the Next Level...
Ch-Ch-Ch-Ch-Changes: Taking Your MongoDB Stitch Application to the Next Level...
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
MongoDB Mobile: Bringing the Power of MongoDB to Your Device
MongoDB Mobile: Bringing the Power of MongoDB to Your DeviceMongoDB Mobile: Bringing the Power of MongoDB to Your Device
MongoDB Mobile: Bringing the Power of MongoDB to Your Device
 
MongoDB.local Austin 2018: Ch-Ch-Ch-Ch-Changes: Taking Your MongoDB Stitch A...
MongoDB.local Austin 2018:  Ch-Ch-Ch-Ch-Changes: Taking Your MongoDB Stitch A...MongoDB.local Austin 2018:  Ch-Ch-Ch-Ch-Changes: Taking Your MongoDB Stitch A...
MongoDB.local Austin 2018: Ch-Ch-Ch-Ch-Changes: Taking Your MongoDB Stitch A...
 
MongoDB.local Atlanta: Modern Data Backup and Recovery from On-Premises to th...
MongoDB.local Atlanta: Modern Data Backup and Recovery from On-Premises to th...MongoDB.local Atlanta: Modern Data Backup and Recovery from On-Premises to th...
MongoDB.local Atlanta: Modern Data Backup and Recovery from On-Premises to th...
 
04 objective-c session 4
04  objective-c session 404  objective-c session 4
04 objective-c session 4
 
React Native for multi-platform mobile applications
React Native for multi-platform mobile applicationsReact Native for multi-platform mobile applications
React Native for multi-platform mobile applications
 
Xamarin devdays 2017 - PT - connected apps
Xamarin devdays 2017 - PT - connected appsXamarin devdays 2017 - PT - connected apps
Xamarin devdays 2017 - PT - connected apps
 
Plone FSR
Plone FSRPlone FSR
Plone FSR
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 MongoDB SoCal 2020: MongoDB Atlas Jump Start MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB SoCal 2020: MongoDB Atlas Jump Start
 
Spring Data MongoDB 介紹
Spring Data MongoDB 介紹Spring Data MongoDB 介紹
Spring Data MongoDB 介紹
 
Stmik bandung
Stmik bandungStmik bandung
Stmik bandung
 
Easing offline web application development with GWT
Easing offline web application development with GWTEasing offline web application development with GWT
Easing offline web application development with GWT
 
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStore
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStoreDeveloping Offline Mobile Apps with Salesforce Mobile SDK SmartStore
Developing Offline Mobile Apps with Salesforce Mobile SDK SmartStore
 
企業應用行動化開發架構
企業應用行動化開發架構企業應用行動化開發架構
企業應用行動化開發架構
 
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJSMeteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS
Meteoro de pegasuus! Desenvolvendo aplicações realtime com MeteorJS
 

More from Matt Lord

Vitess VReplication: Standing on the Shoulders of a MySQL Giant
Vitess VReplication: Standing on the Shoulders of a MySQL GiantVitess VReplication: Standing on the Shoulders of a MySQL Giant
Vitess VReplication: Standing on the Shoulders of a MySQL Giant
Matt Lord
 
Using MySQL Containers
Using MySQL ContainersUsing MySQL Containers
Using MySQL Containers
Matt Lord
 
Why MySQL High Availability Matters
Why MySQL High Availability MattersWhy MySQL High Availability Matters
Why MySQL High Availability Matters
Matt Lord
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB Clusters
Matt Lord
 
Unlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQLUnlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQL
Matt Lord
 
OpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStackOpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStack
Matt Lord
 
MySQL Group Replication - an Overview
MySQL Group Replication - an OverviewMySQL Group Replication - an Overview
MySQL Group Replication - an Overview
Matt Lord
 
OpenStack and MySQL
OpenStack and MySQLOpenStack and MySQL
OpenStack and MySQL
Matt Lord
 
MySQL DBaaS with OpenStack Trove
MySQL DBaaS with OpenStack TroveMySQL DBaaS with OpenStack Trove
MySQL DBaaS with OpenStack Trove
Matt Lord
 
Getting Started with MySQL Full Text Search
Getting Started with MySQL Full Text SearchGetting Started with MySQL Full Text Search
Getting Started with MySQL Full Text Search
Matt Lord
 
Using MySQL in the Cloud
Using MySQL in the CloudUsing MySQL in the Cloud
Using MySQL in the Cloud
Matt Lord
 
MySQL 5.7 GIS
MySQL 5.7 GISMySQL 5.7 GIS
MySQL 5.7 GIS
Matt Lord
 

More from Matt Lord (12)

Vitess VReplication: Standing on the Shoulders of a MySQL Giant
Vitess VReplication: Standing on the Shoulders of a MySQL GiantVitess VReplication: Standing on the Shoulders of a MySQL Giant
Vitess VReplication: Standing on the Shoulders of a MySQL Giant
 
Using MySQL Containers
Using MySQL ContainersUsing MySQL Containers
Using MySQL Containers
 
Why MySQL High Availability Matters
Why MySQL High Availability MattersWhy MySQL High Availability Matters
Why MySQL High Availability Matters
 
MySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB ClustersMySQL High Availability -- InnoDB Clusters
MySQL High Availability -- InnoDB Clusters
 
Unlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQLUnlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQL
 
OpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStackOpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStack
 
MySQL Group Replication - an Overview
MySQL Group Replication - an OverviewMySQL Group Replication - an Overview
MySQL Group Replication - an Overview
 
OpenStack and MySQL
OpenStack and MySQLOpenStack and MySQL
OpenStack and MySQL
 
MySQL DBaaS with OpenStack Trove
MySQL DBaaS with OpenStack TroveMySQL DBaaS with OpenStack Trove
MySQL DBaaS with OpenStack Trove
 
Getting Started with MySQL Full Text Search
Getting Started with MySQL Full Text SearchGetting Started with MySQL Full Text Search
Getting Started with MySQL Full Text Search
 
Using MySQL in the Cloud
Using MySQL in the CloudUsing MySQL in the Cloud
Using MySQL in the Cloud
 
MySQL 5.7 GIS
MySQL 5.7 GISMySQL 5.7 GIS
MySQL 5.7 GIS
 

Recently uploaded

GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Codeigniter VS Cakephp Which is Better for Web Development.pdf
Codeigniter VS Cakephp Which is Better for Web Development.pdfCodeigniter VS Cakephp Which is Better for Web Development.pdf
Codeigniter VS Cakephp Which is Better for Web Development.pdf
Semiosis Software Private Limited
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
ISH Technologies
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 

Recently uploaded (20)

GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Codeigniter VS Cakephp Which is Better for Web Development.pdf
Codeigniter VS Cakephp Which is Better for Web Development.pdfCodeigniter VS Cakephp Which is Better for Web Development.pdf
Codeigniter VS Cakephp Which is Better for Web Development.pdf
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 

MongDB Mobile: Bringing the Power of MongoDB to Your Device

  • 1. MongoDB Mobile Bringing the Power of MongoDB to Your Device
  • 2. This presentation contains “forward-looking statements” within the meaning of Section 27A of the Securities Act of 1933, as amended, and Section 21E of the Securities Exchange Act of 1934, as amended. Such forward-looking statements are subject to a number of risks, uncertainties, assumptions and other factors that could cause actual results and the timing of certain events to differ materially from future results expressed or implied by the forward-looking statements. Factors that could cause or contribute to such differences include, but are not limited to, those identified our filings with the Securities and Exchange Commission. You should not rely upon forward-looking statements as predictions of future events. Furthermore, such forward-looking statements speak only as of the date of this presentation. In particular, the development, release, and timing of any features or functionality described for MongoDB products remains at MongoDB’s sole discretion. This information is merely intended to outline our general product direction and it should not be relied on in making a purchasing decision nor is this a commitment, promise or legal obligation to deliver any material, code, or functionality. Except as required by law, we undertake no obligation to update any forward-looking statements to reflect events or circumstances after the date of such statements. Safe Harbor Statement
  • 3. Matt Lord Senior Product Manager @mattalord
  • 4. We've Come a Long Way
  • 5. Mobile is becoming not only the new digital hub, but also the bridge to the physical world. That’s why mobile will affect more than just your digital operations — it will transform your entire business. Thomas Husson, Vice President and Principal Analyst at Forrester Research Mobile Is Transforming Everything
  • 6. A Complete Data Platform Geographically distributed backend services • MongoDB Atlas • Point and click active/active global clusters • Effortless HA, DR, and low-latency access • MongoDB Stitch, Serverless Platform • Automatic scaling based on request volume • Stitch Query Anywhere • Stitch Functions • Stitch Triggers • Stitch Mobile Sync (coming soon) Geographically distributed frontend services • MongoDB Mobile • IoT and edge devices • iOS and Android apps • Supporting local offline storage Stitch provides a seamless bridge between them
  • 8. The Full Stack Your Mobile Application • iOS and Android devices • Leveraging the power of MongoDB everywhere • Allowing you to focus on building your GREAT THING MongoDB Stitch SDK • Access to MongoDB Stitch services from Android and iOS • New Stitch Interfaces for on-device (local) storage • Synchronization between local and remote MongoDB Mobile Drivers • Swift for iOS, Java for Android • Existing drivers, extended to support local storage MongoDB Mobile Database • A lite version of MongoDB as a library • C language interface to the library • Fully passive, no background threads or tasks MongoDB Mobile Storage Engine • K/V storage on top of SQLite • Very small disk footprint and minimal memory usage • Energy efficient
  • 9. Platform Details Operating System OS Details CPUs Devices iOS, tvOS 10.2+ ARM64 x86_64 (simulators) Apple, Inc. Android 7.0/Nougat+ x86_64 armeabi-v7a arm64-v8a Any vendor (by ABI) Linux TBD x86_64 Any vendor macOS 10.10+ x86_64 Apple, Inc.
  • 10. The Full Stack Stitch SDK Packages the entire mobile stack together Stitches the frontend and backend together • End-to-end Mobile SDK • API for local storage • API for remote Stitch service invocation • API for syncing between local and remote • Provides a transparent bridge for applications iOS SDK: https://github.com/mongodb/stitch-ios-sdk/ Android SDK: https://github.com/mongodb/stitch-android-sdk/ final StitchAppClient client = Stitch.getDefaultAppClient(); final MongoClient mongoClient = client.getServiceClient(LocalMongoDbService.ClientFactory); MongoCollection<Document> items = mongoClient.getDatabase(TodoItem.TODO_LIST_DATABASE).getCollection(TodoItem.TODO_LI ST_COLLECTION); public void updateChecked(final ObjectId itemId, final boolean isChecked) { final Document updateDoc = new Document("$set", new Document(TodoItem.CHECKED_KEY, isChecked)); if (isChecked) { updateDoc.append("$currentDate", new Document(TodoItem.DONE_DATE_KEY, true)); } else { updateDoc.append("$unset", new Document(TodoItem.DONE_DATE_KEY, "")); } items.updateOne(new Document(TodoItem.ID_KEY, itemId), updateDoc); ... } private List<TodoItem> getItems() { final ArrayList<TodoItem> todoItems = new ArrayList<>(); for (final Document doc : items.find()) { if (TodoItem.isTodoItem(doc)) { final TodoItem item = new TodoItem(doc); todoItems.add(item); } } return todoItems; }
  • 11. The Full Stack Mobile Drivers Existing drivers for the given language • With a few extensions • Open a local storage instance • Close a local storage instance • Support today for Swift, Java, and C • Others created based on demand Can be tested directly • Swift: https://github.com/mongodb/swift-mongo-mobile/ • Java: http://central.maven.org/maven2/org/mongodb/mongodb- driver-embedded/ import MongoMobile … let client = MongoMobile.create(settings: MongoClientSettings [ dbPath: "test-path" ]) let coll = try client.db("test").collection("foo") let insertResult = try coll.insertOne([ "test": 42 ]) let findResult = try coll.find([ "_id": insertResult!.insertedId ]) let docs = Array(findResult) … * Complete example
  • 12. The Full Stack Mobile Database Lite version of MongoDB formed into a library • C ABI • Auth, Replication, Sharding, etc. removed • Supports only the mobile storage engine • Passive: no background threads • Light: disk, memory, energy C Interface • Low level • Drivers are extended to invoke it Availability • Builds out of MongoDB 4.0+ community tree • Pre-built binary packages for mobile targets lib = mongo_embedded_v1_lib_init (&params, status); instance = mongo_embedded_v1_instance_create (lib, params.yaml_config, status); client = mongo_embedded_v1_mongoc_client_create (instance); collection = mongoc_client_get_collection (client, "iot_test", "sensor_data"); insert = bson_new (); BSON_APPEND_UTF8 (insert, "message", "Hey there!"); BSON_APPEND_UTF8 (insert, "from", "Matt Lord); mongoc_collection_insert_one (collection, insert, NULL, NULL, &error); query = bson_new (); cursor = mongoc_collection_find_with_opts (collection, query, NULL, NULL); while (mongoc_cursor_next(cursor, &doc)) { str = bson_as_canonical_extended_json (doc, NULL); printf ("%sn", str); bson_free (str); } * Complete example
  • 13. The Full Stack Mobile Storage Engine Leverages SQLite as a K/V store • Maintaining full MongoDB Query Language support • Single SQLite database called “mobile” • Table names follow the WiredTiger filesystem / dictionary naming convention • Every entity you create • database, collection, index, … Can be tested with standard MongoDB ./buildscripts/scons.py mongod --mobile-se=on ./build/opt/mongo/mongod --storageEngine=mobile sqlite> .database main: /.../mobile.sqlite sqlite> .tables _mdb_catalog index-1-1419396644176400596 collection-0-1419396644176400596 index-1-9204882299253173129 collection-0-9204882299253173129 sqlite> select sql from sqlite_master where name='collection-0- 9204882299253173129'; CREATE TABLE "collection-0-6881873531296038739"(rec_id INT, data BLOB, PRIMARY KEY(rec_id)) sqlite> select sql from sqlite_master where name='index-1- 9204882299253173129'; CREATE TABLE "index-1-9204882299253173129"(key BLOB PRIMARY KEY, value BLOB) sqlite> select * from `collection-0-9204882299253173129`; rec_id data ---------- ---------- 1 2
  • 15. Stitch Mobile Sync Example Setup Steps for Sync 1. Define Sync + Conflict Handlers on a collection 2. Add Documents to be synced 3. Application manages local documents 4. Stitch then syncs state with the backend automatically • Bi-directional synchronization // Initialize your application, then configure Synced collections Stitch.initializeDefaultAppClient('<your-app-id>').then(() => { tripsColl.configureSync(trip_conflict, trip_change, trip_error); ... }); // Find all trips that should be synced and ensure they’re synced tripsColl.find({user: stitch.}).toArray().then(trips =>{ tripsColl.syncMany(trips) }); ... tripsColl.sync().update({trip_id:currTripId},{meal_choice: selectedMeal}); ... Coming Soon!
  • 16. Stitch Mobile Sync Example Usage Stitch Syncs data when online on a per operation basis Uses 3 client-side event responders • ChangeListener • ConflictHandler • ErrorListener Handlers receive all local/remote changes // On changes to the remote document the trip_change handler is called function trip_change(changeEvent){ ... if(updatedFields.keys().includes(“Gate”)){ setStatusBarUpdate(“Gate Changed”, tripID, gate); } ... } // On a conflict, the trip_conflict handler is called function trip_conflict(localDoc, remoteDoc){ newStatus = remoteDoc; for(key in remoteDoc.keys()){ if(localDoc[key] != remoteDoc[key] && isLocalPreferred(key)){ newStatus[key] = localDoc[key] } } // Returning a document from the handler will attempt to write it return newStatus; }; Coming Soon!
  • 19. Into the Future… Source: Star Wars Tales: Into the Great Unknown (2004) (Dark Horse Comics)