SlideShare a Scribd company logo
1 of 77
Download to read offline
You	
  May	
  Also	
  Be	
  Interested	
  In:
                          Implemen'ng	
  User	
  Recommenda'ons	
  in	
  Rails




                                                                      Ma#hew	
  Deiters
                                                                theagiledeveloper.com
Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                               How	
  do	
  they	
  do	
  that?



Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                           think	
  about	
  our	
  data	
  in	
  
                                                     new	
  ways


Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




         Understand	
  the	
  tools	
  to	
  do	
  
           something	
  interesBng


Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                     Use	
  those	
  tools	
  in	
  your	
  
                                        Rails	
  applicaBon



Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                            "Everything	
  should	
  be	
  made	
  as	
  simple	
  as	
  
                            possible,	
  but	
  not	
  simpler."	
  
                                                                     -­‐	
  Albert	
  Einstein




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                                    CreaBve	
  RevoluBon
                                                                                          the	
  Golden	
  Age	
  of	
  Adver;sing




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




       Their	
  vision	
  of	
  consuming	
  life	
  had	
  liIle	
  to	
  do	
  with	
  
          actual	
  experience	
  of	
  American	
  consumers




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                                                                                                                An	
  Academic	
  approach

              “Adver;sers	
  followed	
  the	
  wishes	
  of	
  conserva;ve	
  corporate	
  clients,	
  who	
  wanted	
  the	
  safe,	
  “scien;fc”	
  adver;sing




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                                 Technology	
  Changed
                                                                         &
                                                                  Approach	
  Changed


Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                        In	
  the	
  late	
  40’s,	
  only	
  .05%	
  of	
  Americans	
  had	
  a	
  TV

                        End	
  of	
  50’s,	
  sBll	
  only	
  about	
  50%

                        5	
  years	
  later	
  in	
  1962,	
  90%	
  of	
  Americans	
  had	
  a	
  TV




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                                                                                                 Audience	
  SegmentaBon
                                    Adver;sing	
  was	
  comfortable	
  “Male	
  dominated”	
  “academic”	
  approach




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                                      SimilariBes	
  in	
  Web	
  
                                                                      Development	
  Today


Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                                      NoSQL
                                                                 Dynamic	
  Languages


Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




   We’ve	
  been	
  doing	
  CRUD	
  for	
  30	
  years
                                                                                                                                                    boring	
  for	
  us	
  and	
  the	
  user




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                              Our	
  CreaBve	
  RevoluBon
                                                                                                                How	
  can	
  we	
  change	
  our	
  approach




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters


                                                          RecommendaBons	
  =	
  Money



                                                                                                                                                                                                                                        Amazon	
  is	
  reportedly	
  making	
  ~25%	
  of	
  
                                                                                                                                                 25%                                                                                     sales	
  on	
  personalized	
  suggesBons

                                                                                                                                                                                                                                        Net	
  sales	
  are	
  at	
  $7.13	
  billion	
  in	
  the	
  first	
  quarter	
  
                                                                                                                                                                                                                                         Jan-­‐Mar	
  2010	
  -­‐	
  roughly	
  2	
  billion	
  in	
  3	
  months



                                         75%




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters


                                                                RecommendaBons	
  =	
  Traffic
       #1	
  &	
  #2	
  –	
  StumbleUpon's	
  rank	
  among	
  social	
  media	
  traffic	
  sources	
  in	
  the	
  US.

       118%	
  -­‐	
  the	
  growth	
  in	
  acBve	
  users	
  since	
  2009.

       Almost	
  10	
  Million	
  registered	
  users

       400	
  –	
  average	
  number	
  of	
  Bmes	
  a	
  user	
  stumbles	
  per	
  month.




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                         Discovering	
  the	
  relaBonships	
  in	
  your	
  data


                                                         Modeling	
  the	
  relaBonships


                                                         Using	
  graphs	
  in	
  your	
  Rails	
  App



Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                                                                                            President Obama ”The greatest thing about Facebook, is that you can
                                                                                                                            quote something and totally make up the source.” - George
                                                                                                                            Washington
                                                                                                                                                                                                                                                                                                                                                                                                                Dick Cheney




                                                                                                                                                                                                                                                                                                                                                                                                                Precious
                                                                                                                                                    John Adams lol...so true




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                                                                                            President Obama ”The greatest thing about Facebook, is that you can
                                                                                                                            quote something and totally make up the source.” - George
                                                                                                                            Washington
                                                                                                                                                                                                                                                                                                                                                                                                                Dick Cheney




                                                                                                                                                                                                                                                                                                                                                                                                                Precious
                                                                                                                                                    John Adams lol...so true




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                       http://www.hackdiary.com/2010/02/10/algorithmic-recruitment-with-github/
Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                                                                                                               Social	
  Networking

                                                                                                                                               Content

                                                                                                                                               Website	
  AnalyBcs

                                                                                                                                               PredicBve	
  Analysis



Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                         Discovering	
  the	
  relaBonships	
  in	
  your	
  data


                                                         Modeling	
  the	
  relaBonships


                                                         Using	
  graphs	
  in	
  your	
  Rails	
  App



Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                            RelaBonal	
  Databases	
  !=	
  works
                                                                                                                                                                                         SQL	
  is	
  set	
  based




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                                                                                                                                                                                                                                                                                                                                                      Lady Gaga
                                                                                                                                                                                                                                                                                                                                                                                     Kevin Bacon




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                                                                                                                                                                                                                                                                                                                                                      Lady Gaga
                                                                                                                                                                                                                                                                                                                                                                                     Kevin Bacon




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




 Example:	
  Finding	
  2	
  degrees	
  away	
  for	
  a	
  user	
  in	
  SQL


                                                                                                      -­‐	
  100	
  people	
  executes	
  in	
  0.01	
  sec

                                                                                                      -­‐	
  1000	
  people	
  executes	
  in	
  0.1	
  sec	
  

                                                                                                      -­‐	
  4000	
  people	
  executes	
  in	
  17.78	
  sec	
  

                                                                                                      -­‐	
  60K	
  over	
  an	
  hour




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters

                                                                                                                                                                         SQL	
  Smell
                                                                      2	
  degrees                                                                                                                                                                                                                                          more	
  then	
  2	
  degrees
 SELECT b FROM (                                                                                                                                                                                                                                                   WITH RECURSIVE transitive_closure(a, b, distance, path_string) AS
 WITH RECURSIVE transitive_closure(a, b, distance, path_string) AS                                                                                                                                                                                                 ( SELECT a, b, 1 AS distance,
 ( SELECT a, b, 1 AS distance, a || '.' || b || '.' AS path_string                                                                                                                                                                                                          a || '.' || b || '.' AS path_string,
    FROM edges2                                                                                                                                                                                                                                                             b AS direct_connection
   WHERE a = 1 -- set the starting node                                                                                                                                                                                                                                FROM edges2
                                                                                                                                                                                                                                                                      WHERE a = 1 -- set the starting node
     UNION ALL                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                              UNION ALL
     SELECT tc.a, e.b, tc.distance + 1,                                                                                                                                                                                                                             
     tc.path_string || e.b || '.' AS path_string                                                                                                                                                                                                                          SELECT tc.a, e.b, tc.distance + 1,
     FROM edges2 AS e                                                                                                                                                                                                                                                            tc.path_string || e.b || '.' AS path_string,
       JOIN transitive_closure AS tc ON e.a = tc.b                                                                                                                                                                                                                               tc.direct_connection
     WHERE tc.path_string NOT LIKE '%' || e.b || '.%'                                                                                                                                                                                                                       FROM edges2 AS e
       AND tc.distance = 0                                                                                                                                                                                                                                                  JOIN transitive_closure AS tc ON e.a = tc.b
 )                                                                                                                                                                                                                                                                         WHERE tc.path_string NOT LIKE '%' || e.b || '.%'
 SELECT b FROM transitive_closure                                                                                                                                                                                                                                            AND tc.distance < 3
 UNION ALL                                                                                                                                                                                                                                                         )
 (WITH RECURSIVE transitive_closure(a, b, distance, path_string) AS                                                                                                                                                                                                SELECT * FROM transitive_closure
 ( SELECT a, b, 1 AS distance, a || '.' || b || '.' AS path_string                                                                                                                                                                                                 --WHERE b=3 -- set the target node
    FROM edges2                                                                                                                                                                                                                                                    ORDER BY a,b,distance
   WHERE a = 4 -- set the target node
  
     UNION ALL
  
     SELECT tc.a, e.b, tc.distance + 1,
     tc.path_string || e.b || '.' AS path_string
     FROM edges2 AS e
       JOIN transitive_closure AS tc ON e.a = tc.b
     WHERE tc.path_string NOT LIKE '%' || e.b || '.%'
       AND tc.distance = 0
 )
 SELECT b FROM transitive_closure
 )) AS immediate_connections
 GROUP BY b
 HAVING COUNT(b) > 1;



                                                                                             Courtsey of                                           http://techportal.ibuildings.com/2009/09/07/graphs-in-the-database-sql-meets-social-networks/
Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




  How	
  is	
  Luke	
  connected	
  to	
  Princess	
  Leah?

                                                                                                                                                                                  First                                                                                                             Last
                                                                                                                       1 Luke                                                                                                                               Skywalker
                                                                                                                       2 Darth                                                                                                                              Vader
                                                                                                                       3 Princess                                                                                                                           Leah




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




  How	
  is	
  Luke	
  connected	
  to	
  Princess	
  Leah?

                                                                                                                                                                                  First                                                                                                             Last
                                                                                                                       1 Luke                                                                                                                               Skywalker
                                                                                                                       2 Darth                                                                                                                              Vader
                                                                                                                       3 Princess                                                                                                                           Leah




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




  How	
  is	
  Luke	
  connected	
  to	
  Princess	
  Leah?

                                                                                                                                                                                  First                                                                                                             Last
                                                                                                                       1 Luke                                                                                                                               Skywalker
                                                                                                                       2 Darth                                                                                                                              Vader
                                                                                                                       3 Princess                                                                                                                           Leah




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters


                                                                                                                                                                              Graphs
                                   Rela;onships	
  are	
  a	
  First	
  Class	
  Ci;zen	
  just	
  like	
  the	
  data


                                                                                                                                                                                  First                                                                                                             Last
                                                                                                                       1 Luke                                                                                                                               Skywalker

                                                                                                                                                                                                                                                                                Father

                                                                                                                       2 Darth                                                                                                                              Vader

                                                                                                                                                                                                                                                                                      Father

                                                                                                                       3 Princess                                                                                                                           Leah

Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters



                                                                                                                                 Rows	
  Nodes
                                                                                     First                                                                                                             Last
                          1 Luke                                                                                                                                Skywalker
                                                                                                                                                                                                                                                                                                                                                                                                     Node
                                                                                                                                                                                   Father
                                                                                                                                                                                                                                                                                                                                                                                                      Point
                          2 Darth                                                                                                                               Vader
                                                                                                                                                                                                                                                                                                                                                                                                     Actor
                                                                                                                                                                                         Father
                                                                                                                                                                                                                                                                                                                                                                                                 Vertex
                          3 Princess                                                                                                                            Leah

Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters



                                                                                                                                                                                          Edges
                                                                                     First                                                                                                             Last
                          1 Luke                                                                                                                                Skywalker
                                                                                                                                                                                                                                                                                                                                                                                                       Edge
                                                                                                                                                                                   Father
                                                                                                                                                                                                                                                                                                                                                                           Rela;onship
                          2 Darth                                                                                                                               Vader
                                                                                                                                                                                                                                                                                                                                                                                                             Arc
                                                                                                                                                                                         Father
                                                                                                                                                                                                                                                                                                                                                                                                          Link
                          3 Princess                                                                                                                            Leah

Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




   Less	
  complex,	
  100%	
  natural


                                                                                                                                                                                                                                                                                                                                                  Luke


                                                                                                                                                                                                                                                                                                          Darth
                                                                                                                                                                                       Princess



Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                         Discovering	
  the	
  relaBonships	
  in	
  your	
  data


                                                         Modeling	
  the	
  relaBonships


                                                         Using	
  graphs	
  in	
  your	
  Rails	
  App



Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                                     In	
  Memory	
  Ruby	
  Graph
                                                             Great	
  for	
  small	
  staBc	
  datasets	
  or	
  ad	
  hoc	
  querying




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                                                                                                                                                                    RGL

                                                                                                         Rails App

                                                                                                                                                    RGL



                                                                                                                                                                                                                                        or

                                                                                                                                                                                                                                                                                              BackroundRB

                                                                                                         Rails App
                                                                                                                                                                                                                                                                                                                            RGL




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters

                                 # http://github.com/fmeyer/rgl

                                 require 'rubygems'
                                 require 'rgl/adjacency'
                                 require 'rgl/dot'

                                 graph = RGL::DirectedAdjacencyGraph.new
                                 graph.add_edge 'mary', 'john'
                                 graph.add_edge 'mary', 'henery'
                                 graph.add_edge 'john', 'frank'
                                 graph.add_edge 'frank', 'henery'

                                 # Use DOT to visualize this graph:
                                 # http://graphviz.org/Download_macos.php
                                 graph.write_to_graphic_file('jpg')
                                 `open graph.jpg`

Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                      20,000	
  nodes	
  and	
  1	
  million	
  edges	
  =	
  300	
  MB




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                     Persistence	
  &	
  Dynamic	
  Data




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                                                                                                                                                               Neo4j




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters


                                                                                                                                                                                          Neo4j.rb



                                                                                                                              Rails App

                                                                                                                                                                                                                                                                                                                         Neo4j
                                                                                                                                 Neo4j.rb
                                                                                                                                                                                  Lucene




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




      class Person
        include Neo4j::NodeMixin
        property :name
        has_n :friends
      end



      Neo4j.start
      Neo4j::Transaction.run do
        andreas = Person.new :name => 'andreas'
        john    = Person.new :name => 'John', :age => 30
        andreas.friends << john
      end



Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters


                                                                                                                                                             Neo4jr-­‐social
                                                                                                                                                                       More	
  REST,	
  Less	
  Java

                                                                                                                            Rails App                                                                                                                                                                               RDBMS



                                                                                                                                                                                                                                                                                                   Neo4jr-social



                                                                                                                                                                                                                                                                                                                         Neo4j




                                                                                                                                                                                                                                                                                                                            Solr
                                                                                                                                                                                                                                                                                                                                                             Lucene




                                                                                                                                                                                                                                                                                                           Memcache


Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters


                                                                                                                                                                   Neo4jr-­‐social
                                                                                                  The	
  SOLR	
  of	
  Graphs	
  (uses	
  Neo4jr-­‐simple)




                                   #> sudo gem install neo4jr-social

                                   #> start-neo4jr-social




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                    No	
  JRuby	
  Required

                                                    Packaged	
  as	
  self-­‐contained	
  jeIy	
  webserver

                                                    Deployable	
  WAR

                                                    Focused	
  on	
  SNA

                                                    Basic	
  Built	
  in	
  Querying

                                                    Extensible	
  ~/.neo4jr-­‐social



Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters



                                           Facebook’s	
  Friend	
  SuggesBons
                                                          Demo
                                                                                                                                                                                                                                 Johnathan




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters



                            LinkedIn’s	
  Degrees	
  of	
  SeparaBon
                                            Demo
                                                                                                                                                                                                                                 Johnathan




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                                                                                                        http://wiki.github.com/tinkerpop/gremlin/




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                                                           SQL                                                                                                                                                                                                       Graphs	
  (Neo4j)
                                       Assembly	
  Required                                                                                                                                                                                                                                       Works	
  out	
  of	
  the	
  Box




Thursday, June 10, 2010
AllSimplePaths	
  &	
  ShortestPath
                          (Who	
  do	
  we	
  follow	
  on	
  Twiber	
  in	
  common)




Thursday, June 10, 2010
Thursday, June 10, 2010
AllSimplePaths	
  &	
  ShortestPath
                          (Who	
  do	
  we	
  follow	
  on	
  Twiber	
  in	
  common)




Thursday, June 10, 2010
Dijkstra
                          (Who	
  do	
  we	
  follow	
  on	
  Twiber	
  in	
  common	
  -­‐	
  on	
  steroids)




                                 score: 20                                score: 5


                                     score: 5

                                                                                     score: 5
                                                              score: 5


                              score: 5



                                                                         score: 10

                                                  score: 10




Thursday, June 10, 2010
Closeness	
  Centrality
                              (Who	
  has	
  the	
  most	
  followers	
  on	
  Twiber)




Thursday, June 10, 2010
Betweenness	
  Centrality
                              (Who	
  has	
  more	
  influen;al	
  people	
  following	
  them	
  on	
  Twiber)




               http://www.stoweboyd.com/message/its-betweenness-that-matters-not-your-eigenvalue-the-dark-ma.html
Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                       http://www.hackdiary.com/2010/02/10/algorithmic-recruitment-with-github/
Thursday, June 10, 2010
Eigenvector	
  Centrality
                                    (PageRank)




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                                                                                                                                                                Performance




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                                                                                                   Sparse	
  vs	
  Dense




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




Thursday, June 10, 2010
Metadata



                          Person                                     Project
                                   started_on    =>   'Jan 1 2010'
                                   finished_on   =>   'Jan 7 2010'
                                   hours         =>   40
                                   type          =>   'worked_on'




Thursday, June 10, 2010
Metadata



                          Person                                     Project
                                   started_on    =>   1265639038
                                   finished_on   =>   1266243897
                                   hours         =>   40
                                   type          =>   'worked_on_reorg'




Thursday, June 10, 2010
Breadth or Depth




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters

                                                                                                                                                                                                                                                                                                                   What	
  Next...




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                            Inspired	
  to	
  think	
  about	
  
                                            your	
  data	
  in	
  new	
  ways


Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                                                                                                                                                       Graphs
                                                        Understand	
  the	
  tools	
  to	
  do	
  something	
  
                                                                 interes;ng	
  with	
  it




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                      Use	
  these	
  tools	
  in	
  your	
  
                                         Rails	
  applicaBon



Thursday, June 10, 2010
NoSQL	
  	
  AugmentaBon
                                          Solr




                                        RDBMS


                          Application


                                         Neo4j
                                                 Lucene




                                        Memcache




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                                                CreaBve	
  RevoluBon




Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters




                                                                                                                                                   QuesBons?



Thursday, June 10, 2010
theagiledeveloper.com	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  @mdeiters



                                                                                                                                                                                                         Links
  •h#p://gist.github.com/431000
  •h#p://github.com/andreasronge/neo4j
  •h#p://github.com/mdeiters/neo4jr-­‐simple
  •h#p://github.com/mdeiters/neo4jr-­‐social
  •h#p://www.hackdiary.com/2010/02/10/algorithmic-­‐recruitment-­‐with-­‐github/
  •h#p://techportal.ibuildings.com/2009/09/07/graphs-­‐in-­‐the-­‐database-­‐sql-­‐meets-­‐social-­‐networks/




Thursday, June 10, 2010

More Related Content

Similar to You Might Also Like: Implementing User Recommendations in Rails

Bode Technology Retreat!
Bode Technology Retreat!Bode Technology Retreat!
Bode Technology Retreat!Terri Sallee
 
What all that beta talk means for brands
What all that beta talk means for brandsWhat all that beta talk means for brands
What all that beta talk means for brandsAndy Whitlock
 
It's 2010. is your business social. milena regos
It's 2010. is your business social. milena regosIt's 2010. is your business social. milena regos
It's 2010. is your business social. milena regosMilena Regos
 
Academix 2010 wilbanks
Academix 2010 wilbanksAcademix 2010 wilbanks
Academix 2010 wilbanksguest6e138b
 
iCrossing client event - You & Your Web Shadow
iCrossing client event - You & Your Web ShadowiCrossing client event - You & Your Web Shadow
iCrossing client event - You & Your Web ShadowAntony Mayfield
 
Learning with Digital Media
Learning with Digital MediaLearning with Digital Media
Learning with Digital MediaThe New School
 
Southwark Council web design
Southwark Council web designSouthwark Council web design
Southwark Council web designJadu
 
35+ Tools to Enhance Your Social Media Strategy
35+ Tools to Enhance Your Social Media Strategy35+ Tools to Enhance Your Social Media Strategy
35+ Tools to Enhance Your Social Media StrategyJeremy Blanton
 

Similar to You Might Also Like: Implementing User Recommendations in Rails (8)

Bode Technology Retreat!
Bode Technology Retreat!Bode Technology Retreat!
Bode Technology Retreat!
 
What all that beta talk means for brands
What all that beta talk means for brandsWhat all that beta talk means for brands
What all that beta talk means for brands
 
It's 2010. is your business social. milena regos
It's 2010. is your business social. milena regosIt's 2010. is your business social. milena regos
It's 2010. is your business social. milena regos
 
Academix 2010 wilbanks
Academix 2010 wilbanksAcademix 2010 wilbanks
Academix 2010 wilbanks
 
iCrossing client event - You & Your Web Shadow
iCrossing client event - You & Your Web ShadowiCrossing client event - You & Your Web Shadow
iCrossing client event - You & Your Web Shadow
 
Learning with Digital Media
Learning with Digital MediaLearning with Digital Media
Learning with Digital Media
 
Southwark Council web design
Southwark Council web designSouthwark Council web design
Southwark Council web design
 
35+ Tools to Enhance Your Social Media Strategy
35+ Tools to Enhance Your Social Media Strategy35+ Tools to Enhance Your Social Media Strategy
35+ Tools to Enhance Your Social Media Strategy
 

Recently uploaded

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 

Recently uploaded (20)

DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 

You Might Also Like: Implementing User Recommendations in Rails

  • 1. You  May  Also  Be  Interested  In: Implemen'ng  User  Recommenda'ons  in  Rails Ma#hew  Deiters theagiledeveloper.com Thursday, June 10, 2010
  • 2. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Thursday, June 10, 2010
  • 3. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Thursday, June 10, 2010
  • 4. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters How  do  they  do  that? Thursday, June 10, 2010
  • 5. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters think  about  our  data  in   new  ways Thursday, June 10, 2010
  • 6. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Understand  the  tools  to  do   something  interesBng Thursday, June 10, 2010
  • 7. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Use  those  tools  in  your   Rails  applicaBon Thursday, June 10, 2010
  • 8. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters "Everything  should  be  made  as  simple  as   possible,  but  not  simpler."   -­‐  Albert  Einstein Thursday, June 10, 2010
  • 9. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Thursday, June 10, 2010
  • 10. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters CreaBve  RevoluBon the  Golden  Age  of  Adver;sing Thursday, June 10, 2010
  • 11. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Their  vision  of  consuming  life  had  liIle  to  do  with   actual  experience  of  American  consumers Thursday, June 10, 2010
  • 12. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters An  Academic  approach “Adver;sers  followed  the  wishes  of  conserva;ve  corporate  clients,  who  wanted  the  safe,  “scien;fc”  adver;sing Thursday, June 10, 2010
  • 13. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Technology  Changed & Approach  Changed Thursday, June 10, 2010
  • 14. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters In  the  late  40’s,  only  .05%  of  Americans  had  a  TV End  of  50’s,  sBll  only  about  50% 5  years  later  in  1962,  90%  of  Americans  had  a  TV Thursday, June 10, 2010
  • 15. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Audience  SegmentaBon Adver;sing  was  comfortable  “Male  dominated”  “academic”  approach Thursday, June 10, 2010
  • 16. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters SimilariBes  in  Web   Development  Today Thursday, June 10, 2010
  • 17. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters NoSQL Dynamic  Languages Thursday, June 10, 2010
  • 18. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters We’ve  been  doing  CRUD  for  30  years boring  for  us  and  the  user Thursday, June 10, 2010
  • 19. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Our  CreaBve  RevoluBon How  can  we  change  our  approach Thursday, June 10, 2010
  • 20. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters RecommendaBons  =  Money Amazon  is  reportedly  making  ~25%  of   25% sales  on  personalized  suggesBons Net  sales  are  at  $7.13  billion  in  the  first  quarter   Jan-­‐Mar  2010  -­‐  roughly  2  billion  in  3  months 75% Thursday, June 10, 2010
  • 21. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters RecommendaBons  =  Traffic #1  &  #2  –  StumbleUpon's  rank  among  social  media  traffic  sources  in  the  US. 118%  -­‐  the  growth  in  acBve  users  since  2009. Almost  10  Million  registered  users 400  –  average  number  of  Bmes  a  user  stumbles  per  month. Thursday, June 10, 2010
  • 22. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Discovering  the  relaBonships  in  your  data Modeling  the  relaBonships Using  graphs  in  your  Rails  App Thursday, June 10, 2010
  • 23. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters President Obama ”The greatest thing about Facebook, is that you can quote something and totally make up the source.” - George Washington Dick Cheney Precious John Adams lol...so true Thursday, June 10, 2010
  • 24. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters President Obama ”The greatest thing about Facebook, is that you can quote something and totally make up the source.” - George Washington Dick Cheney Precious John Adams lol...so true Thursday, June 10, 2010
  • 25. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters http://www.hackdiary.com/2010/02/10/algorithmic-recruitment-with-github/ Thursday, June 10, 2010
  • 26. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Social  Networking Content Website  AnalyBcs PredicBve  Analysis Thursday, June 10, 2010
  • 27. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Discovering  the  relaBonships  in  your  data Modeling  the  relaBonships Using  graphs  in  your  Rails  App Thursday, June 10, 2010
  • 28. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters RelaBonal  Databases  !=  works SQL  is  set  based Thursday, June 10, 2010
  • 29. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Lady Gaga Kevin Bacon Thursday, June 10, 2010
  • 30. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Lady Gaga Kevin Bacon Thursday, June 10, 2010
  • 31. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Example:  Finding  2  degrees  away  for  a  user  in  SQL -­‐  100  people  executes  in  0.01  sec -­‐  1000  people  executes  in  0.1  sec   -­‐  4000  people  executes  in  17.78  sec   -­‐  60K  over  an  hour Thursday, June 10, 2010
  • 32. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters SQL  Smell 2  degrees more  then  2  degrees SELECT b FROM ( WITH RECURSIVE transitive_closure(a, b, distance, path_string) AS WITH RECURSIVE transitive_closure(a, b, distance, path_string) AS ( SELECT a, b, 1 AS distance, ( SELECT a, b, 1 AS distance, a || '.' || b || '.' AS path_string a || '.' || b || '.' AS path_string, FROM edges2 b AS direct_connection WHERE a = 1 -- set the starting node FROM edges2   WHERE a = 1 -- set the starting node UNION ALL     UNION ALL SELECT tc.a, e.b, tc.distance + 1,   tc.path_string || e.b || '.' AS path_string SELECT tc.a, e.b, tc.distance + 1, FROM edges2 AS e tc.path_string || e.b || '.' AS path_string, JOIN transitive_closure AS tc ON e.a = tc.b tc.direct_connection WHERE tc.path_string NOT LIKE '%' || e.b || '.%' FROM edges2 AS e AND tc.distance = 0 JOIN transitive_closure AS tc ON e.a = tc.b ) WHERE tc.path_string NOT LIKE '%' || e.b || '.%' SELECT b FROM transitive_closure AND tc.distance < 3 UNION ALL ) (WITH RECURSIVE transitive_closure(a, b, distance, path_string) AS SELECT * FROM transitive_closure ( SELECT a, b, 1 AS distance, a || '.' || b || '.' AS path_string --WHERE b=3 -- set the target node FROM edges2 ORDER BY a,b,distance WHERE a = 4 -- set the target node   UNION ALL   SELECT tc.a, e.b, tc.distance + 1, tc.path_string || e.b || '.' AS path_string FROM edges2 AS e JOIN transitive_closure AS tc ON e.a = tc.b WHERE tc.path_string NOT LIKE '%' || e.b || '.%' AND tc.distance = 0 ) SELECT b FROM transitive_closure )) AS immediate_connections GROUP BY b HAVING COUNT(b) > 1; Courtsey of http://techportal.ibuildings.com/2009/09/07/graphs-in-the-database-sql-meets-social-networks/ Thursday, June 10, 2010
  • 33. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters How  is  Luke  connected  to  Princess  Leah? First Last 1 Luke Skywalker 2 Darth Vader 3 Princess Leah Thursday, June 10, 2010
  • 34. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters How  is  Luke  connected  to  Princess  Leah? First Last 1 Luke Skywalker 2 Darth Vader 3 Princess Leah Thursday, June 10, 2010
  • 35. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters How  is  Luke  connected  to  Princess  Leah? First Last 1 Luke Skywalker 2 Darth Vader 3 Princess Leah Thursday, June 10, 2010
  • 36. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Graphs Rela;onships  are  a  First  Class  Ci;zen  just  like  the  data First Last 1 Luke Skywalker Father 2 Darth Vader Father 3 Princess Leah Thursday, June 10, 2010
  • 37. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Rows  Nodes First Last 1 Luke Skywalker Node Father Point 2 Darth Vader Actor Father Vertex 3 Princess Leah Thursday, June 10, 2010
  • 38. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Edges First Last 1 Luke Skywalker Edge Father Rela;onship 2 Darth Vader Arc Father Link 3 Princess Leah Thursday, June 10, 2010
  • 39. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Less  complex,  100%  natural Luke Darth Princess Thursday, June 10, 2010
  • 40. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Discovering  the  relaBonships  in  your  data Modeling  the  relaBonships Using  graphs  in  your  Rails  App Thursday, June 10, 2010
  • 41. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters In  Memory  Ruby  Graph Great  for  small  staBc  datasets  or  ad  hoc  querying Thursday, June 10, 2010
  • 42. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters RGL Rails App RGL or BackroundRB Rails App RGL Thursday, June 10, 2010
  • 43. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters # http://github.com/fmeyer/rgl require 'rubygems' require 'rgl/adjacency' require 'rgl/dot' graph = RGL::DirectedAdjacencyGraph.new graph.add_edge 'mary', 'john' graph.add_edge 'mary', 'henery' graph.add_edge 'john', 'frank' graph.add_edge 'frank', 'henery' # Use DOT to visualize this graph: # http://graphviz.org/Download_macos.php graph.write_to_graphic_file('jpg') `open graph.jpg` Thursday, June 10, 2010
  • 44. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters 20,000  nodes  and  1  million  edges  =  300  MB Thursday, June 10, 2010
  • 45. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Persistence  &  Dynamic  Data Thursday, June 10, 2010
  • 46. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Neo4j Thursday, June 10, 2010
  • 47. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Neo4j.rb Rails App Neo4j Neo4j.rb Lucene Thursday, June 10, 2010
  • 48. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters class Person include Neo4j::NodeMixin property :name has_n :friends end Neo4j.start Neo4j::Transaction.run do andreas = Person.new :name => 'andreas' john = Person.new :name => 'John', :age => 30 andreas.friends << john end Thursday, June 10, 2010
  • 49. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Neo4jr-­‐social More  REST,  Less  Java Rails App RDBMS Neo4jr-social Neo4j Solr Lucene Memcache Thursday, June 10, 2010
  • 50. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Neo4jr-­‐social The  SOLR  of  Graphs  (uses  Neo4jr-­‐simple) #> sudo gem install neo4jr-social #> start-neo4jr-social Thursday, June 10, 2010
  • 51. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters No  JRuby  Required Packaged  as  self-­‐contained  jeIy  webserver Deployable  WAR Focused  on  SNA Basic  Built  in  Querying Extensible  ~/.neo4jr-­‐social Thursday, June 10, 2010
  • 52. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Facebook’s  Friend  SuggesBons Demo Johnathan Thursday, June 10, 2010
  • 53. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters LinkedIn’s  Degrees  of  SeparaBon Demo Johnathan Thursday, June 10, 2010
  • 54. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters http://wiki.github.com/tinkerpop/gremlin/ Thursday, June 10, 2010
  • 55. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters SQL Graphs  (Neo4j) Assembly  Required Works  out  of  the  Box Thursday, June 10, 2010
  • 56. AllSimplePaths  &  ShortestPath (Who  do  we  follow  on  Twiber  in  common) Thursday, June 10, 2010
  • 58. AllSimplePaths  &  ShortestPath (Who  do  we  follow  on  Twiber  in  common) Thursday, June 10, 2010
  • 59. Dijkstra (Who  do  we  follow  on  Twiber  in  common  -­‐  on  steroids) score: 20 score: 5 score: 5 score: 5 score: 5 score: 5 score: 10 score: 10 Thursday, June 10, 2010
  • 60. Closeness  Centrality (Who  has  the  most  followers  on  Twiber) Thursday, June 10, 2010
  • 61. Betweenness  Centrality (Who  has  more  influen;al  people  following  them  on  Twiber) http://www.stoweboyd.com/message/its-betweenness-that-matters-not-your-eigenvalue-the-dark-ma.html Thursday, June 10, 2010
  • 62. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters http://www.hackdiary.com/2010/02/10/algorithmic-recruitment-with-github/ Thursday, June 10, 2010
  • 63. Eigenvector  Centrality (PageRank) Thursday, June 10, 2010
  • 64. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Performance Thursday, June 10, 2010
  • 65. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Sparse  vs  Dense Thursday, June 10, 2010
  • 66. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Thursday, June 10, 2010
  • 67. Metadata Person Project started_on => 'Jan 1 2010' finished_on => 'Jan 7 2010' hours => 40 type => 'worked_on' Thursday, June 10, 2010
  • 68. Metadata Person Project started_on => 1265639038 finished_on => 1266243897 hours => 40 type => 'worked_on_reorg' Thursday, June 10, 2010
  • 69. Breadth or Depth Thursday, June 10, 2010
  • 70. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters What  Next... Thursday, June 10, 2010
  • 71. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Inspired  to  think  about   your  data  in  new  ways Thursday, June 10, 2010
  • 72. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Graphs Understand  the  tools  to  do  something   interes;ng  with  it Thursday, June 10, 2010
  • 73. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Use  these  tools  in  your   Rails  applicaBon Thursday, June 10, 2010
  • 74. NoSQL    AugmentaBon Solr RDBMS Application Neo4j Lucene Memcache Thursday, June 10, 2010
  • 75. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters CreaBve  RevoluBon Thursday, June 10, 2010
  • 76. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters QuesBons? Thursday, June 10, 2010
  • 77. theagiledeveloper.com                                                                                                                                                                                                                          @mdeiters Links •h#p://gist.github.com/431000 •h#p://github.com/andreasronge/neo4j •h#p://github.com/mdeiters/neo4jr-­‐simple •h#p://github.com/mdeiters/neo4jr-­‐social •h#p://www.hackdiary.com/2010/02/10/algorithmic-­‐recruitment-­‐with-­‐github/ •h#p://techportal.ibuildings.com/2009/09/07/graphs-­‐in-­‐the-­‐database-­‐sql-­‐meets-­‐social-­‐networks/ Thursday, June 10, 2010