SlideShare a Scribd company logo
1 of 50
Download to read offline
O'Reilly Fluent
Bradley Holt, Developer Advocate
Thursday, March 10, 2016
Offline-First Apps with PouchDB
@BradleyHolt
Why offline first?
Offline-First Apps with PouchDB
Offline-First Apps with PouchDB
Mobile First
Design for the smallest device first and then apply progressive enhancement techniques to
take advantage of larger screen sizes when available
Offline First
Design for offline usage first and then apply progressive enhancement techniques to take
advantage of network connectivity when available
Ubiquitous Connectivity
Why offline first in a world of ubiquitous connectivity?
The Eight Fallacies of Distributed Computing
1.  The network is reliable
2.  Latency is zero
3.  Bandwidth is infinite
4.  The network is secure
5.  Topology doesn't change
6.  There is one administrator
7.  Transport cost is zero
8.  The network is homogeneous
@BradleyHolt
Mobile Backend
What happens when your mobile backend service is unreachable?
Benefits of Offline First
Faster User Experience
Better, faster user experience — both offline and online
Works Offline
Ability to disconnect and continue to work offline
Battery and Bandwidth
Limited access to power and communications infrastructure in disaster scenarios
Offline-First Patterns and
Anti-Patterns
Offline-First Apps with PouchDB
Offline-First Apps with PouchDB
Offline-First Apps with PouchDB
Offline-First Apps with PouchDB
Offline-First Apps with PouchDB
Tools and Use Cases
CouchDB Replication Protocol
@BradleyHolt
Cloudant SyncCouchDB PouchDB
CouchDB Replication Protocol
CouchDB
Offline-First Apps with PouchDB
@BradleyHolt
PouchDB Code Examples
github.com/bradley-holt/offline-first
Offline-First Apps with PouchDB
JSON Documents
{

_id: "6EF9D2B0-13D3-1378-8D30-39E3CE0B36C2",

_rev: "1-0b457efcf82fb29492ef927ba5b6ee15",

type: "Feature",

geometry: {

type: "Point",

coordinates: [

-71.1028,

42.3691

]

},

properties: {

session_id: "3486b13f-7b8a-8a96-dfbf-9b82800e367f",

timestamp: 1422928591717

}

}
@BradleyHolt
Creating a PouchDB Database
var db = new PouchDB("smart-meter");
@BradleyHolt
Creating a New Document
var db = new PouchDB("smart-meter");
db.put({
_id: "2014-11-12T23:27:03.794Z",
kilowatt_hours: 14
}).then(function() {
console.log("Document created");
}).catch(function(error) {
console.log(error);
});
@BradleyHolt
Updating a Document
db.put({
_id: "2014-11-12T23:27:03.794Z",
kilowatt_hours: 14
}).then(function(response) {
return db.get(response.id);
}).then(function(doc) {
// Update the value for kilowatt hours
doc.kilowatt_hours = 15;
// Put the document back to the database
return db.put(doc);
}).catch(function(error) {
console.log(error);
});
@BradleyHolt
Querying a Database with allDocs
db.bulkDocs([
{_id: "2014-11-12T23:27:03.794Z", kilowatt_hours: 14},
{_id: "2014-11-13T00:52:01.471Z", kilowatt_hours: 15},
{_id: "2014-11-13T01:39:28.911Z", kilowatt_hours: 16},
{_id: "2014-11-13T02:52:01.471Z", kilowatt_hours: 17}
]).then(function(result) {
// Get all documents
return db.allDocs({include_docs: true});
}).then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
@BradleyHolt
allDocs Options
§  include_docs
– conflicts
– attachments
§  startkey
§  endkey
§  inclusive_end
(true by default)
§  limit
§  skip
§  descending
§  key
§  keys
@BradleyHolt
PouchDB Data Storage Limits
@BradleyHolt
Firefox Chrome Opera 15+ Internet
Exporer
10+
iOS Safari Safari
(desktop)
Android PhoneGap /
Cordova
Data
Storage
Limit
50MB
(more with
user
permission)
calculated calculated
250MB
(prompts
user at 10
MB)
50MB
(prompts
user at 5MB
and at
increments)
unlimited
(prompts
user at 5MB
and at
increments)
calculated /
200MB
unlimited
Adapter IndexedDB
IndexedDB
/ WebSQL
IndexedDB
/ WebSQL
IndexedDB WebSQL WebSQL
IndexedDB /
WebSQL
SQLite
Replication
Apache CouchDB
CouchDB is a document database featuring an HTTP API, JSON documents,
and peer-to-peer replication
@BradleyHolt
Offline-First Apps with PouchDB
Creating a Remote PouchDB Database
var remoteDb = new PouchDB("https://bradley-holt.cloudant.com/smart-meter");
@BradleyHolt
Cross-Origin Resource Sharing (CORS)
A security restriction implemented by browsers on cross-site HTTP requests
@BradleyHolt
Bidirectional Replication
@BradleyHolt
Bidirectional Replication
db.sync(remoteDb, {
live: false,
retry: false
}).on("change", function(info) {
// Replication has written a new document
console.log(info);
}).on("complete", function(info) {
// Replication has complete or been cancelled
console.log(info);
}).on("error", function(error) {
// Replication has stopped due to an unrecoverable failure
console.log(error);
});
@BradleyHolt
Live Replication
@BradleyHolt
Live Replication
var sync = db.sync(remoteDb, {
live: true,
retry: true
}).on("change", function(info) {
// Replication has written a new document
console.log(info);
}).on("complete", function(info) {
// Replication has complete or been cancelled
console.log(info);
}).on("error", function(error) {
// Replication has stopped due to an unrecoverable failure
console.log(error);
});
@BradleyHolt
Filtered Replication
@BradleyHolt
Filtered Replication
db.replicate.to(remoteDb, {
filter: function(doc) {
return doc._id >= "2014-11-13T00:00:00.000Z";
}
}).on("change", function(info) {
// Replication has written a new document
console.log(info);
}).on("complete", function(info) {
// Replication has complete or been cancelled
console.log(info);
});
@BradleyHolt
One Database Per User
@BradleyHolt
Clemmie
Danyel
Shelba
Manuel
Francis
Marissa
Mitchel
Georgianne
Garnet
Audrey
Kalyn
Offline-First Apps with PouchDB
Boilerplates & Tools
§  Frontend Web Apps
–  React Boilerplate with Service Workers
<https://github.com/mbrio/react-boilerplate/tree/react-0.13-flummox-service>
§  Backend Web Apps
–  PouchDB npm Package
<https://www.npmjs.com/package/pouchdb>
–  PouchDB Server npm Package
<https://www.npmjs.com/package/pouchdb-server>
§  Mobile Apps
–  PouchDB for Ionic Framework
<https://github.com/nolanlawson/pouchdb-ionic>
–  "Hello world" Cordova app with PouchDB
<https://github.com/nolanlawson/pouchdb-cordova-hello-world>
–  "Hello world" Cordova app with PouchDB, using the SQLite Plugin
<https://github.com/nolanlawson/pouchdb-cordova-hello-world-with-sqlite-plugin>
–  Cloudant FoodTracker (uses Cloudant Sync for iOS)
<https://github.com/ibm-cds-labs/cloudant-food-tracker>
§  Desktop Apps
–  PouchDB for Electron (formerly Atom Shell)
<https://github.com/nolanlawson/pouchdb-electron>
–  PouchDB for Chrome packaged apps
<https://github.com/nolanlawson/pouchdb-chrome-app>
–  "Hello world" Chrome app with PouchDB
<https://github.com/nolanlawson/pouchdb-chrome-app-hello-world>
–  PouchDB for NW.js (aka Node-Webkit)
<https://github.com/nolanlawson/pouchdb-nw>
§  Internet of Things (IoT) Apps
–  Node-RED
<http://nodered.org/>
@BradleyHolt
Cloudant FoodTracker
An offline-first demo app built with Swift and Cloudant Sync for iOS
Offline-First Apps with PouchDB
Image Credits
§  A mockup of the golden Apple iPhone 5S by Zach Vega,
on Wikimedia Commons
<https://commons.wikimedia.org/wiki/File:IPhone_5s.png>
§  Joan Touzet (@wohali), ASF Member, CouchDB PMC Member
<https://twitter.com/wohali/status/595689720933445632>
§  Device landscape by Jeremy Keith, on Flickr
<https://flic.kr/p/anLcHu>
§  Cloud Formation Over the Adirondacks by Bradley Holt,
on Twitter
<https://twitter.com/BradleyHolt/status/623030107679002624>
§  Cell phone tower by Gary Lerude, on Flickr
<https://flic.kr/p/crL7TN>
§  Pneumatic Central by Sleestak, on Flickr
<https://flic.kr/p/mRvRQ>
§  Colunas by Daniel Zanini H., on Flickr <https://flic.kr/p/5ZwHWv>
§  Speed DLR on Doklands by Umberto Rotundo, on Flickr
<https://flic.kr/p/7GmcUo>
§  Waterfall by Paulo Valdivieso, on Flickr <https://flic.kr/p/oNkvRP>
§  Wildfire by U.S. Fish and Wildlife Service Southeast Region,
on Flickr <https://flic.kr/p/8zkWGd>
§  Arduino Uno by Pete Prodoehl, on Flickr
<https://flic.kr/p/a3ky7E>
§  Warning by Stefano Brivio, on Flickr <https://flic.kr/p/tuBHA>
@BradleyHolt
Questions?
@BradleyHolt

More Related Content

What's hot

Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition!
Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition! Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition!
Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition! Michel Schudel
 
Drupal, git and sanity
Drupal, git and sanityDrupal, git and sanity
Drupal, git and sanityCharlie Morris
 
Vagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVaidik Kapoor
 
Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)Acquia
 
WordPress at Scale Webinar
WordPress at Scale WebinarWordPress at Scale Webinar
WordPress at Scale WebinarPantheon
 
Queue Everything and Please Everyone
Queue Everything and Please EveryoneQueue Everything and Please Everyone
Queue Everything and Please EveryoneVaidik Kapoor
 
Building production-quality apps with Node.js
Building production-quality apps with Node.jsBuilding production-quality apps with Node.js
Building production-quality apps with Node.jsmattpardee
 
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!DrupalCamp Kyiv
 
Staying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with KafkaStaying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with KafkaRichard Gee
 
Migrating NYSenate.gov
Migrating NYSenate.govMigrating NYSenate.gov
Migrating NYSenate.govPantheon
 
Docker Dhahran November 2017 meetup
Docker Dhahran November 2017 meetupDocker Dhahran November 2017 meetup
Docker Dhahran November 2017 meetupWalid Shaari
 
Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Derek Jacoby
 
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...Igalia
 
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...Nicolas Brousse
 
Stop making, start composing - Using Composer for Drupal development
Stop making, start composing - Using Composer for Drupal developmentStop making, start composing - Using Composer for Drupal development
Stop making, start composing - Using Composer for Drupal developmentkaspergarnaes
 

What's hot (20)

Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition!
Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition! Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition!
Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition!
 
Drupal, git and sanity
Drupal, git and sanityDrupal, git and sanity
Drupal, git and sanity
 
Vagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVagrant for Effective DevOps Culture
Vagrant for Effective DevOps Culture
 
Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)
 
WordPress at Scale Webinar
WordPress at Scale WebinarWordPress at Scale Webinar
WordPress at Scale Webinar
 
Queue Everything and Please Everyone
Queue Everything and Please EveryoneQueue Everything and Please Everyone
Queue Everything and Please Everyone
 
Building production-quality apps with Node.js
Building production-quality apps with Node.jsBuilding production-quality apps with Node.js
Building production-quality apps with Node.js
 
Version Controlling
Version ControllingVersion Controlling
Version Controlling
 
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
Migration from Drupal 7 to Drupal 8 - How Docker can save our lives!
 
On Prem Container Cloud - Lessons Learned
On Prem Container Cloud - Lessons LearnedOn Prem Container Cloud - Lessons Learned
On Prem Container Cloud - Lessons Learned
 
Short-Training asp.net vNext
Short-Training asp.net vNextShort-Training asp.net vNext
Short-Training asp.net vNext
 
Staying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with KafkaStaying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with Kafka
 
Migrating NYSenate.gov
Migrating NYSenate.govMigrating NYSenate.gov
Migrating NYSenate.gov
 
Render-as-You-Fetch
Render-as-You-FetchRender-as-You-Fetch
Render-as-You-Fetch
 
Docker Dhahran November 2017 meetup
Docker Dhahran November 2017 meetupDocker Dhahran November 2017 meetup
Docker Dhahran November 2017 meetup
 
Git 101 for CloudStack
Git 101 for CloudStackGit 101 for CloudStack
Git 101 for CloudStack
 
Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Untangling - fall2017 - week 8
Untangling - fall2017 - week 8
 
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...
 
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
 
Stop making, start composing - Using Composer for Drupal development
Stop making, start composing - Using Composer for Drupal developmentStop making, start composing - Using Composer for Drupal development
Stop making, start composing - Using Composer for Drupal development
 

Viewers also liked

Couch DB/PouchDB approach for hybrid mobile applications
Couch DB/PouchDB approach for hybrid mobile applicationsCouch DB/PouchDB approach for hybrid mobile applications
Couch DB/PouchDB approach for hybrid mobile applicationsIhor Malytskyi
 
Tech Webinar: Offline First: Creare un'app Phonegap che funzioni offline e si...
Tech Webinar: Offline First: Creare un'app Phonegap che funzioni offline e si...Tech Webinar: Offline First: Creare un'app Phonegap che funzioni offline e si...
Tech Webinar: Offline First: Creare un'app Phonegap che funzioni offline e si...Codemotion
 
Easy offline-first mobile and desktop web apps with PouchDB
Easy offline-first mobile and desktop web apps with PouchDBEasy offline-first mobile and desktop web apps with PouchDB
Easy offline-first mobile and desktop web apps with PouchDBRogue Wave Software
 
Device Synchronization with Javascript and PouchDB
Device Synchronization with Javascript and PouchDBDevice Synchronization with Javascript and PouchDB
Device Synchronization with Javascript and PouchDBFrank Rousseau
 
How to Embed a PowerPoint Presentation Using SlideShare
How to Embed a PowerPoint Presentation Using SlideShareHow to Embed a PowerPoint Presentation Using SlideShare
How to Embed a PowerPoint Presentation Using SlideShareJoie Ocon
 

Viewers also liked (7)

Couch DB/PouchDB approach for hybrid mobile applications
Couch DB/PouchDB approach for hybrid mobile applicationsCouch DB/PouchDB approach for hybrid mobile applications
Couch DB/PouchDB approach for hybrid mobile applications
 
Tech Webinar: Offline First: Creare un'app Phonegap che funzioni offline e si...
Tech Webinar: Offline First: Creare un'app Phonegap che funzioni offline e si...Tech Webinar: Offline First: Creare un'app Phonegap che funzioni offline e si...
Tech Webinar: Offline First: Creare un'app Phonegap che funzioni offline e si...
 
Pouch db tdc2016
Pouch db tdc2016Pouch db tdc2016
Pouch db tdc2016
 
Easy offline-first mobile and desktop web apps with PouchDB
Easy offline-first mobile and desktop web apps with PouchDBEasy offline-first mobile and desktop web apps with PouchDB
Easy offline-first mobile and desktop web apps with PouchDB
 
Apache CouchDB
Apache CouchDBApache CouchDB
Apache CouchDB
 
Device Synchronization with Javascript and PouchDB
Device Synchronization with Javascript and PouchDBDevice Synchronization with Javascript and PouchDB
Device Synchronization with Javascript and PouchDB
 
How to Embed a PowerPoint Presentation Using SlideShare
How to Embed a PowerPoint Presentation Using SlideShareHow to Embed a PowerPoint Presentation Using SlideShare
How to Embed a PowerPoint Presentation Using SlideShare
 

Similar to Offline-First Apps with PouchDB

Offline first solutions highland web group - december 2015
Offline first solutions   highland web group - december 2015Offline first solutions   highland web group - december 2015
Offline first solutions highland web group - december 2015Glynn Bird
 
Ten practical ways to improve front-end performance
Ten practical ways to improve front-end performanceTen practical ways to improve front-end performance
Ten practical ways to improve front-end performanceAndrew Rota
 
Rapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 PlatformRapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 PlatformWSO2
 
New Framework for Improving Bigdata Analaysis Using Mobile Agent
New Framework for Improving Bigdata Analaysis Using Mobile AgentNew Framework for Improving Bigdata Analaysis Using Mobile Agent
New Framework for Improving Bigdata Analaysis Using Mobile AgentMohammed Adam
 
Mobile App Development With IBM Cloudant
Mobile App Development With IBM CloudantMobile App Development With IBM Cloudant
Mobile App Development With IBM CloudantIBM Cloud Data Services
 
Offline first development - Glasgow PHP - January 2016
Offline first development - Glasgow PHP - January 2016Offline first development - Glasgow PHP - January 2016
Offline first development - Glasgow PHP - January 2016Glynn Bird
 
Laurentiu macovei meteor. a better way of building apps
Laurentiu macovei   meteor. a better way of building appsLaurentiu macovei   meteor. a better way of building apps
Laurentiu macovei meteor. a better way of building appsCodecamp Romania
 
Multi-Tenancy: Da Teoria à Prática, do DB ao Middleware
Multi-Tenancy: Da Teoria à Prática, do DB ao MiddlewareMulti-Tenancy: Da Teoria à Prática, do DB ao Middleware
Multi-Tenancy: Da Teoria à Prática, do DB ao MiddlewareBruno Borges
 
High Availability And Oracle Data Guard 11g R2
High Availability And Oracle Data Guard 11g R2High Availability And Oracle Data Guard 11g R2
High Availability And Oracle Data Guard 11g R2Mario Redón Luz
 
Hadoop workshop
Hadoop workshopHadoop workshop
Hadoop workshopFang Mac
 
Introduction to NoSQL with Couchbase
Introduction to NoSQL with CouchbaseIntroduction to NoSQL with Couchbase
Introduction to NoSQL with CouchbaseTugdual Grall
 
Sentiment Analysis using Big Data
Sentiment Analysis using Big Data Sentiment Analysis using Big Data
Sentiment Analysis using Big Data Rajat Mittal
 
GlobalsDB: Its significance for Node.js Developers
GlobalsDB: Its significance for Node.js DevelopersGlobalsDB: Its significance for Node.js Developers
GlobalsDB: Its significance for Node.js DevelopersRob Tweed
 
AWS re:Invent 2016: Large-Scale, Cloud-Based Analysis of Cancer Genomes: Less...
AWS re:Invent 2016: Large-Scale, Cloud-Based Analysis of Cancer Genomes: Less...AWS re:Invent 2016: Large-Scale, Cloud-Based Analysis of Cancer Genomes: Less...
AWS re:Invent 2016: Large-Scale, Cloud-Based Analysis of Cancer Genomes: Less...Amazon Web Services
 
Atmosphere 2014: Switching from monolithic approach to modular cloud computin...
Atmosphere 2014: Switching from monolithic approach to modular cloud computin...Atmosphere 2014: Switching from monolithic approach to modular cloud computin...
Atmosphere 2014: Switching from monolithic approach to modular cloud computin...PROIDEA
 
zdlra-db-migration-5188715.pdf
zdlra-db-migration-5188715.pdfzdlra-db-migration-5188715.pdf
zdlra-db-migration-5188715.pdfAhmed Abdellatif
 
APIdays Paris 2018 - Deliver API Updates in Real Time with Mercure.rocks Kévi...
APIdays Paris 2018 - Deliver API Updates in Real Time with Mercure.rocks Kévi...APIdays Paris 2018 - Deliver API Updates in Real Time with Mercure.rocks Kévi...
APIdays Paris 2018 - Deliver API Updates in Real Time with Mercure.rocks Kévi...apidays
 
LISA18: Hidden Linux Metrics with Prometheus eBPF Exporter
LISA18: Hidden Linux Metrics with Prometheus eBPF ExporterLISA18: Hidden Linux Metrics with Prometheus eBPF Exporter
LISA18: Hidden Linux Metrics with Prometheus eBPF ExporterIvan Babrou
 

Similar to Offline-First Apps with PouchDB (20)

Offline first solutions highland web group - december 2015
Offline first solutions   highland web group - december 2015Offline first solutions   highland web group - december 2015
Offline first solutions highland web group - december 2015
 
Ten practical ways to improve front-end performance
Ten practical ways to improve front-end performanceTen practical ways to improve front-end performance
Ten practical ways to improve front-end performance
 
Rapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 PlatformRapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 Platform
 
New Framework for Improving Bigdata Analaysis Using Mobile Agent
New Framework for Improving Bigdata Analaysis Using Mobile AgentNew Framework for Improving Bigdata Analaysis Using Mobile Agent
New Framework for Improving Bigdata Analaysis Using Mobile Agent
 
Mobile App Development With IBM Cloudant
Mobile App Development With IBM CloudantMobile App Development With IBM Cloudant
Mobile App Development With IBM Cloudant
 
Offline first development - Glasgow PHP - January 2016
Offline first development - Glasgow PHP - January 2016Offline first development - Glasgow PHP - January 2016
Offline first development - Glasgow PHP - January 2016
 
Laurentiu macovei meteor. a better way of building apps
Laurentiu macovei   meteor. a better way of building appsLaurentiu macovei   meteor. a better way of building apps
Laurentiu macovei meteor. a better way of building apps
 
Multi-Tenancy: Da Teoria à Prática, do DB ao Middleware
Multi-Tenancy: Da Teoria à Prática, do DB ao MiddlewareMulti-Tenancy: Da Teoria à Prática, do DB ao Middleware
Multi-Tenancy: Da Teoria à Prática, do DB ao Middleware
 
High Availability And Oracle Data Guard 11g R2
High Availability And Oracle Data Guard 11g R2High Availability And Oracle Data Guard 11g R2
High Availability And Oracle Data Guard 11g R2
 
your browser, my storage
your browser, my storageyour browser, my storage
your browser, my storage
 
Hadoop workshop
Hadoop workshopHadoop workshop
Hadoop workshop
 
October 2013 HUG: Oozie 4.x
October 2013 HUG: Oozie 4.xOctober 2013 HUG: Oozie 4.x
October 2013 HUG: Oozie 4.x
 
Introduction to NoSQL with Couchbase
Introduction to NoSQL with CouchbaseIntroduction to NoSQL with Couchbase
Introduction to NoSQL with Couchbase
 
Sentiment Analysis using Big Data
Sentiment Analysis using Big Data Sentiment Analysis using Big Data
Sentiment Analysis using Big Data
 
GlobalsDB: Its significance for Node.js Developers
GlobalsDB: Its significance for Node.js DevelopersGlobalsDB: Its significance for Node.js Developers
GlobalsDB: Its significance for Node.js Developers
 
AWS re:Invent 2016: Large-Scale, Cloud-Based Analysis of Cancer Genomes: Less...
AWS re:Invent 2016: Large-Scale, Cloud-Based Analysis of Cancer Genomes: Less...AWS re:Invent 2016: Large-Scale, Cloud-Based Analysis of Cancer Genomes: Less...
AWS re:Invent 2016: Large-Scale, Cloud-Based Analysis of Cancer Genomes: Less...
 
Atmosphere 2014: Switching from monolithic approach to modular cloud computin...
Atmosphere 2014: Switching from monolithic approach to modular cloud computin...Atmosphere 2014: Switching from monolithic approach to modular cloud computin...
Atmosphere 2014: Switching from monolithic approach to modular cloud computin...
 
zdlra-db-migration-5188715.pdf
zdlra-db-migration-5188715.pdfzdlra-db-migration-5188715.pdf
zdlra-db-migration-5188715.pdf
 
APIdays Paris 2018 - Deliver API Updates in Real Time with Mercure.rocks Kévi...
APIdays Paris 2018 - Deliver API Updates in Real Time with Mercure.rocks Kévi...APIdays Paris 2018 - Deliver API Updates in Real Time with Mercure.rocks Kévi...
APIdays Paris 2018 - Deliver API Updates in Real Time with Mercure.rocks Kévi...
 
LISA18: Hidden Linux Metrics with Prometheus eBPF Exporter
LISA18: Hidden Linux Metrics with Prometheus eBPF ExporterLISA18: Hidden Linux Metrics with Prometheus eBPF Exporter
LISA18: Hidden Linux Metrics with Prometheus eBPF Exporter
 

More from Paula Peña (She, Her, Hers) (8)

Getting Started with Cloud Foundry on Bluemix
Getting Started with Cloud Foundry on BluemixGetting Started with Cloud Foundry on Bluemix
Getting Started with Cloud Foundry on Bluemix
 
Building Next Gen Applications and Microservices
Building Next Gen Applications and Microservices Building Next Gen Applications and Microservices
Building Next Gen Applications and Microservices
 
Bluemix DevOps Services
Bluemix DevOps Services Bluemix DevOps Services
Bluemix DevOps Services
 
Bluemix Garage Method
Bluemix Garage MethodBluemix Garage Method
Bluemix Garage Method
 
Blockchain Explained for Devlopers
Blockchain Explained for DevlopersBlockchain Explained for Devlopers
Blockchain Explained for Devlopers
 
The App Evolution Continues
The App Evolution ContinuesThe App Evolution Continues
The App Evolution Continues
 
App Development Evolution: What has changed?
App Development Evolution: What has changed? App Development Evolution: What has changed?
App Development Evolution: What has changed?
 
Building an IOT app using MQTT
Building an IOT app using MQTTBuilding an IOT app using MQTT
Building an IOT app using MQTT
 

Recently uploaded

How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?IES VE
 
100+ ChatGPT Prompts for SEO Optimization
100+ ChatGPT Prompts for SEO Optimization100+ ChatGPT Prompts for SEO Optimization
100+ ChatGPT Prompts for SEO Optimizationarrow10202532yuvraj
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfinfogdgmi
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDELiveplex
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
IEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
IEEE Computer Society’s Strategic Activities and Products including SWEBOK GuideIEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
IEEE Computer Society’s Strategic Activities and Products including SWEBOK GuideHironori Washizaki
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"
UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"
UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"DianaGray10
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...Daniel Zivkovic
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
99.99% of Your Traces Are (Probably) Trash (SRECon NA 2024).pdf
99.99% of Your Traces  Are (Probably) Trash (SRECon NA 2024).pdf99.99% of Your Traces  Are (Probably) Trash (SRECon NA 2024).pdf
99.99% of Your Traces Are (Probably) Trash (SRECon NA 2024).pdfPaige Cruz
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 

Recently uploaded (20)

How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?
 
100+ ChatGPT Prompts for SEO Optimization
100+ ChatGPT Prompts for SEO Optimization100+ ChatGPT Prompts for SEO Optimization
100+ ChatGPT Prompts for SEO Optimization
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdf
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
IEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
IEEE Computer Society’s Strategic Activities and Products including SWEBOK GuideIEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
IEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"
UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"
UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
99.99% of Your Traces Are (Probably) Trash (SRECon NA 2024).pdf
99.99% of Your Traces  Are (Probably) Trash (SRECon NA 2024).pdf99.99% of Your Traces  Are (Probably) Trash (SRECon NA 2024).pdf
99.99% of Your Traces Are (Probably) Trash (SRECon NA 2024).pdf
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 

Offline-First Apps with PouchDB

  • 1. O'Reilly Fluent Bradley Holt, Developer Advocate Thursday, March 10, 2016 Offline-First Apps with PouchDB @BradleyHolt
  • 5. Mobile First Design for the smallest device first and then apply progressive enhancement techniques to take advantage of larger screen sizes when available
  • 6. Offline First Design for offline usage first and then apply progressive enhancement techniques to take advantage of network connectivity when available
  • 7. Ubiquitous Connectivity Why offline first in a world of ubiquitous connectivity?
  • 8. The Eight Fallacies of Distributed Computing 1.  The network is reliable 2.  Latency is zero 3.  Bandwidth is infinite 4.  The network is secure 5.  Topology doesn't change 6.  There is one administrator 7.  Transport cost is zero 8.  The network is homogeneous @BradleyHolt
  • 9. Mobile Backend What happens when your mobile backend service is unreachable?
  • 11. Faster User Experience Better, faster user experience — both offline and online
  • 12. Works Offline Ability to disconnect and continue to work offline
  • 13. Battery and Bandwidth Limited access to power and communications infrastructure in disaster scenarios
  • 20. Tools and Use Cases
  • 21. CouchDB Replication Protocol @BradleyHolt Cloudant SyncCouchDB PouchDB CouchDB Replication Protocol CouchDB
  • 26. JSON Documents {
 _id: "6EF9D2B0-13D3-1378-8D30-39E3CE0B36C2",
 _rev: "1-0b457efcf82fb29492ef927ba5b6ee15",
 type: "Feature",
 geometry: {
 type: "Point",
 coordinates: [
 -71.1028,
 42.3691
 ]
 },
 properties: {
 session_id: "3486b13f-7b8a-8a96-dfbf-9b82800e367f",
 timestamp: 1422928591717
 }
 } @BradleyHolt
  • 27. Creating a PouchDB Database var db = new PouchDB("smart-meter"); @BradleyHolt
  • 28. Creating a New Document var db = new PouchDB("smart-meter"); db.put({ _id: "2014-11-12T23:27:03.794Z", kilowatt_hours: 14 }).then(function() { console.log("Document created"); }).catch(function(error) { console.log(error); }); @BradleyHolt
  • 29. Updating a Document db.put({ _id: "2014-11-12T23:27:03.794Z", kilowatt_hours: 14 }).then(function(response) { return db.get(response.id); }).then(function(doc) { // Update the value for kilowatt hours doc.kilowatt_hours = 15; // Put the document back to the database return db.put(doc); }).catch(function(error) { console.log(error); }); @BradleyHolt
  • 30. Querying a Database with allDocs db.bulkDocs([ {_id: "2014-11-12T23:27:03.794Z", kilowatt_hours: 14}, {_id: "2014-11-13T00:52:01.471Z", kilowatt_hours: 15}, {_id: "2014-11-13T01:39:28.911Z", kilowatt_hours: 16}, {_id: "2014-11-13T02:52:01.471Z", kilowatt_hours: 17} ]).then(function(result) { // Get all documents return db.allDocs({include_docs: true}); }).then(function(response) { console.log(response); }).catch(function(error) { console.log(error); }); @BradleyHolt
  • 31. allDocs Options §  include_docs – conflicts – attachments §  startkey §  endkey §  inclusive_end (true by default) §  limit §  skip §  descending §  key §  keys @BradleyHolt
  • 32. PouchDB Data Storage Limits @BradleyHolt Firefox Chrome Opera 15+ Internet Exporer 10+ iOS Safari Safari (desktop) Android PhoneGap / Cordova Data Storage Limit 50MB (more with user permission) calculated calculated 250MB (prompts user at 10 MB) 50MB (prompts user at 5MB and at increments) unlimited (prompts user at 5MB and at increments) calculated / 200MB unlimited Adapter IndexedDB IndexedDB / WebSQL IndexedDB / WebSQL IndexedDB WebSQL WebSQL IndexedDB / WebSQL SQLite
  • 34. Apache CouchDB CouchDB is a document database featuring an HTTP API, JSON documents, and peer-to-peer replication @BradleyHolt
  • 36. Creating a Remote PouchDB Database var remoteDb = new PouchDB("https://bradley-holt.cloudant.com/smart-meter"); @BradleyHolt
  • 37. Cross-Origin Resource Sharing (CORS) A security restriction implemented by browsers on cross-site HTTP requests @BradleyHolt
  • 39. Bidirectional Replication db.sync(remoteDb, { live: false, retry: false }).on("change", function(info) { // Replication has written a new document console.log(info); }).on("complete", function(info) { // Replication has complete or been cancelled console.log(info); }).on("error", function(error) { // Replication has stopped due to an unrecoverable failure console.log(error); }); @BradleyHolt
  • 41. Live Replication var sync = db.sync(remoteDb, { live: true, retry: true }).on("change", function(info) { // Replication has written a new document console.log(info); }).on("complete", function(info) { // Replication has complete or been cancelled console.log(info); }).on("error", function(error) { // Replication has stopped due to an unrecoverable failure console.log(error); }); @BradleyHolt
  • 43. Filtered Replication db.replicate.to(remoteDb, { filter: function(doc) { return doc._id >= "2014-11-13T00:00:00.000Z"; } }).on("change", function(info) { // Replication has written a new document console.log(info); }).on("complete", function(info) { // Replication has complete or been cancelled console.log(info); }); @BradleyHolt
  • 44. One Database Per User @BradleyHolt Clemmie Danyel Shelba Manuel Francis Marissa Mitchel Georgianne Garnet Audrey Kalyn
  • 46. Boilerplates & Tools §  Frontend Web Apps –  React Boilerplate with Service Workers <https://github.com/mbrio/react-boilerplate/tree/react-0.13-flummox-service> §  Backend Web Apps –  PouchDB npm Package <https://www.npmjs.com/package/pouchdb> –  PouchDB Server npm Package <https://www.npmjs.com/package/pouchdb-server> §  Mobile Apps –  PouchDB for Ionic Framework <https://github.com/nolanlawson/pouchdb-ionic> –  "Hello world" Cordova app with PouchDB <https://github.com/nolanlawson/pouchdb-cordova-hello-world> –  "Hello world" Cordova app with PouchDB, using the SQLite Plugin <https://github.com/nolanlawson/pouchdb-cordova-hello-world-with-sqlite-plugin> –  Cloudant FoodTracker (uses Cloudant Sync for iOS) <https://github.com/ibm-cds-labs/cloudant-food-tracker> §  Desktop Apps –  PouchDB for Electron (formerly Atom Shell) <https://github.com/nolanlawson/pouchdb-electron> –  PouchDB for Chrome packaged apps <https://github.com/nolanlawson/pouchdb-chrome-app> –  "Hello world" Chrome app with PouchDB <https://github.com/nolanlawson/pouchdb-chrome-app-hello-world> –  PouchDB for NW.js (aka Node-Webkit) <https://github.com/nolanlawson/pouchdb-nw> §  Internet of Things (IoT) Apps –  Node-RED <http://nodered.org/> @BradleyHolt
  • 47. Cloudant FoodTracker An offline-first demo app built with Swift and Cloudant Sync for iOS
  • 49. Image Credits §  A mockup of the golden Apple iPhone 5S by Zach Vega, on Wikimedia Commons <https://commons.wikimedia.org/wiki/File:IPhone_5s.png> §  Joan Touzet (@wohali), ASF Member, CouchDB PMC Member <https://twitter.com/wohali/status/595689720933445632> §  Device landscape by Jeremy Keith, on Flickr <https://flic.kr/p/anLcHu> §  Cloud Formation Over the Adirondacks by Bradley Holt, on Twitter <https://twitter.com/BradleyHolt/status/623030107679002624> §  Cell phone tower by Gary Lerude, on Flickr <https://flic.kr/p/crL7TN> §  Pneumatic Central by Sleestak, on Flickr <https://flic.kr/p/mRvRQ> §  Colunas by Daniel Zanini H., on Flickr <https://flic.kr/p/5ZwHWv> §  Speed DLR on Doklands by Umberto Rotundo, on Flickr <https://flic.kr/p/7GmcUo> §  Waterfall by Paulo Valdivieso, on Flickr <https://flic.kr/p/oNkvRP> §  Wildfire by U.S. Fish and Wildlife Service Southeast Region, on Flickr <https://flic.kr/p/8zkWGd> §  Arduino Uno by Pete Prodoehl, on Flickr <https://flic.kr/p/a3ky7E> §  Warning by Stefano Brivio, on Flickr <https://flic.kr/p/tuBHA> @BradleyHolt