betting the company (literally) on a graph database – aseem kishore @ graphconnect ny 2013
DESCRIPTION
Aseem Kishore of FiftyThree will be speaking about his experiences building an early-stage startup, The Thingdom, on Neo4j and Node.js: why he and his team chose to build on a graph database, how they did it, and what lessons they learned along the way.TRANSCRIPT
BETTING THE COMPANY(LITERALLY) ON A
GRAPH DATABASETIPS, TRICKS, AND LESSONS LEARNED
Aseem KishoreJan–Nov 2013
START user=node(1), other=node(2)
MATCH (user) -[r1:has|wants]-> (thing) <-[r2:has|wants]- (other)
WHERE TYPE(r1) <> TYPE(r2)
RETURN TYPE(r1), TYPE(r2), thing
SO…
JUST WHAT IS AGRAPH DATABASE?
# adjacency list:
nodes = List<Node>
neighbors = Map<Node, List<Node>>
neighbors[node1].add(node2)
# adjacency matrix:
nodes = List<Node>
connections = Map<Node, Map<Node, bool>>
connections[node1][node2] = true
OKAY...
LET'S TALK ABOUTWHAT WE LEARNED
OUR USAGE
NODE.JS+
REST API+
CYPHER
WHAT WE LEARNEDUnique, expressive relationship types
WHAT WE LEARNEDUnique, expressive relationship types
Cache stats where possible
WHAT WE LEARNEDUnique, expressive relationship types
Cache stats where possible
Capture history through event nodes
WHAT WE LEARNEDUnique, expressive relationship types
Cache stats where possible
Capture history through event nodes
First-class objects nodes, not rels
WHAT WE LEARNEDUnique, expressive relationship types
Cache stats where possible
Capture history through event nodes
First-class objects nodes, not rels
Connected data nodes, not props
WHAT WE LEARNEDUnique, expressive relationship types
Cache stats where possible
Capture history through event nodes
First-class objects nodes, not rels
Connected data nodes, not props
Maintain linked lists for O(1) queries
NEO4J 2.0+Labels & constraints
Relationship type grouping
Transactional Cypher
Automatic sharding?
AND CHECK OUT...
(MySQL)—[:TO]—>(Neo4j)A DBA PERSPECTIVEDAVE STERN @ 11:30