SlideShare a Scribd company logo
1 of 20
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 Box
Data: http://www.neo4j.org/develop/example_data
Gremlin
●   Provides control over the traversal
    algorithm
●   Pipe & Filter – similar to jQuery
●   Works across different graph databases
●   Based on Groovy (limited to Java)
Gremlin

g.v(1)
 .in('COMPANION_OF')
  .out('APPEARED_IN')
  .has('title', "The Doctor's Daughter")
 .back(2)
Gremlin
●   Can modify the graph
●   Allows to run arbitrary code
●   Implementation not as stable in Neo4j
Cypher

START doctor = node(1)
MATCH
 doctor <-[:COMPANION_OF]- companion,
 companion -[:APPEARED_IN]-> episode
WHERE
 episode.title = "The Doctor's Daughter"
RETURN companion, companion.character
Enough theory

Neo4j in action
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
everyman/neo4jphp
●   Complete? REST API implementation
●   Basic wrappers for all components
●   https://github.com/jadell/neo4jphp/wiki
everyman/neo4jphp

    Pros:                 Cons:
●   Well maintained   ●   Tedious API
●   Good              ●   Error-prone
    documentation     ●   Low-level
●   Predictable
    behavior
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
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)
Others
●   neoxygen/updown
●   neoxygen/neox
●   neoxygen/GraphQuest
Demo




                 Code
https://github.com/lphuberdeau/confoo-demo
Contact



Louis-Philippe Huberdeau
      lp@huberdeau.info

More Related Content

What's hot

Php Inspections (EA Extended): The Cookbook
Php Inspections (EA Extended): The CookbookPhp Inspections (EA Extended): The Cookbook
Php Inspections (EA Extended): The CookbookVladimir Reznichenko
 
TDD in Go with Ginkgo and Gomega
TDD in Go with Ginkgo and GomegaTDD in Go with Ginkgo and Gomega
TDD in Go with Ginkgo and GomegaEddy Reyes
 
Behaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with DrupalBehaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with Drupalsmithmilner
 
TDD with Python and App Engine
TDD with Python and App EngineTDD with Python and App Engine
TDD with Python and App EngineRicardo Bánffy
 
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...César Hernández
 
Phpactor and VIM
Phpactor and VIMPhpactor and VIM
Phpactor and VIMdantleech
 
Aprende, contribuye, y surfea Cloud Native Java - GuateJUG 2021
Aprende, contribuye, y surfea Cloud Native Java - GuateJUG 2021Aprende, contribuye, y surfea Cloud Native Java - GuateJUG 2021
Aprende, contribuye, y surfea Cloud Native Java - GuateJUG 2021César Hernández
 
Patterns: The new Javascript framweork
Patterns: The new Javascript framweorkPatterns: The new Javascript framweork
Patterns: The new Javascript framweorkFranco Pellegrini
 
Civilized Git Process
Civilized Git ProcessCivilized Git Process
Civilized Git ProcessTu Hoang
 
Test Driven Development (TDD) with Windows PowerShell
Test Driven Development (TDD) with Windows PowerShellTest Driven Development (TDD) with Windows PowerShell
Test Driven Development (TDD) with Windows PowerShellHemmerling
 
Continuous Integration In Php
Continuous Integration In PhpContinuous Integration In Php
Continuous Integration In PhpWilco Jansen
 
Behaviour Driven Development Hands-on
Behaviour Driven Development Hands-onBehaviour Driven Development Hands-on
Behaviour Driven Development Hands-onHemmerling
 
Understanding how concurrency work in os
Understanding how concurrency work in osUnderstanding how concurrency work in os
Understanding how concurrency work in osGenchiLu1
 
PHPUnit Automated Unit Testing Framework
PHPUnit Automated Unit Testing FrameworkPHPUnit Automated Unit Testing Framework
PHPUnit Automated Unit Testing FrameworkDave Ross
 
PHPUnit with Magento
PHPUnit with MagentoPHPUnit with Magento
PHPUnit with MagentoTu Hoang
 
Using Mountebank to inject behavior into test stubs
Using Mountebank to inject behavior into test stubsUsing Mountebank to inject behavior into test stubs
Using Mountebank to inject behavior into test stubsAndré Diegues Rodrigues
 
Secure Your Pipeline While Keeping Your Developers and Admins Happy
Secure Your Pipeline While Keeping Your Developers and Admins HappySecure Your Pipeline While Keeping Your Developers and Admins Happy
Secure Your Pipeline While Keeping Your Developers and Admins HappyDevOps.com
 

What's hot (20)

Php Inspections (EA Extended): The Cookbook
Php Inspections (EA Extended): The CookbookPhp Inspections (EA Extended): The Cookbook
Php Inspections (EA Extended): The Cookbook
 
TDD in Go with Ginkgo and Gomega
TDD in Go with Ginkgo and GomegaTDD in Go with Ginkgo and Gomega
TDD in Go with Ginkgo and Gomega
 
Behaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with DrupalBehaviour Testing and Continuous Integration with Drupal
Behaviour Testing and Continuous Integration with Drupal
 
TDD with Python and App Engine
TDD with Python and App EngineTDD with Python and App Engine
TDD with Python and App Engine
 
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
 
Go at Skroutz
Go at SkroutzGo at Skroutz
Go at Skroutz
 
Phpactor and VIM
Phpactor and VIMPhpactor and VIM
Phpactor and VIM
 
Aprende, contribuye, y surfea Cloud Native Java - GuateJUG 2021
Aprende, contribuye, y surfea Cloud Native Java - GuateJUG 2021Aprende, contribuye, y surfea Cloud Native Java - GuateJUG 2021
Aprende, contribuye, y surfea Cloud Native Java - GuateJUG 2021
 
Goodpractice
GoodpracticeGoodpractice
Goodpractice
 
Patterns: The new Javascript framweork
Patterns: The new Javascript framweorkPatterns: The new Javascript framweork
Patterns: The new Javascript framweork
 
Cpu profiling
Cpu profilingCpu profiling
Cpu profiling
 
Civilized Git Process
Civilized Git ProcessCivilized Git Process
Civilized Git Process
 
Test Driven Development (TDD) with Windows PowerShell
Test Driven Development (TDD) with Windows PowerShellTest Driven Development (TDD) with Windows PowerShell
Test Driven Development (TDD) with Windows PowerShell
 
Continuous Integration In Php
Continuous Integration In PhpContinuous Integration In Php
Continuous Integration In Php
 
Behaviour Driven Development Hands-on
Behaviour Driven Development Hands-onBehaviour Driven Development Hands-on
Behaviour Driven Development Hands-on
 
Understanding how concurrency work in os
Understanding how concurrency work in osUnderstanding how concurrency work in os
Understanding how concurrency work in os
 
PHPUnit Automated Unit Testing Framework
PHPUnit Automated Unit Testing FrameworkPHPUnit Automated Unit Testing Framework
PHPUnit Automated Unit Testing Framework
 
PHPUnit with Magento
PHPUnit with MagentoPHPUnit with Magento
PHPUnit with Magento
 
Using Mountebank to inject behavior into test stubs
Using Mountebank to inject behavior into test stubsUsing Mountebank to inject behavior into test stubs
Using Mountebank to inject behavior into test stubs
 
Secure Your Pipeline While Keeping Your Developers and Admins Happy
Secure Your Pipeline While Keeping Your Developers and Admins HappySecure Your Pipeline While Keeping Your Developers and Admins Happy
Secure Your Pipeline While Keeping Your Developers and Admins Happy
 

Similar to Neo4j Graph Database, from PHP

Xdebug and Drupal8 tests (PhpUnit and Simpletest)
Xdebug and Drupal8 tests (PhpUnit and Simpletest)Xdebug and Drupal8 tests (PhpUnit and Simpletest)
Xdebug and Drupal8 tests (PhpUnit and Simpletest)Francisco José Seva Mora
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsGR8Conf
 
apacheairflow-160827123852.pdf
apacheairflow-160827123852.pdfapacheairflow-160827123852.pdf
apacheairflow-160827123852.pdfvijayapraba1
 
Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8Sam Becker
 
Introduction to ZooKeeper - TriHUG May 22, 2012
Introduction to ZooKeeper - TriHUG May 22, 2012Introduction to ZooKeeper - TriHUG May 22, 2012
Introduction to ZooKeeper - TriHUG May 22, 2012mumrah
 
Performance Profiling Tools and Tricks
Performance Profiling Tools and TricksPerformance Profiling Tools and Tricks
Performance Profiling Tools and TricksPhase2
 
Performance Profiling Tools & Tricks
Performance Profiling Tools & TricksPerformance Profiling Tools & Tricks
Performance Profiling Tools & TricksAll Things Open
 
Vietnam qa meetup
Vietnam qa meetupVietnam qa meetup
Vietnam qa meetupSyam Sasi
 
Codeception: introduction to php testing
Codeception: introduction to php testingCodeception: introduction to php testing
Codeception: introduction to php testingEngineor
 
Lighning Talk: PHP build process
Lighning Talk: PHP build processLighning Talk: PHP build process
Lighning Talk: PHP build processBryan Agee
 
PHP 5.6 New and Deprecated Features
PHP 5.6  New and Deprecated FeaturesPHP 5.6  New and Deprecated Features
PHP 5.6 New and Deprecated FeaturesMark Niebergall
 
Xdebug for Beginners
Xdebug for BeginnersXdebug for Beginners
Xdebug for BeginnersSean Prunka
 
An OpenShift Migration: From 3.9 to 4.5
An OpenShift Migration: From 3.9 to 4.5An OpenShift Migration: From 3.9 to 4.5
An OpenShift Migration: From 3.9 to 4.5Everett Toews
 
Introduction to OPA
Introduction to OPAIntroduction to OPA
Introduction to OPAKnoldus Inc.
 
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012Blend Interactive
 
Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)Engineor
 
2014 11 20 Drupal 7 -> 8 test migratie
2014 11 20 Drupal 7 -> 8 test migratie2014 11 20 Drupal 7 -> 8 test migratie
2014 11 20 Drupal 7 -> 8 test migratiehcderaad
 

Similar to Neo4j Graph Database, from PHP (20)

Xdebug and Drupal8 tests (PhpUnit and Simpletest)
Xdebug and Drupal8 tests (PhpUnit and Simpletest)Xdebug and Drupal8 tests (PhpUnit and Simpletest)
Xdebug and Drupal8 tests (PhpUnit and Simpletest)
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails Projects
 
apacheairflow-160827123852.pdf
apacheairflow-160827123852.pdfapacheairflow-160827123852.pdf
apacheairflow-160827123852.pdf
 
Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8
 
Apache Airflow
Apache AirflowApache Airflow
Apache Airflow
 
Introduction to ZooKeeper - TriHUG May 22, 2012
Introduction to ZooKeeper - TriHUG May 22, 2012Introduction to ZooKeeper - TriHUG May 22, 2012
Introduction to ZooKeeper - TriHUG May 22, 2012
 
Performance Profiling Tools and Tricks
Performance Profiling Tools and TricksPerformance Profiling Tools and Tricks
Performance Profiling Tools and Tricks
 
Performance Profiling Tools & Tricks
Performance Profiling Tools & TricksPerformance Profiling Tools & Tricks
Performance Profiling Tools & Tricks
 
Vietnam qa meetup
Vietnam qa meetupVietnam qa meetup
Vietnam qa meetup
 
Codeception: introduction to php testing
Codeception: introduction to php testingCodeception: introduction to php testing
Codeception: introduction to php testing
 
Lighning Talk: PHP build process
Lighning Talk: PHP build processLighning Talk: PHP build process
Lighning Talk: PHP build process
 
PHP 5.6 New and Deprecated Features
PHP 5.6  New and Deprecated FeaturesPHP 5.6  New and Deprecated Features
PHP 5.6 New and Deprecated Features
 
Xdebug for Beginners
Xdebug for BeginnersXdebug for Beginners
Xdebug for Beginners
 
NodeJS
NodeJSNodeJS
NodeJS
 
An OpenShift Migration: From 3.9 to 4.5
An OpenShift Migration: From 3.9 to 4.5An OpenShift Migration: From 3.9 to 4.5
An OpenShift Migration: From 3.9 to 4.5
 
OpenCV Workshop
OpenCV WorkshopOpenCV Workshop
OpenCV Workshop
 
Introduction to OPA
Introduction to OPAIntroduction to OPA
Introduction to OPA
 
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
 
Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)
 
2014 11 20 Drupal 7 -> 8 test migratie
2014 11 20 Drupal 7 -> 8 test migratie2014 11 20 Drupal 7 -> 8 test migratie
2014 11 20 Drupal 7 -> 8 test migratie
 

Recently uploaded

Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 

Recently uploaded (20)

Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 

Neo4j Graph Database, from PHP

  • 1. Neo4j Graph Database From PHP February 28, 2013 Confoo 2013, Montréal
  • 2. How I got here R.I.P. Had a short life, but left before it was too late.
  • 3. Why Neo4j? ● Simple set-up ● Well documented ● Open source ● ... with “Enterprise” support ● Not purely academic
  • 4. What is a graph database? A database providing persistance for graphs.
  • 5. Ok, but what is a graph?
  • 6. Ok, but what is a graph?
  • 7. Neo4j Out of the Box Data: http://www.neo4j.org/develop/example_data
  • 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. Gremlin g.v(1) .in('COMPANION_OF') .out('APPEARED_IN') .has('title', "The Doctor's Daughter") .back(2)
  • 10. Gremlin ● Can modify the graph ● Allows to run arbitrary code ● Implementation not as stable in Neo4j
  • 11. Cypher START doctor = node(1) MATCH doctor <-[:COMPANION_OF]- companion, companion -[:APPEARED_IN]-> episode WHERE episode.title = "The Doctor's Daughter" RETURN companion, companion.character
  • 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. everyman/neo4jphp ● Complete? REST API implementation ● Basic wrappers for all components ● https://github.com/jadell/neo4jphp/wiki
  • 15. everyman/neo4jphp Pros: Cons: ● Well maintained ● Tedious API ● Good ● Error-prone documentation ● Low-level ● Predictable behavior
  • 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. 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. Others ● neoxygen/updown ● neoxygen/neox ● neoxygen/GraphQuest
  • 19. Demo Code https://github.com/lphuberdeau/confoo-demo
  • 20. Contact Louis-Philippe Huberdeau lp@huberdeau.info