Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Pouring Coffee into the Matrix: Java Applications on Neo4j

Pouring Coffee into the Matrix: Java Applications on Neo4j

Many of us have built applications for traditional data structures (like relational database tables), but is it different for graph data stores? In this session, we will cover a brief intro to graphs and build a typical Java application for a graph database. See how to amplify the power of connected data with applications!

Jennifer Reif

February 25, 2022
Tweet

More Decks by Jennifer Reif

Other Decks in Technology

Transcript

  1. Jennifer Reif
    Email: [email protected]
    Twitter: @JMHReif
    LinkedIn: linkedin.com/in/jmhreif
    Github: github.com/JMHReif
    Website: jmhreif.com
    Pouring Coffee into the Matrix
    Java applications on Neo4j

    View Slide

  2. Who Am I?
    • Developer + Advocate

    • Continuous learner

    • Technical content writer

    • Conference speaker

    • Other: geek
    Jennifer Reif
    Email: [email protected]
    Twitter: @JMHReif
    LinkedIn: linkedin.com/in/jmhreif
    Github: github.com/JMHReif
    Website: jmhreif.com

    View Slide

  3. What is graph?

    View Slide

  4. What is a graph?
    • Graph much older than technology of the last decade…

    • Arose from solution need (then and now)
    Seven Bridges of Konigsberg problem. Leonhard Euler, 1735

    View Slide

  5. Java domain
    • Find
    fi
    eld changes between Java 17 and Java 8?

    • Update doc URL for a Class

    • Find most similar di
    ff
    s (which a
    ff
    ected same components)

    View Slide

  6. Enter stage right - graphs
    • Document path (not just data)

    • Answering how and why

    • Understanding connections

    • Find alternates, impacts, etc

    • Produce better assumptions, decisions

    View Slide

  7. Understanding the model

    View Slide

  8. Whiteboard friendliness

    View Slide

  9. Graph data

    View Slide

  10. Graph components
    • Node (vertex)

    • Objects
    Michael
    Jennifer
    Neo4j
    Graphs

    View Slide

  11. Graph components
    • Node (vertex)

    • Objects

    • Relationship (edge)

    • Connections
    Michael
    Jennifer
    Neo4j
    Graphs
    :LIKES
    :WORKS_FOR
    :IS_FRIENDS_WITH

    View Slide

  12. Developing applications

    View Slide

  13. Language drivers
    • Neo4j Java driver (o
    ffi
    cial)

    • Spring Data Neo4j

    • Uses Neo4j Java driver at base

    • Other options:

    • O
    ffi
    cial drivers-> Python, JavaScript, Go, .NET

    • Java frameworks-> Quarkus, Helidon, Micronaut, etc

    View Slide

  14. Spring provisions
    • Spring Initializr

    • Spring Boot’s reduction of boilerplate

    • Annotation-based OGM for POJOs

    • Query derivation + DSL for custom (Cypher)

    • Spring Data’s easy connection to Neo4j

    • BOLT

    View Slide

  15. Let’s see some code!
    Demo time!

    View Slide

  16. Resources
    • Source code: github.com/JMHReif/pouring-co
    ff
    ee-into-matrix-lombok

    • Spring Data Neo4j documentation: dev.neo4j.com/sdn-docs

    • SDN reactive: github.com/JMHReif/sdnrx-marvel-basic

    • Neo4j AuraDB: dev.neo4j.com/aura (FREE instance!)
    Jennifer Reif
    Email: [email protected]
    Twitter: @JMHReif
    LinkedIn: linkedin.com/in/jmhreif
    Github: GitHub.com/JMHReif
    Website: jmhreif.com

    View Slide