SlideShare a Scribd company logo
1 of 35
Getting Your
Hands On
Graphs
Nathan T Freeman
Chief Software Architect
Why Framed Graphs
• Performance
• Flexibility
• Ease of Use
• Low Risk
Today’s Mission
• Help you understand the power of GraphNSF
• Show you concrete examples
• Avoid making your brain hurt
– But please understand, we’re drinking from a
firehose for two hours
– This is all I’ve done since 2014
Quick Graph Review
• Graphs are collections of vertices & edges
• Vertices are the entities of interest
• Edges are the relationships between them
• Vertices have whatever properties you want to
give them
• So do Edges
• There are no indices to define relationships
• In fact there are no indices at all
Quick Framed Graph Review
• Framed Graphs map Java objects to Vertices &
Edges
• No classes required; all implementation is
synthetic via interfaces
• Uses @annotations to define model rules
• Specific implementations are optional and
extensible
• Best expressed with Vertices as nouns, Edges as
verbs
What GraphNSF Does to Notes Data
• Virtualization layer via Java plugin
• All NSFs can be included in a contiguous data
set
• On-demand
• 4 models for all contents:
– It’s a Document db
– It’s a Map db
– It’s a Graph db
– It’s a Java object db (with schemas!)
Framed Graph Example
• Event vertex: MWLUG
• Presentation vertex: Hands on Graphs
• Person vertex: Nathan T Freeman
• Person vertex: Bob Kadrie
• Person vertex: Devin Olson
• HappensAt edge
• Presents edge
• Attends edge
MWLUG
Hands on
Graphs
Bob
Kadrie
Devin
Olson
Nathan
Freeman
Movie vertex: Suicide SquadActor vertex: Will SmithActor vertex: Margot RobbieStarsIn edgeMovie vertex: FocusActor vertex: Jared LetoCharacter vertex: JokerPortrays edgeActor vertex: Heath LedgerCharacter vertex: Will SmithAppearsIn edge
r
Today’s Plan – Org Chart Graph
Enterprise
Person
Department
Position
EmployedAt
ReportsInto
DivisionOf
AssignedTo
Manages
ReportsTo
Enterprise Vertex
• Name
– @Property, @TypedProperty, @TypeValue
• Adjacent Departments
– @Adjacent, @AdjacentUnique
• Adjacent Persons
Person Vertex
• First Name
• Last Name
• Email
• Phone
• Adjacent Enterprise
• Adjacent Positions
Department Vertex
• Name
• Adjacent Departments (sub-departments)
• Adjacent Department (parent department)
• Adjacent Positions
• Adjacent Manager Position
Position Vertex
• Title
• Description
• Adjacent Department
• Adjacent Persons (Reports)
• Adjacent Person (Boss)
A look back at edges
• EmployedAt
– Start date
– End date
– @InVertex, @OutVertex
– @Incidence, @IncidenceUnique
• AssignedTo
– Start date
– End date
Assembling the plugin
• IGraphFactory interface
• Extension point
• Defining ElementStores
• Naming our Graph
We have a Graph. What next?
Everything begins with a Vertex
• Start at the top
• Start with me
• Start with a search
From there we branch out
• Given a vertex, iterate adjacency until you get
what you need
• Example: Find X’s peers
• Example: Find grandboss
• Example: Find everyone in department
ODA REST API
• Based on DAS (Had to modify IBM’s code a little)
• Currently frames only
• Other modes coming (or you can start writing!)
REST API Basics
• Hey, I wrote some documentation!
– https://wiki.openntf.org/display/ODA/How+to+use+t
he+ODA+REST+API
– Okay, Keith helped
• http://server/api/oda/frames/mwlug
– Route to collections
• http://server/api/oda/frame/mwlug
– Route to elements
REST API Supported Methods
• GET, POST, PUT, DELETE, PATCH
• GETs use query parameters
• DELETEs use query parameters
• POST, PUT, PATCH use JSON payloads
REST API Common GET params
• /frames/
– ?type=[namespace]
– &key=[string]
– &filterkey/filtervalue, &partialkey/partialvalue,
&startskey/startsvalue
– &orderby=[property list (comma-separated)]
• /frame/
– ?id=[identifier]
– &edges
– &label=[edge label list (comma-separated]
– &orderby=[property list (comma-separated)]
– &vertices
REST API Common POST params
• /frames/ - none. Only payload
• /frame/
– ?id=[identifier]
– Payload is one or more edges
REST API Common PUT params
• /frames/ - none
• /frame/
– ?id=[identifier]
– Payload is complete vertex/edge contents
REST API Common PATCH params
• /frames/
– Payload is JSON Array of updates
• /frame/
– ?id=[identifier]
– Payload is delta-only for vertex or edge
REST API Common DELETE params
• /frames/ - none
• /frame/
– ?id=[identifiers (comma-separated)]
REST API Demos
Advanced Stuff
• We already have Persons
• They are in the Directory!
• Can we put the Directory in the graph?
The Problem
• When we create edges between vertices, the
vertices are modified.
• This could mean a LOT of updates to the
Directory in an active graph
• Lots of updates to the Directory is double plus
bad
The Solution: Proxy Vertices
• Proxies can be configured per Element Store
• Create mirror documents per vertex to hold
graph info
• Non-graph properties are passed through to
original
• DirPerson Vertex
• BoundTo Edge
Custom Key Resolvers
• How would we like to find Persons?
• Notes persons: canonical name
• Create a Java implementation to discover
document vertex
• Demo
Now we have a directory (ho ho ho)
• That means we have Views
• Let’s use them!
• Why? Because we can!
View Vertices
• All View Design notes are Framed Vertices
• All View Categories are Framed Vertices
• All ViewEntries are Framed Edges (View ->
Category, Category -> Document)
Nathan T Freeman
ntf@redpillnow.com
redpillnow.comwww
Acapulco, Mexico
Nathanfreeman.wordpress.com
Getting your hands on graphs

More Related Content

What's hot

What's hot (20)

Adding Rules on Existing Hypermedia APIs
Adding Rules on Existing Hypermedia APIsAdding Rules on Existing Hypermedia APIs
Adding Rules on Existing Hypermedia APIs
 
React & GraphQL
React & GraphQLReact & GraphQL
React & GraphQL
 
APIs and Linked Data: A match made in Heaven
APIs and Linked Data: A match made in HeavenAPIs and Linked Data: A match made in Heaven
APIs and Linked Data: A match made in Heaven
 
RDF Data Quality Assessment - connecting the pieces
RDF Data Quality Assessment - connecting the piecesRDF Data Quality Assessment - connecting the pieces
RDF Data Quality Assessment - connecting the pieces
 
SharePoint PnP Demo - react-display-hierarchy
SharePoint PnP Demo - react-display-hierarchySharePoint PnP Demo - react-display-hierarchy
SharePoint PnP Demo - react-display-hierarchy
 
[DevDay2019] Layering GraphQL on top of existing infrastructure - By Phan Tha...
[DevDay2019] Layering GraphQL on top of existing infrastructure - By Phan Tha...[DevDay2019] Layering GraphQL on top of existing infrastructure - By Phan Tha...
[DevDay2019] Layering GraphQL on top of existing infrastructure - By Phan Tha...
 
Mastering On-Site Search / Custom Site Search
Mastering On-Site Search / Custom Site SearchMastering On-Site Search / Custom Site Search
Mastering On-Site Search / Custom Site Search
 
Microsoft Flow - SharePoint Saturday Paris 2017
Microsoft Flow - SharePoint Saturday Paris 2017Microsoft Flow - SharePoint Saturday Paris 2017
Microsoft Flow - SharePoint Saturday Paris 2017
 
Building materialised views for linked data systems using microservices
Building materialised views for linked data systems using microservicesBuilding materialised views for linked data systems using microservices
Building materialised views for linked data systems using microservices
 
REA Group's journey with Data Cataloging and Amundsen
REA Group's journey with Data Cataloging and AmundsenREA Group's journey with Data Cataloging and Amundsen
REA Group's journey with Data Cataloging and Amundsen
 
Fried data summit data quality data analytics together
Fried data summit data quality data analytics togetherFried data summit data quality data analytics together
Fried data summit data quality data analytics together
 
How Graph Databases efficiently store, manage and query connected data at s...
How Graph Databases efficiently  store, manage and query  connected data at s...How Graph Databases efficiently  store, manage and query  connected data at s...
How Graph Databases efficiently store, manage and query connected data at s...
 
SharePoint PnP Demo - react-manage-o365-groups
SharePoint PnP Demo - react-manage-o365-groupsSharePoint PnP Demo - react-manage-o365-groups
SharePoint PnP Demo - react-manage-o365-groups
 
Running Natural Language Queries on MongoDB
Running Natural Language Queries on MongoDBRunning Natural Language Queries on MongoDB
Running Natural Language Queries on MongoDB
 
Delve and the Office Graph for IT- Pros & Admins
Delve and the Office Graph for IT- Pros & AdminsDelve and the Office Graph for IT- Pros & Admins
Delve and the Office Graph for IT- Pros & Admins
 
Making the leap to BI on Hadoop by Mariani, dave @ atscale
Making the leap to BI on Hadoop by Mariani, dave @ atscaleMaking the leap to BI on Hadoop by Mariani, dave @ atscale
Making the leap to BI on Hadoop by Mariani, dave @ atscale
 
Neo4j & fby presentation
Neo4j & fby presentationNeo4j & fby presentation
Neo4j & fby presentation
 
Data Quality at the Scale of Aggregation
Data Quality at the Scale of AggregationData Quality at the Scale of Aggregation
Data Quality at the Scale of Aggregation
 
Introduction to Elastic with a hint of Symfony and Docker
Introduction to Elastic with a hint of Symfony and DockerIntroduction to Elastic with a hint of Symfony and Docker
Introduction to Elastic with a hint of Symfony and Docker
 
GraphQL or RESTful
GraphQL or RESTfulGraphQL or RESTful
GraphQL or RESTful
 

Viewers also liked

MEMS Sensors Overview
MEMS Sensors OverviewMEMS Sensors Overview
MEMS Sensors Overview
Jennifer Chin
 
Innovate in new and exciting optical sensing applications in industrial marke...
Innovate in new and exciting optical sensing applications in industrial marke...Innovate in new and exciting optical sensing applications in industrial marke...
Innovate in new and exciting optical sensing applications in industrial marke...
Design World
 

Viewers also liked (20)

Rethinking Notes
Rethinking NotesRethinking Notes
Rethinking Notes
 
Review: Wellness technology in the workplace
Review: Wellness technology in the workplace Review: Wellness technology in the workplace
Review: Wellness technology in the workplace
 
The Lotus Position: Four Degrees of Freedom
The Lotus Position: Four Degrees of FreedomThe Lotus Position: Four Degrees of Freedom
The Lotus Position: Four Degrees of Freedom
 
Once You Go Graph
Once You Go GraphOnce You Go Graph
Once You Go Graph
 
Assistive Technology in the Workplace
Assistive Technology in the WorkplaceAssistive Technology in the Workplace
Assistive Technology in the Workplace
 
Best practices for optimizing performance and reducing costs when selecting a...
Best practices for optimizing performance and reducing costs when selecting a...Best practices for optimizing performance and reducing costs when selecting a...
Best practices for optimizing performance and reducing costs when selecting a...
 
An Introduction to Web Components
An Introduction to Web ComponentsAn Introduction to Web Components
An Introduction to Web Components
 
Design Matters
Design MattersDesign Matters
Design Matters
 
The Lotus Position : 3 Degrees Of Freedom
The Lotus Position : 3 Degrees Of FreedomThe Lotus Position : 3 Degrees Of Freedom
The Lotus Position : 3 Degrees Of Freedom
 
GL Optic Optical Spectrophotometers from Saelig
GL Optic Optical Spectrophotometers from SaeligGL Optic Optical Spectrophotometers from Saelig
GL Optic Optical Spectrophotometers from Saelig
 
MEMS Sensors Overview
MEMS Sensors OverviewMEMS Sensors Overview
MEMS Sensors Overview
 
Blending
BlendingBlending
Blending
 
Innovate in new and exciting optical sensing applications in industrial marke...
Innovate in new and exciting optical sensing applications in industrial marke...Innovate in new and exciting optical sensing applications in industrial marke...
Innovate in new and exciting optical sensing applications in industrial marke...
 
A World Without Applications
A World Without ApplicationsA World Without Applications
A World Without Applications
 
Poised For Growth. Digital And The Future Of A Rapidly Expanding Fitness Indu...
Poised For Growth. Digital And The Future Of A Rapidly Expanding Fitness Indu...Poised For Growth. Digital And The Future Of A Rapidly Expanding Fitness Indu...
Poised For Growth. Digital And The Future Of A Rapidly Expanding Fitness Indu...
 
Beyond XPages
Beyond XPagesBeyond XPages
Beyond XPages
 
Big Data With Graphs
Big Data With GraphsBig Data With Graphs
Big Data With Graphs
 
SLOPE 3rd workshop - presentation 3
SLOPE 3rd workshop - presentation 3SLOPE 3rd workshop - presentation 3
SLOPE 3rd workshop - presentation 3
 
Augmented Reality for Travel: A Business Model
Augmented Reality for Travel: A Business ModelAugmented Reality for Travel: A Business Model
Augmented Reality for Travel: A Business Model
 
Mems sensor
Mems sensorMems sensor
Mems sensor
 

Similar to Getting your hands on graphs

MathWorks Interview Lecture
MathWorks Interview LectureMathWorks Interview Lecture
MathWorks Interview Lecture
John Yates
 

Similar to Getting your hands on graphs (20)

AgensGraph: a Multi-model Graph Database based on PostgreSql
AgensGraph: a Multi-model Graph Database based on PostgreSqlAgensGraph: a Multi-model Graph Database based on PostgreSql
AgensGraph: a Multi-model Graph Database based on PostgreSql
 
Graph Databases in the Microsoft Ecosystem
Graph Databases in the Microsoft EcosystemGraph Databases in the Microsoft Ecosystem
Graph Databases in the Microsoft Ecosystem
 
AgensGraph Presentation at PGConf.us 2017
AgensGraph Presentation at PGConf.us 2017AgensGraph Presentation at PGConf.us 2017
AgensGraph Presentation at PGConf.us 2017
 
How To Model and Construct Graphs with Oracle Database (AskTOM Office Hours p...
How To Model and Construct Graphs with Oracle Database (AskTOM Office Hours p...How To Model and Construct Graphs with Oracle Database (AskTOM Office Hours p...
How To Model and Construct Graphs with Oracle Database (AskTOM Office Hours p...
 
Neo4j Training Introduction
Neo4j Training IntroductionNeo4j Training Introduction
Neo4j Training Introduction
 
Change RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDBChange RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDB
 
MathWorks Interview Lecture
MathWorks Interview LectureMathWorks Interview Lecture
MathWorks Interview Lecture
 
GraphDb in XPages
GraphDb in XPagesGraphDb in XPages
GraphDb in XPages
 
(DAT203) Building Graph Databases on AWS
(DAT203) Building Graph Databases on AWS(DAT203) Building Graph Databases on AWS
(DAT203) Building Graph Databases on AWS
 
Searching and Querying Knowledge Graphs with Solr/SIREn - A Reference Archite...
Searching and Querying Knowledge Graphs with Solr/SIREn - A Reference Archite...Searching and Querying Knowledge Graphs with Solr/SIREn - A Reference Archite...
Searching and Querying Knowledge Graphs with Solr/SIREn - A Reference Archite...
 
Design Systems at Scale
Design Systems at ScaleDesign Systems at Scale
Design Systems at Scale
 
Zero to Sixty with Oracle ApEx
Zero to Sixty with Oracle ApExZero to Sixty with Oracle ApEx
Zero to Sixty with Oracle ApEx
 
Evolution of the Graph Schema
Evolution of the Graph SchemaEvolution of the Graph Schema
Evolution of the Graph Schema
 
Processing Large Graphs
Processing Large GraphsProcessing Large Graphs
Processing Large Graphs
 
Transforming AI with Graphs: Real World Examples using Spark and Neo4j
Transforming AI with Graphs: Real World Examples using Spark and Neo4jTransforming AI with Graphs: Real World Examples using Spark and Neo4j
Transforming AI with Graphs: Real World Examples using Spark and Neo4j
 
Transforming AI with Graphs: Real World Examples using Spark and Neo4j
Transforming AI with Graphs: Real World Examples using Spark and Neo4jTransforming AI with Graphs: Real World Examples using Spark and Neo4j
Transforming AI with Graphs: Real World Examples using Spark and Neo4j
 
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
 
flickr's architecture & php
flickr's architecture & php flickr's architecture & php
flickr's architecture & php
 
Learning to run
Learning to runLearning to run
Learning to run
 
Punta Dreamin 17 Generic Apex and Tooling Api
Punta Dreamin 17 Generic Apex and Tooling ApiPunta Dreamin 17 Generic Apex and Tooling Api
Punta Dreamin 17 Generic Apex and Tooling Api
 

More from Red Pill Now

More from Red Pill Now (18)

M is for modernization
M is for modernizationM is for modernization
M is for modernization
 
Take 5 Modernization Workshop
Take 5 Modernization WorkshopTake 5 Modernization Workshop
Take 5 Modernization Workshop
 
Reusability is the goal
Reusability is the goalReusability is the goal
Reusability is the goal
 
The internet of (Notes) Things
The internet of (Notes) ThingsThe internet of (Notes) Things
The internet of (Notes) Things
 
Countdown to Domino 2025
Countdown to Domino 2025Countdown to Domino 2025
Countdown to Domino 2025
 
Red Pill Now - Taking the Guesswork Out of Selecting a Solution for Modernizi...
Red Pill Now - Taking the Guesswork Out of Selecting a Solution for Modernizi...Red Pill Now - Taking the Guesswork Out of Selecting a Solution for Modernizi...
Red Pill Now - Taking the Guesswork Out of Selecting a Solution for Modernizi...
 
Design for the Visually Impaired
Design for the Visually ImpairedDesign for the Visually Impaired
Design for the Visually Impaired
 
Migration Verus Modernization
Migration Verus ModernizationMigration Verus Modernization
Migration Verus Modernization
 
I Smell a RAT: Rapid Application Testing
I Smell a RAT: Rapid Application TestingI Smell a RAT: Rapid Application Testing
I Smell a RAT: Rapid Application Testing
 
IBM XPages: The Next Step in Your Life As a Notes Developer
IBM XPages: The Next Step in Your Life As a Notes DeveloperIBM XPages: The Next Step in Your Life As a Notes Developer
IBM XPages: The Next Step in Your Life As a Notes Developer
 
FIVE Reasons Not To Use Red Pill Now
FIVE Reasons Not To Use Red Pill NowFIVE Reasons Not To Use Red Pill Now
FIVE Reasons Not To Use Red Pill Now
 
Influencing Behavior Through Color and Page Design
Influencing Behavior Through Color and Page DesignInfluencing Behavior Through Color and Page Design
Influencing Behavior Through Color and Page Design
 
The PRPL Pattern
The PRPL PatternThe PRPL Pattern
The PRPL Pattern
 
Big Data With Graphs
Big  Data With GraphsBig  Data With Graphs
Big Data With Graphs
 
The Internet of (Notes) Things
The Internet of (Notes) ThingsThe Internet of (Notes) Things
The Internet of (Notes) Things
 
M is for modernization
M is for modernizationM is for modernization
M is for modernization
 
Digging for Gold
Digging for GoldDigging for Gold
Digging for Gold
 
IBM Connect 2016 Recap
IBM Connect 2016 RecapIBM Connect 2016 Recap
IBM Connect 2016 Recap
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 

Getting your hands on graphs

  • 1. Getting Your Hands On Graphs Nathan T Freeman Chief Software Architect
  • 2. Why Framed Graphs • Performance • Flexibility • Ease of Use • Low Risk
  • 3. Today’s Mission • Help you understand the power of GraphNSF • Show you concrete examples • Avoid making your brain hurt – But please understand, we’re drinking from a firehose for two hours – This is all I’ve done since 2014
  • 4. Quick Graph Review • Graphs are collections of vertices & edges • Vertices are the entities of interest • Edges are the relationships between them • Vertices have whatever properties you want to give them • So do Edges • There are no indices to define relationships • In fact there are no indices at all
  • 5. Quick Framed Graph Review • Framed Graphs map Java objects to Vertices & Edges • No classes required; all implementation is synthetic via interfaces • Uses @annotations to define model rules • Specific implementations are optional and extensible • Best expressed with Vertices as nouns, Edges as verbs
  • 6. What GraphNSF Does to Notes Data • Virtualization layer via Java plugin • All NSFs can be included in a contiguous data set • On-demand • 4 models for all contents: – It’s a Document db – It’s a Map db – It’s a Graph db – It’s a Java object db (with schemas!)
  • 7. Framed Graph Example • Event vertex: MWLUG • Presentation vertex: Hands on Graphs • Person vertex: Nathan T Freeman • Person vertex: Bob Kadrie • Person vertex: Devin Olson • HappensAt edge • Presents edge • Attends edge MWLUG Hands on Graphs Bob Kadrie Devin Olson Nathan Freeman
  • 8. Movie vertex: Suicide SquadActor vertex: Will SmithActor vertex: Margot RobbieStarsIn edgeMovie vertex: FocusActor vertex: Jared LetoCharacter vertex: JokerPortrays edgeActor vertex: Heath LedgerCharacter vertex: Will SmithAppearsIn edge r
  • 9. Today’s Plan – Org Chart Graph Enterprise Person Department Position EmployedAt ReportsInto DivisionOf AssignedTo Manages ReportsTo
  • 10. Enterprise Vertex • Name – @Property, @TypedProperty, @TypeValue • Adjacent Departments – @Adjacent, @AdjacentUnique • Adjacent Persons
  • 11. Person Vertex • First Name • Last Name • Email • Phone • Adjacent Enterprise • Adjacent Positions
  • 12. Department Vertex • Name • Adjacent Departments (sub-departments) • Adjacent Department (parent department) • Adjacent Positions • Adjacent Manager Position
  • 13. Position Vertex • Title • Description • Adjacent Department • Adjacent Persons (Reports) • Adjacent Person (Boss)
  • 14. A look back at edges • EmployedAt – Start date – End date – @InVertex, @OutVertex – @Incidence, @IncidenceUnique • AssignedTo – Start date – End date
  • 15. Assembling the plugin • IGraphFactory interface • Extension point • Defining ElementStores • Naming our Graph
  • 16. We have a Graph. What next?
  • 17. Everything begins with a Vertex • Start at the top • Start with me • Start with a search
  • 18. From there we branch out • Given a vertex, iterate adjacency until you get what you need • Example: Find X’s peers • Example: Find grandboss • Example: Find everyone in department
  • 19. ODA REST API • Based on DAS (Had to modify IBM’s code a little) • Currently frames only • Other modes coming (or you can start writing!)
  • 20. REST API Basics • Hey, I wrote some documentation! – https://wiki.openntf.org/display/ODA/How+to+use+t he+ODA+REST+API – Okay, Keith helped • http://server/api/oda/frames/mwlug – Route to collections • http://server/api/oda/frame/mwlug – Route to elements
  • 21. REST API Supported Methods • GET, POST, PUT, DELETE, PATCH • GETs use query parameters • DELETEs use query parameters • POST, PUT, PATCH use JSON payloads
  • 22. REST API Common GET params • /frames/ – ?type=[namespace] – &key=[string] – &filterkey/filtervalue, &partialkey/partialvalue, &startskey/startsvalue – &orderby=[property list (comma-separated)] • /frame/ – ?id=[identifier] – &edges – &label=[edge label list (comma-separated] – &orderby=[property list (comma-separated)] – &vertices
  • 23. REST API Common POST params • /frames/ - none. Only payload • /frame/ – ?id=[identifier] – Payload is one or more edges
  • 24. REST API Common PUT params • /frames/ - none • /frame/ – ?id=[identifier] – Payload is complete vertex/edge contents
  • 25. REST API Common PATCH params • /frames/ – Payload is JSON Array of updates • /frame/ – ?id=[identifier] – Payload is delta-only for vertex or edge
  • 26. REST API Common DELETE params • /frames/ - none • /frame/ – ?id=[identifiers (comma-separated)]
  • 28. Advanced Stuff • We already have Persons • They are in the Directory! • Can we put the Directory in the graph?
  • 29. The Problem • When we create edges between vertices, the vertices are modified. • This could mean a LOT of updates to the Directory in an active graph • Lots of updates to the Directory is double plus bad
  • 30. The Solution: Proxy Vertices • Proxies can be configured per Element Store • Create mirror documents per vertex to hold graph info • Non-graph properties are passed through to original • DirPerson Vertex • BoundTo Edge
  • 31. Custom Key Resolvers • How would we like to find Persons? • Notes persons: canonical name • Create a Java implementation to discover document vertex • Demo
  • 32. Now we have a directory (ho ho ho) • That means we have Views • Let’s use them! • Why? Because we can!
  • 33. View Vertices • All View Design notes are Framed Vertices • All View Categories are Framed Vertices • All ViewEntries are Framed Edges (View -> Category, Category -> Document)