Save 37% off PRO during our Black Friday Sale! »

WWC Connect BLR

WWC Connect BLR



March 03, 2017


  1. - Sarah Masud, Red Hat Gremlin The universal graph language

  2. Nodes: M-Member c - City C - Country XYZ- Organization

    Edges: D - Director F - Founder B - BoD W- Works at 50K+ -Members 60 -Cities 20 -Countries
  3. Agenda 1. What is a graph database? 2. What about

    our dear RDBMS 3. What the hell is gremlin? 4. Features and use cases of gremlin 5. Demo Women Who Code
  4. What is Graph DB? ❖A graph is a collection of

    vertices and edge. G=(V,E) ❖A graph DB is a system that helps us store, retrieve and consume data in a graph structured format ❖USP- Relationship Women Who Code Vertex 2 [properties] Vertex 1 [properties] Edge [properties]
  5. Examples Women Who Code

  6. WWC Graph - A Dummy ❖ Entities ➢ People ➢

    Cities, Countries ➢ Organizations ❖ Relations ➢ Person -- founder---WWC ➢ Person -- BOD---WWC ➢ Person---Director---City ➢ Person--Member---City ➢ Person--Knows--Person Women Who Code
  7. Why not our dear RDBMS :/ Women Who Code Name

    Founder A Yes B Yes C D E F G 1. In order to find the founders, must have a column with most rows empty 2. In order to map names to cities, perform costly join operations 3. RDBMS is useful for transactional data 4. How to map real time relations between person A and person B?
  8. So… What the hell is Gremlin?? Framework: TinkerPop DSL: Gremlin

    Wrapper: Gremlin-python Driver: SQL-Gremlin
  9. Features of Gremlin • Provides backend transparency BECAUSE • Does

    NOT provide schema management queries • Based on functional programming • Returns the result as an iterator • Default- Edges are directional • Support all primitive Java data types out of the box • +Many more!
  10. The Universality of Gremlin

  11. Use Cases for TinkerPop-Gremlin 1. Experiment with different graph stores

    without affecting your query logic 2. Switch context between OLAP and OLTP 3. Support from open source + enterprise
  12. Pros and Cons with Gremlin Pros ❖ Open source! ❖

    Vendor agnostic ❖ Wrapper and driver support for many languages ❖ Intuitive Cons ❖ Just a DSL not a programming language ❖ No out of box support for schema and indexing ❖ Wrappers are slow
  13. Example Query 1 Who are the founders and Board of

    directors of WWC? Step 1: Go to the WWC org node Step 2 : Find out those people who are connected with the WWC org Step 3: Filter out those people who have an edge with label founder or BOD g.V().hasLabel(‘Org).has(‘name’,’WWC’).inE(‘founder_of’,bod_at’).outV().values(‘name’)
  14. Nodes: M-Member c - City C - Country XYZ- Organization

    Edges: D - Director F - Founder B - BoD W- Works at
  15. Example Query 2 WWC Directors who are less than 30

    years old Step 1: Find all the people who are WWC directors Step2: Filter them by property age<30 g.V().hasLabel(‘Person’).outE(‘director_of’).inV().has(‘age’,lt(30)).values(‘name’)
  16. Nodes: M-Member c - City C - Country XYZ- Organization

    Edges: D - Director F - Founder B - BoD W- Works at
  17. How can Gremlin help WWC? 1. Suggest friends on social

    media to members of same chapter 2. page Rank the most influential people in WWC network 3. Track growth of chapters 4. Personalize job recommendation 5. Mentor-Mentee opportunity Awesome WWC
  18. References 1. TinkerPop 2. Tinkerpop -Gremlin Getting started 3. Gremlin-Titan-Dynamo

    Setup 4. Gremlin -Python 5. Demo Source Code