Neo4j Graph Database      From PHP  February 28, 2013   Confoo 2013, Montréal
How I got here                     R.I.P.Had a short life, but left before it was too late.
Why Neo4j?●   Simple set-up●   Well documented●   Open source●   ... with “Enterprise” support●   Not purely academic
What is a graph database?A database providing persistance for graphs.
Ok, but what is a graph?
Ok, but what is a graph?
Neo4j            Out of the BoxData: http://www.neo4j.org/develop/example_data
Gremlin●   Provides control over the traversal    algorithm●   Pipe & Filter – similar to jQuery●   Works across different...
Gremling.v(1) .in(COMPANION_OF)  .out(APPEARED_IN)  .has(title, "The Doctors Daughter") .back(2)
Gremlin●   Can modify the graph●   Allows to run arbitrary code●   Implementation not as stable in Neo4j
CypherSTART doctor = node(1)MATCH doctor <-[:COMPANION_OF]- companion, companion -[:APPEARED_IN]-> episodeWHERE episode.ti...
Enough theoryNeo4j in action
REST API●   JSON over HTTP●   Well supported●   Used by the web admin●   Meaningful work requires many HTTP    requests●  ...
everyman/neo4jphp●   Complete? REST API implementation●   Basic wrappers for all components●   https://github.com/jadell/n...
everyman/neo4jphp    Pros:                 Cons:●   Well maintained   ●   Tedious API●   Good              ●   Error-prone...
hirevoice/neo4jphp-ogm●   Bias: I am the author●   Inspired by Doctrine●   Uses annotations on classes●   Built on top of ...
hirevoice/neo4jphp-ogm    Pros:                        Cons:●   Fast (bulk operations)   ●   Supported by me●   Feels like...
Others●   neoxygen/updown●   neoxygen/neox●   neoxygen/GraphQuest
Demo                 Codehttps://github.com/lphuberdeau/confoo-demo
ContactLouis-Philippe Huberdeau      lp@huberdeau.info
Upcoming SlideShare
Loading in …5
×

Neo4j Graph Database, from PHP

8,416 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
8,416
On SlideShare
0
From Embeds
0
Number of Embeds
67
Actions
Shares
0
Downloads
36
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Neo4j Graph Database, from PHP

  1. 1. Neo4j Graph Database From PHP February 28, 2013 Confoo 2013, Montréal
  2. 2. How I got here R.I.P.Had a short life, but left before it was too late.
  3. 3. Why Neo4j?● Simple set-up● Well documented● Open source● ... with “Enterprise” support● Not purely academic
  4. 4. What is a graph database?A database providing persistance for graphs.
  5. 5. Ok, but what is a graph?
  6. 6. Ok, but what is a graph?
  7. 7. Neo4j Out of the BoxData: http://www.neo4j.org/develop/example_data
  8. 8. Gremlin● Provides control over the traversal algorithm● Pipe & Filter – similar to jQuery● Works across different graph databases● Based on Groovy (limited to Java)
  9. 9. Gremling.v(1) .in(COMPANION_OF) .out(APPEARED_IN) .has(title, "The Doctors Daughter") .back(2)
  10. 10. Gremlin● Can modify the graph● Allows to run arbitrary code● Implementation not as stable in Neo4j
  11. 11. CypherSTART doctor = node(1)MATCH doctor <-[:COMPANION_OF]- companion, companion -[:APPEARED_IN]-> episodeWHERE episode.title = "The Doctors Daughter"RETURN companion, companion.character
  12. 12. Enough theoryNeo4j in action
  13. 13. REST API● JSON over HTTP● Well supported● Used by the web admin● Meaningful work requires many HTTP requests● http://docs.neo4j.org/chunked/stable/rest-api.html
  14. 14. everyman/neo4jphp● Complete? REST API implementation● Basic wrappers for all components● https://github.com/jadell/neo4jphp/wiki
  15. 15. everyman/neo4jphp Pros: Cons:● Well maintained ● Tedious API● Good ● Error-prone documentation ● Low-level● Predictable behavior
  16. 16. hirevoice/neo4jphp-ogm● Bias: I am the author● Inspired by Doctrine● Uses annotations on classes● Built on top of everyman/neo4jphp● https://github.com/lphuberdeau/Neo4j-PHP-OGM
  17. 17. hirevoice/neo4jphp-ogm Pros: Cons:● Fast (bulk operations) ● Supported by me● Feels like Doctrine ● Skim● Benefits from type documentation checking ● Implementation still● Well tested partial● Bundles and modules available (many)
  18. 18. Others● neoxygen/updown● neoxygen/neox● neoxygen/GraphQuest
  19. 19. Demo Codehttps://github.com/lphuberdeau/confoo-demo
  20. 20. ContactLouis-Philippe Huberdeau lp@huberdeau.info

×