the graph revolution
Post on 14-Jul-2015
737 Views
Preview:
TRANSCRIPT
The GraphrevolutionHow to change the way you think about NSFs and achieve Nirvana
Nathan T Freeman - #ChiefArchitect @RedPillDevelopment
Mission
productive
problems
mind
The Numbers Problem
Thousands of data silos (NSFs)
Hundreds of indexes in each
Thousands of documents in each
The Logic Problem
Data schemas in the UI
Limited serialization
Relationships are a lot of work
What is a graph?
Elements (vertexes and edges)
Key/Value pairs
Index-free adjacency
Why use graphs?
Speed Scalability Intuitive
People graph
Nathan
knows
Mac
Movie graph
portrays
appearsIn
stars
The Matrix Keanu
Reeves
Neo
What is an nsf?
Documents
Item-value pairs Appalling bad indices
Graph & NSF
Openntf domino api
Documents with keys (Serializable -> MD5 -> UNID)
Auto-type coercion
Document implements Map<String, Object>
includes Document.get(“fname + \” \” lname”)
A Single nsf with…
Hundreds of thousands of vertices
Millions of edges
A question…If each Vertex is a Document, why can’t every Document be a Vertex?
The dream
Tens of millions of enterprise documents.
Decades of accumulated knowledge.
One big warehouse.
No migration required.
Implementation 2.0
Vertices need models; models are hard.
Graph must consume many NSFs
UniversalID not enough; need MetaversalID
Can’t modify some Vertices
Tinkerpop.frames@TypeField("form")
@TypeValue("Person")
public interface User extends VertexFrame {
• @TypedProperty("FirstName")
• public String getFirstName();
• @TypedProperty("FirstName")
• public void setFirstName(String firstName);
• @IncidenceUnique(label = “likes”)
• public Iterable<Edge> getLikes();
• @IncidenceUnique(label = “likes”)
• public Edge addLikes(Vertex vertex);
}
Graph sharding
One graph can have many element stores (NSFs)
Element stores based on Frame interfaces
Stores respect ACLs and can cross servers
Can store vertexes and/or edges
Proxy shards separate graph data from core properties
Metaversalids
ReplicaID + UniversalID
16 char hex + 32 char hex = bulky
16 char hex = 64-bit number AKA long
long[3] can hold same information
NoteCoordinate (x,y,z)
Stores as byte[24]
The Numbers Problem
Thousands of data silos (NSFs)
Hundreds of indexes in each
Thousands of documents in each
Millions of vertexes across the enterprise
No indexes needed
The Logic Problem
Schemas are defined with Java interfaces
Anything can be written to any key/value pair
Relationships are trivial
Mission
productive
problems
mind
top related