際際滷

際際滷Share a Scribd company logo
GraphAware Framework 
GraphAwareTM 
advanced Neo4j use cases 
by Michal Bachman 
! 
@graph_aware 
@bachmanm
Advanced Use Cases 
GraphAware Framework (implementing advanced functionality) 
GraphAware Framework Modules (built by us, used by you) 
GraphAwareTM 
About this Talk
GraphAwareTM 
Advanced Use Cases 
Custom APIs 
Transaction-Driven Behaviour 
Asynchronous Computation
GraphAwareTM 
Advanced Use Cases 
Custom APIs 
Transaction-Driven Behaviour 
Asynchronous Computation
GraphAwareTM 
Custom APIs - What? 
a.k.a. unmanaged extensions 
Stored procedures on steroids 
Implemented and tested (!) in Java 
Deployed with Neo4j (same lifecycle)
GraphAwareTM 
Custom APIs - Why? 
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
GraphAware Framework makes it extremely easy 
to build, test, and deploy custom Neo4j APIs. 
GraphAwareTM 
Custom APIs (How?)
Custom APIs - How? (GraphAware) 
GraphAwareTM 
pure Spring MVC 
test with GraphUnit 
drop to plugins 
restart Neo
GraphAwareTM 
Custom APIs - Example 
representing time in Neo4j 
storing and querying time series data 
GraphAware TimeTree
Email 
Month 
from: "..@.." 
to: "..@.." 
text: "" 
Year 
Day 
value: 24 
SENT_ON 
Month 
value: 4 
Day 
value: 23 
Day 
value: 22 
CHILD 
NEXT NEXT 
value: 5 
FIRST NEXT 
LAST 
CHILD 
CHILD 
value: 2014 
FIRST 
LAST 
CHILD 
CHILD 
TimeTreeRoot 
CHILD 
FIRST 
LAST
GraphAwareTM 
TimeTree Demo
GraphAwareTM 
Interlude: GraphUnit
GraphAwareTM
GraphAwareTM
GraphAwareTM 
Getting GraphUnit 
<dependency> 
<groupId>com.graphaware.neo4j</groupId> 
<artifactId>tests</artifactId> 
<version>2.1.5.25</version> 
<scope>test</scope> 
</dependency>
GraphAwareTM 
Advanced Use Cases 
Custom APIs 
Transaction-Driven Behaviour 
Asynchronous Computation
Transaction-Driven Behaviour - What? 
GraphAwareTM 
Neo4j is fully ACID 
Triggers on steroids 
Implemented and tested (!) in Java
Transaction-Driven Behaviour - Why? 
GraphAwareTM 
Integrations with other systems 
In-graph indexing 
Additional modifications 
Schema enforcement
Transaction-Driven Behaviour (How?) 
GraphAware Framework makes it extremely easy 
to build, test, and deploy custom Transaction- 
Driven functionality. 
GraphAwareTM
Transaction-Driven Behaviour - Examples 
GraphAwareTM 
Tracking changes in your graph (demo) 
Assigning a UUID to each node (demo) 
Defining and enforcing constraints (wip) 
Auditing
Transaction-Driven Behaviour - Demo 
GraphAwareTM
GraphAwareTM 
Advanced Use Cases 
Custom APIs 
Transaction-Driven Behaviour 
Asynchronous Computation
Asynchronous Computation - What? 
GraphAwareTM 
Neo4j is primarily OLTP 
Requests drive transactions 
How about background computation?
Asynchronous Computation - Why? 
GraphAwareTM 
Interesting graph algorithms 
Expensive in real-time 
Can be approximate 
Can be approximated 
There are quiet periods / dedicated slaves
Asynchronous Computation (How?) 
GraphAware Framework makes it possible to 
build, test, and deploy functionality executed in 
the background during quiet periods. 
GraphAwareTM
Asynchronous Computation - Examples 
GraphAwareTM 
Page Rank 
Recommendations 
Similarities 
Centralities 
Statistics
GraphAwareTM 
Asynchronous Computation - Demo
GraphAware Framework makes it easy to build, 
test, and deploy generic as well as domain-specific 
functionality for Neo4j. 
GraphAwareTM 
GraphAware Framework
GraphAwareTM 
GraphAware Framework 
TimeTree 
Algorithms 
ChangeFeed 
UUID 
NodeRank
GraphAwareTM 
GraphAware Framework 
GraphUnit & RestTest 
RelCount 
WarmUp 
Schema (wip) 
Recommendation Engine (wip)
GraphAwareTM 
GraphAware Framework 
Open Source (GPL) 
Active 
Production Ready 
Github (http://github.com/graphaware) 
Our Web (http://graphaware.com) 
Maven Central
GraphAwareTM 
GraphAware Framework 
Try it 
Give us feedback 
Contribute 
Build Own Modules 
Get in touch for consultancy / support 
info@graphaware.com / @graph_aware
Thank You! 
www.graphaware.com 
@graph_aware 
@bachmanm 
GraphAwareTM

More Related Content

Advanced Neo4j Use Cases with the GraphAware Framework