the nosql world
play

the NOSQL World Jim Webber Chief Scien?st, Neo Technology - PowerPoint PPT Presentation

Square Pegs and Round Holes in the NOSQL World Jim Webber Chief Scien?st, Neo Technology @jimwebber A rapid talk about Neo4j (and rants on other


  1. Square ¡Pegs ¡and ¡Round ¡Holes ¡in ¡ the ¡NOSQL ¡World ¡ Jim ¡Webber ¡ Chief ¡Scien?st, ¡Neo ¡Technology ¡ @jimwebber ¡

  2. A ¡rapid ¡talk ¡about ¡Neo4j ¡ (and ¡rants ¡on ¡other ¡stuff) ¡ Jim ¡Webber ¡ Chief ¡Scien?st, ¡Neo ¡Technology ¡ @jimwebber ¡

  3. hMp://slantmagazine.com/film/review/saturday-­‑night-­‑fever/4210 ¡

  4. hMp://freenewfoundlandlabrador.blogspot.com/2011/07/nl-­‑fisheries-­‑500-­‑years-­‑of-­‑turmoil.html ¡

  5. hMp://www.oopsla.org/oopsla2008/support ¡

  6. hMp://uncyclopedia.wikia.com/wiki/File:Square-­‑earth.jpg ¡

  7. hMp://www.telegraph.co.uk/finance/newsbysector/industry/8470355/The-­‑fall-­‑and-­‑rise-­‑of-­‑the-­‑Bri?sh-­‑car-­‑industry-­‑?meline.html ¡

  8. Bomb ¡the ¡argies! ¡ Crush ¡the ¡miners ! ¡ Defy ¡Europe! ¡ I’m ¡CEO, ¡bitch! ¡ hMp://www.answers.com/topic/margaret-­‑thatcher-­‑large-­‑image-­‑3 ¡

  9. hMp://www.themoviedb.org/movie/26305 ¡

  10. hMp://iremedy.net/blog/2010/05/your-­‑office-­‑without-­‑boundaries/ ¡

  11. Share ¡everything! ¡ Social ¡graph! ¡ ¡ I’m ¡CEO, ¡bitch! ¡

  12. hMp://morganlinton.com/why-­‑there-­‑is-­‑no-­‑one-­‑size-­‑fits-­‑all-­‑development-­‑solu?on/ ¡

  13. hMp://www.flickr.com/photos/crazyneighborlady/355232758/ ¡

  14. hMp://gallery.nen.gov.uk/image82582-­‑.html ¡

  15. hMp://www.xtranormal.com/watch/6995033/mongo-­‑db-­‑is-­‑web-­‑scale ¡

  16. hMp://www.orangesmile.com/des?na?ons/img/berlin-­‑map-­‑metro-­‑big.gif ¡

  17. Neo4j: ¡Crea?ng ¡Nodes ¡ GraphDatabaseService db = new EmbeddedGraphDatabase( "/tmp/neo"); Transaction tx = db.beginTx(); try { Node theDoctor = db.createNode(); theDoctor.setProperty("name", "the Doctor"); tx.success(); } finally { tx.finish(); }

  18. Neo4j: ¡Crea?ng ¡Rela?onships ¡ Transaction tx = db.beginTx(); try { Node theDoctor = db.createNode(); theDoctor.setProperty("name", "The Doctor"); Node susan = db.createNode(); susan.setProperty("firstname", "Susan"); susan.setProperty("lastname", "Campbell"); susan.createRelationshipTo(theDoctor, DynamicRelationshipType.withName("COMPANION_OF")); tx.success(); } finally { tx.finish(); }

  19. hMp://malden-­‑dsme.co.uk/public/hcj.html ¡

  20. hMp://easystreetdiscount.auc?vacommerce.com/Nirvana-­‑Smiley-­‑Face-­‑Music-­‑Band-­‑Decal-­‑S?cker-­‑P188162.aspx ¡

  21. hMp://www.tolkienlibrary.com/press/922-­‑Isildur_Poker_Champion.php ¡

  22. hMp://www.vaccine?mes.com/wp-­‑content/uploads/2010/12/microscope.jpg ¡

  23. username: Jeff1986 username: SallyDJ username: FunkySam username: Gazza age: 25 age: 28 age: 24 age: 32 friend : SallyDJ friend : Jeff1986 friend : SallyDJ friend : Jeff1986 friend : Gazza friend: FunkySam Document ¡Database ¡

  24. username: SallyDJ age: 28 username: Jeff1986 username: FunkySam username: Gazza age: 25 age: 24 age: 32 Applica?on ¡Layer ¡ Reify ¡ username: Jeff1986 username: SallyDJ username: FunkySam username: Gazza age: 25 age: 28 age: 24 age: 32 friend : SallyDJ friend : Jeff1986 friend : SallyDJ friend : Jeff1986 friend : Gazza friend: FunkySam Document ¡Database ¡

  25. username: SallyDJ age: 28 FRIEND FRIEND FRIEND username: Jeff1986 username: FunkySam username: Gazza age: 25 age: 24 age: 32 Graph ¡Database ¡

  26. hMp://www.freewebs.com/fic?onfrek101/han.jpg ¡

  27. username: Gazza username: SallyDJ age: 32 age: 28 PURCHASED PURCHASED D E S A H C R U P product: SuperCans product: CoolDecks manufacturer : Acme manufacturer : Acme price : 150 price : 599 Graph ¡Database ¡ username: SallyDJ username: Gazza age: 28 age: 32 purchased : product: SuperCans product: CoolDecks purchased : CoolDecks SuperCans manufacturer : Acme manufacturer : Acme purchased : price : 150 price : 599 SuperCans Document ¡Database ¡

  28. hMp://xkcd.com/653/ ¡

  29. FRIEND username: Jeff1986 username: FunkySam username: Gazza age: 25 age: 24 age: 32 FRIEND D N E I R F PURCHASED username: SallyDJ age: 28 D E PURCHASED S A H C R U P product: SuperCans product: CoolDecks manufacturer : Acme manufacturer : Acme price : 150 price : 599 Graph ¡Database ¡

  30. hMp://void.iddqd.cz/comic-­‑book-­‑guy-­‑pc.jpg ¡

  31. stole ¡ companion ¡ loves ¡ from ¡ appeared ¡ ¡ loves ¡ enemy ¡ in ¡ companion ¡ appeared ¡ ¡ in ¡ appeared ¡ ¡ enemy ¡ in ¡ enemy ¡ appeared ¡ ¡ appeared ¡ ¡ in ¡ A ¡Good ¡Man ¡ in ¡ Goes ¡to ¡War ¡ Victory ¡of ¡ ¡ the ¡Daleks ¡ appeared ¡ ¡ in ¡

  32. Graph ¡Algorithms ¡ What’s ¡the ¡shortest ¡path ¡between ¡the ¡Doctor ¡and ¡the ¡Master? ¡ Node theMaster = … Node theDoctor = … int maxDepth = 5; PathFinder<Path> shortestPathFinder = GraphAlgoFactory. shortestPath( Traversal.expanderForAllTypes(), maxDepth); Path shortestPath = shortestPathFinder.findSinglePath(theDoctor, theMaster);

  33. Path ¡finding ¡ Find ¡ all ¡the ¡episodes ¡where ¡Rose ¡Tyler ¡fought ¡the ¡Daleks ¡

  34. Path ¡finder ¡code ¡ algo ¡ Node rose = ... Node daleks = ... PathFinder<Path> pathFinder = GraphAlgoFactory.pathsWithLength( Traversal.expanderForTypes( constraints ¡ DoctorWhoUniverse.APPEARED_IN, Direction.BOTH), 2); fixed ¡path ¡length ¡ Iterable<Path> paths = pathFinder.findAllPaths(rose, daleks);

  35. !PURCHASED product: CoolDecks age: < 40 manufacturer : Acme PURCHASED product: SuperCans manufacturer : Acme FRIEND username: Gazza username: Jeff1986 username: FunkySam age: 32 age: 25 age: 24 FRIEND FRIEND PURCHASED username: SallyDJ age: 28 E D P S U H A R C C U R H P A S E D product: SuperCans product: CoolDecks manufacturer : Acme manufacturer : Acme price : 150 price : 599 Graph&Database&

  36. Why ¡graph ¡matching? ¡ • It’s ¡super-­‑powerful ¡for ¡looking ¡for ¡paMerns ¡in ¡ a ¡data ¡set ¡ – Retail ¡analy?cs ¡ – Real-­‑?me ¡upselling ¡ • Higher-­‑level ¡abstrac?on ¡than ¡raw ¡traversers ¡ – Uses ¡ PatternNode ¡and ¡ PatternRelationship ¡types ¡to ¡describe ¡ graph ¡paMerns ¡ – The ¡“unbound” ¡parts ¡of ¡the ¡graph ¡

  37. In ¡which ¡episodes ¡did ¡the ¡Doctor ¡ baMle ¡the ¡Cybermen? ¡

  38. Seong ¡up ¡and ¡matching ¡a ¡paMern ¡ final PatternNode theDoctor = new PatternNode(); theDoctor.setAssociation( universe.theDoctor()); final PatternNode anEpisode = new PatternNode(); anEpisode.addPropertyConstraint("title", CommonValueMatchers. has()); anEpisode.addPropertyConstraint("episode", CommonValueMatchers. has()); final PatternNode aDoctorActor = new PatternNode(); aDoctorActor.createRelationshipTo(theDoctor, DoctorWhoUniverse. PLAYED); aDoctorActor.createRelationshipTo(anEpisode, DoctorWhoUniverse. APPEARED_IN); aDoctorActor.addPropertyConstraint("actor", CommonValueMatchers. has()); final PatternNode theCybermen = new PatternNode(); theCybermen.setAssociation( universe.speciesIndex.get("species", "Cyberman").getSingle()); theCybermen.createRelationshipTo(anEpisode, DoctorWhoUniverse. APPEARED_IN); theCybermen.createRelationshipTo(theDoctor, DoctorWhoUniverse. ENEMY_OF); PatternMatcher matcher = PatternMatcher. getMatcher(); final Iterable<PatternMatch> matches = matcher.match(theDoctor, universe.theDoctor());

  39. HIPSTER ¡DEVS, ¡Y ¡U ¡NO ¡LIKE ¡JAVA? ¡

  40. Equivalent ¡Cypher ¡Query ¡ start doctor=(Characters,name,"Doctor"), cybermen=(Species,species,"Cyberman") match (doctor)<-[:PLAYED]-(actor) -[:APPEARED_IN]->(ep) <-[:APPEARED_IN]-(cybermen) where ep.title and ep.episode return ep.title, actor.actor

  41. Cold ¡cache! ¡

  42. hMp://male-­‑ejacula?on.net/ ¡

  43. hMp://www.561studios.com/blog/wp-­‑content/uploads/2010/07/commonsense.jpg ¡

  44. Hands-­‑on ¡tutorial ¡tomorrow! ¡ Sign ¡up ¡with ¡the ¡ ¡conference ¡organisers ¡

  45. Thanks ¡for ¡listening ¡ Community: ¡ h1p://neo4j.org ¡ Koans: ¡ h1ps://github.com/jimwebber/neo4j-­‑tutorial ¡ Me: ¡ @jimwebber ¡

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