Graph Databases What makes them Different ? www.objectivity.com - - PowerPoint PPT Presentation

graph databases what makes them different
SMART_READER_LITE
LIVE PREVIEW

Graph Databases What makes them Different ? www.objectivity.com - - PowerPoint PPT Presentation

Graph Databases What makes them Different ? www.objectivity.com Darren Wood Chief Architect, InfiniteGraph NoSQL Data Specialists Everyone specializes Doctors, Lawyers, Bankers, Developers Why was data so


slide-1
SLIDE 1

www.objectivity.com

Graph Databases What makes them Different ?

Darren Wood Chief Architect, InfiniteGraph

slide-2
SLIDE 2

NoSQL ¡– ¡Data ¡Specialists ¡

  • Everyone specializes

– Doctors, Lawyers, Bankers, Developers 

  • Why was data so normalized for so long !
  • NoSQL is all about the data specialist
  • Specializing in…

– Distribution / deployment – Physical data storage – Logical data model – Query mechanism

slide-3
SLIDE 3

Polyglot ¡NoSQL ¡Architectures ¡

Distributed ¡Data ¡ Processing ¡ Pla;orm ¡ Document ¡ Graph ¡ Database ¡ RDBMS ¡ ParAAoned ¡Distributed ¡DB ¡(oCen ¡Document ¡/ ¡KV) ¡

Users ¡

ApplicaAons ¡

External ¡/ ¡Legacy ¡Data ¡

TransformaAon ¡\ ¡MDM ¡

Business ¡

slide-4
SLIDE 4

The Physical Data Model

  • Becoming a relationship specialist…

MeeAngs ¡ P1 ¡ Place ¡ Time ¡ P2 ¡ Alice ¡ Denver ¡ 5-­‑27-­‑10 ¡ Bob ¡ Calls ¡ From ¡ Time ¡ DuraAon ¡ To ¡ Bob ¡ 13:20 ¡ 25 ¡ Carlos ¡ Bob ¡ 17:10 ¡ 15 ¡ Charlie ¡ Payments ¡ From ¡ Date ¡ Amount ¡ To ¡ Carlos ¡ 5-­‑12-­‑10 ¡ 100000 ¡ Charlie ¡ Met ¡ 5-­‑27-­‑10 ¡ Alice ¡ Called ¡ 13:20 ¡ Bob ¡ Paid ¡ 100000 ¡ Carlos ¡ Charlie ¡ Called ¡ 17:10 ¡

Rows/Columns/Tables Relationship/Graph Optimized

slide-5
SLIDE 5

Navigational Query Performance

slide-6
SLIDE 6

Scaling ¡Writes ¡

  • Big/Fast ¡data ¡demands ¡write ¡performance ¡
  • Most ¡NoSQL ¡soluAons ¡allow ¡you ¡to ¡scale ¡

writes ¡by… ¡

– ParAAoning ¡the ¡data ¡ – Understanding ¡your ¡consistency ¡requirements ¡ – Allowing ¡you ¡to ¡defer ¡conflicts ¡ ¡

slide-7
SLIDE 7

Scaling Graph Writes

ACID Transactions

InfiniteGraph ¡ ObjecAvity/DB ¡Persistence ¡Layer ¡ App-­‑1 ¡ (Ingest ¡V1) ¡ App-­‑2 ¡ (Ingest ¡V2) ¡ App-­‑3 ¡ (Ingest ¡V3) ¡

V1 ¡ V2 ¡ V3 ¡

App-­‑1 ¡ (E1 ¡2{ ¡V1V2}) ¡ App-­‑2 ¡ (E23{ ¡V2V3}) ¡ App-­‑3 ¡

E12 ¡ E23 ¡

slide-8
SLIDE 8

High Performance Edge Ingest

IG ¡Core/API ¡

C1 ¡ C2 ¡ C3 ¡ E12 ¡ E23 ¡

Target ¡Containers ¡ Pipeline ¡Containers ¡

E(1-­‑>2) ¡ E(3-­‑>1) ¡ E(2-­‑>3) ¡ E(2-­‑>1) ¡ E(2-­‑>3) ¡ E(3-­‑>1) ¡ E(1-­‑>2) ¡ E(3-­‑>2) ¡ E(1-­‑>2) ¡ E(2-­‑>3) ¡ E(3-­‑>1) ¡ E(2-­‑>1) ¡ E(2-­‑>3) ¡ E(3-­‑>1) ¡ E(3-­‑>2) ¡ E(1-­‑>2) ¡

Pipeline ¡ Agent ¡

slide-9
SLIDE 9

Trade offs

  • Excellent for efficient use of page cache
  • Able to maintain full base data consistency
  • Achieves highest ingest rate in distributed

environments

  • Almost always has highest “perceived” rate
  • Trading Off :
  • Eventual consistency in graph
  • Updates are still atomic, isolated and durable but phased
  • External agent performs graph building
slide-10
SLIDE 10

1 ¡client ¡ 2 ¡clients ¡ 4 ¡clients ¡ 8 ¡clients ¡ 0 ¡ 50000 ¡ 100000 ¡ 150000 ¡ 200000 ¡ 250000 ¡ 300000 ¡ 350000 ¡ 400000 ¡ 450000 ¡ 500000 ¡ 1 ¡ 2 ¡ 4 ¡ Nodes ¡and ¡Edges ¡per ¡second ¡ 1 ¡client ¡ 2 ¡clients ¡ 4 ¡clients ¡ 8 ¡clients ¡

Result…

8 ¡Hosts ¡ 4 ¡Hosts ¡ 2 ¡Hosts ¡ Single ¡Host ¡

slide-11
SLIDE 11

Distributed ¡API ¡ ApplicaAon(s) ¡ ParAAon ¡1 ¡ ParAAon ¡3 ¡ ParAAon ¡2 ¡ ParAAon ¡...n ¡ Processor ¡ Processor ¡ Processor ¡ Processor ¡

Scaling Reads and Query

Partitioning and Read Replicas… easy right !

slide-12
SLIDE 12

Distributed ¡API ¡ ApplicaAon(s) ¡ ParAAon ¡1 ¡ ParAAon ¡3 ¡ ParAAon ¡2 ¡ ParAAon ¡...n ¡ Processor ¡ Processor ¡ Processor ¡ Processor ¡

Why ¡are ¡Graphs ¡Different ¡? ¡

slide-13
SLIDE 13

Optimizing Distributed Navigation

  • Pregel Clones

– Message passing for each hop, messages processed at the data host for the target vertex – High concurrency, no data leaves its physical host – Message marshalling and transport is expensive

  • Distributed Caching Models

– Essentially trying to cache graph in memory over multiple hosts – Requires too much memory for large graphs – Issues with cache consistency

slide-14
SLIDE 14

Optimizing Distributed Navigation

  • InfiniteGraph… both

– Detect local hops and perform in memory traversal – Intelligently cache remote data when accessed frequently – Route tasks to other hosts when it is optimal

Processor ¡ Distributed ¡API ¡ ParAAon ¡1 ¡ ParAAon ¡2 ¡ Processor ¡ ApplicaAon ¡ P(A,B,C,D) ¡

slide-15
SLIDE 15

Schema ¡– ¡It’s ¡not ¡your ¡enemy ¡! ¡ ¡

(at ¡least ¡not ¡all ¡the ¡Ame...) ¡

  • Schema vs Schema-less

– Database religion – No time for a full debate here – InfiniteGraph supports schema, but does not restrict connection types between vertices – Planning to also support “Document Style” Nodes

slide-16
SLIDE 16

GraphViews ¡ ¡ Leveraging ¡Schema ¡in ¡the ¡Graph ¡

PaAent ¡ PrescripAon ¡ Drug ¡ Ingredient ¡ Outcome ¡ Complaint ¡ Visit ¡ Allergy ¡ Physician ¡

slide-17
SLIDE 17

Schema Enables Views

  • GraphViews are extremely powerful
  • Allow Big Data to appear small !
  • Connection inference can lead to exponential gains

in query performance

  • Views are reusable between queries
  • Built into the native kernel
slide-18
SLIDE 18

Facility ¡Data ¡Page(s) ¡ PaAent ¡Data ¡Page(s) ¡

Advanced Configured Placement

  • Physically co-locate “closely related” data
  • Driven through a declarative placement model
  • Dramatically speeds “local” reads

Mr ¡ CiAzen ¡ Visit ¡ Visit ¡ Dr ¡ Jones ¡ San ¡ Jose ¡ Facility ¡ Dr ¡ Smith ¡ Primary ¡ ¡Physician ¡ Has ¡ Has ¡ With ¡ At ¡ Located ¡ Located ¡

Facility ¡Data ¡Page(s) ¡

Dr ¡ Blake ¡ Sunny-­‑ vale ¡ Dr ¡ Quinn ¡ Located ¡ Located ¡ With ¡ At ¡

slide-19
SLIDE 19

Why InfiniteGraph™?

  • Objectivity/DB is a proven foundation

– Building distributed databases since 1993 – A complete database management system

  • Concurrency, transactions, cache, schema, query, indexing
  • It’s a Graph Specialist !

– Simple but powerful API tailored for navigation of data – Easy to configure distribution model

slide-20
SLIDE 20

Zone ¡2 ¡ Zone ¡1 ¡ HostA ¡

Fully Distributed Data Model

IG ¡Core/API ¡ Distributed ¡Object ¡and ¡RelaAonship ¡Persistence ¡Layer ¡

Customizable ¡Placement ¡

HostB ¡ HostC ¡ HostX ¡ AddVertex() ¡

slide-21
SLIDE 21

InfiniteGraph ¡is ¡a ¡Complete ¡Database ¡

  • InfiniteGraph ¡helps ¡manage ¡the ¡things ¡you ¡don’t ¡want ¡to ¡do, ¡but ¡

want ¡to ¡have ¡done: ¡

– Concurrency ¡

  • TransacAons ¡(commit/rollback) ¡
  • Controlled ¡mulA-­‑user ¡reading ¡during ¡updates ¡

– Schema ¡Control ¡

  • Build ¡complex ¡data ¡structures, ¡make ¡changes ¡easily ¡and ¡migrate ¡exisAng ¡data ¡

– Distribu9on ¡

  • Sharing ¡large ¡amounts ¡of ¡distributed ¡data ¡between ¡distributed ¡processes ¡

– Indexes ¡

  • Choose ¡built-­‑in ¡key-­‑value, ¡b-­‑tree ¡or ¡other ¡indexes ¡

– Cache ¡

  • Keep ¡large ¡secAons ¡of ¡the ¡graphs ¡in ¡configurable ¡memory ¡caches ¡
slide-22
SLIDE 22

Super Simple API

Person alice = new Person(“Alice”); helloGraphDB.addVertex( alice ); Person bob = new Person(“Bob”); helloGraphDB.addVertex( bob ); Person carlos = new Person(“Carlos”); helloGraphDB.addVertex( carlos ); Person charlie = new Person(“Charlie”); helloGraphDB.addVertex( charlie );

slide-23
SLIDE 23

Adding Edges

MyEdgeType edge = new MyEdgeType(); vertexA.addEdge ( edge, vertexB, EdgeKind.??? );

Meeting denverMeeting = new Meeting("Denver", "5-27-10"); alice.addEdge(denverMeeting, bob, EdgeKind.BIDIRECTIONAL); Call bobCallToCarlos = new Call(getRandomJulyTime()); bob.addEdge(bobCallToCarlos, carlos, EdgeKind.BIDIRECTIONAL); Payment payment = new Payment(10000.00); carlos.addEdge(payment, charlie, EdgeKind.BIDIRECTIONAL); Call bobCallToCharlie = new Call(getRandomJulyTime()); bob.addEdge(bobCallToCharlie, charlie, EdgeKind.BIDIRECTIONAL);

slide-24
SLIDE 24

The ¡Result… ¡

slide-25
SLIDE 25

Graph Traversal (Navigation) Queries

  • Use an instance of the Navigator class to perform a navigation

query.

  • A navigation instance is highly customizable, but is comprised of

the following basic parts:

– Origin : The vertex from which to begin – Guide strategy

  • Guide.Strategy.SIMPLE_BREADTH_FIRST
  • Guide.Strategy.SIMPLE_DEPTH_FIRST

– Graph Views : Powerful filtering and – Qualifiers

  • Qualifying valid intermediate paths and results

– Handlers

  • A result handler
slide-26
SLIDE 26

Tools To Suit the Solution

slide-27
SLIDE 27

Practical Applications

slide-28
SLIDE 28

Pathfinding

– Intelligence, Police, Counter Terrorism – Financial Transactions and Fraud – Discover Paths Between Entities

  • One to One, Many to Many

– Constrain by

  • Edge and Vertex Type
  • Edge and Vertex Attributes (including temporal)
  • Required Sequence of Events
  • Length (Hops), Total Edge Weight
slide-29
SLIDE 29

Graph Analysis (Algorithms)

Bob ¡ Sam ¡ Fred ¡

Degree ¡Centrality ¡ Closeness ¡and ¡ Betweeness ¡Centrality ¡

slide-30
SLIDE 30

Graph Analysis (Algorithms)

  • Social Networks

– Most connected participants – Influencers – Important Syndicates or Sub-networks

  • Central figures in crime organisations
  • Business Intelligence

– Discovering Knowledge Assets – Complex Big Data Analytics

slide-31
SLIDE 31

Graph Analysis (Patterns)

  • Crime (again)

– Recognize common patterns of activity – Complex chains of interaction

  • Security

– Recognize attack/threat patterns – Auditing / log analytics

  • Targeting Advertising

– To specific browsing patterns

slide-32
SLIDE 32

Many Many More ….

  • Spatial data
  • Financial Services
  • Defense / Situational

Awareness

  • Sciences
  • Health Care
  • Genealogy
  • Logistics
  • Tracking
  • PLM