• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Couchdb
 

Couchdb

on

  • 4,431 views

 

Statistics

Views

Total Views
4,431
Views on SlideShare
3,869
Embed Views
562

Actions

Likes
1
Downloads
20
Comments
0

7 Embeds 562

http://blog.cohtan.org 527
http://social.gluecast.net 25
http://www.slideshare.net 3
http://74.125.153.132 2
http://flavors.me 2
http://webcache.googleusercontent.com 2
https://2832559393219961216_09e3437e6cb93b568b56b3812770d518f90e2e27.blogspot.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Couchdb Couchdb Presentation Transcript

    • CouchDB relax Kota Sakoda 2009 6 1
    • • cohtan ( Kota Sakoda ) • • • • • codecheck.in 2009 6 1
    • Agenda • DB CouchDB • 2009 6 1
    • What’s CouchDB? • Erlang DB • Not Relational! • RESTful API • SQL MapReduce • N-Master Replication 2009 6 1
    • Erlang 2009 6 1
    • Erlang • • • 0.9.0 11067 ! ($ cat src/couchdb/*.erl | wc) 2009 6 1
    • Document Oriented 2009 6 1
    • Document Oriented • RDB •1 JSON • JSON • 2009 6 1
    • { “_id”: “ABCDEFG”, “_rev”: “1-AB123C”, “type”: “person”, “name”: “Kota Sakoda”, “age”: 29, “computer”: [”MacBook Air”, “MacBook”, “Inspiron Mini 12”], } 2009 6 1
    • { “_id”: “ABCDEFG”, “_rev”: “2-AB123C”, “type”: “person”, “name”: “Kota Sakoda”, “age”: 29, “computer”: [”MacBook Air”, “MacBook”, “Inspiron Mini 12”, “SC430”], “hobby”:{“program”:[”perl”,”erlang”]} } 2009 6 1
    • RESTful API 2009 6 1
    • RESTful API • Crete HTTP PUT /dbname/docid • Read HTTP GET /dbname/docid • Update HTTP PUT /dbname/docid • Delete HTTP DELETE /dbname/docid 2009 6 1
    • RESTful API • http://wiki.apache.org/couchdb/Basics • Amazon EC2, ExtJS, C, C#, Erlang, Futon, Haskell, Java, JavaScript, LISP, LotusScript, Objective-C, Perl, PHP, Python, Ruby, Smalltalk 2009 6 1
    • MapReduce Framework 2009 6 1
    • MapReduce Framework • JavaScript MapReduce! • Map JSON KeyValue • Reduce KeyValue 2009 6 1
    • { “_id”:“ABCDEFG”, “_rev”:“1-A1B2C3”, “tag”:“perl couchdb cpan”, “title”:”AnyEvent::CouchDB”, “href”:”http://search.cpan.org/ ~beppu/AnyEvent-CouchDB/” } 2009 6 1
    • // Map Function function(doc) { if(doc.tag.match(/couchdb/i){ emit(doc.title, doc.href); } } 2009 6 1
    • Result 2009 6 1
    • // Map Function function(doc) { var tags = doc.tag.split(“ “); for(var i in tags) { emit(tags[i], 1); } } // Reduce Function function(keys, values) { return sum(values); } 2009 6 1
    • Result 2009 6 1
    • N-Master Replication 2009 6 1
    • $ curl -X POST --data '{”source”:”http://remote:5984/ somedb”,”target”:”somedb”}' http://localhost:5984/_replicate 2009 6 1
    • Replication Complete 2009 6 1
    • !!! 2009 6 1
    • 2009 6 1
    • N-Master Replication • Master - Slave • • source, target • ※ 2009 6 1
    • Demo 2009 6 1
    • Demo • cohtan Delicious CouchDB • All Document, Design Document, Temporary View, created view 2009 6 1
    • CouchApp 2009 6 1
    • CouchApp • CouchDB Design Document / Python Framework • Python • HTML JavaScript 2009 6 1
    • Sofa 2009 6 1
    • Sofa • CouchApp • CouchDB 2009 6 1
    • Demo 2009 6 1
    • Demo • Sofa Demo 2009 6 1
    • • Web Application Fit • RESTful JSON • • • Scaffold 2009 6 1
    • : http://delicious/com/cohtan/couchdb 2009 6 1