Your SlideShare is downloading. ×
0
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Couchbase presentation - by Patrick Heneise
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Couchbase presentation - by Patrick Heneise

591

Published on

In the Friday training I am going to introduce CouchBase Server, a NoSQL (Not only SQL, document oriented) database and outline differences to Apache CouchDB. …

In the Friday training I am going to introduce CouchBase Server, a NoSQL (Not only SQL, document oriented) database and outline differences to Apache CouchDB.

We're going through a quick setup of the CouchBase Server and the basics of CouchDB document design. I will show some real world examples, followed by a discussion.

Who is Patrick Heneise?

Patrick is the Founder & CEO of desentia. He achieved a MSc in Media Technology and BSc in Computer Science in Media. Ever since he has improved social interaction and media with creative and professional technology solutions. He started his first business in 2006 during his studies in the fields of eLearning and web technologies and worked for various companies and universities in eCommerce, telecommunications and research & development.

Published in: Technology, Travel
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
591
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
15
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. GETTING COMFORTABLE WITH Patrick Heneise, @PatrickHeneise
  • 2. About.Me/PatrickHeneise Information Architect / Consultant MSc. in Media Technology, Leiden University, NL BSc. in Computer Science in Media, Furtwangen University, DE Certified Software Engineer♥ node.js, , NoSQL 2 years CouchDB/Couchbase experience
  • 3. AGENDA
  • 4. AgendaIntroduction to CouchbaseIntroduction to Document Design and Best PracticesIntroduction to Views (Map, Reduce)Introduction to memcachedUse CasesQ&A
  • 5. Not on the AgendaCluster DesignDeploymentSecurityAdvanced Document DesignBuckets/vBuckets
  • 6. Couchbase ServerCouchDB memcached JSON Documents In-memory key-value store Indexing and Querying Sub-millisecond latency Map/Reduce Distributed
  • 7. Couchbase ServerAuto-Sharding (dynamically add new servers)Management and monitoringData replication with auto-failoverMobile synchronization
  • 8. WHY NOSQL?
  • 9. Why NoSQL?No schema requiredInteractive database engineeringOrganic growthDocument/Object related
  • 10. CouchDB
  • 11. Use CasesInformation storageCataloguesDocument-based information
  • 12. How does it look like? Key Value { “title”: “Barcelona”, Strings “state”: “Catalonia”, “tagline”: “Best place to live in Europe”, “population”: 1621537,Arrays “tags”: [ Numbers “gaudi”, “sagrada familia”, “beach”, “sun” ], “startups”: { Objects Nested “itnig”: { Objects “tagline”: “Make it happen”, “tags”: [“web development”, “marketing”] }, “desentia”: { “tagline”: “design to go.”, “tags”: [“design”, “mobile”, “commerce”] } } }
  • 13. How to interact with data?city.title => “Barcelona”city.tags => [“gaudi”, “sagrada familia”, “beach”, “sun”]city.tags[4] => “gaudi”city.startups.desentia.tagline => “design to go.”
  • 14. Where’s SELECT?Map/Reduce Views JavaScript or ErlangSpatial Views
  • 15. Viewsfunction (doc, meta) { if(doc.jsonType == city) { emit(doc.title, doc.tagline); }}
  • 16. - { - total_rows: 3, - rows: [ - { - id: "barcelona", - key: "Barcelona", - value: "Best place to live in Europe" - }, - { - id: "berlin", - key: "Berlin", - value: "Beer and Startups" - }, - { - id: "london", - key: "London", - value: "Bloody Rainy" - } - ]- }
  • 17. View all tagsfunction (doc, meta) { if(doc.jsonType == city) { doc.tags.forEach(function(tag) { emit(tag, doc.title); }); }}
  • 18. - { - total_rows: 12, - rows: [ - { - id: "barcelona", - key: "beach", - value: "Barcelona" - }, - { - id: "berlin", - key: "brandenburg gate", - value: "Berlin" - }, - { - id: "berlin", - key: "cold", - value: "Berlin" - }, - { id: "berlin", - - key: "DDR", - value: "Berlin" - },...
  • 19. JOINSfunction (doc, meta) { if(doc.jsonType == "startup") { emit([doc.city, 1], doc.title); } else if(doc.jsonType == "city") { emit([meta.id, 0], doc.title); }}
  • 20. ["barcelona",0] barcelona "Barcelona"["barcelona",1] desentia "desentia"["barcelona",1] itnig "itnig"["berlin",0] berlin "Berlin"["berlin",1] soundcloud "soundcloud"["london",0] london "London"
  • 21. MAP/REDUCEfunction (doc, meta) { if(doc.jsonType == "startup") { emit(doc.city, 1); }}_count
  • 22. group_level 0 group_level 1 - { - rows: [- { - - rows: { [ - key: "barcelona", - - value: 2 { - }, - key: null, - - value: 3 { - } - key: "berlin", - ] - value: 1- } - } - ] - }
  • 23. memcached
  • 24. Use CasesSession StoreAlways and fast changing data (user activity)Stock exchange dataGame states
  • 25. Pure key-value store c.set("foo", "bar") c.set("foo", "bar", :ttl => 30) c["foo"] = "bar"c.set("foo", 1)c.incr("foo") #=> 2c.incr("foo", :delta => 2) #=> 4c.incr("foo", 4) #=> 8c.incr("foo", -1) #=> 7
  • 26. Examplesuser:patrick:id => 1user:patrick:lastPage => ‘/account’farmhill:currentPlants => 5farmhill:nextAvailablePlant => ‘Sunflower’sess:abc:username => ‘patrick’global:nextUserId => 15
  • 27. DEMO
  • 28. WHERE CAN I USE COUCHBASE?
  • 29. Use CaseseCommerce Systems Products, Location Information Products, Session, Users, Sales, ... Social Information Systems / Business IntranetsQ/A Systems Timesheets, Project information Store a document per user with questions and answers Wiki / CMS / BlogHistory Databases Articles, Pages, ... Ancient Books, letters, Gaming Systems transcriptions, ... Game states, user datamCommerce Systems ...
  • 30. Additional Informationcouchbase.com / @couchbase / @jchris / @janlcouchbasemodels.com / @scalabl3couchbase.com/docs/couchbase-manual-2.0/couchbase.com/couchconf-berlin - CouchConf Berlin, Oct 30
  • 31. Q&A
  • 32. JOIN US ON MEETUP:THE-BARCELONA-COUCHBASE-GROUP
  • 33. THANK YOU!

×