SlideShare a Scribd company logo
Couchbase Mobile Ideathon 
Traun Leyden 
Lead Android Developer 
tleyden@couchbase.com 
10/29/13
About me 
• I was previously at a startup company doing a 
mobile CRM app — we converted our app to 
Couchbase Lite to solve networking performance 
issues 
• Now I work full time as the lead developer on 
Couchbase Lite Android 
• I also work on demo apps on both iOS and Android 
• I have blog at http://tleyden.github.io
About Couchbase 
• Was the merger of two companies 
• CouchOne (commercial support for CouchDB) 
• Membase (a commercially supported / distributed 
version of memcached) 
• Our flagship product is Couchbase Server, a fault 
tolerant distributed database. 
• We recently released Couchbase Mobile, targeted 
towards mobile and embedded devices/sensors. 
• All of our products are released as Open Source 
software under the Apache2 license. 
• We now have an office in Japan
Why would you want to use 
Couchbase Mobile? 
Will your app work when the network is 
slow or only sometimes connected? 
?
We think our network is fast, but .. 
• On trains or underground 
• Large crowds 
• Out of the city center 
• Deployed on sites which have unreliable 
Wifi 
• Sometimes you are completely offline 
• Etc ..
The simplest use case — sending a 
tweet on the subway 
Users expect better than this!
Our solution - Sync
Your app reads/writes to a local 
database 
This will be fast even if the network is slow or offline
Couchbase Lite sync’s the data to the 
cloud (can run in background)
TodoLite Demo 
• TodoLite is a todo list app 
• Users can login via Facebook 
• Users can share todo lists with each 
other 
• Different users can both view and 
update the same list 
• Photo attachments can be added to 
Todo items 
• Supports conflict resolution 
• Source code available on github (see 
resources slide) 
• Available in iTunes app store and 
Google Play
Understanding sync gateway 
• Sync Gateway can control which 
users can see which documents. 
• In effect, it can partition the 
database so that users only see a 
subset of the database
Partitioning a database by company 
and region
Using Sync Gateway to partition a 
database 
• Sync Gateway can do this efficiently 
• The main reason it was created 
• Sync Gateway uses “channels” to do 
this 
• Let’s walk through an example
Using Channels in 
OfficeRadar Example 
OfficeRadar uses iBeacons to detect who is in the office
Users should only see activity for other 
users in their organization
Sync Function 
• The sync function partitions the database by 
putting documents into channels 
• To understand the sync function, we must 
look at the OfficeRadar documents
OfficeRadar GeofenceEvent Document 
Each Geofence Event is associated with an 
organization 
{ 
"_id":"!QJoBU7cRa~m2E2tYloSHHN", 
"_rev":"1-8e8f3cebf357a2546c0d40e497227115", 
"action":"entry", 
"beacon":"4a83813db6ce76e9618793cf483cfa10", 
"created_at":"2014-08-28T23:43:19.119Z", 
"userprofile":"10152586863333982", 
"type":"geofence_event", 
"organization":"couchbase" 
}
OfficeRadar UserProfile Document 
Each User Profile is associated with an 
organization 
{ 
"_id":"10152586863333982", 
"_rev":"1-2b6a6e182ef77cd15db7171023931e8d", 
"type":"profile", 
"authSystem":"facebook", 
"name":"Traun Leyden", 
"organization":"couchbase" 
}
OfficeRadar Sync Function 
function(doc, oldDoc) { 
if (doc.type == "geofence_event") { 
channel(doc.organization); 
} else if (doc.type == "profile") { 
access(doc.userid, doc.organization); 
} 
}
Adding a geofence event to a channel 
if (doc.type == "geofence_event") { 
channel(doc.organization); 
}
Allowing a user to access an 
organization’s channel 
else if (doc.type == "profile") { 
access(doc.userid, doc.organization); 
}
Views 
Putting the “No” in NoSQL 
• Map/Reduce mechanism 
- A standard method of indexing in NoSQL 
- A view is similar to index in relational database. 
• App-defined map function 
- Called on every document 
- Can emit arbitrary key/value pairs into the index 
• Optional reduce function 
- Data aggregation / grouping 
• Functions are registered as native callbacks 
- Native callbacks make sense for performance and to match the rest of 
the app codebase
Queries 
• Basic feature set 
- Key ranges, offset/limit, reverse, group by key… 
- No joins or fancy sorting 
- but compound keys (and clever emits) allow for some tricks 
• LiveQuery subclass 
- Monitors a view for changes 
- Can think of it as a “pub-sub” approach 
- Register a callback that is triggered when the query changes
Use Cases
Embedded 
Picsolve 
 Image capture of roller 
coaster riders to local 
database in multiple 
theme park locations 
 Machine to machine 
communication example 
 Unreliable network 
connectivity required 
offline capture / later sync 
to centralized 
management system
Infinite Campus 
Education / Social Interaction 
 Selectively push out learning 
modules / multimedia lessons 
to individual students 
 Teachers and students use 
custom mobile chat apps for 
real-time Q&A during lectures 
 Homework assignments can be 
completed offline anywhere
Offline Sensor Data 
A weather balloon could collect sensor data while 
offline and sync it whenever it is online
Travel Expense Tracker 
• I am in Tokyo, but my iPhone 5 is locked so I cannot use a 
local SIM card. 
• But I need an app to track my expenses, so I must be able to 
enter expenses while offline. 
• When I get back to the US, I want to sync these expenses to 
the Cloud so I can download a spreadsheet.
Resources 
• These slides will be made available on SlideShare 
• Sample code links 
• https://github.com/couchbaselabs/ToDoLite-Android 
• https://github.com/couchbaselabs/ToDoLite-iOS 
• https://github.com/tleyden/office-radar 
• Documentation 
• http://developer.couchbase.com/mobile 
• Download 
- http://mobile.couchbase.com 
• Contact: couchbasejp@couchbase.com
Resources 2 
• Couchbase Mobile Google Group (community): 
groups.google.com/group/mobile-couchbase/ 
• Couchbase Mobile Twitter: 
https://twitter.com/CouchbaseMobile 
• Run Sync Gateway (and Couchbase Server!) under Docker: 
http://tleyden.github.io/blog/2014/06/22/running-couchbase- 
sync-gateway-on-gce/
Upcoming Event: Hackathon 
• http://couchbasejpcommunity.doorkeeper.jp/events/13988
Upcoming Event: 
Couchbase Server 
• Couchbase Server 
http://couchbasejpcommunity.doorkeeper.jp/events/14785
Thanks for watching! 
Contact: tleyden@couchbase.com 
Questions?

More Related Content

What's hot

Citizen Developer Tools (session at SharePoint Saturday Twin Cities 4/14/2018...
Citizen Developer Tools (session at SharePoint Saturday Twin Cities 4/14/2018...Citizen Developer Tools (session at SharePoint Saturday Twin Cities 4/14/2018...
Citizen Developer Tools (session at SharePoint Saturday Twin Cities 4/14/2018...
Antti Koskela
 
Citizen Developer Tools - session at SPS New England 10/20/2018
Citizen Developer Tools - session at SPS New England 10/20/2018Citizen Developer Tools - session at SPS New England 10/20/2018
Citizen Developer Tools - session at SPS New England 10/20/2018
Antti Koskela
 
Riding the Edge with Ember.js
Riding the Edge with Ember.jsRiding the Edge with Ember.js
Riding the Edge with Ember.js
aortbals
 
CUST-12 What’s New in Share Extras
CUST-12 What’s New in Share ExtrasCUST-12 What’s New in Share Extras
CUST-12 What’s New in Share Extras
Alfresco Software
 
CUST-13 What’s New in Share Extras
CUST-13 What’s New in Share ExtrasCUST-13 What’s New in Share Extras
CUST-13 What’s New in Share Extras
Alfresco Software
 
Making Articles Easier: Implementing OCLC Knowledge Base for Direct Requestin...
Making Articles Easier: Implementing OCLC Knowledge Base for Direct Requestin...Making Articles Easier: Implementing OCLC Knowledge Base for Direct Requestin...
Making Articles Easier: Implementing OCLC Knowledge Base for Direct Requestin...
alisonjohnson53
 
Intro to PowerApps and Flow
Intro to PowerApps and FlowIntro to PowerApps and Flow
Intro to PowerApps and Flow
April Dunnam
 
Powering Up SharePoint Forms with PowerApps
Powering Up SharePoint Forms with PowerAppsPowering Up SharePoint Forms with PowerApps
Powering Up SharePoint Forms with PowerApps
April Dunnam
 
Full trust code is not dead
Full trust code is not deadFull trust code is not dead
Full trust code is not dead
Shawn Beeson
 
How to build SharePoint 2013 Killer Apps
How to build SharePoint 2013 Killer AppsHow to build SharePoint 2013 Killer Apps
How to build SharePoint 2013 Killer Apps
Maarten Visser
 
Powering the Modern Classroom with PowerApps & PowerBI
Powering the Modern Classroom with PowerApps & PowerBIPowering the Modern Classroom with PowerApps & PowerBI
Powering the Modern Classroom with PowerApps & PowerBI
April Dunnam
 
aOS Moscow - E3 - Integrate the Power Platform with SharePoint
aOS Moscow - E3 - Integrate the Power Platform with SharePointaOS Moscow - E3 - Integrate the Power Platform with SharePoint
aOS Moscow - E3 - Integrate the Power Platform with SharePoint
aOS Community
 
Part1 saintsfinal
Part1 saintsfinalPart1 saintsfinal
Part1 saintsfinal
sfsusaints
 
Part1saintsfinal
Part1saintsfinalPart1saintsfinal
Part1saintsfinal
sfsusaints
 
Building Social Business Applications with OpenSocial
Building Social Business Applications with OpenSocialBuilding Social Business Applications with OpenSocial
Building Social Business Applications with OpenSocial
Clint Oram
 
Next Level PowerApps
Next Level PowerAppsNext Level PowerApps
Next Level PowerApps
April Dunnam
 
aOS Moscow - E4 - PowerApps for enterprise developers - Fabio Franzini
aOS Moscow - E4 - PowerApps for enterprise developers - Fabio FranziniaOS Moscow - E4 - PowerApps for enterprise developers - Fabio Franzini
aOS Moscow - E4 - PowerApps for enterprise developers - Fabio Franzini
aOS Community
 
Dashboarding with Microsoft: Datazen & Power BI
Dashboarding with Microsoft: Datazen & Power BIDashboarding with Microsoft: Datazen & Power BI
Dashboarding with Microsoft: Datazen & Power BI
Davide Mauri
 
Next Level PowerApps SPS St Louis
Next Level PowerApps SPS St LouisNext Level PowerApps SPS St Louis
Next Level PowerApps SPS St Louis
April Dunnam
 
Tar tablet september 2013
Tar tablet september 2013Tar tablet september 2013
Tar tablet september 2013
Amy Smythe-Harris
 

What's hot (20)

Citizen Developer Tools (session at SharePoint Saturday Twin Cities 4/14/2018...
Citizen Developer Tools (session at SharePoint Saturday Twin Cities 4/14/2018...Citizen Developer Tools (session at SharePoint Saturday Twin Cities 4/14/2018...
Citizen Developer Tools (session at SharePoint Saturday Twin Cities 4/14/2018...
 
Citizen Developer Tools - session at SPS New England 10/20/2018
Citizen Developer Tools - session at SPS New England 10/20/2018Citizen Developer Tools - session at SPS New England 10/20/2018
Citizen Developer Tools - session at SPS New England 10/20/2018
 
Riding the Edge with Ember.js
Riding the Edge with Ember.jsRiding the Edge with Ember.js
Riding the Edge with Ember.js
 
CUST-12 What’s New in Share Extras
CUST-12 What’s New in Share ExtrasCUST-12 What’s New in Share Extras
CUST-12 What’s New in Share Extras
 
CUST-13 What’s New in Share Extras
CUST-13 What’s New in Share ExtrasCUST-13 What’s New in Share Extras
CUST-13 What’s New in Share Extras
 
Making Articles Easier: Implementing OCLC Knowledge Base for Direct Requestin...
Making Articles Easier: Implementing OCLC Knowledge Base for Direct Requestin...Making Articles Easier: Implementing OCLC Knowledge Base for Direct Requestin...
Making Articles Easier: Implementing OCLC Knowledge Base for Direct Requestin...
 
Intro to PowerApps and Flow
Intro to PowerApps and FlowIntro to PowerApps and Flow
Intro to PowerApps and Flow
 
Powering Up SharePoint Forms with PowerApps
Powering Up SharePoint Forms with PowerAppsPowering Up SharePoint Forms with PowerApps
Powering Up SharePoint Forms with PowerApps
 
Full trust code is not dead
Full trust code is not deadFull trust code is not dead
Full trust code is not dead
 
How to build SharePoint 2013 Killer Apps
How to build SharePoint 2013 Killer AppsHow to build SharePoint 2013 Killer Apps
How to build SharePoint 2013 Killer Apps
 
Powering the Modern Classroom with PowerApps & PowerBI
Powering the Modern Classroom with PowerApps & PowerBIPowering the Modern Classroom with PowerApps & PowerBI
Powering the Modern Classroom with PowerApps & PowerBI
 
aOS Moscow - E3 - Integrate the Power Platform with SharePoint
aOS Moscow - E3 - Integrate the Power Platform with SharePointaOS Moscow - E3 - Integrate the Power Platform with SharePoint
aOS Moscow - E3 - Integrate the Power Platform with SharePoint
 
Part1 saintsfinal
Part1 saintsfinalPart1 saintsfinal
Part1 saintsfinal
 
Part1saintsfinal
Part1saintsfinalPart1saintsfinal
Part1saintsfinal
 
Building Social Business Applications with OpenSocial
Building Social Business Applications with OpenSocialBuilding Social Business Applications with OpenSocial
Building Social Business Applications with OpenSocial
 
Next Level PowerApps
Next Level PowerAppsNext Level PowerApps
Next Level PowerApps
 
aOS Moscow - E4 - PowerApps for enterprise developers - Fabio Franzini
aOS Moscow - E4 - PowerApps for enterprise developers - Fabio FranziniaOS Moscow - E4 - PowerApps for enterprise developers - Fabio Franzini
aOS Moscow - E4 - PowerApps for enterprise developers - Fabio Franzini
 
Dashboarding with Microsoft: Datazen & Power BI
Dashboarding with Microsoft: Datazen & Power BIDashboarding with Microsoft: Datazen & Power BI
Dashboarding with Microsoft: Datazen & Power BI
 
Next Level PowerApps SPS St Louis
Next Level PowerApps SPS St LouisNext Level PowerApps SPS St Louis
Next Level PowerApps SPS St Louis
 
Tar tablet september 2013
Tar tablet september 2013Tar tablet september 2013
Tar tablet september 2013
 

Viewers also liked

I "love" Shares
I "love" SharesI "love" Shares
I "love" Shares
OpenFinHackIdeathon
 
Ideathon HK
Ideathon HKIdeathon HK
Ideathon HK
Iris Poon
 
Ideathon Overview 2016 - participants
Ideathon Overview 2016 - participantsIdeathon Overview 2016 - participants
Ideathon Overview 2016 - participants
Victoria Bowers
 
20110619 live view ideathon_logcatonliveview
20110619 live view ideathon_logcatonliveview20110619 live view ideathon_logcatonliveview
20110619 live view ideathon_logcatonliveview
Makoto Yamazaki
 
Space Apps Challenge Ideathon Presentation
Space Apps Challenge Ideathon PresentationSpace Apps Challenge Ideathon Presentation
Space Apps Challenge Ideathon PresentationTajima Itsuro
 
2016 Ideathon Big Data Introduction
2016 Ideathon Big Data Introduction2016 Ideathon Big Data Introduction
2016 Ideathon Big Data Introduction
William Tai
 

Viewers also liked (6)

I "love" Shares
I "love" SharesI "love" Shares
I "love" Shares
 
Ideathon HK
Ideathon HKIdeathon HK
Ideathon HK
 
Ideathon Overview 2016 - participants
Ideathon Overview 2016 - participantsIdeathon Overview 2016 - participants
Ideathon Overview 2016 - participants
 
20110619 live view ideathon_logcatonliveview
20110619 live view ideathon_logcatonliveview20110619 live view ideathon_logcatonliveview
20110619 live view ideathon_logcatonliveview
 
Space Apps Challenge Ideathon Presentation
Space Apps Challenge Ideathon PresentationSpace Apps Challenge Ideathon Presentation
Space Apps Challenge Ideathon Presentation
 
2016 Ideathon Big Data Introduction
2016 Ideathon Big Data Introduction2016 Ideathon Big Data Introduction
2016 Ideathon Big Data Introduction
 

Similar to Couchbase Mobile Ideathon in Tokyo 2014.08.29: Developing with couchbase lite

Developer connect - microservices
Developer connect - microservicesDeveloper connect - microservices
Developer connect - microservices
Anton McConville
 
Mobile Devices
Mobile DevicesMobile Devices
Mobile Devices
Ynon Perek
 
how to connect your app to the activity stream with x-pages
how to connect your app to the activity stream with x-pageshow to connect your app to the activity stream with x-pages
how to connect your app to the activity stream with x-pages
Frank van der Linden
 
Let's Take Drupal Offline!
Let's Take Drupal Offline!Let's Take Drupal Offline!
Let's Take Drupal Offline!
Dick Olsson
 
Building serverless apps with Go & SAM
Building serverless apps with Go & SAMBuilding serverless apps with Go & SAM
Building serverless apps with Go & SAM
Leon Stigter
 
Uklug2012 yellow and blue stream
Uklug2012 yellow and blue streamUklug2012 yellow and blue stream
Uklug2012 yellow and blue stream
Frank van der Linden
 
IBM ConnectED SPOT104: Lightning-Fast Development of Native Mobile Apps for I...
IBM ConnectED SPOT104: Lightning-Fast Development of Native Mobile Apps for I...IBM ConnectED SPOT104: Lightning-Fast Development of Native Mobile Apps for I...
IBM ConnectED SPOT104: Lightning-Fast Development of Native Mobile Apps for I...
darwinodb
 
Syncitall
SyncitallSyncitall
Syncitall
Aakash Praliya
 
No need to leave Connections. Bring your Domino applications into the Activit...
No need to leave Connections. Bring your Domino applications into the Activit...No need to leave Connections. Bring your Domino applications into the Activit...
No need to leave Connections. Bring your Domino applications into the Activit...
LetsConnect
 
Offline Webapps
Offline Webapps Offline Webapps
Offline Webapps
mnitchie
 
Web app job and functions - TUGAIT 2017
Web app job and functions  - TUGAIT 2017Web app job and functions  - TUGAIT 2017
Web app job and functions - TUGAIT 2017
Steef-Jan Wiggers
 
WSO2Con US 2013 - The Integration Game Changer: WSO2 Integration Cloud
WSO2Con US 2013 - The Integration Game Changer: WSO2 Integration CloudWSO2Con US 2013 - The Integration Game Changer: WSO2 Integration Cloud
WSO2Con US 2013 - The Integration Game Changer: WSO2 Integration Cloud
WSO2
 
WSO2Con 2013 - The Integration Game Changer: WSO2 Integration Cloud
WSO2Con 2013 - The Integration Game Changer: WSO2 Integration CloudWSO2Con 2013 - The Integration Game Changer: WSO2 Integration Cloud
WSO2Con 2013 - The Integration Game Changer: WSO2 Integration Cloud
Afkham Azeez
 
All about that reactive ui
All about that reactive uiAll about that reactive ui
All about that reactive ui
Paul van Zyl
 
Entwickler camp2012 how to connect your app to the activity stream with x_pages
Entwickler camp2012 how to connect your app to the activity stream with x_pagesEntwickler camp2012 how to connect your app to the activity stream with x_pages
Entwickler camp2012 how to connect your app to the activity stream with x_pages
Frank van der Linden
 
AUGNYC June 21 Presentations
AUGNYC June 21 PresentationsAUGNYC June 21 Presentations
AUGNYC June 21 Presentations
Marlon Palha
 
Portal and Intranets
Portal and Intranets Portal and Intranets
Portal and Intranets
Redar Ismail
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material
Thomas Daly
 
data-mesh-101.pptx
data-mesh-101.pptxdata-mesh-101.pptx
data-mesh-101.pptx
TarekHamdi8
 
Intro to appcelerator
Intro to appceleratorIntro to appcelerator
Intro to appcelerator
Mohab El-Shishtawy
 

Similar to Couchbase Mobile Ideathon in Tokyo 2014.08.29: Developing with couchbase lite (20)

Developer connect - microservices
Developer connect - microservicesDeveloper connect - microservices
Developer connect - microservices
 
Mobile Devices
Mobile DevicesMobile Devices
Mobile Devices
 
how to connect your app to the activity stream with x-pages
how to connect your app to the activity stream with x-pageshow to connect your app to the activity stream with x-pages
how to connect your app to the activity stream with x-pages
 
Let's Take Drupal Offline!
Let's Take Drupal Offline!Let's Take Drupal Offline!
Let's Take Drupal Offline!
 
Building serverless apps with Go & SAM
Building serverless apps with Go & SAMBuilding serverless apps with Go & SAM
Building serverless apps with Go & SAM
 
Uklug2012 yellow and blue stream
Uklug2012 yellow and blue streamUklug2012 yellow and blue stream
Uklug2012 yellow and blue stream
 
IBM ConnectED SPOT104: Lightning-Fast Development of Native Mobile Apps for I...
IBM ConnectED SPOT104: Lightning-Fast Development of Native Mobile Apps for I...IBM ConnectED SPOT104: Lightning-Fast Development of Native Mobile Apps for I...
IBM ConnectED SPOT104: Lightning-Fast Development of Native Mobile Apps for I...
 
Syncitall
SyncitallSyncitall
Syncitall
 
No need to leave Connections. Bring your Domino applications into the Activit...
No need to leave Connections. Bring your Domino applications into the Activit...No need to leave Connections. Bring your Domino applications into the Activit...
No need to leave Connections. Bring your Domino applications into the Activit...
 
Offline Webapps
Offline Webapps Offline Webapps
Offline Webapps
 
Web app job and functions - TUGAIT 2017
Web app job and functions  - TUGAIT 2017Web app job and functions  - TUGAIT 2017
Web app job and functions - TUGAIT 2017
 
WSO2Con US 2013 - The Integration Game Changer: WSO2 Integration Cloud
WSO2Con US 2013 - The Integration Game Changer: WSO2 Integration CloudWSO2Con US 2013 - The Integration Game Changer: WSO2 Integration Cloud
WSO2Con US 2013 - The Integration Game Changer: WSO2 Integration Cloud
 
WSO2Con 2013 - The Integration Game Changer: WSO2 Integration Cloud
WSO2Con 2013 - The Integration Game Changer: WSO2 Integration CloudWSO2Con 2013 - The Integration Game Changer: WSO2 Integration Cloud
WSO2Con 2013 - The Integration Game Changer: WSO2 Integration Cloud
 
All about that reactive ui
All about that reactive uiAll about that reactive ui
All about that reactive ui
 
Entwickler camp2012 how to connect your app to the activity stream with x_pages
Entwickler camp2012 how to connect your app to the activity stream with x_pagesEntwickler camp2012 how to connect your app to the activity stream with x_pages
Entwickler camp2012 how to connect your app to the activity stream with x_pages
 
AUGNYC June 21 Presentations
AUGNYC June 21 PresentationsAUGNYC June 21 Presentations
AUGNYC June 21 Presentations
 
Portal and Intranets
Portal and Intranets Portal and Intranets
Portal and Intranets
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material
 
data-mesh-101.pptx
data-mesh-101.pptxdata-mesh-101.pptx
data-mesh-101.pptx
 
Intro to appcelerator
Intro to appceleratorIntro to appcelerator
Intro to appcelerator
 

Recently uploaded

GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
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
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 

Recently uploaded (20)

GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
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
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 

Couchbase Mobile Ideathon in Tokyo 2014.08.29: Developing with couchbase lite

  • 1. Couchbase Mobile Ideathon Traun Leyden Lead Android Developer tleyden@couchbase.com 10/29/13
  • 2. About me • I was previously at a startup company doing a mobile CRM app — we converted our app to Couchbase Lite to solve networking performance issues • Now I work full time as the lead developer on Couchbase Lite Android • I also work on demo apps on both iOS and Android • I have blog at http://tleyden.github.io
  • 3. About Couchbase • Was the merger of two companies • CouchOne (commercial support for CouchDB) • Membase (a commercially supported / distributed version of memcached) • Our flagship product is Couchbase Server, a fault tolerant distributed database. • We recently released Couchbase Mobile, targeted towards mobile and embedded devices/sensors. • All of our products are released as Open Source software under the Apache2 license. • We now have an office in Japan
  • 4. Why would you want to use Couchbase Mobile? Will your app work when the network is slow or only sometimes connected? ?
  • 5. We think our network is fast, but .. • On trains or underground • Large crowds • Out of the city center • Deployed on sites which have unreliable Wifi • Sometimes you are completely offline • Etc ..
  • 6. The simplest use case — sending a tweet on the subway Users expect better than this!
  • 8. Your app reads/writes to a local database This will be fast even if the network is slow or offline
  • 9. Couchbase Lite sync’s the data to the cloud (can run in background)
  • 10. TodoLite Demo • TodoLite is a todo list app • Users can login via Facebook • Users can share todo lists with each other • Different users can both view and update the same list • Photo attachments can be added to Todo items • Supports conflict resolution • Source code available on github (see resources slide) • Available in iTunes app store and Google Play
  • 11. Understanding sync gateway • Sync Gateway can control which users can see which documents. • In effect, it can partition the database so that users only see a subset of the database
  • 12. Partitioning a database by company and region
  • 13. Using Sync Gateway to partition a database • Sync Gateway can do this efficiently • The main reason it was created • Sync Gateway uses “channels” to do this • Let’s walk through an example
  • 14. Using Channels in OfficeRadar Example OfficeRadar uses iBeacons to detect who is in the office
  • 15. Users should only see activity for other users in their organization
  • 16. Sync Function • The sync function partitions the database by putting documents into channels • To understand the sync function, we must look at the OfficeRadar documents
  • 17. OfficeRadar GeofenceEvent Document Each Geofence Event is associated with an organization { "_id":"!QJoBU7cRa~m2E2tYloSHHN", "_rev":"1-8e8f3cebf357a2546c0d40e497227115", "action":"entry", "beacon":"4a83813db6ce76e9618793cf483cfa10", "created_at":"2014-08-28T23:43:19.119Z", "userprofile":"10152586863333982", "type":"geofence_event", "organization":"couchbase" }
  • 18. OfficeRadar UserProfile Document Each User Profile is associated with an organization { "_id":"10152586863333982", "_rev":"1-2b6a6e182ef77cd15db7171023931e8d", "type":"profile", "authSystem":"facebook", "name":"Traun Leyden", "organization":"couchbase" }
  • 19. OfficeRadar Sync Function function(doc, oldDoc) { if (doc.type == "geofence_event") { channel(doc.organization); } else if (doc.type == "profile") { access(doc.userid, doc.organization); } }
  • 20. Adding a geofence event to a channel if (doc.type == "geofence_event") { channel(doc.organization); }
  • 21. Allowing a user to access an organization’s channel else if (doc.type == "profile") { access(doc.userid, doc.organization); }
  • 22. Views Putting the “No” in NoSQL • Map/Reduce mechanism - A standard method of indexing in NoSQL - A view is similar to index in relational database. • App-defined map function - Called on every document - Can emit arbitrary key/value pairs into the index • Optional reduce function - Data aggregation / grouping • Functions are registered as native callbacks - Native callbacks make sense for performance and to match the rest of the app codebase
  • 23. Queries • Basic feature set - Key ranges, offset/limit, reverse, group by key… - No joins or fancy sorting - but compound keys (and clever emits) allow for some tricks • LiveQuery subclass - Monitors a view for changes - Can think of it as a “pub-sub” approach - Register a callback that is triggered when the query changes
  • 25. Embedded Picsolve  Image capture of roller coaster riders to local database in multiple theme park locations  Machine to machine communication example  Unreliable network connectivity required offline capture / later sync to centralized management system
  • 26. Infinite Campus Education / Social Interaction  Selectively push out learning modules / multimedia lessons to individual students  Teachers and students use custom mobile chat apps for real-time Q&A during lectures  Homework assignments can be completed offline anywhere
  • 27. Offline Sensor Data A weather balloon could collect sensor data while offline and sync it whenever it is online
  • 28. Travel Expense Tracker • I am in Tokyo, but my iPhone 5 is locked so I cannot use a local SIM card. • But I need an app to track my expenses, so I must be able to enter expenses while offline. • When I get back to the US, I want to sync these expenses to the Cloud so I can download a spreadsheet.
  • 29. Resources • These slides will be made available on SlideShare • Sample code links • https://github.com/couchbaselabs/ToDoLite-Android • https://github.com/couchbaselabs/ToDoLite-iOS • https://github.com/tleyden/office-radar • Documentation • http://developer.couchbase.com/mobile • Download - http://mobile.couchbase.com • Contact: couchbasejp@couchbase.com
  • 30. Resources 2 • Couchbase Mobile Google Group (community): groups.google.com/group/mobile-couchbase/ • Couchbase Mobile Twitter: https://twitter.com/CouchbaseMobile • Run Sync Gateway (and Couchbase Server!) under Docker: http://tleyden.github.io/blog/2014/06/22/running-couchbase- sync-gateway-on-gce/
  • 31. Upcoming Event: Hackathon • http://couchbasejpcommunity.doorkeeper.jp/events/13988
  • 32. Upcoming Event: Couchbase Server • Couchbase Server http://couchbasejpcommunity.doorkeeper.jp/events/14785
  • 33. Thanks for watching! Contact: tleyden@couchbase.com Questions?