Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Neo4j confoo

on

  • 2,128 views

 

Statistics

Views

Total Views
2,128
Views on SlideShare
2,125
Embed Views
3

Actions

Likes
0
Downloads
32
Comments
0

2 Embeds 3

http://www.linkedin.com 2
http://us-w1.rockmelt.com 1

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

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
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Neo4j confoo Neo4j confoo Presentation Transcript

  • ENOOOUUGGHH OFTHIS NOSQL BLA BLA BLA!
  • I Can’t....
  • get enough!
  • The power of Neo4j And graphs!
  • Who the hell are you?
  • Who the hell are you?• Hi!
  • Who the hell are you?• Hi!• Hanneli
  • Who the hell are you?• Hi!• Hanneli• a.k.a @hannelita
  • Who the hell are you?• Hi!• Hanneli• a.k.a @hannelita• Coding addicted
  • Who the hell are you?• Hi!• Hanneli• a.k.a @hannelita• Coding addicted• Computer Engineer
  • Who the hell are you?
  • Who the hell are you?• She is from Brazil
  • Who the hell are you?• She is from Brazil• Has a horrible accent when speaking English
  • Who the hell are you?• She is from Brazil• Has a horrible accent when speaking English• Works with nice people at @caelum
  • Who the hell are you?• She is from Brazil• Has a horrible accent when speaking English• Works with nice people at @caelum
  • Who the hell are you?• She is from Brazil• Has a horrible accent when speaking English• Works with nice people at @caelum
  • Who the hell are you?• She is from Brazil• Has a horrible accent when speaking English• Works with nice people at @caelum My boss
  • ok, enough of stories
  • story?Let me tell you another story
  • story?Let me tell you another story
  • story?Let me tell you another story
  • story?Let me tell you another story OWWN
  • There was a guy
  • There was a guy
  • Studying Computer Science
  • Studying Computer Science
  • Studying Computer Science
  • During data structures classes
  • During data structures classes Expected
  • During data structures classes Expected
  • During data structures classes Reality Expected
  • During data structures classes Reality Expected
  • Data StructuresTree List Stack Hashes
  • During graphs theory classes
  • During graphs theory classes Expected
  • During graphs theory classes Expected
  • During graphs theory classes Reality Expected
  • During graphs theory classes Reality Expected
  • I learned lots of things
  • During databases classesReality Expected
  • Professor
  • Professor
  • Students Professor
  • Students Professor
  • Ok, guys, let’s store data.Students Professor
  • Students Professor
  • Can anyone tell me which structure we use for storing data?Students Professor
  • I know everything about data structures! I can answer that!
  • May I try,professor?
  • Sure.
  • Hashes!
  • No.
  • Trees!
  • No.
  • Lists!
  • No.
  • The student
  • Go back to high school.
  • We store data into tables.
  • We store data into tables.
  • WHYYYYYYY??? Data structureclasses are useless
  • The relational modelSince 70’s it makes you happy storing your data
  • • Normalization• Table• Relationship tables• PK, FK• ACID• bla bla bla
  • So tables areperfect! Now I see!
  • So, the student came to work at Caelum as an intern
  • Caelum online
  • Be social while you learn
  • We must storesome data into our system
  • Store data...Tables! SQL! Relational databases!
  • I’ll be able to use everything I learned atgraduation course!
  • Let’s do some data modeling Did the Is able to Is doing theStudent courses in write code courses the past in VRaptor, Java, Ruby,Hanneli Git SQL Python, C VRaptor, Simon Ruby Java, Ruby SQL Anna SQL, Ruby - Java, C Ruby, Python, Diego SQL Ruby PHP
  • Now let’s do some[awesome] queries
  • Boss wanna know all thestudents who did the samecourse that Hanneli is doing
  • Boss wanna know all thestudents who did the samecourse that Hanneli is doing
  • Boss wanna know all thestudents who did the samecourse that Hanneli is doing (my boss)
  • Boss wanna know all thestudents who did the samecourse that Hanneli is doing
  • Boss wanna know all thestudents who did the samecourse that Hanneli is doing
  • Boss wanna know all thestudents who did the samecourse that Hanneli is doing
  • Boss wanna know all thestudents who did the samecourse that Hanneli is doing
  • Boss wanna know all thestudents who did the samecourse that Hanneli is doing Serious guy
  • Ok, got it.
  • joins, subselects
  • Wanna know all thestudents who did the same course that Hanneli is doing or already did
  • poor you
  • How can I do this?
  • joins, subselects. More difficult this time
  • What if you have tocreate more queries like that?
  • What if you have tocreate more queries like that?
  • Not fun.
  • It was difficult. Why?
  • I though tableswould always save my life!
  • Is not over yet.
  • This is a fast query.
  • This is a fast query. NOT
  • It was difficult. Why?
  • Let’s take a look at the situation
  • Consider some students
  • Consider some studentsHanneli
  • Consider some studentsHanneli
  • Consider some studentsHanneli Simon
  • Consider some studentsHanneli Simon
  • Consider some studentsHanneli Simon Anna
  • Consider some studentsHanneli Simon Anna
  • Consider some studentsHanneli Simon Anna Diego
  • Consider some studentsHanneli Simon Anna Diego
  • Consider some studentsHanneli Simon Anna Diego
  • Consider some studentsHanneli Simon Anna Diego OMG, a cow!
  • Hanneli Simon Anna Diego
  • Is doing the course Hanneli Simon Anna Diego
  • Is doing the course Git Hanneli Simon Anna Diego
  • Is doing the course Git VRaptor Hanneli Simon Anna Diego
  • Is doing the course Git VRaptor SQL Hanneli Simon Anna Diego
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna DiegoDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego GitDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptorDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQLDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Does it look like a table?
  • No.
  • It’s a graph
  • Why you can’t storedata into... graphs?
  • a. Because Databaseadmin just knowtables;
  • b. Because teachertold me to usetables
  • c. Because_____
  • Let us store data into...
  • Let us store data into... GRAPHS
  • Ladies and Gentleman
  • NEO4J
  • How does it work?
  • Hanneli
  • GitHanneli
  • GitHanneli SQL
  • GitHanneli SQL
  • GitHanneli SQL
  • GitIs doing the course Hanneli SQL
  • Git Is doing the course HanneliDid the courses in the past SQL
  • Git Is doing the course HanneliDid the courses in the past SQL
  • Git Node Is doing the course HanneliDid the courses in the past SQL
  • Git Node Is doing the course HanneliDid the courses in the past SQL
  • Git Node Is doing the course Hanneli Did the courses in the past SQLRelationship
  • Is doing the course Git VRaptor SQL Ruby Hanneli Simon Anna Diego Git VRaptor SQL RubyDid the courses in the past
  • Traversal
  • Just look at the arrows
  • Ok, it’s beautiful. How can I use that?
  • Jar
  • Jar
  • Back to our story
  • Remember our intern?
  • List all the studentswho are able to code in the same languages as Hanneli
  • Did the Is able to Is doing theStudent courses in write code courses the past in VRaptor, Java, Ruby,Hanneli Git SQL Python, C VRaptor,Simon Ruby Java, Ruby SQL Anna SQL, Ruby - Java, C Ruby, Python,Diego SQL Ruby PHP
  • Create a new application.
  • Ok, got it. I’m goingto use Neo4j and Java.
  • You must use Rails.
  • You must use Rails.
  • RailsRubyNeo4j
  • RailsRubyNeo4java
  • Neo4j + Ruby == ?
  • Neo4j + Ruby == ?
  • Neo4j + Ruby == ?JRuby
  • Neo4j + Ruby == ? JRuby (more info, contact thisguy; he is around here at Confoo)
  • Neo4j + Ruby == ? JRuby (more info, contact thisguy; he is around here at Confoo)
  • show me the code
  • rails new yourProject -m http:// andreasronge.github.com/rails3.rb
  • Create a node
  • Traversal!
  • class Student < Neo4j::Rails::Modelend
  • class Student < Neo4j::Rails::Model property :nameend
  • class Student < Neo4j::Rails::Model property :name has_n(:is_doing_the_courses).to(Cou rse).relationship(Coursing)end
  • class Course < Neo4j::Rails::Model property :name has_n(:students).from(Student, :is_doing_the_courses) has_n(:students).from(Student, :past_courses)end
  • Lessons learned
  • ORM?
  • Polyglot persistence!
  • References and help• neo4j.org• neo4j.rubyforge.org• Twitter - @neo4j• Mailing lists - Neo4j and Neo4j.rb
  • Thanks!• hannelita@gmail.com - Gtalk• @hannelita• http://hannelita.wordpress.com