SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Downloaden Sie, um offline zu lesen
Your devices deserve more than your files
v
Setup 
<script src="pouchdb.min.js"></script> 
$ npm install pouchdb ­­save 
var pouchdb = require('pouchdb');
Synchronization 
var db = new PouchDB('todos'); 
var remoteCouch = 'https://mycouch/todos'; 
var opts = {live: true}; 
db.sync(remoteCouch, opts) 
.on('change', onChange) 
.on('uptodate', onUpdate) 
.on('error', onError);
Conflicts 
var opts = {conflicts: true}; 
db.get('docid', opts, function (err, doc) { 
var rev = doc._rev; 
var conflictRev = doc._conflicts[0]; 
rev = selectRevision(rev, conflictRev); 
opts = {rev: rev}; 
db.get('docid', opts, function (err, doc) { 
db.put(doc); 
}); 
};
Messaging (pub/sub) 
function onChange (change) { 
if(change.doc.type === 'message' 
&& change.doc.chan === 'mychan') { 
console.log(doc.content); 
db.put({ 
type: 'message', 
content: 'Got it! Now I publish' 
}); 
}
pouchdb.com 
pouchdb/pouchdb 
pouchdb/pouchdb-server 
colinskow/pouch-mirror 
natevw/PeerPouch 
cozy-labs/[mobile|desktop]
Your Devices Deserve More with PouchDB

Weitere ähnliche Inhalte

Was ist angesagt?

Putting the Go in MongoDB: How We Rebuilt The MongoDB Tools in Go
Putting the Go in MongoDB: How We Rebuilt The MongoDB Tools in GoPutting the Go in MongoDB: How We Rebuilt The MongoDB Tools in Go
Putting the Go in MongoDB: How We Rebuilt The MongoDB Tools in GoMongoDB
 
GCPUG meetup 201610 - Dataflow Introduction
GCPUG meetup 201610 - Dataflow IntroductionGCPUG meetup 201610 - Dataflow Introduction
GCPUG meetup 201610 - Dataflow IntroductionSimon Su
 
Building .NET Apps using Couchbase Lite
Building .NET Apps using Couchbase LiteBuilding .NET Apps using Couchbase Lite
Building .NET Apps using Couchbase Litegramana
 
What I learned from FluentConf and then some
What I learned from FluentConf and then someWhat I learned from FluentConf and then some
What I learned from FluentConf and then someOhad Kravchick
 
Event Pipe - Lambda Architecture
Event Pipe - Lambda ArchitectureEvent Pipe - Lambda Architecture
Event Pipe - Lambda ArchitectureBahadir Cambel
 
Building Scalable Websites with Perl
Building Scalable Websites with PerlBuilding Scalable Websites with Perl
Building Scalable Websites with PerlPerrin Harkins
 
Background Tasks in Node - Evan Tahler, TaskRabbit
Background Tasks in Node - Evan Tahler, TaskRabbitBackground Tasks in Node - Evan Tahler, TaskRabbit
Background Tasks in Node - Evan Tahler, TaskRabbitRedis Labs
 
Automating Workflows for Analytics Pipelines
Automating Workflows for Analytics PipelinesAutomating Workflows for Analytics Pipelines
Automating Workflows for Analytics PipelinesSadayuki Furuhashi
 
Introduction to performance tuning perl web applications
Introduction to performance tuning perl web applicationsIntroduction to performance tuning perl web applications
Introduction to performance tuning perl web applicationsPerrin Harkins
 
Docker in Action
Docker in ActionDocker in Action
Docker in ActionSimon Su
 
Client Side Storage
Client Side StorageClient Side Storage
Client Side StoragePaul Sowden
 
Common Pitfalls for your Drupal Site, and How to Avoid Them
Common Pitfalls for your Drupal Site, and How to Avoid ThemCommon Pitfalls for your Drupal Site, and How to Avoid Them
Common Pitfalls for your Drupal Site, and How to Avoid ThemAcquia
 
Dmp hadoop getting_start
Dmp hadoop getting_startDmp hadoop getting_start
Dmp hadoop getting_startGim GyungJin
 
Scalable network applications, event-driven - Node JS
Scalable network applications, event-driven - Node JSScalable network applications, event-driven - Node JS
Scalable network applications, event-driven - Node JSCosmin Mereuta
 
Getting started with node JS
Getting started with node JSGetting started with node JS
Getting started with node JSHamdi Hmidi
 
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...ronwarshawsky
 
Social Analytics with MongoDB
Social Analytics with MongoDBSocial Analytics with MongoDB
Social Analytics with MongoDBPatrick Stokes
 

Was ist angesagt? (20)

Putting the Go in MongoDB: How We Rebuilt The MongoDB Tools in Go
Putting the Go in MongoDB: How We Rebuilt The MongoDB Tools in GoPutting the Go in MongoDB: How We Rebuilt The MongoDB Tools in Go
Putting the Go in MongoDB: How We Rebuilt The MongoDB Tools in Go
 
GCPUG meetup 201610 - Dataflow Introduction
GCPUG meetup 201610 - Dataflow IntroductionGCPUG meetup 201610 - Dataflow Introduction
GCPUG meetup 201610 - Dataflow Introduction
 
Building .NET Apps using Couchbase Lite
Building .NET Apps using Couchbase LiteBuilding .NET Apps using Couchbase Lite
Building .NET Apps using Couchbase Lite
 
What I learned from FluentConf and then some
What I learned from FluentConf and then someWhat I learned from FluentConf and then some
What I learned from FluentConf and then some
 
Event Pipe - Lambda Architecture
Event Pipe - Lambda ArchitectureEvent Pipe - Lambda Architecture
Event Pipe - Lambda Architecture
 
Intro To Couch Db
Intro To Couch DbIntro To Couch Db
Intro To Couch Db
 
Building Scalable Websites with Perl
Building Scalable Websites with PerlBuilding Scalable Websites with Perl
Building Scalable Websites with Perl
 
Background Tasks in Node - Evan Tahler, TaskRabbit
Background Tasks in Node - Evan Tahler, TaskRabbitBackground Tasks in Node - Evan Tahler, TaskRabbit
Background Tasks in Node - Evan Tahler, TaskRabbit
 
Automating Workflows for Analytics Pipelines
Automating Workflows for Analytics PipelinesAutomating Workflows for Analytics Pipelines
Automating Workflows for Analytics Pipelines
 
Introduction to performance tuning perl web applications
Introduction to performance tuning perl web applicationsIntroduction to performance tuning perl web applications
Introduction to performance tuning perl web applications
 
Docker in Action
Docker in ActionDocker in Action
Docker in Action
 
Client Side Storage
Client Side StorageClient Side Storage
Client Side Storage
 
Analyse Yourself
Analyse YourselfAnalyse Yourself
Analyse Yourself
 
Common Pitfalls for your Drupal Site, and How to Avoid Them
Common Pitfalls for your Drupal Site, and How to Avoid ThemCommon Pitfalls for your Drupal Site, and How to Avoid Them
Common Pitfalls for your Drupal Site, and How to Avoid Them
 
Dmp hadoop getting_start
Dmp hadoop getting_startDmp hadoop getting_start
Dmp hadoop getting_start
 
Scalable network applications, event-driven - Node JS
Scalable network applications, event-driven - Node JSScalable network applications, event-driven - Node JS
Scalable network applications, event-driven - Node JS
 
Docker Monitoring Webinar
Docker Monitoring  WebinarDocker Monitoring  Webinar
Docker Monitoring Webinar
 
Getting started with node JS
Getting started with node JSGetting started with node JS
Getting started with node JS
 
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
MongoDB performance tuning and load testing, NOSQL Now! 2013 Conference prese...
 
Social Analytics with MongoDB
Social Analytics with MongoDBSocial Analytics with MongoDB
Social Analytics with MongoDB
 

Andere mochten auch

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
 
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
 
Offline first, the painless way
Offline first, the painless wayOffline first, the painless way
Offline first, the painless wayMarcel Kalveram
 
Idris: Chocolatey Yumm-Tastic
Idris: Chocolatey Yumm-TasticIdris: Chocolatey Yumm-Tastic
Idris: Chocolatey Yumm-TasticWalida Roberts
 
วารุณี
วารุณีวารุณี
วารุณีwarunee18
 
Sherry power point 3
Sherry power point 3Sherry power point 3
Sherry power point 3Sherry14
 
Leverage social media to drive business the case sept 2012
Leverage social media to drive business the case sept 2012Leverage social media to drive business the case sept 2012
Leverage social media to drive business the case sept 2012SimoneVersteeg
 
IEC Orientation first year for B-Tech
IEC Orientation first year for B-TechIEC Orientation first year for B-Tech
IEC Orientation first year for B-Techiec
 
Volcanestaller
VolcanestallerVolcanestaller
VolcanestallerImacp
 
Weekly news (4th oct – 9th oct
Weekly news (4th oct – 9th octWeekly news (4th oct – 9th oct
Weekly news (4th oct – 9th octNitin Kochhar
 
SJob
SJobSJob
SJobd3ves
 
[plan politika] Indonesian Youth and Politics : Serial Slide Bakal Calon Gube...
[plan politika] Indonesian Youth and Politics : Serial Slide Bakal Calon Gube...[plan politika] Indonesian Youth and Politics : Serial Slide Bakal Calon Gube...
[plan politika] Indonesian Youth and Politics : Serial Slide Bakal Calon Gube...Plan Politika
 
Bee module 1
Bee module 1Bee module 1
Bee module 1BChange
 
Cactus explorer 14 complete
Cactus explorer 14 completeCactus explorer 14 complete
Cactus explorer 14 completerochonf
 
Velazquez
VelazquezVelazquez
VelazquezJ Luque
 

Andere mochten auch (20)

Offline-First Apps with PouchDB
Offline-First Apps with PouchDB Offline-First Apps with PouchDB
Offline-First Apps with PouchDB
 
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
 
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
 
Apache CouchDB
Apache CouchDBApache CouchDB
Apache CouchDB
 
Offline first, the painless way
Offline first, the painless wayOffline first, the painless way
Offline first, the painless way
 
Idris: Chocolatey Yumm-Tastic
Idris: Chocolatey Yumm-TasticIdris: Chocolatey Yumm-Tastic
Idris: Chocolatey Yumm-Tastic
 
วารุณี
วารุณีวารุณี
วารุณี
 
Sherry power point 3
Sherry power point 3Sherry power point 3
Sherry power point 3
 
2 weekly news
2 weekly news2 weekly news
2 weekly news
 
Leverage social media to drive business the case sept 2012
Leverage social media to drive business the case sept 2012Leverage social media to drive business the case sept 2012
Leverage social media to drive business the case sept 2012
 
IEC Orientation first year for B-Tech
IEC Orientation first year for B-TechIEC Orientation first year for B-Tech
IEC Orientation first year for B-Tech
 
Volcanestaller
VolcanestallerVolcanestaller
Volcanestaller
 
Weekly news (4th oct – 9th oct
Weekly news (4th oct – 9th octWeekly news (4th oct – 9th oct
Weekly news (4th oct – 9th oct
 
SJob
SJobSJob
SJob
 
[plan politika] Indonesian Youth and Politics : Serial Slide Bakal Calon Gube...
[plan politika] Indonesian Youth and Politics : Serial Slide Bakal Calon Gube...[plan politika] Indonesian Youth and Politics : Serial Slide Bakal Calon Gube...
[plan politika] Indonesian Youth and Politics : Serial Slide Bakal Calon Gube...
 
Bee module 1
Bee module 1Bee module 1
Bee module 1
 
Cactus explorer 14 complete
Cactus explorer 14 completeCactus explorer 14 complete
Cactus explorer 14 complete
 
Got Community?
Got Community?Got Community?
Got Community?
 
Weekly news (3)
Weekly news (3)Weekly news (3)
Weekly news (3)
 
Velazquez
VelazquezVelazquez
Velazquez
 

Ähnlich wie Your Devices Deserve More with PouchDB

Synchronisation de périphériques avec Javascript et PouchDB
Synchronisation de périphériques avec Javascript et PouchDBSynchronisation de périphériques avec Javascript et PouchDB
Synchronisation de périphériques avec Javascript et PouchDBFrank Rousseau
 
Spring data iii
Spring data iiiSpring data iii
Spring data iii명철 강
 
AngularJS - $http & $resource Services
AngularJS - $http & $resource ServicesAngularJS - $http & $resource Services
AngularJS - $http & $resource ServicesEyal Vardi
 
EWD 3 Training Course Part 20: The DocumentNode Object
EWD 3 Training Course Part 20: The DocumentNode ObjectEWD 3 Training Course Part 20: The DocumentNode Object
EWD 3 Training Course Part 20: The DocumentNode ObjectRob Tweed
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous phpWim Godden
 
WordCamp San Francisco 2011: Transients, Caching, and the Complexities of Mul...
WordCamp San Francisco 2011: Transients, Caching, and the Complexities of Mul...WordCamp San Francisco 2011: Transients, Caching, and the Complexities of Mul...
WordCamp San Francisco 2011: Transients, Caching, and the Complexities of Mul...andrewnacin
 
Practical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppPractical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppSmartLogic
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesLindsay Holmwood
 
Cakephp2study tips集
Cakephp2study tips集Cakephp2study tips集
Cakephp2study tips集Kohji Tanaka
 
Performance measurement and tuning
Performance measurement and tuningPerformance measurement and tuning
Performance measurement and tuningAOE
 
Virtual Madness @ Etsy
Virtual Madness @ EtsyVirtual Madness @ Etsy
Virtual Madness @ EtsyNishan Subedi
 
Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Carlos Sanchez
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applicationsTom Croucher
 
Bang-Bang, you have been hacked - Yonatan Levin, KolGene
Bang-Bang, you have been hacked - Yonatan Levin, KolGeneBang-Bang, you have been hacked - Yonatan Levin, KolGene
Bang-Bang, you have been hacked - Yonatan Levin, KolGeneDroidConTLV
 

Ähnlich wie Your Devices Deserve More with PouchDB (20)

Synchronisation de périphériques avec Javascript et PouchDB
Synchronisation de périphériques avec Javascript et PouchDBSynchronisation de périphériques avec Javascript et PouchDB
Synchronisation de périphériques avec Javascript et PouchDB
 
Hadoop
HadoopHadoop
Hadoop
 
Spring data iii
Spring data iiiSpring data iii
Spring data iii
 
AngularJS - $http & $resource Services
AngularJS - $http & $resource ServicesAngularJS - $http & $resource Services
AngularJS - $http & $resource Services
 
EWD 3 Training Course Part 20: The DocumentNode Object
EWD 3 Training Course Part 20: The DocumentNode ObjectEWD 3 Training Course Part 20: The DocumentNode Object
EWD 3 Training Course Part 20: The DocumentNode Object
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous php
 
WordCamp San Francisco 2011: Transients, Caching, and the Complexities of Mul...
WordCamp San Francisco 2011: Transients, Caching, and the Complexities of Mul...WordCamp San Francisco 2011: Transients, Caching, and the Complexities of Mul...
WordCamp San Francisco 2011: Transients, Caching, and the Complexities of Mul...
 
Practical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppPractical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails App
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
Fatc
FatcFatc
Fatc
 
8. Move in Laravel
8. Move in Laravel8. Move in Laravel
8. Move in Laravel
 
Cakephp2study tips集
Cakephp2study tips集Cakephp2study tips集
Cakephp2study tips集
 
Performance measurement and tuning
Performance measurement and tuningPerformance measurement and tuning
Performance measurement and tuning
 
Virtual Madness @ Etsy
Virtual Madness @ EtsyVirtual Madness @ Etsy
Virtual Madness @ Etsy
 
Angular js security
Angular js securityAngular js security
Angular js security
 
Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applications
 
Rails is not just Ruby
Rails is not just RubyRails is not just Ruby
Rails is not just Ruby
 
6. Add numbers in Laravel
6. Add numbers in Laravel6. Add numbers in Laravel
6. Add numbers in Laravel
 
Bang-Bang, you have been hacked - Yonatan Levin, KolGene
Bang-Bang, you have been hacked - Yonatan Levin, KolGeneBang-Bang, you have been hacked - Yonatan Levin, KolGene
Bang-Bang, you have been hacked - Yonatan Levin, KolGene
 

Mehr von Frank Rousseau

Node.js et NPM: de la récupération de dépendances à la publication de paquets
Node.js et NPM: de la récupération de dépendances à la publication de paquetsNode.js et NPM: de la récupération de dépendances à la publication de paquets
Node.js et NPM: de la récupération de dépendances à la publication de paquetsFrank Rousseau
 
Newebe, un Réseau Social ou Chacun est Indépendant
Newebe, un Réseau Social ou Chacun est IndépendantNewebe, un Réseau Social ou Chacun est Indépendant
Newebe, un Réseau Social ou Chacun est IndépendantFrank Rousseau
 
Conseils sur le Design pour les Développeurs par un Développeur
Conseils sur le Design pour les Développeurs par un DéveloppeurConseils sur le Design pour les Développeurs par un Développeur
Conseils sur le Design pour les Développeurs par un DéveloppeurFrank Rousseau
 
Développement web sans souffrance avec Cozy
Développement web sans souffrance avec CozyDéveloppement web sans souffrance avec Cozy
Développement web sans souffrance avec CozyFrank Rousseau
 
Newebe, a social network where all users are independent
Newebe, a social network where all users are independentNewebe, a social network where all users are independent
Newebe, a social network where all users are independentFrank Rousseau
 
Cozy Cloud, Pour un meilleur web
Cozy Cloud, Pour un meilleur webCozy Cloud, Pour un meilleur web
Cozy Cloud, Pour un meilleur webFrank Rousseau
 
Comment les grands acteurs du web s'improvisent magiciens et jouent avec nos ...
Comment les grands acteurs du web s'improvisent magiciens et jouent avec nos ...Comment les grands acteurs du web s'improvisent magiciens et jouent avec nos ...
Comment les grands acteurs du web s'improvisent magiciens et jouent avec nos ...Frank Rousseau
 
20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdevFrank Rousseau
 
A startup with no office, hipster tools and open source products
A startup with no office, hipster tools and open source productsA startup with no office, hipster tools and open source products
A startup with no office, hipster tools and open source productsFrank Rousseau
 
How to make a Personal Single Page Application with Cozy
How to make a Personal Single Page Application with CozyHow to make a Personal Single Page Application with Cozy
How to make a Personal Single Page Application with CozyFrank Rousseau
 
How to quickly make REST APIs with CompoundJS
How to quickly make REST APIs with CompoundJSHow to quickly make REST APIs with CompoundJS
How to quickly make REST APIs with CompoundJSFrank Rousseau
 
Haibu: dev deployment is fast and easy again
Haibu: dev deployment is fast and easy againHaibu: dev deployment is fast and easy again
Haibu: dev deployment is fast and easy againFrank Rousseau
 
Cozy Cloud for RMLL 2012
Cozy Cloud for RMLL 2012Cozy Cloud for RMLL 2012
Cozy Cloud for RMLL 2012Frank Rousseau
 

Mehr von Frank Rousseau (17)

Node.js et NPM: de la récupération de dépendances à la publication de paquets
Node.js et NPM: de la récupération de dépendances à la publication de paquetsNode.js et NPM: de la récupération de dépendances à la publication de paquets
Node.js et NPM: de la récupération de dépendances à la publication de paquets
 
Newebe, un Réseau Social ou Chacun est Indépendant
Newebe, un Réseau Social ou Chacun est IndépendantNewebe, un Réseau Social ou Chacun est Indépendant
Newebe, un Réseau Social ou Chacun est Indépendant
 
Conseils sur le Design pour les Développeurs par un Développeur
Conseils sur le Design pour les Développeurs par un DéveloppeurConseils sur le Design pour les Développeurs par un Développeur
Conseils sur le Design pour les Développeurs par un Développeur
 
Développement web sans souffrance avec Cozy
Développement web sans souffrance avec CozyDéveloppement web sans souffrance avec Cozy
Développement web sans souffrance avec Cozy
 
Cozy, a Personal PaaS
Cozy, a Personal PaaSCozy, a Personal PaaS
Cozy, a Personal PaaS
 
Newebe, a social network where all users are independent
Newebe, a social network where all users are independentNewebe, a social network where all users are independent
Newebe, a social network where all users are independent
 
Cozy Cloud, Pour un meilleur web
Cozy Cloud, Pour un meilleur webCozy Cloud, Pour un meilleur web
Cozy Cloud, Pour un meilleur web
 
Comment les grands acteurs du web s'improvisent magiciens et jouent avec nos ...
Comment les grands acteurs du web s'improvisent magiciens et jouent avec nos ...Comment les grands acteurs du web s'improvisent magiciens et jouent avec nos ...
Comment les grands acteurs du web s'improvisent magiciens et jouent avec nos ...
 
20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev
 
A startup with no office, hipster tools and open source products
A startup with no office, hipster tools and open source productsA startup with no office, hipster tools and open source products
A startup with no office, hipster tools and open source products
 
How to make a Personal Single Page Application with Cozy
How to make a Personal Single Page Application with CozyHow to make a Personal Single Page Application with Cozy
How to make a Personal Single Page Application with Cozy
 
How to quickly make REST APIs with CompoundJS
How to quickly make REST APIs with CompoundJSHow to quickly make REST APIs with CompoundJS
How to quickly make REST APIs with CompoundJS
 
Haibu: dev deployment is fast and easy again
Haibu: dev deployment is fast and easy againHaibu: dev deployment is fast and easy again
Haibu: dev deployment is fast and easy again
 
Cozy Cloud, JDLL 2012
Cozy Cloud, JDLL 2012Cozy Cloud, JDLL 2012
Cozy Cloud, JDLL 2012
 
Newebe, JDLL 2012
Newebe, JDLL 2012Newebe, JDLL 2012
Newebe, JDLL 2012
 
Newebe for RMLL 2012
Newebe for RMLL 2012Newebe for RMLL 2012
Newebe for RMLL 2012
 
Cozy Cloud for RMLL 2012
Cozy Cloud for RMLL 2012Cozy Cloud for RMLL 2012
Cozy Cloud for RMLL 2012
 

Kürzlich hochgeladen

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 

Kürzlich hochgeladen (20)

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 

Your Devices Deserve More with PouchDB

  • 1. Your devices deserve more than your files
  • 2.
  • 3. v
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. Setup <script src="pouchdb.min.js"></script> $ npm install pouchdb ­­save var pouchdb = require('pouchdb');
  • 12. Synchronization var db = new PouchDB('todos'); var remoteCouch = 'https://mycouch/todos'; var opts = {live: true}; db.sync(remoteCouch, opts) .on('change', onChange) .on('uptodate', onUpdate) .on('error', onError);
  • 13. Conflicts var opts = {conflicts: true}; db.get('docid', opts, function (err, doc) { var rev = doc._rev; var conflictRev = doc._conflicts[0]; rev = selectRevision(rev, conflictRev); opts = {rev: rev}; db.get('docid', opts, function (err, doc) { db.put(doc); }); };
  • 14. Messaging (pub/sub) function onChange (change) { if(change.doc.type === 'message' && change.doc.chan === 'mychan') { console.log(doc.content); db.put({ type: 'message', content: 'Got it! Now I publish' }); }
  • 15. pouchdb.com pouchdb/pouchdb pouchdb/pouchdb-server colinskow/pouch-mirror natevw/PeerPouch cozy-labs/[mobile|desktop]