Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

What’s the big deal with Graph Databases?

334 visualizaciones

Publicado el

Introduction to Graph Databases - a different way to see data, with endless possibilities!
Alex Barbosa Coqueiro - Head of Public Sector Solutions Architecture at AWS for Latin America, Canada & Caribbean covers Graph technology, terminology, how Graph could be applied to real-world business problems, and share a few examples of graph data model using AWS Cloud services.

Event details: https://www.meetup.com/Serverless-Toronto/events/271595147/
Event recording: https://youtu.be/p96pppoCIGo

For more exciting learning opportunities, join our #ServerlessTO community: https://www.meetup.com/Serverless-Toronto/about/

Publicado en: Software
  • Sé el primero en comentar

What’s the big deal with Graph Databases?

  1. 1. Welcome to ServerlessToronto.org “Home of Less IT Mess” 2 Introduce Yourself ☺ - Why are you here? - Looking for work? - Offering work? “What’s the big deal with Graph Databases” presentation & demo will start at 6:15pm…
  2. 2. Serverless is not just about the Tech: 3 Serverless is New Agile & Mindset #1 Serverless Dev (Back-end FaaS dev, but turned into gluing APIs and Managed Services) #2 We're obsessed to creating business value (meaningful MVPs, Products), to empower Business users #3 We build bridges between Serverless Community (“Dev leg”), and Front-end & Voice- First developers & User Experience designers (“UX leg”) #4 Achieve agility NOT by “sprinting” faster (like in Scrum), but working smarter (by using bigger building blocks and less Ops)
  3. 3. Upcoming #ServerlessTO Online Meetups 4 1. Deliver Business Value Faster with AWS Step Functions – Yan Cui ** SEP 1 @ 5pm EST ** 2. Your Presentation ☺ Serverless ≠ AWS, so practitioners from other clouds are welcome!
  4. 4. What’s the big deal with Graph Databases? Alex Barbosa Coqueiro – Head of Public Sector Solutions Architecture for Latin America, Canada and Caribbean at AWS 5 The Feature Presentation
  5. 5. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential What’s the big deal with Graph Databases? Alex Coqueiro Head of Solutions Architecture Team AWS Public Sector for Latin America, Canada and Caribbean @alexbcbr
  6. 6. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential What is this all about? 1
  7. 7. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential The origin by Leonhard Euler in 1736 Vertex/Nodes Edges
  8. 8. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential Graphs are all around us Social networking Recommendations Knowledge graphs Fraud detection Protein Research Network & IT operations Customer 360
  9. 9. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential Knowledge Graph Application What museums should Alice visit while in Paris? Who painted the Mona Lisa? What artists have paintings in The Louvre?
  10. 10. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential Highly Connected Data Use Cases Retail Fraud DetectionRestaurant RecommendationsSocial Networks
  11. 11. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential … Architecture … 2
  12. 12. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential Building Your Solution Datastore Query Visualization ?
  13. 13. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential Challenges Building Apps with Highly Connected DataRELATIONAL DATABASE CHALLENGES BUILDING APPS WITH HIGHLY CONNECTED DATA Unnatural for querying graph Inefficient graph processing Rigid schema inflexible for changing data
  14. 14. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential DIFFERENT APPROACHES FOR HIGHLY CONNECTED DATA Purpose-built for a business process Purpose-built to answer questions about relationships
  15. 15. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential Graph Database is optimized for efficient storage and retrieval of HIGHLY CONNECTED DATA
  16. 16. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential Large variety of solutions • Deploy software on demand (E.g. AgensGraph, Neo4J) • 1,400+ ISVs • Over 4,500 product listings • 200,000 active customers • Over 650 million hours of EC2 deployed monthly • Deployed in 17 regions • Offers 35 categories • Flexible consumption and contract models • Easy and secure deployment, almost instantly • One consolidated bill • Always evolving • Deploy directly in your EC2 instance (E.g. JanusGraph) • Code could be customized to your specific needs • https://github.com/awslabs/dynamodb-janusgraph- storage-backend
  17. 17. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential AMAZON NEPTUNE Fully managed graph database FAST RELIABLE OPEN Query billions of relationships with millisecond latency 6 replicas of your data across 3 AZs with full backup and restore Build powerful queries easily with Gremlin and SPARQL Supports Apache TinkerPop & W3C RDF graph models EASY
  18. 18. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential Fully Managed Service Easily configurable via the console Backup and restore, point-in-time recovery Multi-AZ high availability Support for up to 15 read replicas Supports encryption at rest Supports encryption in transit (TLS) B E N E F I T S
  19. 19. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential AMAZON NEPTUNE HIGH LEVEL ARCHITECTURE Bulk load from Amazon S3 Database Mgmt.
  20. 20. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential Distributed storage architecture • Performance, availability, durability • Scale-out replica architecture • Shared storage volume with 10-GB segments striped across hundreds of nodes • Data are replicated 6 times across 3 AZs • Hotspot rebalance, fast database recovery • Log applicator embedded in storage layer Delivered as a managed service Master Replica Replica Primary Shared storage volume Replica Replica Gremlin/ SPARQL Transactions Caching Gremlin/ SPARQL Transactions Caching Gremlin/ SPARQL Transactions Caching AZ 1 AZ 2 AZ 3
  21. 21. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential… Pandemic disease use case … 3
  22. 22. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential Building Your Solution Datastore Query Visualization AWS Marketplace Amazon EC2 Amazon Neptune ?
  23. 23. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential RESOURCE DESCRIPTION FRAMEWORK (RDF) PROPERTY GRAPH GRAPH MODELS
  24. 24. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential PROPERTY GRAPH A property graph is a set of vertices and edges with respective properties • Vertex represents entities/domains (often referred to as nodes) • Edge represents directional relationship between vertices. • Each edge has a label that denotes the type of relationship • Each vertex & edge has a unique identifier • Vertex and edges can have properties which express non-relational information FRIEND name: Bill name: Sarah UserUser Since 11/29/16
  25. 25. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential RESOURCE DESCRIPTION FRAMEWORK (RDF) PROPERTY GRAPH GRAPH MODELS
  26. 26. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential PROPERTY GRAPH & APACHE TINKERPOP • Apache TinkerPop Open source graph computing framework for Property Graph • Gremlin Graph traversal language used to analyze the graph Amazon Neptune is fully compatibility with Tinkerpop Gremlin and provides optimized query execution engine for Gremlin query language.
  27. 27. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential CREATING A TINKERPOP GRAPH //Connect to Neptune and receive a remote graph, g. user1 = g.addVertex (id, 1, label, "User", "name", ”Alex"); user2 = g.addVertex (id, 2, label, "User", "name", ”Sue"); ... user1.addEdge(”KNOWS", user2, id, 21); KNOWS name: Alex name: Sue User User
  28. 28. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential W3C Standard SPARQL Query Language RESOURCE DESCRIPTION FRAMEWORK (RDF) PROPERTY GRAPH GRAPH MODELS
  29. 29. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential RDF GRAPHS • RDF Graphs are described as a collection of triples: subject, predicate, and object. • Internationalized Resource Identifiers (IRIs) uniquely identify subjects. • The Object can be an IRI or Literal. • A Literal in RDF is like a property and RDF supports the XML data types. • When the Object is an IRI, it forms an “Edge” in the graph. <http://www.socialnetwork.com/person#1> rdf:type contacts:User; contact:name: ”Bill” . subject predicate Object (literal) name: Bill User <http://www.socialnetwork.com/person#1>IRI <http://www.socialnetwork.com/person#1> contacts:friend <http://www.socialnetwork.com/person#2> . subject predicate Object (IRI) FRIEND #1 2#2
  30. 30. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential SQL RELATIONAL DATABASE QUERY SELECT distinct c.CompanyName FROM customers AS c JOIN orders AS o ON /* Join the customer from the order */ (c.CustomerID = o.CustomerID) JOIN order_details AS od /* Join the order details from the order */ ON (o.OrderID = od.OrderID) JOIN products as p /* Join the products from the order details */ ON (od.ProductID = p.ProductID) WHERE p.ProductName = ’Echo'; /* Find the product named ‘Echo’ */ Find the name of companies that purchased the ‘Echo’.
  31. 31. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential SPARQL DECLARATIVE GRAPH QUERY PREFIX sales_db: <http://sales.widget.com/> SELECT distinct ?comp_name WHERE { ?customer <sales_db:HAS_ORDER> ?order ; #customer graph pattern <sales_db:CompanyName> ?comp_name . #orders graph pattern ?order <sales_db:HAS_DETAILS> ?order_d . #order details graph pattern ?order_d <sales_db:HAS_PRODUCT> ?product . #products graph pattern ?product <sales_db:ProductName> “Echo” . } * Source : http://www.playnexacro.com/index.html#show:article Find the name of companies that purchased the ‘Echo’.
  32. 32. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential GREMLIN IMPERATIVE GRAPH TRAVERSAL /* All products named ”Echo” */ g.V().hasLabel(‘Product’).has('name',’Echo') .in(’HAS_PRODUCT') /* Traverse to order details */ .in(‘HAS_DETAILS’) /* Traverse to order */ .in(’HAS_ORDER’) /* Traverse to Customer */ .values(’CompanyName’).dedup() /* Unique Company Name */ Find the name of companies that purchased the ‘Echo’.
  33. 33. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential Building Your Solution Datastore Query Visualization AWS Marketplace Amazon EC2 Amazon Neptune ?
  34. 34. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential Building Your Solution Datastore Query Visualization AWS Marketplace Amazon EC2 Amazon Neptune Graphexp
  35. 35. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential 4 … Key Takeaways …
  36. 36. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential USE CASE
  37. 37. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential Building Your Solution Datastore Query Visualization AWS Marketplace Amazon Neptune
  38. 38. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential Learn Gremlin http://kelvinlawrence.net/book/Gremlin-Graph-Guide.html https://github.com/krlawrence/graph
  39. 39. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential Learn SPARQL https://logd.tw.rpi.edu/tutorial/a_crash_course_on_sparql https://www.w3.org/TR/sparql11-query/
  40. 40. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential Samples https://github.com/aws-samples/amazon-neptune-samples
  41. 41. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential Explore use cases using Neptune https://aws.amazon.com/blogs/database/analyze-amazon-neptune-graphs-using-amazon-sagemaker-jupyter-notebooks/
  42. 42. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential Reference architectures https://github.com/aws-samples/aws-dbs-refarch-graph/
  43. 43. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential Use cases, videos, blog posts, and code https://aws.amazon.com/neptune/developer-resources/
  44. 44. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential Customer Reference
  45. 45. © 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential Thank YOU Alex Coqueiro Head of Solutions Architecture Team AWS Public Sector for Latin America, Canada and Caribbean @alexbcbr
  46. 46. Knowledge Sponsor 1. Go to www.manning.com 2. Select *any* e-Book, Video course, or liveProject you want! 3. Add it to your shopping cart (no more than 1 item in the cart) 4. Raffle winners will send me the emails (used in Manning portal), 5. So the publisher can move it to your Dashboard – as if purchased. GOOD LUCK!
  47. 47. Join www.ServerlessToronto.org Home of “Less IT Mess”

×