CouchDB Google
-
Upload
steve-souders -
Category
Technology
-
view
3.150 -
download
4
Transcript of CouchDB Google
![Page 1: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/1.jpg)
CouchDBApache
![Page 2: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/2.jpg)
HelloChris Anderson
[email protected] / @jchris
Apache CouchDB Committer
REST and JavaScript enthusiastDirector, couch.io
![Page 3: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/3.jpg)
I’m here to answer the question: What is CouchDB? (from an app devs perspective - and some implementor)How many of you have: built an application around a key value store?written map reduce functions?used Erlang in an application?
![Page 4: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/4.jpg)
Relax - easy to reason about - reliable - your data is safe with us. - honda accord, not a ferrari - as a debating point among developers
![Page 5: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/5.jpg)
Bandwidth Explosion
![Page 6: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/6.jpg)
![Page 7: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/7.jpg)
![Page 8: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/8.jpg)
![Page 9: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/9.jpg)
![Page 10: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/10.jpg)
![Page 11: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/11.jpg)
![Page 12: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/12.jpg)
“no bars”
![Page 13: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/13.jpg)
http://www.flickr.com/photos/hercwad/2290378571/
![Page 14: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/14.jpg)
Latency Sucks
speed of lightdrawback to cloud computing
![Page 15: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/15.jpg)
What is CouchDB?
- k/v store with map reduce - http database written in erlang
![Page 16: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/16.jpg)
Local Web Platform
Local Web
Platform - on your device, local network, in a browser plugin - replication: it just works. makes data portable. - real-time remote backups, ad hoc topologies.
![Page 17: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/17.jpg)
http://www.flickr.com/photos/mcpig/872293700/
“Ground Computing”@jhuggins
- local to the user, more like desktop web than like Gears - local http server - browser apps - same application on the client and server or the cloud
![Page 18: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/18.jpg)
http://www.flickr.com/photos/shane-h/280084650
Offline by Default
- low latency & reliable - 2 tier applications
![Page 19: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/19.jpg)
http://jacobian.org/writing/of-the-web/
http://apod.nasa.gov/apod/ap050930.html
“Of the Web”
Let me tell you something: Django may be built for the Web, but CouchDB is built of the Web. I've never seen software that so completely embraces the philosophies behind HTTP. ... this is what the software of the future looks like. Jacob Kaplan-Moss -- October, 2007
perfect spot - discovered not invented
![Page 20: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/20.jpg)
- lower barrier for contribution - validate installations - foster interop (CouchDB as a protocol)
![Page 21: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/21.jpg)
Learning Curve
- doc modeling (mvcc / concurrency) - etags / Functional style of REST - eventual consistency
![Page 22: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/22.jpg)
![Page 23: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/23.jpg)
![Page 24: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/24.jpg)
http://www.longnow.org/projects/clock/
http://www.longnow.org/projects/clock/orrery/
![Page 25: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/25.jpg)
Robust
- single file - append only - no fixup phase - minimizes seeks
![Page 26: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/26.jpg)
Robust
- when britain is burning - Enda Farrell - bbc
![Page 27: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/27.jpg)
{ "_id": "BC4ea69ce1a73aa7d21d23b608d221d0", "_rev": "1-967a00dff5e02add41819138abb3284d",
"type": "person", "name": "Darth Vader", "age": 63, "headware": ["Helmet", "Sombrero"], "dark_side": true}
JSON Documents
- denormalize - natural data behavior - evolve formats with your application - easier to bootstrap in your mind
![Page 28: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/28.jpg)
{ "_id": "BC4ea69ce1a73aa7d21d23b608d221d0", "_rev": "1-967a00dff5e02add41819138abb3284d",
"type": "person", "name": "Darth Vader", "age": 63, "headware": ["Helmet", "Sombrero"], "dark_side": true}
JSON Documents
- 2 patterns - document update - event log
![Page 29: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/29.jpg)
{ "_id": "BC4ea69ce1a73aa7d21d23b608d221d0", "_rev": "2-41819138abb32967a00dff5e02add84d",
"type": "person", "name": "Darth Vader", "age": 63, "headware": ["Helmet", "Sombrero"], "dark_side": “More CoWbell!”}
JSON Documents
- MVCC - model for concurrency
![Page 30: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/30.jpg)
![Page 31: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/31.jpg)
Map Reduce
![Page 32: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/32.jpg)
http://horicky.blogspot.com/2008/10/couchdb-implementation.html
![Page 33: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/33.jpg)
http://www.flickr.com/photos/calliope/3573471166
ful
![Page 34: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/34.jpg)
db
http://code.google.com/p/couchdb-lounge/
http://www.flickr.com/photos/aussiegall/658457636
![Page 35: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/35.jpg)
![Page 36: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/36.jpg)
curl -X POSThttp://127.0.0.1:5984/_replicate
-d '{"source":"http://couch.example.com:5984/remote-db",
"target":"local-db"
}'
![Page 37: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/37.jpg)
curl -X POSThttp://127.0.0.1:5984/_replicate
-d '{"source":"http://couch.example.com:5984/remote-db",
"target":"local-db"
}'
![Page 38: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/38.jpg)
![Page 39: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/39.jpg)
![Page 40: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/40.jpg)
![Page 41: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/41.jpg)
![Page 42: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/42.jpg)
periodic, notifier system
![Page 43: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/43.jpg)
![Page 44: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/44.jpg)
“In the fullness of time there is only one CouchDB”
![Page 45: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/45.jpg)
standalone CouchDB applications
![Page 46: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/46.jpg)
Scaling Down
![Page 47: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/47.jpg)
Browser CouchJavaScript port
Uses HTML5 storage
Replicates with CouchDB
http://hg.toolness.com/browser-couch/
![Page 48: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/48.jpg)
Gives Control to Users
CC-BY-SA http://www.flickr.com/photos/kelleys/492253912/
- want to get kids in trouble for programming too muchclaris
![Page 49: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/49.jpg)
![Page 50: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/50.jpg)
![Page 51: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/51.jpg)
![Page 52: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/52.jpg)
! !
Stuart Langridge - Canonical
![Page 53: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/53.jpg)
- good because it's the status quo - easy to address with URLs - bad because users are depending on a remote resource for low latency responses - centralized, so traffic spikes impact all users, who might start refreshing
![Page 54: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/54.jpg)
- local requests are fast - easier to tune for throughput - plays to the strengths of mobile connections
![Page 55: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/55.jpg)
- users can run different applications on the same datasetdeployment Independent Personal - dark matter of the information universe
![Page 56: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/56.jpg)
messaging peer discovery identity Can we trust intermediate servers?
![Page 57: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/57.jpg)
“Obvious.”
web architecture
![Page 58: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/58.jpg)
Local Web Platform
![Page 59: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/59.jpg)
anks!
![Page 60: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/60.jpg)
Resources@CouchDB
http://couchdb.apache.org/
Dress like a Couch: http://shop.couchdb.com
http://planet.couchdb.org/
https://peepcode.com/products/couchdb-with-rails
![Page 61: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/61.jpg)
http://books.couchdb.org/relax
@couchdbinaction
![Page 62: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/62.jpg)
Robust
JSON
HTTP
Local
![Page 63: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/63.jpg)
couch.io
Conflict resolution by example
A B
![Page 64: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/64.jpg)
couch.io
❦
Conflict resolution by example
A B
![Page 65: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/65.jpg)
couch.io
❦❦
Conflict resolution by example
A B
![Page 66: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/66.jpg)
couch.io
❦ ❦
Conflict resolution by example
A B
![Page 67: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/67.jpg)
couch.io
❦
Conflict resolution by example
A B
❦
![Page 68: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/68.jpg)
couch.io
❦
Conflict resolution by example
A B
❦ ✿
![Page 69: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/69.jpg)
couch.io
❦
Conflict resolution by example
A B
❦ ✿♪
![Page 70: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/70.jpg)
couch.io
✿♪
Conflict resolution by example
A B
♪
![Page 71: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/71.jpg)
couch.io
✿♪
Conflict resolution by example
A B
♪
![Page 72: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/72.jpg)
couch.io
✿♪
Conflict resolution by example
A B
♪
![Page 73: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/73.jpg)
couch.io
✿♪
Conflict resolution by example
A B
♪
![Page 74: CouchDB Google](https://reader038.fdocuments.in/reader038/viewer/2022102815/554f5855b4c905423f8b5711/html5/thumbnails/74.jpg)
CC-by-nd http://www.flic.kr/photos/eifelyeti110/273939759/