CouchConf-SF-Developing-with-Couchbase
 

CouchConf-SF-Developing-with-Couchbase

on

  • 3,133 views

 

Statistics

Views

Total Views
3,133
Views on SlideShare
2,120
Embed Views
1,013

Actions

Likes
1
Downloads
31
Comments
0

7 Embeds 1,013

http://www.couchbase.com 992
http://new.stage.couchbase.com 9
http://localhost 6
http://confluence.membase.org 2
http://www.couchbase.net 2
http://67-221-231-37.contegix.com 1
http://websitewww.unqlspec.org 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

CouchConf-SF-Developing-with-Couchbase CouchConf-SF-Developing-with-Couchbase Presentation Transcript

  • Developing  with  Couchbase  Server Ma7  Ingenthron,  Jan  Lehnardt,  Jason  Sirota 1Friday, August 5, 2011
  • LOWERING  THE  BAR 2Friday, August 5, 2011
  • LOWERING  THE  BAR 2Friday, August 5, 2011
  • LOWERING  THE  BAR Easy  to  Install Easy  to  get  Started (building  on)  Open  Source 3Friday, August 5, 2011
  • LANGUAGE  SUPPORT Java,  C#,  PHP,  Ruby,  Python*,  Node.js* More  soon! Any  plain  “old”  memcached/CouchDB  library,  really. 4Friday, August 5, 2011
  • SUPPORT  ALL  COUCHBASE  2.0   FEATURES Views touch,  gat,  getl,  sync 5Friday, August 5, 2011
  • BEST  PRACTICES  BUILT  IN View  Efficiency PaginaVon Maintaining  Development  and  ProducVon  Views 6Friday, August 5, 2011
  • QUICK  JAVA  EXAMPLE MaX  Ingenthron 7Friday, August 5, 2011
  • ! Query query = new Query(); ! View view = client.getView(“design”, “players”); ! ViewFuture future = client.query(view, query); ! ViewResponseWithDocs response = future.get(); ! Iterator<RowWithDocs> itr = response.iterator(); ! while (itr.hasNext()) { ! ! RowWithDocs row = itr.next(); ! ! // do something row.getDoc(); ! } 8Friday, August 5, 2011
  • ! Query query = new Query(); ! View view = client.getView(“design”, “players”); ! HttpFuture<ViewResponseNoDocs> future = client.queryAndExcludeDocs(view, query); ! ViewResponseNoDocs response = future.get(); ! Iterator<RowNoDocs> itr = response.iterator(); ! while (itr.hasNext()) { ! ! RowNoDocs row = itr.next(); ! ! // do something with row.getKey(); row.getValue(); ! } 9Friday, August 5, 2011
  • QUICK  PHP  EXAMPLE Jan  Lehnardt 10Friday, August 5, 2011
  • <?php // setup include "Couchbase.php"; $cb = new Couchbase; $cb->addCouchbaseServer("localhost"); $cb->set("a", 1); echo $cb->get("a"); 11Friday, August 5, 2011
  • <?php $obj = new stdClass; $obj->name = "Simon"; $cb->set("a", json_encode($obj)); 12Friday, August 5, 2011
  • <?php $obj = new stdClass; $obj->name = "James"; $cb->set("a", json_encode($obj)); 13Friday, August 5, 2011
  • <?php $obj = new stdClass; $obj->name = "Ben"; $cb->set("a", json_encode($obj)); 14Friday, August 5, 2011
  • 15Friday, August 5, 2011
  • Design  Doc Name 16Friday, August 5, 2011
  • <?php Design  Doc Name $view = $db->getView("design_doc", "name"); $result = $view->getResult(); foreach($result AS $row) { echo $row->value; } 17Friday, August 5, 2011
  • $ php test.php Ben James Simon $ 18Friday, August 5, 2011
  • Friday, August 5, 2011
  • <?php $result = $view->getResultByKey("Ben"); 20Friday, August 5, 2011
  • <?php $result = $view->getResultByKeyRange("Ben", "James"); 21Friday, August 5, 2011
  • <?php $result = $view->getValues(); // {"name": "Ben"} // {"name": "James"} // {"name": "Simon"} 22Friday, August 5, 2011
  • <?php $resultPages = $view->getResultPaginator(); foreach($resultPages AS $page) { // $page is a Couchbase_ViewResult instance } 23Friday, August 5, 2011
  • HTTP://GITHUB.COM/ COUCHBASELABS/PHP-­‐COUCHBASE (BE  GENTLE) 24Friday, August 5, 2011
  • QUICK  .NET  EXAMPLE Jason  Sirota,  Couchbase  .NET  client  contributor (Open  Source  is  Awesome!) 25Friday, August 5, 2011
  • SDK  CENTER  ON HTTP://COUCHBASE.ORG Downloads Ge`ng  Started  Guides In-­‐depth  Tutorials Contribute 26Friday, August 5, 2011
  • QUESTIONS? 27Friday, August 5, 2011
  • THANKS! 28Friday, August 5, 2011
  • THANKS! 29Friday, August 5, 2011
  • Friday, August 5, 2011