Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

CouchConf-Berlin-Developing-with-Couchbase-Server

953 views

Published on

Published in: Technology, Design
  • Be the first to comment

  • Be the first to like this

CouchConf-Berlin-Developing-with-Couchbase-Server

  1. 1. Developing with Couchbase Server 1
  2. 2. 2
  3. 3. Easy to Easy to Get(Building on) Open 2
  4. 4. LANGUAGE 3
  5. 5. LANGUAGERuby, Java, PHP, C#, Python, 3
  6. 6. LANGUAGERuby, Java, PHP, C#, Python, More soon! 3
  7. 7. SUPPORT ALL COUCHBASE 4
  8. 8. SUPPORT ALL COUCHBASE get, set, add, replace, 4
  9. 9. SUPPORT ALL COUCHBASE get, set, add, replace, touch, gat, getl, sync 4
  10. 10. SUPPORT ALL COUCHBASE get, set, add, replace, touch, gat, getl, sync views 4
  11. 11. BEST PRACTICES ARE BUILT 5
  12. 12. BEST PRACTICES ARE BUILT Data Access Patterns 5
  13. 13. BEST PRACTICES ARE BUILT Data Access Patterns Pagination 5
  14. 14. BEST PRACTICES ARE BUILT Data Access Patterns PaginationAccess to Development and Production 5
  15. 15. THE SERVER 6
  16. 16. THE SERVER(BUCKETS AND VIEWS) 6
  17. 17. THE DATA 7
  18. 18. THE DATA(PRESIDENTS AND U.S. 7
  19. 19. THE VIEWS 8
  20. 20. THE VIEWS(PRESIDENT_NAMES, BY_STATE, PRESIDENT_EVENTS) 8
  21. 21. QUICK RUBY 9
  22. 22. QUICK RUBY(COUCHBASE GEM IN 9
  23. 23. 10
  24. 24. require couchbaserequire uuidDEFAULT_BUCKET_URL = http://localhost:8091/pools/defaultcouchbase = Couchbase.new(DEFAULT_BUCKET_URL) 10
  25. 25. require couchbaserequire uuidDEFAULT_BUCKET_URL = http://localhost:8091/pools/defaultcouchbase = Couchbase.new(DEFAULT_BUCKET_URL)design_doc = couchbase.design_docs[‘design_doc’]design_doc.views[‘president_names’, ‘president_events’, ‘by_party’,‘by_state’] 10
  26. 26. require couchbaserequire uuidDEFAULT_BUCKET_URL = http://localhost:8091/pools/defaultcouchbase = Couchbase.new(DEFAULT_BUCKET_URL)design_doc = couchbase.design_docs[‘design_doc’]design_doc.views[‘president_names’, ‘president_events’, ‘by_party’,‘by_state’]design_doc.president_names(:reduce => false).each { |doc| puts "#{doc[key]}: #{doc[value]}"} 10
  27. 27. CONNECTING TO THEimport net.spy.memcached.CouchbaseClientimport net.spy.memcached.protocol.couch.Queryimport java.util.LinkedListSERVER_URI = "http://127.0.0.1:8091/pools"uris = new LinkedList()uris.add(URI.create(SERVER_URI))couchbase = new CouchbaseClient(uris,"default", "") 11
  28. 28. Aquery = new Query()query.setReduce(false)view = couchbase.getView("design_doc","president_names")future = couchbase.asyncQuery(view, query)viewResponse = future.get()iterator = viewResponse.iterator()while (iterator.hasNext()) { viewRow = iterator.next() println("Key: " + viewRow.key + ", Value:" + viewRow.value)} 12
  29. 29. QUICK PHP 13
  30. 30. QUICK PHP(PHP-COUCHBASE IN 13
  31. 31. include "Couchbase.php";$cb = new Couchbase;$cb->addCouchbaseServer("localhost");$view = $cb->getView("design_doc", "by_state");$result = $view->getResult();foreach($result AS $row) { echo $row->value;} 14
  32. 32. GET 15
  33. 33. GETgem install couchbase 15
  34. 34. GET gem install couchbasehttp://www.couchbase.org/code/couchbase/ 15
  35. 35. GET gem install couchbasehttp://www.couchbase.org/code/couchbase/http://github.com/couchbaselabs/php- 15
  36. 36. HTTP:// 16
  37. 37. HTTP:// DownloadGetting Started Guides In-Depth Tutorials Screencasts 16
  38. 38. QUESTION 17

×