Introduction to
    Graph Databases
Andreas Kollegger
@akollegger
#neo4j
                    1
Introduction to
    Graph Databases
Andreas Kollegger
@akollegger
#neo4j
                    1
Introduction to
    Graph Databases
Andreas Kollegger
@akollegger
#neo4j
                    1
1
2
The Path Forward




                   2
The Path Forward

1.Why graphs?




                         2
The Path Forward

1.Why graphs?
2.What's a graph database?




                             2
The Path Forward

1.Why graphs?
2.What's a graph database?
3.How do people use Neo4j?




                             2
3
Why graphs, why now?




         D
    $
;
* , ☕⛵
   ) ⛽. 7 4B N % 8 1
             =
             +O
              '
                      @
                 5% < J
  - ☕     9:
           (
           ⚾      !
                  ?
                E F$    P
         2
   ✈ 3 * - ), L C
     (
    ⚽         IQ  H 6       3
     >G     KM
Why graphs, why now?

1.Big Data is the trend




        8 /!            ⛽C &
       :D          A ⛵0 , #
                    G
       7 <7 J$ O " ⚾
          ! T⚽ %
                +
                          3
                       X. E
              C M S D@ A; B
                 *
    9N                   ✈
  P                10 4 #
   Q K D  5 Y EI @ ⛽
    , 4 J4 Z   &R      "☕> G
     % 5 3+9 =% 8 @F ?
     $ +7
; [W . $          B
                L⚾.
                       ⛵
* ,< ⛵ U
   )☕ ⛽     XO F> 5 $=1 H
             =
            BN'          ☕✈
                     ! 1⚽ P
  - ☕ 8 2⚾: LE H % < J
         /9 V
           (         ?
                     F?
     (      ]
   ✈ 3 * - ), ; : C O *6
    ⚽         IQ     H         3
     > G    KM
Why graphs, why now?

     1.Big Data is the trend
     2.NOSQL is the answer


     P ' L 97 N W
              Y
     T 5 K 0 S @! ;
           Q   8 /B .         ⛽C&
   & ⛽        : D !2$% A ⛵0 , #
                      ?   G
  # O- 3⛵        ! T⚽ C " ⚾
          X 7$ 7JR+ O
           J %< !
                               3
    8            [      *    X. E
     ⚾] " N , ⚽9 C > S D@ A; B
  D  1 P9  O > E M 10 4 #
M UJ I     + D
           7                  ✈
    #:   Q K         & WA ⛽
     ✈ R34 S 5 Y EI @ '
          , 5 $ 4 < R T ⛵☕> G
                     Z
                     9 K %. " @F ?
 X         $ 4& J
       ⛽[) % 0 7 XOL⚾ - =☕
      ;" WI 5A 3B N = . 8 1 H
H V * ⛵ ☕. U L + $ B5
               +
             ⛽ N
            ⛵ U 9 = , > B$1 ✈
    G☕ , < M P
   Z ☕ - ☕ ⚾8 2⚾:[FE H % < J P
                     '<: !
             F / ]8 V; % FQ ⚽
                          ?
    ✈ 4 H Z GV ), 2L E? *6
     ⚽
           1
       F ✈ 3      (
            ( - ] ; : CO
                      ?
              * @
        ⚽ C D Y M Q I     H         3
      +     > G    K
Why graphs, why now?

     1.Big Data is the trend
     2.NOSQL is the answer
     3.Large in volume, and in
                         P ' L 97 N W
                                  Y
     P ' L 97 N W
              Y         T5K 0 S @ . ;
     T 5 K 0 S @! ; ⛽
                    . &        Q &   B
   & ⛽     Q 8 /B      O-G⛵ ⛽ C # !2R C
             : D !2$% A "
                     #      ⛵X
                           3 0,         ?
  # O- 3⛵        ! T⚽ ? 8 " J 3%$[ ! >
          X 7$ 7JR+ 1 ] X⚾ A;⚽9 E
           J % < M DJO C⚾      ,
    8     9     [ C >✈S
                       *      7✈ O >
                                .
     ⚾] " N , ⚽9 ! U M IR D@ + E B        WA
  D  1 P  + O >E # : 0 4 S
M UJ I                    1 3 45          T'
           7 S D X I@    WA " # &
     ✈    Q K
          , 4 J      &
                    Y EG T ⛽
           $ +7 < Z= ⛵R           UG
    # :R34 5 $ 54HZV ☕"' I >0 L < $K% .
                           ⛽ ⛵☕ FN? [ : -
 X    ;" WI 5A 3B 9 K %.8 1⚾P
        [   % 0 L + N ⚾.
H V * ⛵ )☕. U
       ⛽
    G☕ , < M PU&
               N XO ☕
                    = L B-     ☕
                               1@ A ]8 ;
                                MH
                                F       ,
                                        <  BQ
            ⛽
            ⛵        [F> 4 Q J
                    ';✈ 5 $= GV
           1 F / 98 V, ⚽F ? < ✈
                  (    : F
   Z ☕ - ☕ ⚾8 2⚾: $ E H % 1⚽ P @
                      < %B Z
                           !
                           ?H          2? E
    ✈ 4 H Z GV ]] 2L +  *6 D Y
       F ✈ 3( - ), ; : C O
     ⚽    ⚽ * @Y IQ E ?     H    C
      +  >C D K M
             G                               3
P    L0 7 N W
                       T 5 K Q S @ . ; L9 Y W
                     & ⛽              BP ' 07 N
9 Y                   O- 3⛵          !2 ? K
                                        T5        S @B ;.
 7 N W         P ' L 97 N "
                    # Y X
                      8      WJ %$ & R 9 Y Q
                                         ⛽C7
                                      ' L >⛵ N W !2 ?
                     01             [ !
   S @ B ; T 5 KDJ ⚾] @ . , ⚽# O- 3 X
         .                          P> 0
                                     9
Q
       !2 ? ⛽    Why graphs, why now?
                  M UQ IS      
                              7 + O 58 Q WA @ $[ !R C
                              BS T K
                                 ;      E     J
                                             S  %. 9
                                             "     B⚽ >
            &
          R C - 3⛵
             O     XJ # :R34 5& ⛽ J ⚾] T ' , ; E >
                       ✈    !I ?M U <I K 7 ! O ?
                              2RU LD 1
   %$[ ! # 8 H"V ☕"
     ⚽9             X G %$⛽      0O
                                  C
                                  AN    ✈$ % . S
                          ⛵ [ ! #& - 3⛵:R34 + 2R C
                                              -               WA
 ,
 + O M UJ W    ⚾]     ,        F >X #"< I [U L < K T '
        > E >1 A Z ☕ ⚽9 M P8]8 [J %$5 &  X: BQ
                                          ,
                              1E H⚾V ; , ⚽9 ! >
                               ⚾                                .
                      ✈ 4 H > GV 1 AG☕" E 0 E       N
  S        1.Big Data is the trend
           D I
 5U LL < # :.
    '                  ⚽
                         F Z DJ W] 2 ⛵
                 R3 7 S  9
         9 Y ✈T ' 4 + O M U @IR ☕7 + 1⚾P
                                  D Y
                                          ⛽     M A
                                      Z' ? S O > ]8 [A % B Q
                                                 F       W<
                                                          ;$
                                                           ,:  -
  P& 0[ K -
   0N      7: "
    A H ,G ⛵             &'
                          N
                        P A 0[ < YNT ✈ 4 5 '
                                   ✈
         X $ N W I 50 LL XC # :.34 H Z GV9 Y 2. E
                         +        K - ⚽F
                                      W I P& L < K T '
 M P K8 ; % ⛽ Q M U
 FT         V @ .
 ⚾ 5 ] Q Z ☕B ;⚾P
            <                   7: "
                              H $ %⛽
            S ☕ B 1 F 5 K8 ; G☕⛵ Q+M A
                                 V
                                 , @B  .     U     @Y
                                              0 LC0[ :%W
                                               N D7 N -    ?
                       T         <
 G⛽ @
   V             E
           2 ✈ !2 Z GV ] Q Z F
                F
            ? ⚽4 H ? ⛽                    1F 5 ] Q $
                                 S ☕ B ;⚾P K8 ; @B Q
                                            T         ,<
                                                       S     .
 O-D⛵
 8
           2.NOSQL is the answer
    3 Y' 9 Y  &
  C PJ L + R C C 3⛵
       X %$7 N #
       "             WO-D X 9
  ⚾] T  , ⚽9 ! > ⚾ NJ %$[ ! #
                                      E
                          @Y 2 ✈ !2 Z G⛽ @
                                 ? ⚽4 H ? V
                                          &
                                         R C C D⛵
                                           O- 3 Y    2     E ;
                                                            B
                                                       ? !2 ?
  1          0 [>
        5 K Q S E B1;  8
                    @ J WA
                              Y    L ' 8
                                     +
                       . W " 7 , ⚽9 P >           X %$
                                                   J          RC
J I     7+ O M U . ] 7+ O5T
                    D I@       0     > E 1 A "  , ⚽9 ! >
                                             ⚾]           [
# :R34 ⛵
  ✈& ⛽ S            !# :.34 S K M UJ W ' 7 + O > E
                     ; ✈T ' S Q
                         ?
                        BR               D I                      WA
 G# 8
    ⛽
    ⛵      3.Large in volume, and in
     O-I 5 &
         3 XNJ
                      2R C
                   <? -
                      K ! I 5 & ⛽ & ✈T 34 S
            0 L H $!2 ⛽
V ☕" ⚾ M" A %$[V % "
            U      X :
                   [ < ☕⛵ Q
           F  , ⚽9R! > $%M J
            P        ,
                    CG B
                 8 ;E [
                                        < K -
                                  U L X # :.
                                               R
                                 0 ⛵3 -[ # % " I 50 L < K T
                                  XA HOV
                                   N                    &
                                                        N
        1⚾
  ☕4 1 ] 7 + O Z ☕ E⚽ 1⚾P
M UJ I GV
 ✈D HZ
    F           ]    >          F " ]8 8; $ G☕⛵ Q YU
                                          <
                                       ⚾ ZP
                                           : ⛽
                                          , ' 9M P
                                               B        A       : -
                                                              [< %
                                                               $
                                                               ,
      ✈      YS W         9
                    > E 4 WAGV
  ⚽ # :R34 @9 2 ✈ > H Z+ 7 ]9 2D ☕F L0 7 N W8 ;
                     ? ⚽F O , ' ' I JU ME 1⚾
                                       1 Y✈ 4       F
       W NI 5 & ' P K TS
                Y9
                AL                 @Y ✈ ? ⚽ K Z GV @ . 2
                                     L0 7 T 5 H
                                              W           ]        E
 X + . " C' 0N Y < +  - P43R: # N
              7
              D UL             .CD                    S @Y ;?
 H V ☕⛵ P S' 0 K 5N W % 5 I K
         ⛽
      G B@    MQ.T K < :&
                  A     [< N BQ              @B Q
                L0 7 T $ L U T 5 "Q & ⛽ +. ; C D B ?
                                          SX 
    ;☕                   ,.A
    Z
        F  T 5⚾P :8 @! ;F⛽ ⛽☕#Z -!⛵ J
               F
             1 K- ] ⛽ ; 0 M
                     $[ & &⚾
    ? ⚽4 H Z GV% < -/? P 1 ⛵0 ☕C
                                     ⛵⛽G& H
                                          V 3
                                          O              !2
     ✈2!           ⛵Y, 8
                     S O
                     8
              Q B Q 3D2B # O- 3⛵ F ✈ 8
                     ;        E                2R C %$[ !R C
                                                 X
                                                "?
        & ⛽     ED ? 8 ] $%8 Z " ⚽ %$ !  , ⚽9
   C R +  % CX :2 !# ? G A HX, # ]
                 J@
         O- 3⛵ " ⚾ Y⚽ V ⚾G M UJ ⚾9 7 + O > E > A
          [$ J 7 ! T@ CO " 4 3 1[
       ! 9⚽               2R          JD ⚽
       #
   > E >8 , "   X ]$ JD D J I X⚾ A;IR3 >
                       1 7J MC S
                    % <9UC + 1 ] + , O > E SWA
                      I[ M U *          . EB 4
                                           ✈
                                      @ +# :                     W
           O S 9N R ⚽
           ⚾] 7  , ✈ >
              +            !D         7
       D  1 5 43 : # E # A H #
     M UJ I P  + O
                 7 S D X I@
                              >✈ 10DX S
                               M :R34 ✈           I 50 L < K T
                                       45 G☕" < KU .
                                              ⛽
                                              ⛵        &
                                                       T' [ : -
                                                       N           .
   K < # N R34 K 5 V Y E W"' I Z & ?
                    "☕      X
          L 0 I ⛽ G HZV T ⛽ >0 L
          ✈U Q
            &                &       "☕ V A G
            A M, 5+ 4 < RG☕⛵ ⛵ M F F [ ⚾ % ]8 ; % B
                                           N
                                          U☕       MP
                                                    F
                                                       A      $
                                                              ,
    ,X      :       ⛵J
   : [ 8 ;"⚾ I 5N 3 = Z= .
    $                $7
                  % 0☕ + N ⚾.
                             H
                 $ 4 & Z 9 K %⛽ 8 @P              $ V B Q 2< E
                                                  1: -
    ; V * P W . U L XOL B -
    <         F ⛽U
             ⛽ 1M 4
          G VG< P
              , Z⚾    A         ☕4 $1☕ ✈ ] H ;
     H ] ☕⛵ )☕⛵ F ✈ B $✈ 5 =1 H⚽48 Z< @
              [             [F % B < J1⚾
                            '; > F Q GV F         ,
                               :⚽ F Z ✈ +  2 C D Y
                             , E H% ⚽ P
                                   !
                                                    G
                                                       E      ?
    ? Z @F ☕ H8 ⚽98 V L
     2             F 2⚾:
           ☕4 ✈1  / ]] < E
              -                    ?
         Y D C Z GV ), 2 : + ? *6 D Y
         ✈               (          H       @      ?
                  ( +
           ⚽ H ⚽3 * - Y ;     ? CO       C
                       @     I     H
            +  >C D K M Q
                    G                                      3
3
4
A Graph?


           4
A Graph?
Yes, a graph

               4
A graph database...




                      5
A graph database...

๏ no: not for charts & diagrams, or vector artwork




                                                     5
A graph database...

๏ no: not for charts & diagrams, or vector artwork
๏ yes: for storing data that is structured as a graph




                                                        5
A graph database...

๏ no: not for charts & diagrams, or vector artwork
๏ yes: for storing data that is structured as a graph
   •remember linked lists, trees?




                                                        5
A graph database...

๏ no: not for charts & diagrams, or vector artwork
๏ yes: for storing data that is structured as a graph
   •remember linked lists, trees?
   •graphs are the general-purpose data structure



                                                        5
A graph database...

๏ no: not for charts & diagrams, or vector artwork
๏ yes: for storing data that is structured as a graph
   •remember linked lists, trees?
   •graphs are the general-purpose data structure
๏ “A traditional relational database may tell you the
    average age of everyone in this conference,
  but a graph database will tell you who is most
    likely to buy you a beer (spoiler: it's me).”


                                                        5
6
Some well-known named graphs




                               6
Some well-known named graphs



   diamond




                               6
Some well-known named graphs



   diamond   butterfly




                               6
Some well-known named graphs



   diamond   butterfly   star




                               6
Some well-known named graphs



   diamond   butterfly   star   bull




                                      6
Some well-known named graphs



   diamond    butterfly   star   bull




   franklin




                                       6
Some well-known named graphs



   diamond    butterfly    star   bull




   franklin   robertson




                                        6
Some well-known named graphs



   diamond    butterfly     star    bull




   franklin   robertson   horton




                                          6
Some well-known named graphs



   diamond    butterfly     star       bull




   franklin   robertson   horton   hall-janko




                                                6
6
7
Most well-known named graph




                              7
Most well-known named graph




                              7
Graph DB 101


               8
9
You know relational




                      9
You know relational




                      9
You know relational




          foo

                      9
You know relational




          foo         bar

                            9
You know relational




          foo   foo_bar   bar

                                9
You know relational




          foo   foo_bar   bar

                                9
You know relational




          foo   foo_bar   bar

                                9
You know relational




          foo   foo_bar   bar

                                9
You know relational
now consider relationships...




                                9
You know relational
now consider relationships...




                                9
You know relational
now consider relationships...




                                9
You know relational
now consider relationships...




                                9
You know relational
now consider relationships...




                                9
You know relational
now consider relationships...




                                9
9
10
We're talking about a
Property Graph




                        10
We're talking about a
Property Graph


    Nodes




                        10
We're talking about a
Property Graph


    Nodes


     Relationships




                        10
We're talking about a
Property Graph
                                            Em                                       Joh
                                                 il                                      a   n
                                  knows                                     knows
                     Alli                                         Tob                                    Lar

    Nodes
                            son                                       ias           knows                   s
                                                          knows
                                          And                                       And                  knows
                     knows                      rea                                       rés
                                                      s
                                                          knows             knows                knows
                     Pet                                          Miic
                                                                  Mc                knows                 Ian
                        er                knows                        a
                                                                       a
                                  knows                   knows
                                           De                                       Mic
                                              lia                                      h   ael

     Relationships

            Properties (each a key+value)

       + Indexes (for easy look-ups)
                                                                                                                 10
10
11
Looks different, fine. Who cares?




                                   11
Looks different, fine. Who cares?
๏ a sample social graph




                                   11
Looks different, fine. Who cares?
๏ a sample social graph
   •with ~1,000 persons




                                   11
Looks different, fine. Who cares?
๏ a sample social graph
   •with ~1,000 persons
๏ average 50 friends per person




                                   11
Looks different, fine. Who cares?
๏ a sample social graph
   •with ~1,000 persons
๏ average 50 friends per person
๏ pathExists(a,b) limited to depth 4




                                       11
Looks different, fine. Who cares?
๏ a sample social graph
   •with ~1,000 persons
๏ average 50 friends per person
๏ pathExists(a,b) limited to depth 4
๏ caches warmed up to eliminate disk I/O




                                           11
Looks different, fine. Who cares?
๏ a sample social graph
   •with ~1,000 persons
๏ average 50 friends per person
๏ pathExists(a,b) limited to depth 4
๏ caches warmed up to eliminate disk I/O
                                # persons         query time

    Relational database 1,000               2000ms

                Neo4j 1,000                 2ms

                Neo4j 1,000,000             2ms

                                                               11
Looks different, fine. Who cares?
๏ a sample social graph
   •with ~1,000 persons
๏ average 50 friends per person
๏ pathExists(a,b) limited to depth 4
๏ caches warmed up to eliminate disk I/O
                                # persons         query time

    Relational database 1,000               2000ms

                Neo4j 1,000                 2ms

                Neo4j 1,000,000             2ms

                                                               11
Looks different, fine. Who cares?
๏ a sample social graph
   •with ~1,000 persons
๏ average 50 friends per person
๏ pathExists(a,b) limited to depth 4
๏ caches warmed up to eliminate disk I/O
                                # persons         query time

    Relational database 1,000               2000ms

                Neo4j 1,000                 2ms

                Neo4j 1,000,000             2ms

                                                               11
11
12
And, but, so how do you
query this "graph" database?



                         12
13
Cypher - a graph query language
๏ a pattern-matching query language
๏ declarative grammar with clauses (like SQL)
๏ aggregation, ordering, limits
๏ create, read, update, delete




                                                13
Cypher - a graph query language
๏ a pattern-matching query language
๏ declarative grammar with clauses (like SQL)
๏ aggregation, ordering, limits
๏ create, read, update, delete

   // get node with id 0
   start a=node(0) return a
   // traverse from node 1
   start a=node(1) match (a)-->(b) return b
   // return friends of friends
   start a=node(1) match (a)--()--(c) return c

                                                13
Neo4j - the Graph Database




                       14
With love, from Sweden
๏ 2001 - a Swedish media asset project
   •CTO Emil prototyped a proper graph interface
   •first SQL-backed, then revised down to bare metal
   •(just like Amazon->Dynamo, Facebook->Cassandra,
     Google-> Big Table, Sweden->Neo4j)
๏ 2003 Neo4j went into 24/7 production
๏ 2006-2007 - Neo4j was spun off as an open source project
๏ 2009 seed funding for the company
๏ 2010 Neo4j Server was created (previously only an embedded DB)
๏ 2011 Series-A Funding, Top-Tier customers
     (gratuitous name dropping)

                                                                   15
Neo4j is a Graph Database




                            16
Neo4j is a Graph Database
๏ A Graph Database:




                            16
Neo4j is a Graph Database
๏ A Graph Database:
   • a Property Graph with Nodes, Relationships
     and Properties on both




                                                  16
Neo4j is a Graph Database
๏ A Graph Database:
   • a Property Graph with Nodes, Relationships
     and Properties on both

   • perfect for complex, highly connected data




                                                  16
Neo4j is a Graph Database
๏ A Graph Database:
   • a Property Graph with Nodes, Relationships
     and Properties on both

   • perfect for complex, highly connected data
๏ A Graph Database:




                                                  16
Neo4j is a Graph Database
๏ A Graph Database:
   • a Property Graph with Nodes, Relationships
     and Properties on both

   • perfect for complex, highly connected data
๏ A Graph Database:
   • reliable with real ACID Transactions


                                                  16
Neo4j is a Graph Database
๏ A Graph Database:
   • a Property Graph with Nodes, Relationships
     and Properties on both

   • perfect for complex, highly connected data
๏ A Graph Database:
   • reliable with real ACID Transactions
   • scalable: 32 Billion Nodes, 32 Billion Relationships, 64 Billion
       Properties



                                                                 16
Neo4j is a Graph Database
๏ A Graph Database:
   • a Property Graph with Nodes, Relationships
     and Properties on both

   • perfect for complex, highly connected data
๏ A Graph Database:
   • reliable with real ACID Transactions
   • scalable: 32 Billion Nodes, 32 Billion Relationships, 64 Billion
       Properties

   • Server with REST API, or Embeddable on the JVM
                                                                 16
Neo4j is a Graph Database
๏ A Graph Database:
   • a Property Graph with Nodes, Relationships
     and Properties on both

   • perfect for complex, highly connected data
๏ A Graph Database:
   • reliable with real ACID Transactions
   • scalable: 32 Billion Nodes, 32 Billion Relationships, 64 Billion
       Properties

   • Server with REST API, or Embeddable on the JVM
   • high-performance with High-Availability (read scaling)      16
the Real World


                 17
18
Real World Use Cases:




                        18
Real World Use Cases:
•   [A] Mmm Pancakes




                        18
Real World Use Cases:
•[A] Mmm Pancakes
• [B] ACL from Hell




                        18
Real World Use Cases:
•[A] Mmm Pancakes
• [B] ACL from Hell
• [C] Master of your Domain




                              18
[A] Mmm Pancakes
[A] Mmm Pancakes
[A] Mozilla Pancake




This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the
MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
[A] Mozilla Pancake
        • Experimental cloud-based browser
        • Built to improve how users Discover,
                  Collect, Share & Organize things on
                  the web

        • Goal: help users better access &
                  curate information on the net, on
                  any device

This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the
MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the
MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
Why Neo4J?




This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the
MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
Why Neo4J?
        • The internet is a network of pages
                  connected to each other. What
                  better way to model that than in
                  graphs?

        • No time lost fighting with less
                  expressive datastores

        • Easy to implement experimental
                  features

This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the
MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
Cute meta + data




This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the
MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
Cute meta + data




This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the
MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
Neo4J Co-Existence
        • Node uuids as refs in external
                  ElasticSearch also in internal Lucene

        • Custom search ranking for user
                  history based on node relationship
                  data

        • MySQL for user data, Redis for
                  metrics

This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the
MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
Mozilla Pancake
            Available on BitBucket:
            https://bitbucket.org/
            mozillapancake/pancake


            Questions?
            Olivier Yiptong:
            oyiptong@mozilla.com

This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the
MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
[B] ACL from Hell




One of the top 10 telcos worldwide
Background

Telenor calculated in 2010 that it´s self-service web solution for
companies, MinBedrift, would not scale with the projected
customer and subscription growth beyond 2012.




                                                  Limit
                                      th
                                G row
                          ted
                      jec
                   Pro




                 2010
                                           2015
[B] Telenor Background

Background

Telenor calculated in 2010 that it´s self-service web solution for
companies, MinBedrift, would not scale with the projected
customer and subscription growth beyond 2012.




                                                  Limit
                                      th
                                G row
                          ted
                      jec
                   Pro




                 2010
                                           2015
[B] Telenor Background
• MinBedrif, a self service web
  solution for companies
     Background

• 2010 - calculated that it would not
     Telenor calculated in 2010 that it´s self-service web solution for

  scale with projected growth
     companies, MinBedrift, would not scale with the projected
     customer and subscription growth beyond 2012.




                                                       Limit
                                           th
                                     G row
                               ted
                           jec
                        Pro




                      2010
                                                2015
Business Case

The business case is built on the negative consequence of NOT
addressing the problem.




                             Loss of customers (income)

                             Reduced sales transactions (income)

                             Increased manual support (expenses)

                             Other
28
Current ACL Service




                      28
Current ACL Service
๏ Stored procedure in DB calculating all access
   •cached results for up to 24 hours
   •minutes to calculate for large customers
   •extremely complex to understand (1500 lines)
   •depends on temporary tables
   •joins across multiple tables


                                                   28
Example Access Authorization
                                                                             User
Access may be given directly or by inheritance                               Customer
                                                                             Account
                                                U                            Subscription
                 U                                      Inherit = true
                          Inherit =
                                    false
                In


                                                C
                  he
                    rit
                     =




C                                                          C                                C
                      tru
                         e




        A                        A              A                    A           A


    S       S                S       S      S       S            S       S   S         S
30
ACL With Neo4j




                 30
ACL With Neo4j
๏ Faster than current solution
๏ Simpler to understand the logic
๏ Avoid large temporary tables
๏ Tailored for service (resource authorization)




                                                  30
[C] Master of your Domain
[C] MDM within Cisco
master data management, sales compensation management, online customer support


Description                                                          Benefits
Real-time conflict detection in sales compensation management.        Performance : “Minutes to Milliseconds”
Business-critical “P1” system. Neo4j allows Cisco to model complex   Outperforms Oracle RAC, serving complex queries in real time
algorithms, which still maintaining high performance over a large    Flexibility
dataset.                                                             Allows for Cisco to model interconnected data and complex queries with
                                                                     ease
Background
                                                                     Robustness
Neo4j replaces Oracle RAC, which was not performant enough for the
                                                                     With 9+ years of production experience, Neo4j brings a solid product.
use case.




Architecture
3-node Enterprise cluster with mirrored
disaster recovery cluster
Dedicated hardware in own datacenter
Embedded in custom webapp
Sizing
35 million nodes
50 million relationships
600 million properties
33
Really, once you start
              thinking in graphs
               it's hard to stop

          Recommendations       MDM
                        Business intelligence
       Geospatial
                   catalogs       Systems
   access control Social computingManagement
                                 your brain
          Biotechnology
                          routing         genealogy
linguistics
              Making Sense of all that
      compensation
              data          market vectors
                                              33
Really, once you start
              thinking in graphs
               it's hard to stop

       What will you MDM
        Recommendations build?
                        Business intelligence
       Geospatial
                   catalogs       Systems
   access control Social computingManagement
                                 your brain
          Biotechnology
                          routing         genealogy
linguistics
              Making Sense of all that
      compensation
              data          market vectors
                                              33
34
Neo4j




and, Thanks :)




                 34
NoSQL Now! Introduction to Graph Databases

NoSQL Now! Introduction to Graph Databases

  • 1.
    Introduction to Graph Databases Andreas Kollegger @akollegger #neo4j 1
  • 2.
    Introduction to Graph Databases Andreas Kollegger @akollegger #neo4j 1
  • 3.
    Introduction to Graph Databases Andreas Kollegger @akollegger #neo4j 1
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
    The Path Forward 1.Whygraphs? 2.What's a graph database? 2
  • 9.
    The Path Forward 1.Whygraphs? 2.What's a graph database? 3.How do people use Neo4j? 2
  • 10.
  • 11.
    Why graphs, whynow? D $ ; * , ☕⛵ ) ⛽. 7 4B N % 8 1 = +O ' @ 5% < J - ☕ 9: ( ⚾ ! ? E F$ P 2 ✈ 3 * - ), L C ( ⚽ IQ H 6 3 >G KM
  • 12.
    Why graphs, whynow? 1.Big Data is the trend 8 /! ⛽C & :D A ⛵0 , # G 7 <7 J$ O " ⚾ ! T⚽ % + 3 X. E C M S D@ A; B * 9N ✈ P 10 4 # Q K D 5 Y EI @ ⛽ , 4 J4 Z &R "☕> G % 5 3+9 =% 8 @F ? $ +7 ; [W . $ B L⚾. ⛵ * ,< ⛵ U )☕ ⛽ XO F> 5 $=1 H = BN' ☕✈ ! 1⚽ P - ☕ 8 2⚾: LE H % < J /9 V ( ? F? ( ] ✈ 3 * - ), ; : C O *6 ⚽ IQ H 3 > G KM
  • 13.
    Why graphs, whynow? 1.Big Data is the trend 2.NOSQL is the answer P ' L 97 N W Y T 5 K 0 S @! ; Q 8 /B . ⛽C& & ⛽ : D !2$% A ⛵0 , # ? G # O- 3⛵ ! T⚽ C " ⚾ X 7$ 7JR+ O J %< ! 3 8 [ * X. E ⚾] " N , ⚽9 C > S D@ A; B D 1 P9 O > E M 10 4 # M UJ I + D 7 ✈ #: Q K & WA ⛽ ✈ R34 S 5 Y EI @ ' , 5 $ 4 < R T ⛵☕> G Z 9 K %. " @F ? X $ 4& J ⛽[) % 0 7 XOL⚾ - =☕ ;" WI 5A 3B N = . 8 1 H H V * ⛵ ☕. U L + $ B5 + ⛽ N ⛵ U 9 = , > B$1 ✈ G☕ , < M P Z ☕ - ☕ ⚾8 2⚾:[FE H % < J P '<: ! F / ]8 V; % FQ ⚽ ? ✈ 4 H Z GV ), 2L E? *6 ⚽ 1 F ✈ 3 ( ( - ] ; : CO ? * @ ⚽ C D Y M Q I H 3 + > G K
  • 14.
    Why graphs, whynow? 1.Big Data is the trend 2.NOSQL is the answer 3.Large in volume, and in P ' L 97 N W Y P ' L 97 N W Y T5K 0 S @ . ; T 5 K 0 S @! ; ⛽ . & Q & B & ⛽ Q 8 /B O-G⛵ ⛽ C # !2R C : D !2$% A " # ⛵X 3 0, ? # O- 3⛵ ! T⚽ ? 8 " J 3%$[ ! > X 7$ 7JR+ 1 ] X⚾ A;⚽9 E J % < M DJO C⚾ , 8 9 [ C >✈S * 7✈ O > . ⚾] " N , ⚽9 ! U M IR D@ + E B WA D 1 P + O >E # : 0 4 S M UJ I 1 3 45 T' 7 S D X I@ WA " # & ✈ Q K , 4 J & Y EG T ⛽ $ +7 < Z= ⛵R UG # :R34 5 $ 54HZV ☕"' I >0 L < $K% . ⛽ ⛵☕ FN? [ : - X ;" WI 5A 3B 9 K %.8 1⚾P [ % 0 L + N ⚾. H V * ⛵ )☕. U ⛽ G☕ , < M PU& N XO ☕ = L B- ☕ 1@ A ]8 ; MH F , < BQ ⛽ ⛵ [F> 4 Q J ';✈ 5 $= GV 1 F / 98 V, ⚽F ? < ✈ ( : F Z ☕ - ☕ ⚾8 2⚾: $ E H % 1⚽ P @ < %B Z ! ?H 2? E ✈ 4 H Z GV ]] 2L + *6 D Y F ✈ 3( - ), ; : C O ⚽ ⚽ * @Y IQ E ? H C + >C D K M G 3
  • 15.
    P L0 7 N W T 5 K Q S @ . ; L9 Y W & ⛽ BP ' 07 N 9 Y O- 3⛵ !2 ? K T5 S @B ;. 7 N W P ' L 97 N " # Y X 8 WJ %$ & R 9 Y Q ⛽C7 ' L >⛵ N W !2 ? 01 [ ! S @ B ; T 5 KDJ ⚾] @ . , ⚽# O- 3 X . P> 0 9 Q !2 ? ⛽ Why graphs, why now? M UQ IS 7 + O 58 Q WA @ $[ !R C BS T K ; E J S %. 9 " B⚽ > & R C - 3⛵ O XJ # :R34 5& ⛽ J ⚾] T ' , ; E > ✈ !I ?M U <I K 7 ! O ? 2RU LD 1 %$[ ! # 8 H"V ☕" ⚽9 X G %$⛽ 0O C AN ✈$ % . S ⛵ [ ! #& - 3⛵:R34 + 2R C - WA , + O M UJ W ⚾] , F >X #"< I [U L < K T ' > E >1 A Z ☕ ⚽9 M P8]8 [J %$5 & X: BQ , 1E H⚾V ; , ⚽9 ! > ⚾ . ✈ 4 H > GV 1 AG☕" E 0 E N S 1.Big Data is the trend D I 5U LL < # :. ' ⚽ F Z DJ W] 2 ⛵ R3 7 S 9 9 Y ✈T ' 4 + O M U @IR ☕7 + 1⚾P D Y ⛽ M A Z' ? S O > ]8 [A % B Q F W< ;$ ,: - P& 0[ K - 0N 7: " A H ,G ⛵ &' N P A 0[ < YNT ✈ 4 5 ' ✈ X $ N W I 50 LL XC # :.34 H Z GV9 Y 2. E + K - ⚽F W I P& L < K T ' M P K8 ; % ⛽ Q M U FT V @ . ⚾ 5 ] Q Z ☕B ;⚾P < 7: " H $ %⛽ S ☕ B 1 F 5 K8 ; G☕⛵ Q+M A V , @B . U @Y 0 LC0[ :%W N D7 N - ? T < G⛽ @ V E 2 ✈ !2 Z GV ] Q Z F F ? ⚽4 H ? ⛽ 1F 5 ] Q $ S ☕ B ;⚾P K8 ; @B Q T ,< S . O-D⛵ 8 2.NOSQL is the answer 3 Y' 9 Y & C PJ L + R C C 3⛵ X %$7 N # " WO-D X 9 ⚾] T , ⚽9 ! > ⚾ NJ %$[ ! # E @Y 2 ✈ !2 Z G⛽ @ ? ⚽4 H ? V & R C C D⛵ O- 3 Y 2 E ; B ? !2 ? 1 0 [> 5 K Q S E B1; 8 @ J WA Y L ' 8 + . W " 7 , ⚽9 P > X %$ J RC J I 7+ O M U . ] 7+ O5T D I@ 0 > E 1 A " , ⚽9 ! > ⚾] [ # :R34 ⛵ ✈& ⛽ S !# :.34 S K M UJ W ' 7 + O > E ; ✈T ' S Q ? BR D I WA G# 8 ⛽ ⛵ 3.Large in volume, and in O-I 5 & 3 XNJ 2R C <? - K ! I 5 & ⛽ & ✈T 34 S 0 L H $!2 ⛽ V ☕" ⚾ M" A %$[V % " U X : [ < ☕⛵ Q F , ⚽9R! > $%M J P , CG B 8 ;E [ < K - U L X # :. R 0 ⛵3 -[ # % " I 50 L < K T XA HOV N & N 1⚾ ☕4 1 ] 7 + O Z ☕ E⚽ 1⚾P M UJ I GV ✈D HZ F ] > F " ]8 8; $ G☕⛵ Q YU < ⚾ ZP : ⛽ , ' 9M P B A : - [< % $ , ✈ YS W 9 > E 4 WAGV ⚽ # :R34 @9 2 ✈ > H Z+ 7 ]9 2D ☕F L0 7 N W8 ; ? ⚽F O , ' ' I JU ME 1⚾ 1 Y✈ 4 F W NI 5 & ' P K TS Y9 AL @Y ✈ ? ⚽ K Z GV @ . 2 L0 7 T 5 H W ] E X + . " C' 0N Y < + - P43R: # N 7 D UL .CD S @Y ;? H V ☕⛵ P S' 0 K 5N W % 5 I K ⛽ G B@ MQ.T K < :& A [< N BQ @B Q L0 7 T $ L U T 5 "Q & ⛽ +. ; C D B ? SX ;☕ ,.A Z F T 5⚾P :8 @! ;F⛽ ⛽☕#Z -!⛵ J F 1 K- ] ⛽ ; 0 M $[ & &⚾ ? ⚽4 H Z GV% < -/? P 1 ⛵0 ☕C ⛵⛽G& H V 3 O !2 ✈2! ⛵Y, 8 S O 8 Q B Q 3D2B # O- 3⛵ F ✈ 8 ; E 2R C %$[ !R C X "? & ⛽ ED ? 8 ] $%8 Z " ⚽ %$ ! , ⚽9 C R + % CX :2 !# ? G A HX, # ] J@ O- 3⛵ " ⚾ Y⚽ V ⚾G M UJ ⚾9 7 + O > E > A [$ J 7 ! T@ CO " 4 3 1[ ! 9⚽ 2R JD ⚽ # > E >8 , " X ]$ JD D J I X⚾ A;IR3 > 1 7J MC S % <9UC + 1 ] + , O > E SWA I[ M U * . EB 4 ✈ @ +# : W O S 9N R ⚽ ⚾] 7 , ✈ > + !D 7 D 1 5 43 : # E # A H # M UJ I P + O 7 S D X I@ >✈ 10DX S M :R34 ✈ I 50 L < K T 45 G☕" < KU . ⛽ ⛵ & T' [ : - N . K < # N R34 K 5 V Y E W"' I Z & ? "☕ X L 0 I ⛽ G HZV T ⛽ >0 L ✈U Q & & "☕ V A G A M, 5+ 4 < RG☕⛵ ⛵ M F F [ ⚾ % ]8 ; % B N U☕ MP F A $ , ,X : ⛵J : [ 8 ;"⚾ I 5N 3 = Z= . $ $7 % 0☕ + N ⚾. H $ 4 & Z 9 K %⛽ 8 @P $ V B Q 2< E 1: - ; V * P W . U L XOL B - < F ⛽U ⛽ 1M 4 G VG< P , Z⚾ A ☕4 $1☕ ✈ ] H ; H ] ☕⛵ )☕⛵ F ✈ B $✈ 5 =1 H⚽48 Z< @ [ [F % B < J1⚾ '; > F Q GV F , :⚽ F Z ✈ + 2 C D Y , E H% ⚽ P ! G E ? ? Z @F ☕ H8 ⚽98 V L 2 F 2⚾: ☕4 ✈1 / ]] < E - ? Y D C Z GV ), 2 : + ? *6 D Y ✈ ( H @ ? ( + ⚽ H ⚽3 * - Y ; ? CO C @ I H + >C D K M Q G 3
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
    A graph database... ๏no: not for charts & diagrams, or vector artwork 5
  • 22.
    A graph database... ๏no: not for charts & diagrams, or vector artwork ๏ yes: for storing data that is structured as a graph 5
  • 23.
    A graph database... ๏no: not for charts & diagrams, or vector artwork ๏ yes: for storing data that is structured as a graph •remember linked lists, trees? 5
  • 24.
    A graph database... ๏no: not for charts & diagrams, or vector artwork ๏ yes: for storing data that is structured as a graph •remember linked lists, trees? •graphs are the general-purpose data structure 5
  • 25.
    A graph database... ๏no: not for charts & diagrams, or vector artwork ๏ yes: for storing data that is structured as a graph •remember linked lists, trees? •graphs are the general-purpose data structure ๏ “A traditional relational database may tell you the average age of everyone in this conference, but a graph database will tell you who is most likely to buy you a beer (spoiler: it's me).” 5
  • 26.
  • 27.
  • 28.
    Some well-known namedgraphs diamond 6
  • 29.
    Some well-known namedgraphs diamond butterfly 6
  • 30.
    Some well-known namedgraphs diamond butterfly star 6
  • 31.
    Some well-known namedgraphs diamond butterfly star bull 6
  • 32.
    Some well-known namedgraphs diamond butterfly star bull franklin 6
  • 33.
    Some well-known namedgraphs diamond butterfly star bull franklin robertson 6
  • 34.
    Some well-known namedgraphs diamond butterfly star bull franklin robertson horton 6
  • 35.
    Some well-known namedgraphs diamond butterfly star bull franklin robertson horton hall-janko 6
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
    You know relational foo foo_bar bar 9
  • 47.
    You know relational foo foo_bar bar 9
  • 48.
    You know relational foo foo_bar bar 9
  • 49.
    You know relational foo foo_bar bar 9
  • 50.
    You know relational nowconsider relationships... 9
  • 51.
    You know relational nowconsider relationships... 9
  • 52.
    You know relational nowconsider relationships... 9
  • 53.
    You know relational nowconsider relationships... 9
  • 54.
    You know relational nowconsider relationships... 9
  • 55.
    You know relational nowconsider relationships... 9
  • 56.
  • 57.
  • 58.
    We're talking abouta Property Graph 10
  • 59.
    We're talking abouta Property Graph Nodes 10
  • 60.
    We're talking abouta Property Graph Nodes Relationships 10
  • 61.
    We're talking abouta Property Graph Em Joh il a n knows knows Alli Tob Lar Nodes son ias knows s knows And And knows knows rea rés s knows knows knows Pet Miic Mc knows Ian er knows a a knows knows De Mic lia h ael Relationships Properties (each a key+value) + Indexes (for easy look-ups) 10
  • 62.
  • 63.
  • 64.
  • 65.
    Looks different, fine.Who cares? ๏ a sample social graph 11
  • 66.
    Looks different, fine.Who cares? ๏ a sample social graph •with ~1,000 persons 11
  • 67.
    Looks different, fine.Who cares? ๏ a sample social graph •with ~1,000 persons ๏ average 50 friends per person 11
  • 68.
    Looks different, fine.Who cares? ๏ a sample social graph •with ~1,000 persons ๏ average 50 friends per person ๏ pathExists(a,b) limited to depth 4 11
  • 69.
    Looks different, fine.Who cares? ๏ a sample social graph •with ~1,000 persons ๏ average 50 friends per person ๏ pathExists(a,b) limited to depth 4 ๏ caches warmed up to eliminate disk I/O 11
  • 70.
    Looks different, fine.Who cares? ๏ a sample social graph •with ~1,000 persons ๏ average 50 friends per person ๏ pathExists(a,b) limited to depth 4 ๏ caches warmed up to eliminate disk I/O # persons query time Relational database 1,000 2000ms Neo4j 1,000 2ms Neo4j 1,000,000 2ms 11
  • 71.
    Looks different, fine.Who cares? ๏ a sample social graph •with ~1,000 persons ๏ average 50 friends per person ๏ pathExists(a,b) limited to depth 4 ๏ caches warmed up to eliminate disk I/O # persons query time Relational database 1,000 2000ms Neo4j 1,000 2ms Neo4j 1,000,000 2ms 11
  • 72.
    Looks different, fine.Who cares? ๏ a sample social graph •with ~1,000 persons ๏ average 50 friends per person ๏ pathExists(a,b) limited to depth 4 ๏ caches warmed up to eliminate disk I/O # persons query time Relational database 1,000 2000ms Neo4j 1,000 2ms Neo4j 1,000,000 2ms 11
  • 73.
  • 74.
  • 75.
    And, but, sohow do you query this "graph" database? 12
  • 76.
  • 77.
    Cypher - agraph query language ๏ a pattern-matching query language ๏ declarative grammar with clauses (like SQL) ๏ aggregation, ordering, limits ๏ create, read, update, delete 13
  • 78.
    Cypher - agraph query language ๏ a pattern-matching query language ๏ declarative grammar with clauses (like SQL) ๏ aggregation, ordering, limits ๏ create, read, update, delete // get node with id 0 start a=node(0) return a // traverse from node 1 start a=node(1) match (a)-->(b) return b // return friends of friends start a=node(1) match (a)--()--(c) return c 13
  • 79.
    Neo4j - theGraph Database 14
  • 80.
    With love, fromSweden ๏ 2001 - a Swedish media asset project •CTO Emil prototyped a proper graph interface •first SQL-backed, then revised down to bare metal •(just like Amazon->Dynamo, Facebook->Cassandra, Google-> Big Table, Sweden->Neo4j) ๏ 2003 Neo4j went into 24/7 production ๏ 2006-2007 - Neo4j was spun off as an open source project ๏ 2009 seed funding for the company ๏ 2010 Neo4j Server was created (previously only an embedded DB) ๏ 2011 Series-A Funding, Top-Tier customers (gratuitous name dropping) 15
  • 81.
    Neo4j is aGraph Database 16
  • 82.
    Neo4j is aGraph Database ๏ A Graph Database: 16
  • 83.
    Neo4j is aGraph Database ๏ A Graph Database: • a Property Graph with Nodes, Relationships and Properties on both 16
  • 84.
    Neo4j is aGraph Database ๏ A Graph Database: • a Property Graph with Nodes, Relationships and Properties on both • perfect for complex, highly connected data 16
  • 85.
    Neo4j is aGraph Database ๏ A Graph Database: • a Property Graph with Nodes, Relationships and Properties on both • perfect for complex, highly connected data ๏ A Graph Database: 16
  • 86.
    Neo4j is aGraph Database ๏ A Graph Database: • a Property Graph with Nodes, Relationships and Properties on both • perfect for complex, highly connected data ๏ A Graph Database: • reliable with real ACID Transactions 16
  • 87.
    Neo4j is aGraph Database ๏ A Graph Database: • a Property Graph with Nodes, Relationships and Properties on both • perfect for complex, highly connected data ๏ A Graph Database: • reliable with real ACID Transactions • scalable: 32 Billion Nodes, 32 Billion Relationships, 64 Billion Properties 16
  • 88.
    Neo4j is aGraph Database ๏ A Graph Database: • a Property Graph with Nodes, Relationships and Properties on both • perfect for complex, highly connected data ๏ A Graph Database: • reliable with real ACID Transactions • scalable: 32 Billion Nodes, 32 Billion Relationships, 64 Billion Properties • Server with REST API, or Embeddable on the JVM 16
  • 89.
    Neo4j is aGraph Database ๏ A Graph Database: • a Property Graph with Nodes, Relationships and Properties on both • perfect for complex, highly connected data ๏ A Graph Database: • reliable with real ACID Transactions • scalable: 32 Billion Nodes, 32 Billion Relationships, 64 Billion Properties • Server with REST API, or Embeddable on the JVM • high-performance with High-Availability (read scaling) 16
  • 90.
  • 91.
  • 92.
    Real World UseCases: 18
  • 93.
    Real World UseCases: • [A] Mmm Pancakes 18
  • 94.
    Real World UseCases: •[A] Mmm Pancakes • [B] ACL from Hell 18
  • 95.
    Real World UseCases: •[A] Mmm Pancakes • [B] ACL from Hell • [C] Master of your Domain 18
  • 97.
  • 98.
  • 100.
    [A] Mozilla Pancake ThisMaterial is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
  • 101.
    [A] Mozilla Pancake • Experimental cloud-based browser • Built to improve how users Discover, Collect, Share & Organize things on the web • Goal: help users better access & curate information on the net, on any device This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
  • 102.
    This Material issubject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
  • 103.
    Why Neo4J? This Materialis subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
  • 104.
    Why Neo4J? • The internet is a network of pages connected to each other. What better way to model that than in graphs? • No time lost fighting with less expressive datastores • Easy to implement experimental features This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
  • 105.
    Cute meta +data This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
  • 106.
    Cute meta +data This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
  • 107.
    Neo4J Co-Existence • Node uuids as refs in external ElasticSearch also in internal Lucene • Custom search ranking for user history based on node relationship data • MySQL for user data, Redis for metrics This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
  • 108.
    Mozilla Pancake Available on BitBucket: https://bitbucket.org/ mozillapancake/pancake Questions? Olivier Yiptong: oyiptong@mozilla.com This Material is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/
  • 110.
    [B] ACL fromHell One of the top 10 telcos worldwide
  • 111.
    Background Telenor calculated in2010 that it´s self-service web solution for companies, MinBedrift, would not scale with the projected customer and subscription growth beyond 2012. Limit th G row ted jec Pro 2010 2015
  • 112.
    [B] Telenor Background Background Telenorcalculated in 2010 that it´s self-service web solution for companies, MinBedrift, would not scale with the projected customer and subscription growth beyond 2012. Limit th G row ted jec Pro 2010 2015
  • 113.
    [B] Telenor Background •MinBedrif, a self service web solution for companies Background • 2010 - calculated that it would not Telenor calculated in 2010 that it´s self-service web solution for scale with projected growth companies, MinBedrift, would not scale with the projected customer and subscription growth beyond 2012. Limit th G row ted jec Pro 2010 2015
  • 114.
    Business Case The businesscase is built on the negative consequence of NOT addressing the problem. Loss of customers (income) Reduced sales transactions (income) Increased manual support (expenses) Other
  • 115.
  • 116.
  • 117.
    Current ACL Service ๏Stored procedure in DB calculating all access •cached results for up to 24 hours •minutes to calculate for large customers •extremely complex to understand (1500 lines) •depends on temporary tables •joins across multiple tables 28
  • 118.
    Example Access Authorization User Access may be given directly or by inheritance Customer Account U Subscription U Inherit = true Inherit = false In C he rit = C C C tru e A A A A A S S S S S S S S S S
  • 119.
  • 120.
  • 121.
    ACL With Neo4j ๏Faster than current solution ๏ Simpler to understand the logic ๏ Avoid large temporary tables ๏ Tailored for service (resource authorization) 30
  • 123.
    [C] Master ofyour Domain
  • 124.
    [C] MDM withinCisco master data management, sales compensation management, online customer support Description Benefits Real-time conflict detection in sales compensation management. Performance : “Minutes to Milliseconds” Business-critical “P1” system. Neo4j allows Cisco to model complex Outperforms Oracle RAC, serving complex queries in real time algorithms, which still maintaining high performance over a large Flexibility dataset. Allows for Cisco to model interconnected data and complex queries with ease Background Robustness Neo4j replaces Oracle RAC, which was not performant enough for the With 9+ years of production experience, Neo4j brings a solid product. use case. Architecture 3-node Enterprise cluster with mirrored disaster recovery cluster Dedicated hardware in own datacenter Embedded in custom webapp Sizing 35 million nodes 50 million relationships 600 million properties
  • 125.
  • 126.
    Really, once youstart thinking in graphs it's hard to stop Recommendations MDM Business intelligence Geospatial catalogs Systems access control Social computingManagement your brain Biotechnology routing genealogy linguistics Making Sense of all that compensation data market vectors 33
  • 127.
    Really, once youstart thinking in graphs it's hard to stop What will you MDM Recommendations build? Business intelligence Geospatial catalogs Systems access control Social computingManagement your brain Biotechnology routing genealogy linguistics Making Sense of all that compensation data market vectors 33
  • 128.
  • 129.

Editor's Notes