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

Pouring Coffee into the Matrix: Building Java Applications on Neo4j

Pouring Coffee into the Matrix: Building 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. We will interact with the graph data from the application, and explore some deployment possibilities. Join us to see how to amplify the power of connected data with applications!

10f2b035856eef2b59c02267e3ee9e63?s=128

Jennifer Reif

October 29, 2021
Tweet

Transcript

  1. Jennifer Reif Email: jennifer.reif@neo4j.com Twitter: @JMHReif LinkedIn: linkedin.com/in/jmhreif Github: GitHub.com/JMHReif

    Website: jmhreif.com Pouring Coffee into the Matrix Building Java applications on Neo4j
  2. Who Am I? • Developer • Continuous learner • Technical

    content writer • Conference speaker • Other: geek
  3. What is graph?

  4. What is a graph? • Set of discrete objects, each

    of which has some set of relationships with other objects Seven Bridges of Konigsberg problem. Leonhard Euler, 1735
  5. Shows how data is connected

  6. Have you ever? • Walked into a room and forgotten

    what you needed? • Left a possession somewhere, but can’t remember? • Written some code/requirement and forgotten why? Business: • Not sure where a bug/issue is coming from? • Don’t know the impacts of a device/system being down? • Unsure how your customers relate to their orders (or products purchased)?
  7. Enter stage right - graphs • Trace your steps •

    Document path (not just data) • Answering how and why • Not just who, what, and where • Understanding connections • Understand alternates, impacts, etc • Better assumptions, decisions
  8. Graph - an example Prospective Friend You Coffee Family Java

    Pets Reading Travel Food Music Sports Nightlife Drawing Music Gift: concert tickets Do together: cook Sell: Coffee
  9. Graph - another example ? ? ? ?

  10. A few graph use cases… Social network Fraud detection Network

    & IT operations Identity & access management Graph-based search
  11. What is the structure?

  12. Whiteboard friendliness

  13. Graph model

  14. Graph data

  15. Graph components • Node (vertex) • Objects Michael Jennifer Neo4j

    Graphs
  16. Graph components • Node (vertex) • Objects • Relationship (edge)

    • Connections Michael Jennifer Neo4j Graphs :LIKES :WORKS_FOR :IS_FRIENDS_WITH
  17. Developing applications

  18. 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
  19. 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, HTTP, or embedded
  20. Let’s see some code! Demo time!

  21. Resources • Source code: github.com/JMHReif/pouring-co ff ee-into-matrix • Spring Data

    Neo4j documentation: dev.neo4j.com/sdn-docs • SDN reactive: github.com/JMHReif/sdnrx-marvel-basic • Neo4j AuraDB: dev.neo4j.com/aura Jennifer Reif Email: jennifer.reif@neo4j.com Twitter: @JMHReif LinkedIn: linkedin.com/in/jmhreif Github: GitHub.com/JMHReif Website: jmhreif.com