SlideShare a Scribd company logo
Start Flying with Python &
Apache TinkerPop
Graph Day SF
Jason Plurad โ€ข pluradj@us.ibm.com โ€ข @pluradj
IBM Open Technology โ€ข Apache TinkerPop โ€ข JanusGraph
Saturday, June 17, 2017
ยฉ2017 IBM Corporation 19 June 20172
@pluradj
Open source โ€ข Graph computing
Dev @IBM โ€ข PMC @ApacheTinkerPop โ€ข TSC @JanusGraph
Food truck chaser
Jason Plurad
ยฉ2017 IBM Corporation 19 June 20173
Agenda
Apache TinkerPop
Gremlin + Python
- Jupyter
- Flask
- IBM Cloud
House of Mirrors: Ketrina Yim @KetrinaYim
ยฉ2017 IBM Corporation 19 June 20174
Founded 2009 โ€ข Marko Rodriguez @twarko
Apache Top-Level Project 2016 โ€ข PMC Chair: Stephen Mallette @spmallette
Committers: 16 โ€ข Contributors: 67 โ€ข Graph Systems: 20
https://tinkerpop.apache.org
ยฉ2017 IBM Corporation 19 June 20175
Apache TinkerPop: Graph Computing Framework
ยง Defines graph structure and process
ยง Core framework is written in Java
ยง Provider implementations
โ€“ Azure Cosmos DB
โ€“ Blazegraph
โ€“ DataStax Enterprise Graph
โ€“ GRAKN.AI
โ€“ HGraphDB
โ€“ IBM Graph
โ€“ JanusGraph
โ€“ Neo4j
โ€“ OrientDB
โ€“ Sqlg
โ€“ Stardog
ยฉ2017 IBM Corporation 19 June 20176
Gremlin Traversal Language
sql2gremlin: Daniel Kuppitz @dkuppitz
Recursively show all employees and their supervisors
ยฉ2017 IBM Corporation 19 June 20177
Graph Application Architecture
Gremlin Server Graph DatabaseApplication
ยฉ2017 IBM Corporation 19 June 20178
Gremlin Language Drivers
gremlin-javascript: Jean-Baptiste Musso @jbmusso
Gremlin Bindings
ยฉ2017 IBM Corporation 19 June 20179
Gremlin Language Variants (GLV)
ยง Elevate Gremlin to a top-level citizen in the programming language of choice
ยง GLV can work with any modern language
โ€“ Function composition
โ€“ Function nesting
ยง Java and Groovy (native)
ยง Python is the first non-JVM GLV
ยง Others are coming soon (JavaScript, C#)
ยง SPARQL-Gremlin and SQL-Gremlin
http://tinkerpop.apache.org/docs/current/tutorials/gremlin-language-variants
ยฉ2017 IBM Corporation 19 June 201710
Gremlin Bytecode
http://www.datastax.com/dev/blog/the-benefits-of-the-gremlin-graph-traversal-machine
[ ['V'], ['range', 0, 5],
['out', 'created'],
['values', 'name'] ]
g.V().range(0, 5).
out('created').
values('name')
ยฉ2017 IBM Corporation 19 June 201711
ยฉ2017 IBM Corporation 19 June 201712
Programming Language Popularity
TIOBE Index
PYPL Popularity RedMonk Rankings
ยฉ2017 IBM Corporation 19 June 201713
Example Python Application Architecture
Graph DatabaseClients
Web browser
Data notebook
Gremlin Bytecode
Gremlin
Bytecode
HTTP
HTTP
ipython-gremlin
Gremlin-Python
Application Server
ยฉ2017 IBM Corporation 19 June 201714
ยฉ2017 IBM Corporation 19 June 201715
Gremlin-Python (GLV)
ยง Directly incorporated and tested by Apache TinkerPop
ยง Implements core pieces found in Gremlin-Java
โ€“ Graph Traversal
โ€“ Graph Traversal Source
โ€“ __
ยง Install via pip package manager
ยง Gremlin-Python sugar
โ€“ g.V().both()[1:3].toList()
โ€“ g.V().both().name.toList()
ยง Bindings
โ€“ g.V(('id',4)).out('created').name.toList()
http://tinkerpop.apache.org/docs/current/reference/#gremlin-python
ยฉ2017 IBM Corporation 19 June 201716
ยฉ2017 IBM Corporation 19 June 201717
ipython-gremlin: Gremlin Magic
ipython-gremlin: David Michael Brown @davebshow
Line Magic CellMagic
ยฉ2017 IBM Corporation 19 June 201718
ipython-gremlin: Python integrations
ipython-gremlin: David Michael Brown @davebshow
pandas, matplotlib NetworkX
ยฉ2017 IBM Corporation 19 June 201719
Air Routes Graph
Air Routes Graph: Kelvin Lawrence @gfxman
ยฉ2017 IBM Corporation 19 June 201720
Air Routes Web Application
ยง Build a small set of APIs as a microservice to power the app
ยง APIs can be used to
โ€“ Serve data to the app
โ€“ Serve data to other services
โ€“ Serve data to the Jupyter notebook
ยง Example API for routes
โ€“ GET /routes/<orig>
โ€“ GET /routes/<orig>/<dest>
โ€“ GET /routes/<orig>/<dest>?maxhops=2
ยง Graph (TinkerPop + Gremlin) is an implementation detail
ยฉ2017 IBM Corporation 19 June 201721
ยฉ2017 IBM Corporation 19 June 201722
ยฉ2017 IBM Corporation 19 June 201723
ยฉ2017 IBM Corporation 19 June 201724
Flying into the cloud
ยง Graphs are most useful when they are large
ยง Operating distributed clusters
โ€“ Security
โ€“ Availability
โ€“ Scalability
ยง Sharing is caring
ยฉ2017 IBM Corporation 19 June 201725
Python Application Architecture (Local)
Graph DatabaseClients
Web browser
Data notebook
Gremlin Bytecode
Gremlin
Bytecode
HTTP
HTTP
ipython-gremlin
Gremlin-Python
Application Server
ยฉ2017 IBM Corporation 19 June 201726
Python Application Architecture (IBM Cloud)
Graph Database
Application Server
Clients
Web browser
Data notebook
Gremlin Bytecode
Gremlin
Bytecode
HTTP
HTTP
ipython-gremlin
Gremlin-Python
ยฉ2017 IBM Corporation 19 June 201727
https://www.compose.com/janusgraph
ยฉ2017 IBM Corporation 19 June 201728
Thank You: Open Source Foundations
Start Flying with Python & Apache TinkerPop

More Related Content

What's hot (19)

PDF
Graph Processing with Apache TinkerPop and Gremlin
Jason Plurad
ย 
PDF
Enabling Multimodel Graphs with Apache TinkerPop
Jason Plurad
ย 
PDF
IBM Open by Design: Graph Technology
Jason Plurad
ย 
PDF
Airline Reservations and Routing: A Graph Use Case
Jason Plurad
ย 
PPTX
Community-Driven Graphs with JanusGraph
Jason Plurad
ย 
PPTX
Janus graph lookingbackwardreachingforward
Demai Ni
ย 
PDF
Graph Processing with Titan and Scylla
Jason Plurad
ย 
PDF
Graph Processing with Apache TinkerPop
Jason Plurad
ย 
PPTX
Large Scale Graph Analytics with JanusGraph
P. Taylor Goetz
ย 
PDF
Cloud architectures for data science
Margriet Groenendijk
ย 
PDF
Zentral QueryCon 2018
Henry Stamerjohann
ย 
PDF
On-boarding with JanusGraph Performance
Chin Huang
ย 
PDF
Introduction to GraphQL
ฤฐlker Gรผller
ย 
PDF
Google Cloud Platform for the Enterprise
VMware Tanzu
ย 
PDF
Presto talk @ Global AI conference 2018 Boston
kbajda
ย 
PPT
Hw09 Hadoop Applications At Yahoo!
Cloudera, Inc.
ย 
PDF
FUTURESTACK13: Software analytics with Project Rubicon from Alex Kroman Engin...
New Relic
ย 
PDF
Superset druid realtime
arupmalakar
ย 
PDF
Presto Summit 2018 - 10 - Qubole
kbajda
ย 
Graph Processing with Apache TinkerPop and Gremlin
Jason Plurad
ย 
Enabling Multimodel Graphs with Apache TinkerPop
Jason Plurad
ย 
IBM Open by Design: Graph Technology
Jason Plurad
ย 
Airline Reservations and Routing: A Graph Use Case
Jason Plurad
ย 
Community-Driven Graphs with JanusGraph
Jason Plurad
ย 
Janus graph lookingbackwardreachingforward
Demai Ni
ย 
Graph Processing with Titan and Scylla
Jason Plurad
ย 
Graph Processing with Apache TinkerPop
Jason Plurad
ย 
Large Scale Graph Analytics with JanusGraph
P. Taylor Goetz
ย 
Cloud architectures for data science
Margriet Groenendijk
ย 
Zentral QueryCon 2018
Henry Stamerjohann
ย 
On-boarding with JanusGraph Performance
Chin Huang
ย 
Introduction to GraphQL
ฤฐlker Gรผller
ย 
Google Cloud Platform for the Enterprise
VMware Tanzu
ย 
Presto talk @ Global AI conference 2018 Boston
kbajda
ย 
Hw09 Hadoop Applications At Yahoo!
Cloudera, Inc.
ย 
FUTURESTACK13: Software analytics with Project Rubicon from Alex Kroman Engin...
New Relic
ย 
Superset druid realtime
arupmalakar
ย 
Presto Summit 2018 - 10 - Qubole
kbajda
ย 

Similar to Start Flying with Python & Apache TinkerPop (20)

PDF
GeoPython - Mapping Data in Jupyter Notebooks with PixieDust
Margriet Groenendijk
ย 
PPTX
Programming Lecture 2nd - Flask and Heroku in Python -
Naoki Watanabe
ย 
PPTX
All your database are belong to us - Koop, Cloudant, Feature Services
Raj Singh
ย 
PDF
Big data analysis in python @ PyCon.tw 2013
Jimmy Lai
ย 
PDF
The latest in site speed: advanced #webperf 2018
Anton Shulke
ย 
PDF
Big Data LDN 2017: Your flight is boarding now!
Matt Stubbs
ย 
PDF
Heterogeneous Data Mining with Spark
KNIMESlides
ย 
PPTX
Airline reservations and routing: a graph use case
DataWorks Summit
ย 
PDF
Machine Learning for Java Developers - Nasser Ebrahim
Eclipse Day India
ย 
PPTX
Webinar - Analyzing Video
Turi, Inc.
ย 
PDF
Apache Spark and Apache Ignite: Where Fast Data Meets IoT
Denis Magda
ย 
PDF
CodeCamp Iasi - Creating serverless data analytics system on GCP using BigQuery
Mรกrton Kodok
ย 
PPTX
Big Data London 2019 v.10 I 'Loading data into ignite' - Stephen Darlington, ...
Dataconomy Media
ย 
PPTX
Loading data into Apache Ignite
Stephen Darlington
ย 
PDF
Improving Python and Spark Performance and Interoperability with Apache Arrow...
Databricks
ย 
PPTX
Northwestern 20181004 v9
home
ย 
PDF
Supercharge your app with Cloud Functions for Firebase
Bret McGowen - NYC Google Developer Advocate
ย 
PPTX
Debugging and Performance tricks for MXNet Gluon
Apache MXNet
ย 
PPSX
Electron - Build cross platform desktop apps
Priyaranjan Mohanty
ย 
PDF
Big Data LDN 2017: Will they blend?
Matt Stubbs
ย 
GeoPython - Mapping Data in Jupyter Notebooks with PixieDust
Margriet Groenendijk
ย 
Programming Lecture 2nd - Flask and Heroku in Python -
Naoki Watanabe
ย 
All your database are belong to us - Koop, Cloudant, Feature Services
Raj Singh
ย 
Big data analysis in python @ PyCon.tw 2013
Jimmy Lai
ย 
The latest in site speed: advanced #webperf 2018
Anton Shulke
ย 
Big Data LDN 2017: Your flight is boarding now!
Matt Stubbs
ย 
Heterogeneous Data Mining with Spark
KNIMESlides
ย 
Airline reservations and routing: a graph use case
DataWorks Summit
ย 
Machine Learning for Java Developers - Nasser Ebrahim
Eclipse Day India
ย 
Webinar - Analyzing Video
Turi, Inc.
ย 
Apache Spark and Apache Ignite: Where Fast Data Meets IoT
Denis Magda
ย 
CodeCamp Iasi - Creating serverless data analytics system on GCP using BigQuery
Mรกrton Kodok
ย 
Big Data London 2019 v.10 I 'Loading data into ignite' - Stephen Darlington, ...
Dataconomy Media
ย 
Loading data into Apache Ignite
Stephen Darlington
ย 
Improving Python and Spark Performance and Interoperability with Apache Arrow...
Databricks
ย 
Northwestern 20181004 v9
home
ย 
Supercharge your app with Cloud Functions for Firebase
Bret McGowen - NYC Google Developer Advocate
ย 
Debugging and Performance tricks for MXNet Gluon
Apache MXNet
ย 
Electron - Build cross platform desktop apps
Priyaranjan Mohanty
ย 
Big Data LDN 2017: Will they blend?
Matt Stubbs
ย 
Ad

Recently uploaded (20)

PDF
Automated Test Case Repair Using Language Models
Lionel Briand
ย 
PDF
Writing Maintainable Playwright Tests with Ease
Shubham Joshi
ย 
PDF
Difference Between Kubernetes and Docker .pdf
Kindlebit Solutions
ย 
PPTX
computer forensics encase emager app exp6 1.pptx
ssuser343e92
ย 
PPTX
CONCEPT OF PROGRAMMING in language .pptx
tamim41
ย 
PDF
Alur Perkembangan Software dan Jaringan Komputer
ssuser754303
ย 
PDF
Rewards and Recognition (2).pdf
ethan Talor
ย 
PDF
WholeClear Split vCard Software for Split large vCard file
markwillsonmw004
ย 
PDF
The Rise of Sustainable Mobile App Solutions by New York Development Firms
ostechnologies16
ย 
PPTX
Iobit Driver Booster Pro 12 Crack Free Download
chaudhryakashoo065
ย 
PPTX
declaration of Variables and constants.pptx
meemee7378
ย 
PDF
AI Software Development Process, Strategies and Challenges
Net-Craft.com
ย 
PPTX
Quality on Autopilot: Scaling Testing in Uyuni
Oscar Barrios Torrero
ย 
PPTX
CV-Project_2024 version 01222222222.pptx
MohammadSiddiqui70
ย 
PPTX
IObit Driver Booster Pro 12.4-12.5 license keys 2025-2026
chaudhryakashoo065
ย 
PDF
Telemedicine App Development_ Key Factors to Consider for Your Healthcare Ven...
Mobilityinfotech
ย 
PDF
capitulando la keynote de GrafanaCON 2025 - Madrid
Imma Valls Bernaus
ย 
PPTX
Automatic_Iperf_Log_Result_Excel_visual_v2.pptx
Chen-Chih Lee
ย 
PPTX
IDM Crack with Internet Download Manager 6.42 [Latest 2025]
HyperPc soft
ย 
PDF
IDM Crack with Internet Download Manager 6.42 Build 41
utfefguu
ย 
Automated Test Case Repair Using Language Models
Lionel Briand
ย 
Writing Maintainable Playwright Tests with Ease
Shubham Joshi
ย 
Difference Between Kubernetes and Docker .pdf
Kindlebit Solutions
ย 
computer forensics encase emager app exp6 1.pptx
ssuser343e92
ย 
CONCEPT OF PROGRAMMING in language .pptx
tamim41
ย 
Alur Perkembangan Software dan Jaringan Komputer
ssuser754303
ย 
Rewards and Recognition (2).pdf
ethan Talor
ย 
WholeClear Split vCard Software for Split large vCard file
markwillsonmw004
ย 
The Rise of Sustainable Mobile App Solutions by New York Development Firms
ostechnologies16
ย 
Iobit Driver Booster Pro 12 Crack Free Download
chaudhryakashoo065
ย 
declaration of Variables and constants.pptx
meemee7378
ย 
AI Software Development Process, Strategies and Challenges
Net-Craft.com
ย 
Quality on Autopilot: Scaling Testing in Uyuni
Oscar Barrios Torrero
ย 
CV-Project_2024 version 01222222222.pptx
MohammadSiddiqui70
ย 
IObit Driver Booster Pro 12.4-12.5 license keys 2025-2026
chaudhryakashoo065
ย 
Telemedicine App Development_ Key Factors to Consider for Your Healthcare Ven...
Mobilityinfotech
ย 
capitulando la keynote de GrafanaCON 2025 - Madrid
Imma Valls Bernaus
ย 
Automatic_Iperf_Log_Result_Excel_visual_v2.pptx
Chen-Chih Lee
ย 
IDM Crack with Internet Download Manager 6.42 [Latest 2025]
HyperPc soft
ย 
IDM Crack with Internet Download Manager 6.42 Build 41
utfefguu
ย 
Ad

Start Flying with Python & Apache TinkerPop

  • 1. Start Flying with Python & Apache TinkerPop Graph Day SF Jason Plurad โ€ข [email protected] โ€ข @pluradj IBM Open Technology โ€ข Apache TinkerPop โ€ข JanusGraph Saturday, June 17, 2017
  • 2. ยฉ2017 IBM Corporation 19 June 20172 @pluradj Open source โ€ข Graph computing Dev @IBM โ€ข PMC @ApacheTinkerPop โ€ข TSC @JanusGraph Food truck chaser Jason Plurad
  • 3. ยฉ2017 IBM Corporation 19 June 20173 Agenda Apache TinkerPop Gremlin + Python - Jupyter - Flask - IBM Cloud House of Mirrors: Ketrina Yim @KetrinaYim
  • 4. ยฉ2017 IBM Corporation 19 June 20174 Founded 2009 โ€ข Marko Rodriguez @twarko Apache Top-Level Project 2016 โ€ข PMC Chair: Stephen Mallette @spmallette Committers: 16 โ€ข Contributors: 67 โ€ข Graph Systems: 20 https://tinkerpop.apache.org
  • 5. ยฉ2017 IBM Corporation 19 June 20175 Apache TinkerPop: Graph Computing Framework ยง Defines graph structure and process ยง Core framework is written in Java ยง Provider implementations โ€“ Azure Cosmos DB โ€“ Blazegraph โ€“ DataStax Enterprise Graph โ€“ GRAKN.AI โ€“ HGraphDB โ€“ IBM Graph โ€“ JanusGraph โ€“ Neo4j โ€“ OrientDB โ€“ Sqlg โ€“ Stardog
  • 6. ยฉ2017 IBM Corporation 19 June 20176 Gremlin Traversal Language sql2gremlin: Daniel Kuppitz @dkuppitz Recursively show all employees and their supervisors
  • 7. ยฉ2017 IBM Corporation 19 June 20177 Graph Application Architecture Gremlin Server Graph DatabaseApplication
  • 8. ยฉ2017 IBM Corporation 19 June 20178 Gremlin Language Drivers gremlin-javascript: Jean-Baptiste Musso @jbmusso Gremlin Bindings
  • 9. ยฉ2017 IBM Corporation 19 June 20179 Gremlin Language Variants (GLV) ยง Elevate Gremlin to a top-level citizen in the programming language of choice ยง GLV can work with any modern language โ€“ Function composition โ€“ Function nesting ยง Java and Groovy (native) ยง Python is the first non-JVM GLV ยง Others are coming soon (JavaScript, C#) ยง SPARQL-Gremlin and SQL-Gremlin http://tinkerpop.apache.org/docs/current/tutorials/gremlin-language-variants
  • 10. ยฉ2017 IBM Corporation 19 June 201710 Gremlin Bytecode http://www.datastax.com/dev/blog/the-benefits-of-the-gremlin-graph-traversal-machine [ ['V'], ['range', 0, 5], ['out', 'created'], ['values', 'name'] ] g.V().range(0, 5). out('created'). values('name')
  • 11. ยฉ2017 IBM Corporation 19 June 201711
  • 12. ยฉ2017 IBM Corporation 19 June 201712 Programming Language Popularity TIOBE Index PYPL Popularity RedMonk Rankings
  • 13. ยฉ2017 IBM Corporation 19 June 201713 Example Python Application Architecture Graph DatabaseClients Web browser Data notebook Gremlin Bytecode Gremlin Bytecode HTTP HTTP ipython-gremlin Gremlin-Python Application Server
  • 14. ยฉ2017 IBM Corporation 19 June 201714
  • 15. ยฉ2017 IBM Corporation 19 June 201715 Gremlin-Python (GLV) ยง Directly incorporated and tested by Apache TinkerPop ยง Implements core pieces found in Gremlin-Java โ€“ Graph Traversal โ€“ Graph Traversal Source โ€“ __ ยง Install via pip package manager ยง Gremlin-Python sugar โ€“ g.V().both()[1:3].toList() โ€“ g.V().both().name.toList() ยง Bindings โ€“ g.V(('id',4)).out('created').name.toList() http://tinkerpop.apache.org/docs/current/reference/#gremlin-python
  • 16. ยฉ2017 IBM Corporation 19 June 201716
  • 17. ยฉ2017 IBM Corporation 19 June 201717 ipython-gremlin: Gremlin Magic ipython-gremlin: David Michael Brown @davebshow Line Magic CellMagic
  • 18. ยฉ2017 IBM Corporation 19 June 201718 ipython-gremlin: Python integrations ipython-gremlin: David Michael Brown @davebshow pandas, matplotlib NetworkX
  • 19. ยฉ2017 IBM Corporation 19 June 201719 Air Routes Graph Air Routes Graph: Kelvin Lawrence @gfxman
  • 20. ยฉ2017 IBM Corporation 19 June 201720 Air Routes Web Application ยง Build a small set of APIs as a microservice to power the app ยง APIs can be used to โ€“ Serve data to the app โ€“ Serve data to other services โ€“ Serve data to the Jupyter notebook ยง Example API for routes โ€“ GET /routes/<orig> โ€“ GET /routes/<orig>/<dest> โ€“ GET /routes/<orig>/<dest>?maxhops=2 ยง Graph (TinkerPop + Gremlin) is an implementation detail
  • 21. ยฉ2017 IBM Corporation 19 June 201721
  • 22. ยฉ2017 IBM Corporation 19 June 201722
  • 23. ยฉ2017 IBM Corporation 19 June 201723
  • 24. ยฉ2017 IBM Corporation 19 June 201724 Flying into the cloud ยง Graphs are most useful when they are large ยง Operating distributed clusters โ€“ Security โ€“ Availability โ€“ Scalability ยง Sharing is caring
  • 25. ยฉ2017 IBM Corporation 19 June 201725 Python Application Architecture (Local) Graph DatabaseClients Web browser Data notebook Gremlin Bytecode Gremlin Bytecode HTTP HTTP ipython-gremlin Gremlin-Python Application Server
  • 26. ยฉ2017 IBM Corporation 19 June 201726 Python Application Architecture (IBM Cloud) Graph Database Application Server Clients Web browser Data notebook Gremlin Bytecode Gremlin Bytecode HTTP HTTP ipython-gremlin Gremlin-Python
  • 27. ยฉ2017 IBM Corporation 19 June 201727 https://www.compose.com/janusgraph
  • 28. ยฉ2017 IBM Corporation 19 June 201728 Thank You: Open Source Foundations