WIFI:%HeavyBitGuest                     p/w:%guestbit  Building)Apps)with)Couchbase                    Jasdeep)Jaitla     ...
JasdeepJaitla              Technical)Evangelist                   @scalabl3           jasdeep@couchbase.comGivemeashoutout...
Why$I$found$Couchbase... We wanted high performance and near real-  time interactions, PHP wasn’t cutting it.  I rebuilt t...
Couchbase*Server*Core*Principles            Easy                                           Consistent/High         Scalabi...
UNDERSTAND
Applications+Have+Many+Dimensions                           Inception.                    Why’d he put that there?
Our$Developer$Brain$isn’t...                 The$Modernist$Mind                 late%19th%)%early%20th%Centuries
Our$Real$Developer$Brain
In#Fact,#the#World#Is#More#Like#this:                     The#Postmodern#Mind                     mid$20th$Century$/$Now?
Mmm,$data.big  da    ta  The$Post)Postmodern$Mind         21st%century%,%Now.
..."this"makes"sense"...• Users%“do”%these%actions4 >>"methods• Users%“have” properties/state4 >>"instance"variables
..."this"makes"sense"...
Relational)Modeling    In#Memory,#your#objects#have#an#implicit#data#structure#B   An)object)is)a)collection)of)data)struc...
Relational)ModelingIn#Memory,#your#objects#have#an#implicit#data#structure    • Complex)Collection)Values)(arrays,)diction...
Relational)ModelingEnds)up)with)a)table)sprawl)that)makes       JOINs)very)slow)at)scale.
AggregateViewofDatahttp://martinfowler.com/bliki/AggregateOrientedDatabase.html
Store&and&Retrieve&Aggregates                         order::1001                         {                         uid:&j...
JSON%supports%direct%relationship%of%In%Memory%Data%Structures%to%Data%Storage              No%Impedance%Mismatch
stringstring   Objects(Serialized(to(JSON(and(Back         uid         firstnamestring   lastname      User%Object        ...
JSON%Document%Structure                        meta                        { Meta6Information       “id”:%“u::jasdeep@couc...
the$best$products$don’t$just$solve$a$need.
the$best$products$create$and$solve$a$need.                Jean1Baptiste$Say$(176711832)        Say’s$Law:$“Supplycreatesit...
What%happens%when%you%do%both%well?      Scale.Acquisition.IPO.
SCALE
DrawSomething:/Non1Linear/Growth     Draw%Something%by%OMGPOP     Daily&Active&Users&(millions)1614                  By/Ma...
Apps$in$1995 Client(Browsers)        AppServer   SQLDatabaseServerDouble$your$salary$by$making$a$“dynamic”$website
Late%1990’sClient(Browsers)       AppServers   SQLDatabaseServer
Early&2000’sClient((Browsers)(       App(Servers(   Memcached(   SQL(Database(Server(
Mid$2000’s   App#Servers#   Memcached#                  (Membase)#                               SQL#Database#Clusters#
Couchbase*Simplifies         App"Servers"                        Couchbase"Server"                            Cluster"    ...
ClientSDKs                                       n                              nn ectio                             co   ...
OfficialSDKs     Ruby                    Pythonwww.couchbase.com/develop CommunitySDKs                             Go   Cl...
REPOWALL.COM
DEMO
User%Documents1.#Primary#User#Documentu::{github_id}%%%%%%%%%%%%%%%%%%%%%%%%%%%=>%%u::17186062.#Reference#Documentu::{gith...
User%Document{""doctype"":""user",""last_retrieve"":"1363171793,""is_registered"":"true,""superuser"":"false,""last_retrie...
User%Repo%List{""doctype"":""repos",""github_id"":"1718606,""github_username"":""scalabl3",""language_dist"":"{"unknown":"...
User%Instance%Vars%&%Save%Methodclass%User%<%ModelBase%%%%fattr%:doctype,%:default%=>%self.to_s.downcase%fattr%:last_retri...
Learn&More&Patterns  Couchbase*Models  CouchbaseModels.com  Couchbase*&*Rails  CouchbaseOnRails.com
Questions?                 JasdeepJaitla              Technical/Evangelist                   @scalabl3           jasdeep@c...
Webinar - Couchbase in Action - Real-World App Demo
Upcoming SlideShare
Loading in...5
×

Webinar - Couchbase in Action - Real-World App Demo

1,654

Published on

Learn more about real-world applications of Couchbase Server NoSQL document database.

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,654
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
16
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Webinar - Couchbase in Action - Real-World App Demo

  1. 1. WIFI:%HeavyBitGuest p/w:%guestbit Building)Apps)with)Couchbase Jasdeep)Jaitla Technical)Evangelist)/)Scalability)Sherpaemail:)jasdeep@scalabl3.com twitter:)@scalabl3
  2. 2. JasdeepJaitla Technical)Evangelist @scalabl3 jasdeep@couchbase.comGivemeashoutoutwith@couchbase@scalabl3!
  3. 3. Why$I$found$Couchbase... We wanted high performance and near real- time interactions, PHP wasn’t cutting it. I rebuilt the whole app using Ruby/Rails,Backbone.js, Pubnub, Couchbase and Neo4J. We didn’t get funding so I left and started working for Couchbase.
  4. 4. Couchbase*Server*Core*Principles Easy Consistent/High Scalability PE RF O R M A N C E Performance Grow*cluster*without Consistent*sub;millisecond*application*changes,*without read*and*write*response*times*downtime*with*a*single*click with*consistent*high*throughput Always/On JSON JSON JSO JSON N JSON Flexible/Data 24x365 ModelNo*downtime*for*software JSON*document*model*with*no upgrades,*hardware fixed*schema. maintenance,*etc.
  5. 5. UNDERSTAND
  6. 6. Applications+Have+Many+Dimensions Inception. Why’d he put that there?
  7. 7. Our$Developer$Brain$isn’t... The$Modernist$Mind late%19th%)%early%20th%Centuries
  8. 8. Our$Real$Developer$Brain
  9. 9. In#Fact,#the#World#Is#More#Like#this: The#Postmodern#Mind mid$20th$Century$/$Now?
  10. 10. Mmm,$data.big da ta The$Post)Postmodern$Mind 21st%century%,%Now.
  11. 11. ..."this"makes"sense"...• Users%“do”%these%actions4 >>"methods• Users%“have” properties/state4 >>"instance"variables
  12. 12. ..."this"makes"sense"...
  13. 13. Relational)Modeling In#Memory,#your#objects#have#an#implicit#data#structure#B An)object)is)a)collection)of)data)structuresB These)data)Structures)are)rich: • Keys)(variable)names) • Simple)Single)Values)(string,)integer,)float)) RDBMS#handles#Simple#Single#Values#as#Columns
  14. 14. Relational)ModelingIn#Memory,#your#objects#have#an#implicit#data#structure • Complex)Collection)Values)(arrays,)dictionary/hashes) • More)Complex)Values:)Collections)of)Objects • Structures)can)be)nested)within)Structures RDBMS#Can’t#Map#Complex#Collection#Values#SIMPLY Most#commonly#it’s#via#a#JOIN#with# 1H1#or#1..n#type#foreign_key#relationship
  15. 15. Relational)ModelingEnds)up)with)a)table)sprawl)that)makes JOINs)very)slow)at)scale.
  16. 16. AggregateViewofDatahttp://martinfowler.com/bliki/AggregateOrientedDatabase.html
  17. 17. Store&and&Retrieve&Aggregates order::1001 { uid:&ji22jd, customer:&Ann, line_items:&[& {&sku:&0321293533,&quan:&3,&unit_price:&48.0&}, {&sku:&0321601912,&quan:&1,&unit_price:&39.0&}, {&sku:&0131495054,&quan:&1,&unit_price:&51.0&}& ], payment:&{&type:&Amex,&expiry:&04/2001,& last5:&12345&} }• Easier&to&Distribute Data• More&Flexibility• Reduced&Latency
  18. 18. JSON%supports%direct%relationship%of%In%Memory%Data%Structures%to%Data%Storage No%Impedance%Mismatch
  19. 19. stringstring Objects(Serialized(to(JSON(and(Back uid firstnamestring lastname User%Object u::jasdeep@couchbase.comint age set() {array favorite_colors “uid”:(123456,string email “firstname”:(“jasdeep”, “lastname”:(“Jaitla”, “age”:(22, “favorite_colors”:([“blue”,(“black”], “email”:(“jasdeep@couchbase.com” } User%Object u::jasdeep@couchbase.com get() { “uid”:(123456, “firstname”:(“jasdeep”, “lastname”:(“Jaitla”, “age”:(22, “favorite_colors”:([“blue”,(“black”], “email”:(“jasdeep@couchbase.com” }
  20. 20. JSON%Document%Structure meta { Meta6Information “id”:%“u::jasdeep@couchbase.com”, Including%Key “rev”:%“1>0002bce0000000000”, “flags”:%0, “expiration”:%0,All%Keys%Unique%and “type”:%“json” Kept%in%RAM } document { “uid”:%123456, Document6Value “firstname”:%“jasdeep”, “lastname”:%“Jaitla”,Most%Recent%In%Ram “age”:%22, “favorite_colors”:%[“blue”,%“black”],And%Persisted%To%Disk “email”:%“jasdeep@couchbase.com” }
  21. 21. the$best$products$don’t$just$solve$a$need.
  22. 22. the$best$products$create$and$solve$a$need. Jean1Baptiste$Say$(176711832) Say’s$Law:$“SupplycreatesitsownDemand” Keynesian$Economics
  23. 23. What%happens%when%you%do%both%well? Scale.Acquisition.IPO.
  24. 24. SCALE
  25. 25. DrawSomething:/Non1Linear/Growth Draw%Something%by%OMGPOP Daily&Active&Users&(millions)1614 By/March/19,/there/were/ 30M%downloads1210 3,000+%drawings/second 2%Billion%Drawings8 3.3+%Terabytes642 2/6 8 10 12 14 16 18 20 22 24 26 28 3/1 3 5 7 9 11 13 15 17 19 21
  26. 26. Apps$in$1995 Client(Browsers) AppServer SQLDatabaseServerDouble$your$salary$by$making$a$“dynamic”$website
  27. 27. Late%1990’sClient(Browsers) AppServers SQLDatabaseServer
  28. 28. Early&2000’sClient((Browsers)( App(Servers( Memcached( SQL(Database(Server(
  29. 29. Mid$2000’s App#Servers# Memcached# (Membase)# SQL#Database#Clusters#
  30. 30. Couchbase*Simplifies App"Servers" Couchbase"Server" Cluster" API"Servers" 8"
  31. 31. ClientSDKs n nn ectio co make logy opo Couchbase et re ceivCouchbaseClient Topology App#Server Update
  32. 32. OfficialSDKs Ruby Pythonwww.couchbase.com/develop CommunitySDKs Go Clojure
  33. 33. REPOWALL.COM
  34. 34. DEMO
  35. 35. User%Documents1.#Primary#User#Documentu::{github_id}%%%%%%%%%%%%%%%%%%%%%%%%%%%=>%%u::17186062.#Reference#Documentu::{github_username}%%%%%%%%%%%%%%%%=>%u::scalabl33.#Repo#List#Documentr::{github_id}%%%%%%%%%%%%%%%%%%%%%%%%=>%r::17186064.%Repo#List#Raw#JSONr::{github_id}::github%%%%%%%%%%%%%%%%=>%r::1718606::github
  36. 36. User%Document{""doctype"":""user",""last_retrieve"":"1363171793,""is_registered"":"true,""superuser"":"false,""last_retrieve_repos"":"1363171977,""github_id"":"1718606,""github_username"":""scalabl3",""num_followers"":"14,""num_following"":"50,""url"":""https://github.com/scalabl3",""avatar"":"https://secure.gravatar.com/avatar/56665ca94bdd4ad5d41b239e07fa823c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2FgravatarJuserJ420.png",""gravatar_id"":""56665ca94bdd4ad5d41b239e07fa823c",""num_repos"":"57,""num_repos_private"":"J1,""user_type"":""User",""email"":""jasdeep@scalabl3.com",""bio"":"null,""proficiencies"":"null,""github_json"":"{"..."""""}"""}"},""github_access_token"":""xxx",""pubnub_channel"":""dc7580f1b474"}
  37. 37. User%Repo%List{""doctype"":""repos",""github_id"":"1718606,""github_username"":""scalabl3",""language_dist"":"{"unknown":""["Unknown",7],"shell":""["Shell",1],"java":""["Java",2],"actionscript":""["ActionScript",1],"javascript":""["JavaScript",3],"c":""["C",3],"python":""["Python",2],"go":""["Go",5],"c#":""["C#",1],"clojure":""["Clojure",3],"ruby":""["Ruby",28],"objective9c":""["ObjectiveMC",1]},""repos"":"{""""8737681"":"{""""""repo_id"":"8737681,""""""name"":""ironworkerMlibcouchbase",""""""full_name"":""scalabl3/ironworkerMlibcouchbase",""""""updated_at"":"1363120145,""""""created_at"":"1363120145,""""""pushed_at"":"1363119688,""""""is_fork"":"true,""""""language"":"null,""""""forks_count"":"0,""""""watchers_count"":"0,""""""description"":""",""""""is_private"":"false,""""""owner"":""scalabl3",
  38. 38. User%Instance%Vars%&%Save%Methodclass%User%<%ModelBase%%%%fattr%:doctype,%:default%=>%self.to_s.downcase%fattr%:last_retrieve,%:default%=>%Time.now.getutc.to_i%fattr%:is_registered,%:default%=>%false%fattr%:superuser,%:default%=>%false%fattr%:last_retrieve_repos,%:default%=>%nil%fattr%:github_id,%:github_username,%:num_followers,%:num_following,%:url,:avatar,%:gravatar_id,%:num_repos,%:num_repos_private,%:user_type,%:email,%:bio,%:proficiencies,:github_json,%:github_access_token,%:pubnub_channel #%update%with%new%last_retrieve_repos c.replace(“u::1718606”,3self.to_hash)
  39. 39. Learn&More&Patterns Couchbase*Models CouchbaseModels.com Couchbase*&*Rails CouchbaseOnRails.com
  40. 40. Questions? JasdeepJaitla Technical/Evangelist @scalabl3 jasdeep@couchbase.comGivemeashoutoutwith@couchbase@scalabl3!
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×