• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Couchbase presentation - by Patrick Heneise
 

Couchbase presentation - by Patrick Heneise

on

  • 896 views

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.

Statistics

Views

Total Views
896
Views on SlideShare
895
Embed Views
1

Actions

Likes
1
Downloads
10
Comments
0

1 Embed 1

https://twitter.com 1

Accessibility

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

    Couchbase presentation - by Patrick Heneise Couchbase presentation - by Patrick Heneise Presentation Transcript

    • GETTING COMFORTABLE WITH Patrick Heneise, @PatrickHeneise
    • 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
    • AGENDA
    • AgendaIntroduction to CouchbaseIntroduction to Document Design and Best PracticesIntroduction to Views (Map, Reduce)Introduction to memcachedUse CasesQ&A
    • Not on the AgendaCluster DesignDeploymentSecurityAdvanced Document DesignBuckets/vBuckets
    • Couchbase ServerCouchDB memcached JSON Documents In-memory key-value store Indexing and Querying Sub-millisecond latency Map/Reduce Distributed
    • Couchbase ServerAuto-Sharding (dynamically add new servers)Management and monitoringData replication with auto-failoverMobile synchronization
    • WHY NOSQL?
    • Why NoSQL?No schema requiredInteractive database engineeringOrganic growthDocument/Object related
    • CouchDB
    • Use CasesInformation storageCataloguesDocument-based information
    • 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”] } } }
    • 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.”
    • Where’s SELECT?Map/Reduce Views JavaScript or ErlangSpatial Views
    • Viewsfunction (doc, meta) { if(doc.jsonType == city) { emit(doc.title, doc.tagline); }}
    • - { - 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" - } - ]- }
    • View all tagsfunction (doc, meta) { if(doc.jsonType == city) { doc.tags.forEach(function(tag) { emit(tag, doc.title); }); }}
    • - { - 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" - },...
    • JOINSfunction (doc, meta) { if(doc.jsonType == "startup") { emit([doc.city, 1], doc.title); } else if(doc.jsonType == "city") { emit([meta.id, 0], doc.title); }}
    • ["barcelona",0] barcelona "Barcelona"["barcelona",1] desentia "desentia"["barcelona",1] itnig "itnig"["berlin",0] berlin "Berlin"["berlin",1] soundcloud "soundcloud"["london",0] london "London"
    • MAP/REDUCEfunction (doc, meta) { if(doc.jsonType == "startup") { emit(doc.city, 1); }}_count
    • group_level 0 group_level 1 - { - rows: [- { - - rows: { [ - key: "barcelona", - - value: 2 { - }, - key: null, - - value: 3 { - } - key: "berlin", - ] - value: 1- } - } - ] - }
    • memcached
    • Use CasesSession StoreAlways and fast changing data (user activity)Stock exchange dataGame states
    • 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
    • Examplesuser:patrick:id => 1user:patrick:lastPage => ‘/account’farmhill:currentPlants => 5farmhill:nextAvailablePlant => ‘Sunflower’sess:abc:username => ‘patrick’global:nextUserId => 15
    • DEMO
    • WHERE CAN I USE COUCHBASE?
    • 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 ...
    • Additional Informationcouchbase.com / @couchbase / @jchris / @janlcouchbasemodels.com / @scalabl3couchbase.com/docs/couchbase-manual-2.0/couchbase.com/couchconf-berlin - CouchConf Berlin, Oct 30
    • Q&A
    • JOIN US ON MEETUP:THE-BARCELONA-COUCHBASE-GROUP
    • THANK YOU!