Slide 1

Slide 1 text

Build Facebook Like Relationships with Neo4j by Von Stark Tuesday, October 11, 11

Slide 2

Slide 2 text

Von Stark I am : Starter, Programmer ,Backpacker Use : Ruby, Rails, Erlang, Neo4j co-founder at meetcliv.com founder at neo4j.tw Engineer at Roodo tech co-founder at theprosbank.com co-founder at envionow.com Sales at 365biotech Tuesday, October 11, 11

Slide 3

Slide 3 text

4 W & 1 H What Why Who When How Tuesday, October 11, 11

Slide 4

Slide 4 text

What is Neo4j Java & Lucene - NeoTechnology Embedded Document High Availability & FailOver. A(atomicity) C(consistency) I(isolation) D(durability) Ꮘೳ࠷ՂతGraph Database Tuesday, October 11, 11

Slide 5

Slide 5 text

What can it do? Social Network Graph Network Complex Relationships Make database like natural Tuesday, October 11, 11

Slide 6

Slide 6 text

What is the difference as Object Oriented DB Data preset as Node & Edge (Objects) More functions to traverse Friendly API Schema = set of Class (Independent) Tuesday, October 11, 11

Slide 7

Slide 7 text

Why to use graph - Web3.0 ࢿྉܕࣜ 1999 2000 2010 2020 Tuesday, October 11, 11

Slide 8

Slide 8 text

Why to use Graph - Complexity Ꮘೳ ࢿྉෳᯑ౓ Tuesday, October 11, 11

Slide 9

Slide 9 text

Why to use Graph - Whiteboard Friendly Tuesday, October 11, 11

Slide 10

Slide 10 text

Why to use Graph - Whiteboard Friendly Tuesday, October 11, 11

Slide 11

Slide 11 text

Why to use graph - Reasons धཁᅷܗ᮫܎፺ࡧ ༗ෳᯑฒ׌Ꮇࢄ(ల։)తࢿྉઅߏ গ෦㟨తࢿྉ -> ඞཁ,େ෦㟨తࢿྉ -> ඇඞཁ SQLதڐଟࢿྉද౎ੋඳड़ࢿྉ᮫܎ੑ ࡏSQL࢖༻ྃଠଟJoin Tuesday, October 11, 11

Slide 12

Slide 12 text

Who use graph Tuesday, October 11, 11

Slide 13

Slide 13 text

When to use graph ቮ༗େྔ᮫܎धཁ႔ཧ ༗ࢿۚత૑ۀᅶୂ ቮख़ࣩGraph֓೦ SQL҃ҰൠKey/ValeతNoSQLቮෆ଍Ҏጯ෇ Tuesday, October 11, 11

Slide 14

Slide 14 text

When to use graph ቮ༗େྔ᮫܎धཁ႔ཧ ༗ࢿۚత૑ۀᅶୂ ቮख़ࣩGraph֓೦ SQL҃ҰൠKey/ValeతNoSQLቮෆ଍Ҏጯ෇ ٣ଠ๞ Tuesday, October 11, 11

Slide 15

Slide 15 text

How is the performance Tuesday, October 11, 11

Slide 16

Slide 16 text

Interested? Tuesday, October 11, 11

Slide 17

Slide 17 text

Connect Ruby / Python / Clojure / PHP / Java / Scala / Erlang / Groovy / Restful .... Rails / Grails / Griffon / Qi4j / Roo... Tuesday, October 11, 11

Slide 18

Slide 18 text

Clients PHP - Thrift / Protobuffers / PHP- Java Bridge Ruby - JRuby + Neo4j.rb Python - JPython / CPython + JCC / Neo4j.py Tuesday, October 11, 11

Slide 19

Slide 19 text

Some Examples Tuesday, October 11, 11

Slide 20

Slide 20 text

Remember It Relationship Node Node Tuesday, October 11, 11

Slide 21

Slide 21 text

Remember It Relationship Node Node Relationship Node Node Tuesday, October 11, 11

Slide 22

Slide 22 text

Relationship - FoF - 1 level me.outgoing(:friends).depth(1) Me Tuesday, October 11, 11

Slide 23

Slide 23 text

Relationship - FoF - 2 level me.outgoing(:friends).depth(2) Me Tuesday, October 11, 11

Slide 24

Slide 24 text

Relationship - FoF - 3 level me.outgoing(:friends).depth(3) Me Tuesday, October 11, 11

Slide 25

Slide 25 text

Relationship - FoF - n level me.outgoing(:friends).depth(n) Tuesday, October 11, 11

Slide 26

Slide 26 text

Filters filter / prune Evaluator - INCLUDE_AND_CONTINUE INCLUDE_AND_PRUNE EXCLUDE_AND_DISCONTINUE EXCLUDE_AND_CONTINUE Tuesday, October 11, 11

Slide 27

Slide 27 text

Complex Example FoF who lives in Taipei also like Jazz Taipei Me Jazz Lives Like Friend Tuesday, October 11, 11

Slide 28

Slide 28 text

Complex Example FoF who lives in Taipei also like Jazz Taipei Me Jazz Lives Like Friend Tuesday, October 11, 11

Slide 29

Slide 29 text

me.outgoing(:friend).depth(:all).filter{|path_to_m| path_to_m.end_node.outgoing(:lives).filter{|path_to_live| path_to_live==”Taipei” }.outgoing(:like).filter{|path_to_like| path_to_live==”Jazz” } } SQL ?&^@#%$@)JOIN *&@^ JOIN *@^$ JOIN &@&# JOIN (*@#^ JOIN !&@ JOIN Neo4j Tuesday, October 11, 11

Slide 30

Slide 30 text

BranchSelector preorderDepthFirst - ਂ౓༏ઌ,ઌ႔ཧ postorderDepthFirst - ਂ౓༏ઌ,ޙ႔ཧ preorderBreadthFirst - ኍ౓༏ઌ,ઌ႔ཧ postorderBreadthFirst - ኍ౓༏ઌ,ޙ႔ཧ ਂ౓༏ઌ௨ৗֱ࢑༻هԱᱪ Tuesday, October 11, 11

Slide 31

Slide 31 text

Other CRUD Batch Insertion Range Query Compound Query Uniqueness Expand and more... Tuesday, October 11, 11

Slide 32

Slide 32 text

Caching File Buffer Cache Object Cache 5~10 times faster as file cache for read Memory eater Tuesday, October 11, 11

Slide 33

Slide 33 text

Scale - 1 Tuesday, October 11, 11

Slide 34

Slide 34 text

Scale - 2 Tuesday, October 11, 11

Slide 35

Slide 35 text

Web-Admin Dashboard Data Browser Console Tuesday, October 11, 11

Slide 36

Slide 36 text

Visual Tools Flare NeoClipse Arbor.js Dracula more... Tuesday, October 11, 11

Slide 37

Slide 37 text

Other Graph DB Dex OrientDB VertexDB Pregel - Very Mystery Allegro - Performance just fine FlockDB - One Layer, Based on MySQL InfiniteGraph Tuesday, October 11, 11

Slide 38

Slide 38 text

NoSQL খᡉ ໿㑌݄1࣍ ൒ओ୊ࣜަྲྀ ኍᬐ֤छNoSQL࢖༻ៃᱛ ᓣܴ૝ላश,༗࢖༻ៃᱛ,࢖༻ԙ㗞඼த,ߴख... Tuesday, October 11, 11

Slide 39

Slide 39 text

޻঎࣌ؒ 㑌ݸਓ౎ऐሚ,୞ੋఔ౓ෆಉ Tuesday, October 11, 11

Slide 40

Slide 40 text

޻঎࣌ؒ ೝࣝᡅಘိత৽๎༑ 㑌ݸਓ౎ऐሚ,୞ੋఔ౓ෆಉ Tuesday, October 11, 11

Slide 41

Slide 41 text

޻঎࣌ؒ Marketing Angel Investor Backend Engineer ೝࣝᡅಘိత৽๎༑ 㑌ݸਓ౎ऐሚ,୞ੋఔ౓ෆಉ Tuesday, October 11, 11

Slide 42

Slide 42 text

Q & A Blog : vonstark.co FB : facebook.com/vonstark Twitter : vonstark32 Contact : [email protected] Tuesday, October 11, 11