Presentation is loading. Please wait.

Presentation is loading. Please wait.

Www.Objectivity.com 12/5/20151 Making Sense of the Graph Revolution Nick Quinn, Principal Engineer, InfiniteGraph.

Similar presentations


Presentation on theme: "Www.Objectivity.com 12/5/20151 Making Sense of the Graph Revolution Nick Quinn, Principal Engineer, InfiniteGraph."— Presentation transcript:

1 www.Objectivity.com 12/5/20151 Making Sense of the Graph Revolution Nick Quinn, Principal Engineer, InfiniteGraph

2 Why Call it a Revolution? “a forcible overthrow of the current order in favor of a new system.” NoSQL (Not Only SQL) = Choice + Big Data –Scalable –Performing –Distributed –Highly Available

3 Big Data + Graph = Big Graph Data Social Scale – 1 billion vertices, 100 billion edges Web Scale – 50 billion vertices, 1 trillion edges Brain Scale – 100 billion vertices, 100 trillion edges

4 Why Call it a Graph Revolution? After 2011, NoSQL and Graph database begin to follow same trend line and forecast.

5 The Growing Graph Database Landscape

6 What is a Graph Database? A graph database is a native storage engine that enables efficient storage and retrieval of graph structured data. Graph databases are typically used: – When the data source is highly connected, – Where the connections are important (add value to the data), and – When the user access pattern requires traversals of those connections.

7 What is a Graph Database Graph Databases have a unique data model (Vertices and Edges). They are optimized around concurrent access of persisted data, so users can navigate the data as it is being added or updated. VERTEXEDGE 2N

8 Specialized Graph Use Cases Cyber Security – Identifying potential cyber threats and their targets Network Management – Offer answers to very complex navigational queries on a social network that needs near real-time answers Targeted Advertising – Customize marketing to the consumer by compiling a large knowledge graph with an integrated recommendation engine

9 Example 1 - Ad Placement Networks Smartphone Ad placement - based on the the user’s profile and location data captured by opt-in applications. The location data can be stored and distilled in a key-value and column store hybrid database, such as Cassandra The locations are matched with geospatial data to deduce user interests. As Ad placement orders arrive, an application built on a graph database such as InfiniteGraph, matches groups of users with Ads: Maximizes relevance for the user. Yields maximum value for the advertiser and the placer.

10 Example 2 - Market Analysis The 10 companies that control a majority of U.S. consumer goods brands

11 Example 3 - Seed To Consumer Tracking ?

12 Supply Chain Management Use Case Identify the optimal route for a fleet of trucks at a particular time of the year is quite complex. – number of drivers to pay and their salaries – gas, weather patterns, timing requirements, container sizes, distances, roads, hazards, repairs Consider a winter scenario in which certain highways will tend to become hazardous around the Great Lakes where the snow can hinder travel.

13 Supply Chain Management Use Case Find the most cost-effective route in December with weather conditions X and highway conditions Y, and stay below Z latitude while optimizing costs to achieve a rush delivery GraphView myView = new GraphView(); myView.excludeClass(myGraphDb.getTypeId(Highway.class. getName()), “weather.precipitation > precipitationX && weather.temperature accidentsY ”); myView.excludeClass(myGraphDb.getTypeId(City.class.get Name()), “latitude >= Z”);

14 Supply Chain Management Use Case City origin,target = …; // Use query or index to lookup “origin” & “target” city VertexIdentifier resultQualifier = new VertexIdentifier(target); // Set policies PolicyChain myPolicies = new PolicyChain(); myPolicies.addPolicy(new MaximumPathDepthPolicy(MAXIMUM_STEPS)); myPolicies.addPolicy(new NoRevisitPolicy()); // Don’t revisit the cities more than once // Define logic on how to process results NavigationResultHandler myNavHandler = new NavigationResultHandler { public void handleResultPath(Path result) { // The first path returned is the shortest path, but may not be the cheapest float cost = calculateCost(result); float time = calculateTime(result); // Minimize cost … } Navigator navigator = origin.navigate(myView, Guide.DEPTH_FIRST_SEARCH, Qualifier.ANY /** Path Qualifier **/, resultQualifier, myPolicies, myNavHandler); navigator.start();

15 Graph Database Challenge #1: Reading Distributed Data If your graph data is distributed, traversing path across processors can be difficult to manage.

16 Graph Database Challenge #1: Reading Distributed Data Mitigate bottlenecks and optimize performance by using the following strategies: – Custom Placement: data isolation/localization of logically related information (to achieve close to subgraph partitioning) in order to minimize the number of network calls – Distributed Navigation Engine: Distributes the load on the partitions where the data is located.

17 Reading Distributed Data: Custom Placement Consider the case where you are placing medical data for hospitals and patients. Using a custom placement model you can achieve fairly high isolation of the subgraphs. – Doctor ↔ Hospitals, Patients ↔ Visits.

18 Reading Distributed Data: Distributed Navigation Engine Google Pregel (2010) – Batch algorithms on large graphs – Avoids passing graph state instead sends messages – Apache Giraph, Jpregel, Hama while any vertex is active or max iterations not reached: for each vertex:  this loop is run in parallel process messages from neighbors (update internal state) send messages to neighbors possibly synchronize results set active flag (unless no messages or state doesn’t change)

19 Reading Distributed Data: Distributed Navigation Engine Pregel is optimized for large distributed graph analytics Limitation on Pregel logic: When the traversal is occurring locally, the logic is to still execute by sending messages from vertex to vertex Ideally, when local, the traversal should be executed in memory and when remote, pregel logic should be optimized. – InfiniteGraph’s Distributed Navigation Engine uses the QueryServer (oqs) to achieve this optimized behavior

20 Graph Database Challenge #2: Supernodes A supernode is a vertex with a disproportionally high number of outgoing edges. – Inefficient to traverse through these vertices

21 Graph Database Challenge #2: Supernodes (Avoid the “Tonight Show”!)

22 Supernodes: Great Use Case For GraphViews With InfiniteGraph, we offer two strategies to addressing the supernode problem within the navigation context. – Use GraphViews to filter out vertex or edge types – Globally limit the number of edges traversed using the FanoutLimitPolicy Consider calculating number of links to interesting companies on LinkedIn. – If you are connected to recruiters, the navigation result set can be slowed down and possibly polluted if traversing through these recruiters.

23 Supernodes: Great Use Case For GraphViews Consider calculating number of links to interesting companies on LinkedIn. – If you are connected to recruiters, the navigation result set can be slowed down and possibly polluted if traversing through these recruiters. GraphView myView = new GraphView(); myView.excludeClass(myGraphDb.getTypeId(Person.class.getName()), “CONTAINS(profession, ‘recruiter’)”; PolicyChain chain = new PolicyChain(); // Limits # of edges traversed to 10 chain.addPolicy(new FanoutLimitPolicy(10));

24 Graph Database Challenge #3: Writing Distributed Data App-2 (Ingest V 2 ) App-2 (E 23 { V 2 V 3 }) InfiniteGraph Objectivity/DB Persistence Layer App-1 (Ingest V 1 ) App-3 (Ingest V 3 ) V1V1 V1V1 V2V2 V2V2 V3V3 V3V3 App-1 (E 1 2 { V 1 V 2 }) App-3 E 12 E 23

25 Graph Database Challenge #3: Writing Distributed Data Concurrent writes (multithreaded, multiprocess and/or multiuser access) to a database that holds highly connected data  highly contentious locking behavior  poor write performance retrying transactions NoSQL databases with relaxed consistency modes typically offer higher write performance – System maintains data integrity (ACID), handles lock conflicts, optimizes batch processing

26 Writing Distributed Data: Accelerated Ingest (Pipelining) InfiniteGraph offers relaxed consistency ingest mode, Accelerated Ingest. – Vertex, Edge objects are placed immediately – Edge updates are “pipelined” (no lock contention) and updates are batch processed (optimized) – Graph is built up in background – Achieves highest rate of ingest in distributed environments

27 Writing Distributed Data: Accelerated Ingest (Pipelining) IG Core/API C1C1 C1C1 C2C2 C2C2 C3C3 C3C3 E 12 E 23 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

28 Acclerated Ingest Performance Results

29 Graph Database Challenge #4: Tools Typically, when databases don’t offer tools for analysis or visualization, the tools that are used are general purpose. Tools offered by databases are generally integrated well with the API and native features. – Sometimes exposing “hidden” features – These tools can generally be useful for debugging and development of applications built on top of the database.

30 Tools: The IG Visualizer Uses open source visualization library, Elipse-y. Excellent tool for development and debugging of graph application built on top of IG database.

31 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 data navigation. – Easy to configure distribution model

32 QUESTIONS?

33


Download ppt "Www.Objectivity.com 12/5/20151 Making Sense of the Graph Revolution Nick Quinn, Principal Engineer, InfiniteGraph."

Similar presentations


Ads by Google