SlideShare a Scribd company logo
1 of 23
Download to read offline
Metadata and Access Control
Using Ruby on Rails and Neo4j
September 2015
Agenda
Demo
• Asset Portal UI
• The code
Overview
• Neo4j.rb
• The asset portal
■ Asset management
■ Access control
Neo4j.rb
● Consists primarily of the neo4j-core, neo4j gems
● neo4j-core allows you to query at a low level
○ Raw Cypher queries: query("MATCH n RETURN n")
○ Query class API: query.match(:n).return(:n)
● neo4j provides the ActiveNode and ActiveRel modules for object
modeling of nodes and relationships
Neo4j.rb
Won “Best Community Contribution”
at GraphConnect San Francisco 2014
Neo4j.rb - Querying
Cypher
MATCH (user:User)<-[:written_by]-(:Post)<-[:comments_on]-(c:Comment)-[:written_by]->(user2:User)
WHERE user.id = 123
RETURN user2.name, count(c)
neo4j-core gem: Query API
session.query
.match('(user:User)<-[:written_by]-(:Post)<-[:comments_on]-(c:Comment)-[:written_by]->(user2:User)')
.where(user: {id: 123})
.return('user2.name', 'count(c)')
Neo4j.rb - Querying
Cypher
MATCH (user:User)<-[:written_by]-(:Post)<-[:comments_on]-(c:Comment)-[:written_by]->(user2:User)
WHERE user.id = 123
RETURN user2.name, count(c)
neo4j gem: ActiveNode
user.find_by(id: 123)
user.posts.comments(:c).author(:u2).pluck('u2.name, count(c)')
Neo4j.rb - Querying
class Post
has_one :out, :author, type: :written_by, model_class: 'User'
has_many :in, :comments, type: :comments_on
end
class Comment
has_one :out, :author, type: :written_by, model_class: 'User'
end
class User
has_many :in, :posts, origin: :author
end
user.posts.comments(:c).author(:u2).pluck('u2.name, count(c)')
Many ways to get help
Active on StackOverflow
stackoverflow.com/questions/ask?tags=neo4j.rb+neo4j+ruby
Gitter chat room
gitter.im/neo4jrb/neo4j
Twitter
twitter.com/neo4jrb
The Asset Portal
We wanted to:
• Rewrite our existing GraphGist portal
• Create a learning resource for Neo4j and Ruby
• Make a Neo4j.rb screencast series
• Write articles: "Why You Should Use Neo4j in Your Next Ruby App"
• Host a webinar
• Make something useful
Quick aside: GraphGists
● Interactive Neo4j-backed documents for demonstrating graph use-
cases and solutions
Website:
graphgist.neo4j.com
GraphConnect Presentation:
From Zero to GraphGists
DEMO
GitHub:
github/neo4j-examples/asset_portal
Heroku demo:
asset-portal-demo.herokuapp.com
The Asset Portal
The Asset Portal - What’s Related and How
Assets are connected to Model
indirectly via the Asset’s label and
the Model’s name property
The Asset Portal - Creating Assets and Metadata
class Book < Asset
property :isbn13, type: String
property :author, type: String
property :publish_date, type: String
end
This automatically generates a user interface for managing books and
their properties.
The Asset Portal - Access Control
● Access can be given
○ directly: User to Asset
○ indirectly: via a Group
○ indirectly: via a series of
Subgroups
● CAN_ACCESS relationships
have a “level” property to
determine “read” vs ”write”
The Asset Portal - Access Control
This sort of access control is
useful and easy to understand,
but is much more difficult to
implement in other databases.
The Asset Portal - Access Control
● Access can be given to:
○ A category which gives
them access to all assets in
that category
○ A type of asset (in this case
Book) which gives access to
all assets of that type
○ A property on an asset
type (in this case
“total_sales” on books)
The Asset Portal - Challenges
● Can we make an asset portal which is easy for people to get going
but which allows them to customize as they like?
● Can we make a generic asset portal which also works as a GraphGist
portal?
● Can we make a GraphGist portal which other people can host?
● How can we make an asset / GraphGist portal which is generic and
useful for everybody but which we can style to the neo4j.com
website?
The Asset Portal
Built using:
● Ruby on Rails
● Neo4j.rb
● Semantic UI
● Ember.js
Best practices:
● RSpec
● Rubocop
● Slim
● Devise
● Paperclip
The Asset Portal - Idea: As a Rails Engine
Rails Application
Your app with custom code Asset Portal Engine
● Asset CRUD UI
● Asset administration
○ Access
○ Approval
The Asset Portal - Idea: GraphGist application
GraphGist Application
Hosts your own GraphGists locally Asset Portal Engine
● Asset CRUD UI
● Asset administration
○ Access
○ Approval
Demo
● Asset portal UI
○ Viewing and editing assets
○ Setting permissions on assets, properties, categories
● Code
○ Book model
○ Asset.authorized_for
○ Asset.authorized_properties_query
Outroduction
Brian Underwood
Developer Advocate for Neo4j
Web: www.brian-underwood.codes
E-Mail: public@brian-underwood.codes
Twitter: @cheerfulstoic
Metadata and Access Control
Using Ruby on Rails and Neo4j
End of Presentation

More Related Content

What's hot

The Holy Grail of continuous delivery in distributed teams environment
The Holy Grail of continuous delivery in distributed teams environmentThe Holy Grail of continuous delivery in distributed teams environment
The Holy Grail of continuous delivery in distributed teams environmentSzymon Kurcab
 
Modern APIs with GraphQL
Modern APIs with GraphQLModern APIs with GraphQL
Modern APIs with GraphQLTaikai
 
A complementary currency toolkit in Clojure - Aspasia Beneti - Codemotion Ams...
A complementary currency toolkit in Clojure - Aspasia Beneti - Codemotion Ams...A complementary currency toolkit in Clojure - Aspasia Beneti - Codemotion Ams...
A complementary currency toolkit in Clojure - Aspasia Beneti - Codemotion Ams...Codemotion
 
Shaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patternsShaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patternsAsher Sterkin
 
Power of Elastic Search - nLocate
Power of Elastic Search - nLocatePower of Elastic Search - nLocate
Power of Elastic Search - nLocateAayush Shrestha
 
Drupal day Roma 2017 - Zaratan
Drupal day Roma 2017 - Zaratan Drupal day Roma 2017 - Zaratan
Drupal day Roma 2017 - Zaratan r3vit
 
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8DrupalDay
 
Attain Clean Code in Sitecore Solutions using Design Patterns
Attain Clean Code in Sitecore Solutions using Design PatternsAttain Clean Code in Sitecore Solutions using Design Patterns
Attain Clean Code in Sitecore Solutions using Design PatternsMichael Reynolds
 
Tools for building your identity application
Tools for building your identity applicationTools for building your identity application
Tools for building your identity applicationNemanja Patrnogic
 
Jumbo the Hadoop cluster bootstrapper
Jumbo the Hadoop cluster bootstrapperJumbo the Hadoop cluster bootstrapper
Jumbo the Hadoop cluster bootstrapperGauthier LEONARD
 
Front-end for Java developers Devoxx France 2018
Front-end for Java developers Devoxx France 2018Front-end for Java developers Devoxx France 2018
Front-end for Java developers Devoxx France 2018Deepu K Sasidharan
 

What's hot (13)

The Holy Grail of continuous delivery in distributed teams environment
The Holy Grail of continuous delivery in distributed teams environmentThe Holy Grail of continuous delivery in distributed teams environment
The Holy Grail of continuous delivery in distributed teams environment
 
Modern APIs with GraphQL
Modern APIs with GraphQLModern APIs with GraphQL
Modern APIs with GraphQL
 
A complementary currency toolkit in Clojure - Aspasia Beneti - Codemotion Ams...
A complementary currency toolkit in Clojure - Aspasia Beneti - Codemotion Ams...A complementary currency toolkit in Clojure - Aspasia Beneti - Codemotion Ams...
A complementary currency toolkit in Clojure - Aspasia Beneti - Codemotion Ams...
 
Shaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patternsShaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patterns
 
JSON API Specificiation
JSON API SpecificiationJSON API Specificiation
JSON API Specificiation
 
Power of Elastic Search - nLocate
Power of Elastic Search - nLocatePower of Elastic Search - nLocate
Power of Elastic Search - nLocate
 
Drupal day Roma 2017 - Zaratan
Drupal day Roma 2017 - Zaratan Drupal day Roma 2017 - Zaratan
Drupal day Roma 2017 - Zaratan
 
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
 
Careerdays dev ops
Careerdays   dev opsCareerdays   dev ops
Careerdays dev ops
 
Attain Clean Code in Sitecore Solutions using Design Patterns
Attain Clean Code in Sitecore Solutions using Design PatternsAttain Clean Code in Sitecore Solutions using Design Patterns
Attain Clean Code in Sitecore Solutions using Design Patterns
 
Tools for building your identity application
Tools for building your identity applicationTools for building your identity application
Tools for building your identity application
 
Jumbo the Hadoop cluster bootstrapper
Jumbo the Hadoop cluster bootstrapperJumbo the Hadoop cluster bootstrapper
Jumbo the Hadoop cluster bootstrapper
 
Front-end for Java developers Devoxx France 2018
Front-end for Java developers Devoxx France 2018Front-end for Java developers Devoxx France 2018
Front-end for Java developers Devoxx France 2018
 

Similar to Metadata and Access Control

Getting started with Graph Databases & Neo4j
Getting started with Graph Databases & Neo4jGetting started with Graph Databases & Neo4j
Getting started with Graph Databases & Neo4jSuroor Wijdan
 
Training Week: Build APIs with Neo4j GraphQL Library
Training Week: Build APIs with Neo4j GraphQL LibraryTraining Week: Build APIs with Neo4j GraphQL Library
Training Week: Build APIs with Neo4j GraphQL LibraryNeo4j
 
Training Series: Build APIs with Neo4j GraphQL Library
Training Series: Build APIs with Neo4j GraphQL LibraryTraining Series: Build APIs with Neo4j GraphQL Library
Training Series: Build APIs with Neo4j GraphQL LibraryNeo4j
 
GraphQL - The new "Lingua Franca" for API-Development
GraphQL - The new "Lingua Franca" for API-DevelopmentGraphQL - The new "Lingua Franca" for API-Development
GraphQL - The new "Lingua Franca" for API-Developmentjexp
 
GraphQL in an Age of REST
GraphQL in an Age of RESTGraphQL in an Age of REST
GraphQL in an Age of RESTYos Riady
 
A general introduction to Spring Data / Neo4J
A general introduction to Spring Data / Neo4JA general introduction to Spring Data / Neo4J
A general introduction to Spring Data / Neo4JFlorent Biville
 
Who needs containers in a serverless world
Who needs containers in a serverless worldWho needs containers in a serverless world
Who needs containers in a serverless worldMatthias Luebken
 
All About GRAND Stack: GraphQL, React, Apollo, and Neo4j (Mark Needham) - Gre...
All About GRAND Stack: GraphQL, React, Apollo, and Neo4j (Mark Needham) - Gre...All About GRAND Stack: GraphQL, React, Apollo, and Neo4j (Mark Needham) - Gre...
All About GRAND Stack: GraphQL, React, Apollo, and Neo4j (Mark Needham) - Gre...GreeceJS
 
Tutorial: Building a GraphQL API in PHP
Tutorial: Building a GraphQL API in PHPTutorial: Building a GraphQL API in PHP
Tutorial: Building a GraphQL API in PHPAndrew Rota
 
Day 2 - Intro to Rails
Day 2 - Intro to RailsDay 2 - Intro to Rails
Day 2 - Intro to RailsBarry Jones
 
Visual, scalable, and manageable data loading to and from Neo4j with Apache Hop
Visual, scalable, and manageable data loading to and from Neo4j with Apache Hop Visual, scalable, and manageable data loading to and from Neo4j with Apache Hop
Visual, scalable, and manageable data loading to and from Neo4j with Apache Hop Neo4j
 
Building a GraphQL API in PHP
Building a GraphQL API in PHPBuilding a GraphQL API in PHP
Building a GraphQL API in PHPAndrew Rota
 
web2py:Web development like a boss
web2py:Web development like a bossweb2py:Web development like a boss
web2py:Web development like a bossFrancisco Ribeiro
 
Building APIs with GraphQL and Flask
Building APIs with GraphQL and FlaskBuilding APIs with GraphQL and Flask
Building APIs with GraphQL and FlaskInexture Solutions
 
[Srijan Wednesday Webinar] Decoupled Demystified: The Present & Future of Dr...
 [Srijan Wednesday Webinar] Decoupled Demystified: The Present & Future of Dr... [Srijan Wednesday Webinar] Decoupled Demystified: The Present & Future of Dr...
[Srijan Wednesday Webinar] Decoupled Demystified: The Present & Future of Dr...Srijan Technologies
 
Montreal.rb 2022-10-05 - Glimmer DSL for SWT - Ruby Desktop Development GUI ...
 Montreal.rb 2022-10-05 - Glimmer DSL for SWT - Ruby Desktop Development GUI ... Montreal.rb 2022-10-05 - Glimmer DSL for SWT - Ruby Desktop Development GUI ...
Montreal.rb 2022-10-05 - Glimmer DSL for SWT - Ruby Desktop Development GUI ...Andy Maleh
 
Design Summit - Technology Vision - Oleg Barenboim and Jason Frey
Design Summit - Technology Vision - Oleg Barenboim and Jason FreyDesign Summit - Technology Vision - Oleg Barenboim and Jason Frey
Design Summit - Technology Vision - Oleg Barenboim and Jason FreyManageIQ
 

Similar to Metadata and Access Control (20)

Getting started with Graph Databases & Neo4j
Getting started with Graph Databases & Neo4jGetting started with Graph Databases & Neo4j
Getting started with Graph Databases & Neo4j
 
MongoDB Basics
MongoDB BasicsMongoDB Basics
MongoDB Basics
 
Training Week: Build APIs with Neo4j GraphQL Library
Training Week: Build APIs with Neo4j GraphQL LibraryTraining Week: Build APIs with Neo4j GraphQL Library
Training Week: Build APIs with Neo4j GraphQL Library
 
Training Series: Build APIs with Neo4j GraphQL Library
Training Series: Build APIs with Neo4j GraphQL LibraryTraining Series: Build APIs with Neo4j GraphQL Library
Training Series: Build APIs with Neo4j GraphQL Library
 
GraphQL - The new "Lingua Franca" for API-Development
GraphQL - The new "Lingua Franca" for API-DevelopmentGraphQL - The new "Lingua Franca" for API-Development
GraphQL - The new "Lingua Franca" for API-Development
 
GraphQL in an Age of REST
GraphQL in an Age of RESTGraphQL in an Age of REST
GraphQL in an Age of REST
 
Revealing ALLSTOCKER
Revealing ALLSTOCKERRevealing ALLSTOCKER
Revealing ALLSTOCKER
 
A general introduction to Spring Data / Neo4J
A general introduction to Spring Data / Neo4JA general introduction to Spring Data / Neo4J
A general introduction to Spring Data / Neo4J
 
Graphql usage
Graphql usageGraphql usage
Graphql usage
 
Who needs containers in a serverless world
Who needs containers in a serverless worldWho needs containers in a serverless world
Who needs containers in a serverless world
 
All About GRAND Stack: GraphQL, React, Apollo, and Neo4j (Mark Needham) - Gre...
All About GRAND Stack: GraphQL, React, Apollo, and Neo4j (Mark Needham) - Gre...All About GRAND Stack: GraphQL, React, Apollo, and Neo4j (Mark Needham) - Gre...
All About GRAND Stack: GraphQL, React, Apollo, and Neo4j (Mark Needham) - Gre...
 
Tutorial: Building a GraphQL API in PHP
Tutorial: Building a GraphQL API in PHPTutorial: Building a GraphQL API in PHP
Tutorial: Building a GraphQL API in PHP
 
Day 2 - Intro to Rails
Day 2 - Intro to RailsDay 2 - Intro to Rails
Day 2 - Intro to Rails
 
Visual, scalable, and manageable data loading to and from Neo4j with Apache Hop
Visual, scalable, and manageable data loading to and from Neo4j with Apache Hop Visual, scalable, and manageable data loading to and from Neo4j with Apache Hop
Visual, scalable, and manageable data loading to and from Neo4j with Apache Hop
 
Building a GraphQL API in PHP
Building a GraphQL API in PHPBuilding a GraphQL API in PHP
Building a GraphQL API in PHP
 
web2py:Web development like a boss
web2py:Web development like a bossweb2py:Web development like a boss
web2py:Web development like a boss
 
Building APIs with GraphQL and Flask
Building APIs with GraphQL and FlaskBuilding APIs with GraphQL and Flask
Building APIs with GraphQL and Flask
 
[Srijan Wednesday Webinar] Decoupled Demystified: The Present & Future of Dr...
 [Srijan Wednesday Webinar] Decoupled Demystified: The Present & Future of Dr... [Srijan Wednesday Webinar] Decoupled Demystified: The Present & Future of Dr...
[Srijan Wednesday Webinar] Decoupled Demystified: The Present & Future of Dr...
 
Montreal.rb 2022-10-05 - Glimmer DSL for SWT - Ruby Desktop Development GUI ...
 Montreal.rb 2022-10-05 - Glimmer DSL for SWT - Ruby Desktop Development GUI ... Montreal.rb 2022-10-05 - Glimmer DSL for SWT - Ruby Desktop Development GUI ...
Montreal.rb 2022-10-05 - Glimmer DSL for SWT - Ruby Desktop Development GUI ...
 
Design Summit - Technology Vision - Oleg Barenboim and Jason Frey
Design Summit - Technology Vision - Oleg Barenboim and Jason FreyDesign Summit - Technology Vision - Oleg Barenboim and Jason Frey
Design Summit - Technology Vision - Oleg Barenboim and Jason Frey
 

More from Neo4j

Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdfNeo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdfNeo4j
 
Enabling GenAI Breakthroughs with Knowledge Graphs
Enabling GenAI Breakthroughs with Knowledge GraphsEnabling GenAI Breakthroughs with Knowledge Graphs
Enabling GenAI Breakthroughs with Knowledge GraphsNeo4j
 
Neo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdf
Neo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdfNeo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdf
Neo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdfNeo4j
 
Neo4j_Jesus Barrasa_The Art of the Possible with Graph.pptx.pdf
Neo4j_Jesus Barrasa_The Art of the Possible with Graph.pptx.pdfNeo4j_Jesus Barrasa_The Art of the Possible with Graph.pptx.pdf
Neo4j_Jesus Barrasa_The Art of the Possible with Graph.pptx.pdfNeo4j
 
Swift_Maintaining Critical Standards(...).pptx.pdf
Swift_Maintaining Critical Standards(...).pptx.pdfSwift_Maintaining Critical Standards(...).pptx.pdf
Swift_Maintaining Critical Standards(...).pptx.pdfNeo4j
 
Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...
Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...
Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...Neo4j
 
Ingka Digital_Linked Metadata by Design.pdf
Ingka Digital_Linked Metadata by Design.pdfIngka Digital_Linked Metadata by Design.pdf
Ingka Digital_Linked Metadata by Design.pdfNeo4j
 
Discover Neo4j Aura_ The Future of Graph Database-as-a-Service Workshop_3.13.24
Discover Neo4j Aura_ The Future of Graph Database-as-a-Service Workshop_3.13.24Discover Neo4j Aura_ The Future of Graph Database-as-a-Service Workshop_3.13.24
Discover Neo4j Aura_ The Future of Graph Database-as-a-Service Workshop_3.13.24Neo4j
 
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptxGraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptxNeo4j
 
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptxEmil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptxNeo4j
 
Identification of insulin-resistance genes with Knowledge Graphs topology and...
Identification of insulin-resistance genes with Knowledge Graphs topology and...Identification of insulin-resistance genes with Knowledge Graphs topology and...
Identification of insulin-resistance genes with Knowledge Graphs topology and...Neo4j
 
Novo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNovo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNeo4j
 
EY: Graphs as Critical Enablers for LLM-based Assistants- the Case of Custome...
EY: Graphs as Critical Enablers for LLM-based Assistants- the Case of Custome...EY: Graphs as Critical Enablers for LLM-based Assistants- the Case of Custome...
EY: Graphs as Critical Enablers for LLM-based Assistants- the Case of Custome...Neo4j
 
GraphSummit London Feb 2024 - ABK - Neo4j Product Vision and Roadmap.pptx
GraphSummit London Feb 2024 - ABK - Neo4j Product Vision and Roadmap.pptxGraphSummit London Feb 2024 - ABK - Neo4j Product Vision and Roadmap.pptx
GraphSummit London Feb 2024 - ABK - Neo4j Product Vision and Roadmap.pptxNeo4j
 
The Art of the Possible with Graph by Dr Jim Webber Neo4j.pptx
The Art of the Possible with Graph by Dr Jim Webber Neo4j.pptxThe Art of the Possible with Graph by Dr Jim Webber Neo4j.pptx
The Art of the Possible with Graph by Dr Jim Webber Neo4j.pptxNeo4j
 
KUBRICK Graphs: A journey from in vogue to success-ion
KUBRICK Graphs: A journey from in vogue to success-ionKUBRICK Graphs: A journey from in vogue to success-ion
KUBRICK Graphs: A journey from in vogue to success-ionNeo4j
 
SKY Paradigms, change and cake: the steep curve of introducing new technologies
SKY Paradigms, change and cake: the steep curve of introducing new technologiesSKY Paradigms, change and cake: the steep curve of introducing new technologies
SKY Paradigms, change and cake: the steep curve of introducing new technologiesNeo4j
 
ASTRAZENECA. Knowledge Graphs Powering a Fast-moving Global Life Sciences Org...
ASTRAZENECA. Knowledge Graphs Powering a Fast-moving Global Life Sciences Org...ASTRAZENECA. Knowledge Graphs Powering a Fast-moving Global Life Sciences Org...
ASTRAZENECA. Knowledge Graphs Powering a Fast-moving Global Life Sciences Org...Neo4j
 
IA Générative et Graphes Neo4j : RAG time !
IA Générative et Graphes Neo4j : RAG time !IA Générative et Graphes Neo4j : RAG time !
IA Générative et Graphes Neo4j : RAG time !Neo4j
 
GraphQL and Neo4j - Simple and Intelligent Modern Apps
GraphQL and Neo4j - Simple and Intelligent Modern AppsGraphQL and Neo4j - Simple and Intelligent Modern Apps
GraphQL and Neo4j - Simple and Intelligent Modern AppsNeo4j
 

More from Neo4j (20)

Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdfNeo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
 
Enabling GenAI Breakthroughs with Knowledge Graphs
Enabling GenAI Breakthroughs with Knowledge GraphsEnabling GenAI Breakthroughs with Knowledge Graphs
Enabling GenAI Breakthroughs with Knowledge Graphs
 
Neo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdf
Neo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdfNeo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdf
Neo4j_Anurag Tandon_Product Vision and Roadmap.Benelux.pptx.pdf
 
Neo4j_Jesus Barrasa_The Art of the Possible with Graph.pptx.pdf
Neo4j_Jesus Barrasa_The Art of the Possible with Graph.pptx.pdfNeo4j_Jesus Barrasa_The Art of the Possible with Graph.pptx.pdf
Neo4j_Jesus Barrasa_The Art of the Possible with Graph.pptx.pdf
 
Swift_Maintaining Critical Standards(...).pptx.pdf
Swift_Maintaining Critical Standards(...).pptx.pdfSwift_Maintaining Critical Standards(...).pptx.pdf
Swift_Maintaining Critical Standards(...).pptx.pdf
 
Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...
Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...
Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...
 
Ingka Digital_Linked Metadata by Design.pdf
Ingka Digital_Linked Metadata by Design.pdfIngka Digital_Linked Metadata by Design.pdf
Ingka Digital_Linked Metadata by Design.pdf
 
Discover Neo4j Aura_ The Future of Graph Database-as-a-Service Workshop_3.13.24
Discover Neo4j Aura_ The Future of Graph Database-as-a-Service Workshop_3.13.24Discover Neo4j Aura_ The Future of Graph Database-as-a-Service Workshop_3.13.24
Discover Neo4j Aura_ The Future of Graph Database-as-a-Service Workshop_3.13.24
 
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptxGraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
 
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptxEmil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
 
Identification of insulin-resistance genes with Knowledge Graphs topology and...
Identification of insulin-resistance genes with Knowledge Graphs topology and...Identification of insulin-resistance genes with Knowledge Graphs topology and...
Identification of insulin-resistance genes with Knowledge Graphs topology and...
 
Novo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNovo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4j
 
EY: Graphs as Critical Enablers for LLM-based Assistants- the Case of Custome...
EY: Graphs as Critical Enablers for LLM-based Assistants- the Case of Custome...EY: Graphs as Critical Enablers for LLM-based Assistants- the Case of Custome...
EY: Graphs as Critical Enablers for LLM-based Assistants- the Case of Custome...
 
GraphSummit London Feb 2024 - ABK - Neo4j Product Vision and Roadmap.pptx
GraphSummit London Feb 2024 - ABK - Neo4j Product Vision and Roadmap.pptxGraphSummit London Feb 2024 - ABK - Neo4j Product Vision and Roadmap.pptx
GraphSummit London Feb 2024 - ABK - Neo4j Product Vision and Roadmap.pptx
 
The Art of the Possible with Graph by Dr Jim Webber Neo4j.pptx
The Art of the Possible with Graph by Dr Jim Webber Neo4j.pptxThe Art of the Possible with Graph by Dr Jim Webber Neo4j.pptx
The Art of the Possible with Graph by Dr Jim Webber Neo4j.pptx
 
KUBRICK Graphs: A journey from in vogue to success-ion
KUBRICK Graphs: A journey from in vogue to success-ionKUBRICK Graphs: A journey from in vogue to success-ion
KUBRICK Graphs: A journey from in vogue to success-ion
 
SKY Paradigms, change and cake: the steep curve of introducing new technologies
SKY Paradigms, change and cake: the steep curve of introducing new technologiesSKY Paradigms, change and cake: the steep curve of introducing new technologies
SKY Paradigms, change and cake: the steep curve of introducing new technologies
 
ASTRAZENECA. Knowledge Graphs Powering a Fast-moving Global Life Sciences Org...
ASTRAZENECA. Knowledge Graphs Powering a Fast-moving Global Life Sciences Org...ASTRAZENECA. Knowledge Graphs Powering a Fast-moving Global Life Sciences Org...
ASTRAZENECA. Knowledge Graphs Powering a Fast-moving Global Life Sciences Org...
 
IA Générative et Graphes Neo4j : RAG time !
IA Générative et Graphes Neo4j : RAG time !IA Générative et Graphes Neo4j : RAG time !
IA Générative et Graphes Neo4j : RAG time !
 
GraphQL and Neo4j - Simple and Intelligent Modern Apps
GraphQL and Neo4j - Simple and Intelligent Modern AppsGraphQL and Neo4j - Simple and Intelligent Modern Apps
GraphQL and Neo4j - Simple and Intelligent Modern Apps
 

Recently uploaded

How to release an Open Source Dataweave Library
How to release an Open Source Dataweave LibraryHow to release an Open Source Dataweave Library
How to release an Open Source Dataweave Libraryshyamraj55
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxKaustubhBhavsar6
 
Top 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTop 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTopCSSGallery
 
EMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? WebinarEMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? WebinarThousandEyes
 
IT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingIT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingMAGNIntelligence
 
The Importance of Indoor Air Quality (English)
The Importance of Indoor Air Quality (English)The Importance of Indoor Air Quality (English)
The Importance of Indoor Air Quality (English)IES VE
 
Graphene Quantum Dots-Based Composites for Biomedical Applications
Graphene Quantum Dots-Based Composites for  Biomedical ApplicationsGraphene Quantum Dots-Based Composites for  Biomedical Applications
Graphene Quantum Dots-Based Composites for Biomedical Applicationsnooralam814309
 
Where developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingWhere developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingFrancesco Corti
 
Patch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 updatePatch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 updateadam112203
 
Extra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdfExtra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdfInfopole1
 
The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)codyslingerland1
 
.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptxHansamali Gamage
 
March Patch Tuesday
March Patch TuesdayMarch Patch Tuesday
March Patch TuesdayIvanti
 
UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2DianaGray10
 
AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024Brian Pichman
 
Stobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
Stobox 4: Revolutionizing Investment in Real-World Assets Through TokenizationStobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
Stobox 4: Revolutionizing Investment in Real-World Assets Through TokenizationStobox
 
Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...DianaGray10
 
TrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie WorldTrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie WorldTrustArc
 
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveKeep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveIES VE
 

Recently uploaded (20)

How to release an Open Source Dataweave Library
How to release an Open Source Dataweave LibraryHow to release an Open Source Dataweave Library
How to release an Open Source Dataweave Library
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptx
 
SheDev 2024
SheDev 2024SheDev 2024
SheDev 2024
 
Top 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTop 10 Squarespace Development Companies
Top 10 Squarespace Development Companies
 
EMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? WebinarEMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? Webinar
 
IT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingIT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced Computing
 
The Importance of Indoor Air Quality (English)
The Importance of Indoor Air Quality (English)The Importance of Indoor Air Quality (English)
The Importance of Indoor Air Quality (English)
 
Graphene Quantum Dots-Based Composites for Biomedical Applications
Graphene Quantum Dots-Based Composites for  Biomedical ApplicationsGraphene Quantum Dots-Based Composites for  Biomedical Applications
Graphene Quantum Dots-Based Composites for Biomedical Applications
 
Where developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingWhere developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is going
 
Patch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 updatePatch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 update
 
Extra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdfExtra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdf
 
The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)
 
.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx
 
March Patch Tuesday
March Patch TuesdayMarch Patch Tuesday
March Patch Tuesday
 
UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2
 
AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024
 
Stobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
Stobox 4: Revolutionizing Investment in Real-World Assets Through TokenizationStobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
Stobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
 
Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...
 
TrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie WorldTrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie World
 
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveKeep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
 

Metadata and Access Control

  • 1. Metadata and Access Control Using Ruby on Rails and Neo4j September 2015
  • 2. Agenda Demo • Asset Portal UI • The code Overview • Neo4j.rb • The asset portal ■ Asset management ■ Access control
  • 3. Neo4j.rb ● Consists primarily of the neo4j-core, neo4j gems ● neo4j-core allows you to query at a low level ○ Raw Cypher queries: query("MATCH n RETURN n") ○ Query class API: query.match(:n).return(:n) ● neo4j provides the ActiveNode and ActiveRel modules for object modeling of nodes and relationships
  • 4. Neo4j.rb Won “Best Community Contribution” at GraphConnect San Francisco 2014
  • 5. Neo4j.rb - Querying Cypher MATCH (user:User)<-[:written_by]-(:Post)<-[:comments_on]-(c:Comment)-[:written_by]->(user2:User) WHERE user.id = 123 RETURN user2.name, count(c) neo4j-core gem: Query API session.query .match('(user:User)<-[:written_by]-(:Post)<-[:comments_on]-(c:Comment)-[:written_by]->(user2:User)') .where(user: {id: 123}) .return('user2.name', 'count(c)')
  • 6. Neo4j.rb - Querying Cypher MATCH (user:User)<-[:written_by]-(:Post)<-[:comments_on]-(c:Comment)-[:written_by]->(user2:User) WHERE user.id = 123 RETURN user2.name, count(c) neo4j gem: ActiveNode user.find_by(id: 123) user.posts.comments(:c).author(:u2).pluck('u2.name, count(c)')
  • 7. Neo4j.rb - Querying class Post has_one :out, :author, type: :written_by, model_class: 'User' has_many :in, :comments, type: :comments_on end class Comment has_one :out, :author, type: :written_by, model_class: 'User' end class User has_many :in, :posts, origin: :author end user.posts.comments(:c).author(:u2).pluck('u2.name, count(c)')
  • 8. Many ways to get help Active on StackOverflow stackoverflow.com/questions/ask?tags=neo4j.rb+neo4j+ruby Gitter chat room gitter.im/neo4jrb/neo4j Twitter twitter.com/neo4jrb
  • 9. The Asset Portal We wanted to: • Rewrite our existing GraphGist portal • Create a learning resource for Neo4j and Ruby • Make a Neo4j.rb screencast series • Write articles: "Why You Should Use Neo4j in Your Next Ruby App" • Host a webinar • Make something useful
  • 10. Quick aside: GraphGists ● Interactive Neo4j-backed documents for demonstrating graph use- cases and solutions Website: graphgist.neo4j.com GraphConnect Presentation: From Zero to GraphGists DEMO
  • 12. The Asset Portal - What’s Related and How Assets are connected to Model indirectly via the Asset’s label and the Model’s name property
  • 13. The Asset Portal - Creating Assets and Metadata class Book < Asset property :isbn13, type: String property :author, type: String property :publish_date, type: String end This automatically generates a user interface for managing books and their properties.
  • 14. The Asset Portal - Access Control ● Access can be given ○ directly: User to Asset ○ indirectly: via a Group ○ indirectly: via a series of Subgroups ● CAN_ACCESS relationships have a “level” property to determine “read” vs ”write”
  • 15. The Asset Portal - Access Control This sort of access control is useful and easy to understand, but is much more difficult to implement in other databases.
  • 16. The Asset Portal - Access Control ● Access can be given to: ○ A category which gives them access to all assets in that category ○ A type of asset (in this case Book) which gives access to all assets of that type ○ A property on an asset type (in this case “total_sales” on books)
  • 17. The Asset Portal - Challenges ● Can we make an asset portal which is easy for people to get going but which allows them to customize as they like? ● Can we make a generic asset portal which also works as a GraphGist portal? ● Can we make a GraphGist portal which other people can host? ● How can we make an asset / GraphGist portal which is generic and useful for everybody but which we can style to the neo4j.com website?
  • 18. The Asset Portal Built using: ● Ruby on Rails ● Neo4j.rb ● Semantic UI ● Ember.js Best practices: ● RSpec ● Rubocop ● Slim ● Devise ● Paperclip
  • 19. The Asset Portal - Idea: As a Rails Engine Rails Application Your app with custom code Asset Portal Engine ● Asset CRUD UI ● Asset administration ○ Access ○ Approval
  • 20. The Asset Portal - Idea: GraphGist application GraphGist Application Hosts your own GraphGists locally Asset Portal Engine ● Asset CRUD UI ● Asset administration ○ Access ○ Approval
  • 21. Demo ● Asset portal UI ○ Viewing and editing assets ○ Setting permissions on assets, properties, categories ● Code ○ Book model ○ Asset.authorized_for ○ Asset.authorized_properties_query
  • 22. Outroduction Brian Underwood Developer Advocate for Neo4j Web: www.brian-underwood.codes E-Mail: public@brian-underwood.codes Twitter: @cheerfulstoic
  • 23. Metadata and Access Control Using Ruby on Rails and Neo4j End of Presentation