Advanced Neo4j Use Cases with the GraphAware Framework

33
GraphAware TM by Michal Bachman @graph_aware @bachmanm advanced Neo4j use cases GraphAware Framework

Transcript of Advanced Neo4j Use Cases with the GraphAware Framework

Page 1: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

by Michal Bachman !@graph_aware @bachmanm

advanced Neo4j use cases

GraphAware Framework

Page 2: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

Advanced Use Cases

GraphAware Framework (implementing advanced functionality)

GraphAware Framework Modules (built by us, used by you)

About this Talk

Page 3: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

Custom APIs

Transaction-Driven Behaviour

Asynchronous Computation

Advanced Use Cases

Page 4: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

Custom APIs

Transaction-Driven Behaviour

Asynchronous Computation

Advanced Use Cases

Page 5: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

a.k.a. “unmanaged extensions”

“Stored procedures” on steroids

Implemented and tested (!) in Java

Deployed with Neo4j (same lifecycle)

Custom APIs - What?

Page 6: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

Access to native Neo4j API (Java)

Performance

Locking

Too complex for Cypher

Functions missing in Cypher

Custom input/output format

Limit to read-only

Code to Data

Custom APIs - Why?

Page 7: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

GraphAware Framework makes it extremely easy to build, test, and deploy custom Neo4j APIs.

Custom APIs (How?)

Page 8: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

pure Spring MVC

test with GraphUnit

drop to plugins

restart Neo

Custom APIs - How? (GraphAware)

Page 9: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

representing time in Neo4j

storing and querying time series data

GraphAware TimeTree

Custom APIs - Example

Page 10: Advanced Neo4j Use Cases with the GraphAware Framework

from: "..@.."to: "..@.."text: "…"

Email

value: 24

Day

SENT_ON

value: 23

Day

value: 22

Day

NEXTNEXT

value: 4

Month

value: 5

Month

NEXTFIRST

LAST

CHILD

CHILD

CHILD

value: 2014

Year

FIRSTLAST

CHILD

CHILD

TimeTreeRoot

CHILD

FIRST

LAST

Page 11: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

TimeTree Demo

Page 12: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

Interlude: GraphUnit

Page 13: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

Page 14: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

Page 15: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

<dependency> <groupId>com.graphaware.neo4j</groupId> <artifactId>tests</artifactId> <version>2.1.5.25</version> <scope>test</scope> </dependency>

Getting GraphUnit

Page 16: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

Custom APIs

Transaction-Driven Behaviour

Asynchronous Computation

Advanced Use Cases

Page 17: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

Neo4j is fully ACID

“Triggers” on steroids

Implemented and tested (!) in Java

Transaction-Driven Behaviour - What?

Page 18: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

Integrations with other systems

In-graph indexing

Additional modifications

Schema enforcement

Transaction-Driven Behaviour - Why?

Page 19: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

GraphAware Framework makes it extremely easy to build, test, and deploy custom Transaction-Driven functionality.

Transaction-Driven Behaviour (How?)

Page 20: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

Tracking changes in your graph (demo)

Assigning a UUID to each node (demo)

Defining and enforcing constraints (wip)

Auditing

Transaction-Driven Behaviour - Examples

Page 21: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

Transaction-Driven Behaviour - Demo

Page 22: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

Custom APIs

Transaction-Driven Behaviour

Asynchronous Computation

Advanced Use Cases

Page 23: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

Neo4j is primarily OLTP

Requests drive transactions

How about background computation?

Asynchronous Computation - What?

Page 24: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

Interesting graph algorithms

Expensive in real-time

Can be approximate

Can be approximated

There are quiet periods / dedicated slaves

Asynchronous Computation - Why?

Page 25: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

GraphAware Framework makes it possible to build, test, and deploy functionality executed in the background during quiet periods.

Asynchronous Computation (How?)

Page 26: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

Page Rank

Recommendations

Similarities

Centralities

Statistics

Asynchronous Computation - Examples

Page 27: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

Asynchronous Computation - Demo

Page 28: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

GraphAware Framework makes it easy to build, test, and deploy generic as well as domain-specific functionality for Neo4j.

GraphAware Framework

Page 29: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

TimeTree

Algorithms

ChangeFeed

UUID

NodeRank

GraphAware Framework

Page 30: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

GraphUnit & RestTest

RelCount

WarmUp

Schema (wip)

Recommendation Engine (wip)

GraphAware Framework

Page 31: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

Open Source (GPL)

Active

Production Ready

Github (http://github.com/graphaware)

Our Web (http://graphaware.com)

Maven Central

GraphAware Framework

Page 32: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

Try it

Give us feedback

Contribute

Build Own Modules

Get in touch for consultancy / support

[email protected] / @graph_aware

GraphAware Framework

Page 33: Advanced Neo4j Use Cases with the GraphAware Framework

GraphAwareTM

www.graphaware.com @graph_aware @bachmanm

Thank You!