1
play

1 Wednesday, October 6, 2010 Image credit: - PowerPoint PPT Presentation

1 Wednesday, October 6, 2010 Image credit: http://browsertoolkit.com/fault-tolerance.png 2 Wednesday, October 6, 2010 Image credit: http://browsertoolkit.com/fault-tolerance.png 3 Wednesday, October 6, 2010 Image credit:


  1. 1 Wednesday, October 6, 2010

  2. Image credit: http://browsertoolkit.com/fault-tolerance.png 2 Wednesday, October 6, 2010

  3. Image credit: http://browsertoolkit.com/fault-tolerance.png 3 Wednesday, October 6, 2010

  4. Image credit: http://browsertoolkit.com/fault-tolerance.png 4 Wednesday, October 6, 2010

  5. NOSQL - an overview - goto; con 2010 Emil Eifrem @emileifrem emil@neotechnology.com CEO, Neo Technology Wednesday, October 6, 2010

  6. So what’s the plan? ๏ Why NOSQL? ๏ The NOSQL landscape ๏ NOSQL challenges ๏ Conclusion 6 Wednesday, October 6, 2010

  7. First off: the name ๏ WE ALL HATES IT, M’KAY? 7 Wednesday, October 6, 2010

  8. NOSQL is NOT... 8 Wednesday, October 6, 2010

  9. NOSQL is NOT... ๏ NO to SQL 8 Wednesday, October 6, 2010

  10. NOSQL is NOT... ๏ NO to SQL ๏ NEVER SQL 8 Wednesday, October 6, 2010

  11. NOSQL is simply N ot O nly SQL 9 Wednesday, October 6, 2010

  12. Wednesday, October 6, 2010

  13. NOSQL - Why now? Four trends 11 Wednesday, October 6, 2010

  14. Trend 1: data set size 40 2007 Source: IDC 2007 Wednesday, October 6, 2010

  15. 988 Trend 1: data set size 40 2010 2007 Source: IDC 2007 Wednesday, October 6, 2010

  16. Trend 2: Connectedness Information connectivity web 1.0 web 2.0 “web 3.0” 1990 2000 2010 2020 14 Wednesday, October 6, 2010

  17. Trend 2: Connectedness Information connectivity Text documents web 1.0 web 2.0 “web 3.0” 1990 2000 2010 2020 15 Wednesday, October 6, 2010

  18. Trend 2: Connectedness Information connectivity Hypertext Text documents web 1.0 web 2.0 “web 3.0” 1990 2000 2010 2020 16 Wednesday, October 6, 2010

  19. Trend 2: Connectedness Folksonomies Information connectivity Tagging User-generated Wikis content Blogs RSS Hypertext Text documents web 1.0 web 2.0 “web 3.0” 1990 2000 2010 2020 17 Wednesday, October 6, 2010

  20. Trend 2: Connectedness Giant Global Graph (GGG) Ontologies RDF Folksonomies Information connectivity Tagging User-generated Wikis content Blogs RSS Hypertext Text documents web 1.0 web 2.0 “web 3.0” 1990 2000 2010 2020 18 Wednesday, October 6, 2010

  21. Trend 2: Connectedness Giant Global Graph (GGG) Ontologies RDF Folksonomies Information connectivity Tagging User-generated Wikis content Blogs RSS Hypertext Text documents web 1.0 web 2.0 “web 3.0” 1990 2000 2010 2020 19 Wednesday, October 6, 2010

  22. Trend 3: Semi-structure ๏ Individualization of content • In the salary lists of the 1970s, all elements had exactly one job • In the salary lists of the 2000s, we need 5 job columns! Or 8? Or 15? ๏ All encompassing “entire world views” • Store more data about each entity ๏ Trend accelerated by the decentralization of content generation that is the hallmark of the age of participation (“web 2.0”) 20 Wednesday, October 6, 2010

  23. Aside: RDBMS performance Relational database Requirement of application Performance Data complexity 21 Wednesday, October 6, 2010

  24. Aside: RDBMS performance Relational database Requirement of application Performance Data complexity 22 Wednesday, October 6, 2010

  25. Aside: RDBMS performance Relational database Salary List Requirement of application Performance Data complexity 23 Wednesday, October 6, 2010

  26. Aside: RDBMS performance Relational database Salary List Requirement of application Performance Majority of Webapps Data complexity 24 Wednesday, October 6, 2010

  27. Aside: RDBMS performance Relational database Salary List Requirement of application Performance Majority of Webapps Social network } Semantic Trading custom Data complexity 25 Wednesday, October 6, 2010

  28. Trend 4: Architecture 1980s: Application (<-- note lack of s) Application DB 26 Wednesday, October 6, 2010

  29. Trend 4: Architecture 1990s: Database as integration hub Application Application Application DB 27 Wednesday, October 6, 2010

  30. Trend 4: Architecture 2000s: (moving towards) Decoupled services with their own backend Service Service Service DB DB DB 28 Wednesday, October 6, 2010

  31. Why NOSQL Now? ๏ Trend 1: Size ๏ Trend 2: Connectedness ๏ Trend 3: Semi-structure ๏ Trend 4: Architecture 29 Wednesday, October 6, 2010

  32. Four NOSQL categories 30 Wednesday, October 6, 2010

  33. Category 1: Key-Value stores ๏ Lineage: • “Dynamo: Amazon’s Highly Available Key-Value Store” (2007) ๏ Data model: • Global key-value mapping • Think: Globally available HashMap/Dict/etc ๏ Examples: • Project Voldemort • Tokyo {Cabinet, Tyrant, etc} 31 Wednesday, October 6, 2010

  34. Category 1: Key-Value stores ๏ Strengths • Simple data model • Great at scaling out horizontally ๏ Weaknesses: • Simplistic data model • Poor for complex data 32 Wednesday, October 6, 2010

  35. Category II: ColumnFamily (BigTable) stores ๏ Lineage: • “Bigtable: A Distributed Storage System for Structured Data” (2006) ๏ Data model: • A big table, with column families ๏ Examples: • HBase • HyperTable • Cassandra 33 Wednesday, October 6, 2010

  36. Category III: Document databases ๏ Lineage: • Lotus Notes ๏ Data model: • Collections of documents • A document is a key-value collection ๏ Examples: • CouchDB • MongoDB 34 Wednesday, October 6, 2010

  37. Document db: An example ๏ How would we model a blogging software? ๏ One stab: • Represent each Blog as a Collection of Post documents • Represent Comments as nested documents in the Post documents 35 Wednesday, October 6, 2010

  38. Document db: Creating a blog post import com.mongodb.Mongo; import com.mongodb.DB; import com.mongodb.DBCollection; import com.mongodb.BasicDBObject; import com.mongodb.DBObject; // ... Mongo mongo = new Mongo( "localhost" ); // Connect to MongoDB // ... DB blogs = mongo.getDB( "blogs" ); // Access the blogs database DBCollection myBlog = blogs.getCollection( "Thobe’s blog" ); DBObject blogPost = new BasicDBObject(); blogPost.put( "title", "JAOO^H^H^H^HGoto; con 2010" ); blogPost.put( "pub_date", new Date() ); blogPost.put( "body", "Publishing a post about JA...Goto con in my MongoDB blog!" ); blogPost.put( "tags", Arrays. asList ( "conference", "names" ) ); blogPost.put( "comments", new ArrayList() ); myBlog.insert( blogPost ); 36 Wednesday, October 6, 2010

  39. Retrieving posts // ... import com.mongodb.DBCursor; // ... public Object getAllPosts( String blogName ) { DBCollection blog = db.getCollection( blogName ); return renderPosts( blog.find() ); } private Object renderPosts( DBCursor cursor ) { // order by publication date (descending) cursor = cursor.sort( new BasicDBObject( "pub_date", -1 ) ); // ... } 37 Wednesday, October 6, 2010

  40. Category IV: Graph databases ๏ Lineage: • Euler and graph theory ๏ Data model: • Nodes with properties • Typed relationships with properties ๏ Examples: • Sones GraphDB • InfiniteGraph 38 • Neo4j Wednesday, October 6, 2010

  41. Property Graph model 39 Wednesday, October 6, 2010

  42. Property Graph model LOVES LIVES WITH LOVES OWNS DRIVES 40 Wednesday, October 6, 2010

  43. Property Graph model name: “Mary” LOVES age: 35 name: “James” age: 32 LIVES WITH twitter: “@spam” LOVES OWNS DRIVES property type: “car” brand: “Volvo” model: “V70” 41 Wednesday, October 6, 2010

  44. Graphs are whiteboard friendly An application domain model outlined on a whiteboard or piece of paper would be translated to an ER -diagram, then normalized to fit a Relational Database. With a Graph Database the model from the whiteboard is implemented directly. Image credits: Tobias Ivarsson 42 Wednesday, October 6, 2010

  45. Graphs are whiteboard friendly An application domain model outlined on a whiteboard or piece of paper would be translated to an ER -diagram, then normalized to fit a Relational Database. With a Graph Database the model thobe from the whiteboard is implemented directly. Joe project blog Wardrobe Strength Hello Joe Modularizing Jython Neo4j performance analysis Image credits: Tobias Ivarsson 43 Wednesday, October 6, 2010

  46. Graph db: Creating a social graph GraphDatabaseService graphDb = new EmbeddedGraphDatabase( GRAPH_STORAGE_LOCATION ); Transaction tx = graphDb.beginTx(); try { Node mrAnderson = graphDb.createNode(); mrAnderson.setProperty( "name", "Thomas Anderson" ); mrAnderson.setProperty( "age", 29 ); Node morpheus = graphDb.createNode(); morpheus.setProperty( "name", "Morpheus" ); morpheus.setProperty( "rank", "Captain" ); Relationship friendship = mrAnderson.createRelationshipTo( morpheus, SocialGraphTypes.FRIENDSHIP ); tx.success(); } finally { tx.finish(); } 44 Wednesday, October 6, 2010

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend