11. Neo4j 3.1: now in BETA
The Graph Foundation
for the Enterprise
Octobre 2016
12
12.
13. Neo4j 3.0 Recap APRIL 2016 RELEASE
Adoption-Focused Release Delivering New Graph Capabilities
DevelopersDevelopers
Develop
applications
faster and easier
ArchitectsArchitects
Design bigger
and
faster
applications
AdministratorsAdministrators
Deploy Neo4j
anywhere easily
Neo4j 3.0 enables and accelerates large-scale graph initiativesNeo4j 3.0 enables and accelerates large-scale graph initiatives
Giant graphs,
fast performance
Easy full-stack
development
Cloud, container
and on-premise
14
14. Introducing Neo4j 3.1
New Security and Clustering Architecture
Build and deploy graph applications
across
an entire enterprise
• Compliance with internal and external
enterprise Information Security
needs
• Robust and flexible new clustering
architecture for diverse operational
scenarios and application needs
A foundation that enables mainstream
enterprise solutions on-premises and
in the cloud
ENTERPRISE GRAPH FOUNDATIONENTERPRISE GRAPH FOUNDATION
Operational, Analytic, and Transactional UsesOperational, Analytic, and Transactional Uses
SecuritySecurity ClusteringClustering OperabilityOperability
Enterprise
Graph
Applications
Enterprise
Graph
Applications
15
The Graph Foundation for the Enterprise
16. Consistency with Graphs: A Different Challenge
Keeping Your Graph Intact is Essential for Graph Operations
Graphs with Causal
Consistency
Graphs with Eventual
Consistency
17
The graph transaction moves
together as one ACID transaction
with built-in safety
Guarantees Graph Consistency
Without ACID transactions,
the view of the graph & the data
itself becomes corrupted
Not Good Enough for Graphs
Non-
Native
Graph DB
17. Raft-based architecture
• Continuously available
• Consensus commits
• Third-generation cluster architecture
Cluster-aware stack
• Seamless integration among drivers,
Bolt protocol and cluster
• Eliminates need for external load balancer
• Stateful, cluster-aware sessions with
encrypted connections
Streamlined development
• Relieves developers from complex infrastructure
concerns
• Faster and easier to develop distributed graph
Neo4j Causal Clustering Architecture
Resilient, Modern, Fault-Tolerant. Guarantees Graph Safety.
18 ENTERPRISE
18. How Causal Clustering
Works
19
Replica
Servers
Query, View
Core
Servers
Synced
Cluster
Read
Replica
Read
Replica
Read-
Write
Read-
Write
Read
Replica
Read
Replica
Read-
Write
Read-
WriteRead
Replic
a
Read
Replic
a
Read
Replica
Reporting
and Analysis
Read
Replica
Reporting
and Analysis
Grap
h
App
Grap
h
App
Dr
iv
er
Dr
iv
er
B
O
L
T
B
O
L
T
W
ri
te
W
ri
te
R
e
a
d
R
e
a
d
Read
Replic
a
Read
Replic
a
Read
Replic
a
Read
Replic
a
Read
Replic
a
Read
Replic
a
Built-in load balancing
• Spreads reads to core and replica
servers
• Spreads writes across core servers
Causal consistency
• Always-consistent view of data at any
scale
• Stronger than eventual consistency
• Supports varying app SLAs
• Best model for graph transactions
Large heterogeneous clusters
• 1000+ instance clusters
• No dependence on master
avoids bottleneck
• Mix and match instance types
App servers, reporting servers,
IoT devices…
ENTERPRISE
19. R E P L I C A Q U E R I E SR E P L I C A Q U E R I E S C O R E Q U E R I E SC O R E Q U E R I E S
Causal Clustering Architecture Optimizes for
Cost-Consistency at Query Time
Read
Any
Read
Any
20
Read
Your Own
Writes
Read
Your Own
Writes
Read
Any
Read
Any
Read
Your Own
Writes
Read
Your Own
Writes
QUORATE
Q U E R Y C O S TQ U E R Y C O S T
ENTERPRISE
20. How Causally Consistent Reads Work
App ServerApp Server
DriverDriver
3:
Review
Profile
4: Create
an order
Async
Replicatio
n
Raft
Replicatio
n
1: Read
Product
Catalog
Core
Server
Core
Server
Replica
Server
App ServerApp Server
DriverDriver
App ServerApp Server
DriverDriver
ENTERPRISE
2. Create
Account
5:
Review
orders
How it Works:
• Application chooses a consistency level
“Read Any” vs “Read your own writes”
• Cluster chooses appropriate members
Default optimizes for scalability
(i.e. read replica server for reads)
Causal Clustering Enables:
• Application-driven SLAs
• Optimizing for freshness vs. cost
• Tunability within an application
On an application & session basis
1: Read any replica | 2: Write [Tx 101] | 3: RYOW*[Tx 101] | 4: Write [Tx 102] | 5: RYOW [Tx 102]
21. Consistency with Causal Clustering
22
Expected Consistency Behavior
NoSQL
Eventual
Consistency
Neo4j
Causal
Consistenc
y
Every single server is eventually updated
View of related data is always consistent
Users reading and re-reading data always see the
same data
Unless there have been intervening updates by
others
Users writing and updating data always see the
latest data
Unless there have been intervening updates by
others
ENTERPRISE
22. Satisfy enterprise admin and
database security requirements
• Flexible authentication options
ActiveDirectory/LDAP or Native users
• Role-based Authorization
• List and kill running queries
• Access controls for User-Defined
Procedures
Enables subgraph access control
• Query logging and Security event
logging
Passes through originating end user
• Extendable Auth plugin Architecture
Official Kerberos support in near
future
23
Neo4j Security Foundation
Enterprise-Class Security and Control
P R E D E F I N E D R O L E S
Privileges
Reade
r
Publish
er
Archite
ct
Admin
Change own password • • • •
Read data • • • •
View own details • • • •
Terminate own query • • • •
Write/update/delete
data
• • •
Manage
index/constraints
• •
Terminate others’
queries
•
ENTERPRISE
23. Choose from several
authentication and
authorization methods
• Built-in native users repository
Enabled by default
• LDAP connector to Active
Directory
or openLDAP
• Custom auth provider plugins
24
Neo4j Security Foundation
Enterprise-Class Security and Control
Custom
Plugin
Custom
Plugin
Custom
Plugin
Custom
Plugin
Active DirectoryActive Directory openLDAPopenLDAP
LDAP
connecto
r
LDAP
connecto
r
Auth Plugin
Extension Module
Auth Plugin
Extension Module
Built-in
Native Users
Built-in
Native Users
Neo4jNeo4j
ENTERPRISE
24. Neo4j Security Foundation
Manage Running Queries with Admin UI in Neo4j Browser
25
List all running
queries with :qs
(soon
to be :queries)
List all running
queries with :qs
(soon
to be :queries)
List query string
with parameters
and transaction
metadata
List query string
with parameters
and transaction
metadata
Users can only see and
terminate their own
queries
Users can only see and
terminate their own
queries
Terminate
selected
query
Terminate
selected
query
Admins can view and
terminate all running
queries across the cluster
Admins can view and
terminate all running
queries across the cluster
Track elapsed
time for queries
Track elapsed
time for queries
ENTERPRISE
25. Neo4j Security Foundation
Administer Users & Roles with Admin UI in Neo4j Browser
26
Add new user with
:server user add
Add new user with
:server user add
List all native
users with :server
user list
command
List all native
users with :server
user list
command
Assign roles when
creating users
Assign roles when
creating users
Suspend or
activate
users
Suspend or
activate
users
Delete
users
Delete
users
Add or remove
assigned roles to
existing users
Add or remove
assigned roles to
existing users
Enforce user
password change
at first login
Enforce user
password change
at first login
ENTERPRISE
26. Neo4j 3.1
Database Kernel and Operational Improvements
Execution guard
• Terminates long-running end-user queries
• Lets admins specify max query duration per
instance
Node and relationship ID allocation
(ENTERPRISE EDITION)
• Reallocates space from deleted records while
the database cluster is online
27
(a)-->(b)
New command-line interface
• Based on Bolt
• Enables ad-hoc querying and scripting
• Extends Neo4j Browser development to command
line
• Can run remotely with encrypted communication by
default
27. Neo4j 3.1
Schema Viewer
• Neo4j Schema Viewer
displays the graph
model at the current
point in time
• Uses exact database
statistics for instant
responsiveness
• Helps developers,
admins and users
understand and
communicate the
database contents
28
Built into the Neo4j Browser tool
28. Neo4j 3.1
User-Defined Functions
• Allows users to create their own functions and use them with Cypher
• Useful for expressing common computations, rules, conversions,
predicates
• Extends the Neo4j 3.0 Stored Procedure mechanism
Creating a UUID with a Stored Procedure vs.
with a Function