SlideShare a Scribd company logo
1 of 27
Download to read offline
Grails and Neo4j

Stefan Armbruster

      gr8conf
CPH, 2011 May 19th
About myself
●
    located in Munich/Germany
●
    freelancer since 10 years
●
    cofounder of Netjay
●
    Java +10 years, Groovy ~5 years, Grails 3+ years
●
    author of some Grails plugins
●
    cofounder of the usergroup in Munich
●
    passionate volunteer firefighter
●
    twitter: darthvader42
●
    http://blog.armbruster-it.de
What's wrong with SQL?

What's about the hype of NoSQL?
4 trends
much larger data sets:
●


    ●
        IDC comparison: 2010 to 2007 is 40 : 1
data gets more connected
●



semi-structured data
●



horizontal scalability – distributed architecture
●
One size fits all?
exploring the nosql-landscape
Key-Value:                                     Bigtable:
➢
    RIAK *                                     ➢
                                                   Hadoop / Hbase *
➢
    Redis *                                    ➢
                                                   SimpleDB
➢
    Membase                                    ➢
                                                   Cassandra **
Document:
Document                                       Graph:
➢
    CouchDB *                                  ➢
                                                   InfiniteGraph
➢
    Mongo *                                    ➢
                                                   Neo4j *

    *: GORM compliant implementation, **: Grails support without GORM
nosql is not the silver bullet
neo4j basic building blocks

                  1) nodes

              2) relationships

3) properties on both, nodes and relationship

                  that's it!
neo4j
querying neo4j
simple way: navigate the relationships
●



more powerful: use a traverser with callbacks for
●


    ●
        decide where to end
    ●
        decide if node should be part of the result
SQL querying vs traversing

SQL challenge: SQL statement that retrieves friends
 up to n'th grade. Anyone?


Neo4j: using a traverser:
  Node node = // retrieve the starting poing

  def myFriendsAndFriends = node.traverse(
     BREADTH_FIRST,
     { it.depth()<3 } as StopEvaluator,
     { true } as RetrunableEvaluator,
     DynamicRelationshipType.withName('friend'),
     Direction.OUTGOING
  ).allNodes
query performance

some benchmark     data:
    – each Person has 50 friends in avg

       Database          # persons        query time
       Relational        1.000            2000 ms
       Neo4j             1.000            2 ms
       Neo4j             1.000.000        2 ms
accessing the database
Choosing an implementation of GraphDatabase:

   ●
       EmbeddedGraphDatabase: just local to JVM

   ●
       RestGraphDatabase (https://github.com/jexp/neo4j-java-rest-binding)

   ●
       HighAvailableGraphDatabase: uses Zookeeper
neo4j - Licensing

3 editions:


community:    GPL or $
advanced:     AGPL or $
enterprise:   AGPL or $
history of nosql & neo4j for Grails
end 2009: first version of neo4j plugin
during 2010: GORM for nosql
     – 'inconsequential' -> 'spring-data-mapping'
end 2010: 'spring-data-graph'
     – aspectj based injection of JPA like methods
     – focussed at Roo an POWAs
     – "not the right approach for Grails" (IMHO)
May 2011: Neo4j for Grails using spring-data-
 mapping
GORM: spring-data-mapping
provides abstraction layer
●



TCK
●



various implementations:
●


      ●
          hibernate, jpa
      ●
          gemfire, redis, riak
      ●
          mongo, jcr
      ●
          neo4j <- the new child on the block
dependencies
interfaces/abstract base classes in GORM
●   Datastore:
        ●   create sessions
        ●   manage connection to low-level storage
●   MappingContext:
        ●   holds metainformation about mapping domain classes to the underlying
             datastore (type conversion, list of EntityPersisters,...)
●   EntityPersister:
        ●   does the dirty work: interact with low level datastore
●   Session:
        ●   similar HibernateSession
●   Query:
        ●   knows how to query the datastore by criteria (criterion, projections,...)
mapping domain model to nodespace

                                                reference node
   domain class
                                 subreference

                                                      subreference node
   domain class           instance
     instance



  domain instance
                    properties
     property



    association
praying to the demo god....
currently working in neo4j plugin
passing >90% of GORM TCK (hurray!)
●



accessing embedded, REST and [HA datasources]
●



property type conversion
●



access to native API
●



<DomainClass>.traverseStatic, <instance>.traverse
●
currently not working in neo4j plugin

nasty bug: some trouble if a domain class
●


 references itself -> StackOverflowException
Transactions
●



Optimistic Locking
●



Query performance not as good as could be
●



Indexing
●
roadmap
●
    Write docs & publish
●
    Handle relationship to self (Neo4j 1.4?)
●
    Support for arbitrary attributes
●
    Support for indexing (and its usage in criteria queries)
●
    Embed some controller/servlet to visually navigate
     the nodespace (SVG?)
●
    Support for migrations?
●
    ... your suggestions?
Q&A
References
general overview of nosql:
     – http://www.nosql-databases.org/
http://www.neo4j.org
neo4j grails plugin:
     – source: https://github.com/sarmbruster/spring-data-mapping
     – issues: http://jira.grails.org/browse/GPNEO4J
https://github.com/jexp/neo4j-java-rest-binding
site running grails w/ neo4j: http://www.fanorakel.de
my blog: http://blog.armbruster-it.de,
twitter: darthvader42

More Related Content

What's hot

Top 10 frameworks of node js
Top 10 frameworks of node jsTop 10 frameworks of node js
Top 10 frameworks of node jsHabilelabs
 
Mongo db transcript
Mongo db transcriptMongo db transcript
Mongo db transcriptfoliba
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalabilityTwinbit
 
Pre rendering media sites with nuxt.js & netlify
Pre rendering media sites with nuxt.js & netlifyPre rendering media sites with nuxt.js & netlify
Pre rendering media sites with nuxt.js & netlifynuppla
 
Accra MongoDB User Group
Accra MongoDB User GroupAccra MongoDB User Group
Accra MongoDB User GroupMongoDB
 
Hidden gems in Apache Jackrabbit and BloomReach Forge
Hidden gems in Apache Jackrabbit and BloomReach ForgeHidden gems in Apache Jackrabbit and BloomReach Forge
Hidden gems in Apache Jackrabbit and BloomReach ForgeWoonsan Ko
 
MongoDB basics & Introduction
MongoDB basics & IntroductionMongoDB basics & Introduction
MongoDB basics & IntroductionJerwin Roy
 
Getting started with the Lupus Nuxt.js Drupal Stack
Getting started with the Lupus Nuxt.js Drupal StackGetting started with the Lupus Nuxt.js Drupal Stack
Getting started with the Lupus Nuxt.js Drupal Stacknuppla
 
Decoupling Drupal mit dem Lupus Nuxt.js Drupal Stack
Decoupling Drupal mit dem Lupus Nuxt.js Drupal StackDecoupling Drupal mit dem Lupus Nuxt.js Drupal Stack
Decoupling Drupal mit dem Lupus Nuxt.js Drupal Stacknuppla
 
Optimize drupal using mongo db
Optimize drupal using mongo dbOptimize drupal using mongo db
Optimize drupal using mongo dbVladimir Ilic
 
Mojo Facets – so, you have data and browser?
Mojo Facets – so, you have data and browser?Mojo Facets – so, you have data and browser?
Mojo Facets – so, you have data and browser?Dobrica Pavlinušić
 
MongoDB Command Line Tools
MongoDB Command Line ToolsMongoDB Command Line Tools
MongoDB Command Line ToolsRainforest QA
 
Mateusz Gruszczynski - Performance tests in Gatling (Quality Questions Confer...
Mateusz Gruszczynski - Performance tests in Gatling (Quality Questions Confer...Mateusz Gruszczynski - Performance tests in Gatling (Quality Questions Confer...
Mateusz Gruszczynski - Performance tests in Gatling (Quality Questions Confer...Grand Parade Poland
 

What's hot (20)

Top 10 frameworks of node js
Top 10 frameworks of node jsTop 10 frameworks of node js
Top 10 frameworks of node js
 
Mongo db transcript
Mongo db transcriptMongo db transcript
Mongo db transcript
 
Node js crash course session 5
Node js crash course   session 5Node js crash course   session 5
Node js crash course session 5
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalability
 
Pre rendering media sites with nuxt.js & netlify
Pre rendering media sites with nuxt.js & netlifyPre rendering media sites with nuxt.js & netlify
Pre rendering media sites with nuxt.js & netlify
 
Accra MongoDB User Group
Accra MongoDB User GroupAccra MongoDB User Group
Accra MongoDB User Group
 
Hidden gems in Apache Jackrabbit and BloomReach Forge
Hidden gems in Apache Jackrabbit and BloomReach ForgeHidden gems in Apache Jackrabbit and BloomReach Forge
Hidden gems in Apache Jackrabbit and BloomReach Forge
 
MongoDB basics & Introduction
MongoDB basics & IntroductionMongoDB basics & Introduction
MongoDB basics & Introduction
 
Getting started with the Lupus Nuxt.js Drupal Stack
Getting started with the Lupus Nuxt.js Drupal StackGetting started with the Lupus Nuxt.js Drupal Stack
Getting started with the Lupus Nuxt.js Drupal Stack
 
Drupal performance
Drupal performanceDrupal performance
Drupal performance
 
MongoDB
MongoDBMongoDB
MongoDB
 
Decoupling Drupal mit dem Lupus Nuxt.js Drupal Stack
Decoupling Drupal mit dem Lupus Nuxt.js Drupal StackDecoupling Drupal mit dem Lupus Nuxt.js Drupal Stack
Decoupling Drupal mit dem Lupus Nuxt.js Drupal Stack
 
Optimize drupal using mongo db
Optimize drupal using mongo dbOptimize drupal using mongo db
Optimize drupal using mongo db
 
Mojo Facets – so, you have data and browser?
Mojo Facets – so, you have data and browser?Mojo Facets – so, you have data and browser?
Mojo Facets – so, you have data and browser?
 
Mongo db workshop # 02
Mongo db workshop # 02Mongo db workshop # 02
Mongo db workshop # 02
 
MongoDB 101
MongoDB 101MongoDB 101
MongoDB 101
 
MongoDB Command Line Tools
MongoDB Command Line ToolsMongoDB Command Line Tools
MongoDB Command Line Tools
 
MongoDB and Node.js
MongoDB and Node.jsMongoDB and Node.js
MongoDB and Node.js
 
Mateusz Gruszczynski - Performance tests in Gatling (Quality Questions Confer...
Mateusz Gruszczynski - Performance tests in Gatling (Quality Questions Confer...Mateusz Gruszczynski - Performance tests in Gatling (Quality Questions Confer...
Mateusz Gruszczynski - Performance tests in Gatling (Quality Questions Confer...
 
A faster web
A faster webA faster web
A faster web
 

Viewers also liked

GR8Conf 2011: Groovy Maven Builds
GR8Conf 2011: Groovy Maven BuildsGR8Conf 2011: Groovy Maven Builds
GR8Conf 2011: Groovy Maven BuildsGR8Conf
 
GR8Conf 2009: Opening Keynote by Søren Berg Glasius and Guillaume Laforge
GR8Conf 2009: Opening Keynote by Søren Berg Glasius and Guillaume LaforgeGR8Conf 2009: Opening Keynote by Søren Berg Glasius and Guillaume Laforge
GR8Conf 2009: Opening Keynote by Søren Berg Glasius and Guillaume LaforgeGR8Conf
 
GR8Conf 2009: Griffon by Jim Shingler
GR8Conf 2009: Griffon by Jim ShinglerGR8Conf 2009: Griffon by Jim Shingler
GR8Conf 2009: Griffon by Jim ShinglerGR8Conf
 
GR8Conf 2011: Groovy 1.8 update
GR8Conf 2011: Groovy 1.8 updateGR8Conf 2011: Groovy 1.8 update
GR8Conf 2011: Groovy 1.8 updateGR8Conf
 
GR8Conf 2011: Grails Infinispanplugin, Tom Fuller
GR8Conf 2011: Grails Infinispanplugin, Tom FullerGR8Conf 2011: Grails Infinispanplugin, Tom Fuller
GR8Conf 2011: Grails Infinispanplugin, Tom FullerGR8Conf
 
GR8Conf 2011: Canoo RIA Suite
GR8Conf 2011: Canoo RIA SuiteGR8Conf 2011: Canoo RIA Suite
GR8Conf 2011: Canoo RIA SuiteGR8Conf
 

Viewers also liked (7)

GR8Conf 2011: Groovy Maven Builds
GR8Conf 2011: Groovy Maven BuildsGR8Conf 2011: Groovy Maven Builds
GR8Conf 2011: Groovy Maven Builds
 
GR8Conf 2009: Opening Keynote by Søren Berg Glasius and Guillaume Laforge
GR8Conf 2009: Opening Keynote by Søren Berg Glasius and Guillaume LaforgeGR8Conf 2009: Opening Keynote by Søren Berg Glasius and Guillaume Laforge
GR8Conf 2009: Opening Keynote by Søren Berg Glasius and Guillaume Laforge
 
Ethan Chazin 2011 Praxis Retreat
Ethan Chazin 2011 Praxis RetreatEthan Chazin 2011 Praxis Retreat
Ethan Chazin 2011 Praxis Retreat
 
GR8Conf 2009: Griffon by Jim Shingler
GR8Conf 2009: Griffon by Jim ShinglerGR8Conf 2009: Griffon by Jim Shingler
GR8Conf 2009: Griffon by Jim Shingler
 
GR8Conf 2011: Groovy 1.8 update
GR8Conf 2011: Groovy 1.8 updateGR8Conf 2011: Groovy 1.8 update
GR8Conf 2011: Groovy 1.8 update
 
GR8Conf 2011: Grails Infinispanplugin, Tom Fuller
GR8Conf 2011: Grails Infinispanplugin, Tom FullerGR8Conf 2011: Grails Infinispanplugin, Tom Fuller
GR8Conf 2011: Grails Infinispanplugin, Tom Fuller
 
GR8Conf 2011: Canoo RIA Suite
GR8Conf 2011: Canoo RIA SuiteGR8Conf 2011: Canoo RIA Suite
GR8Conf 2011: Canoo RIA Suite
 

Similar to GR8Conf 2011: Neo4j Plugin

Neo4 + Grails
Neo4 + GrailsNeo4 + Grails
Neo4 + Grailsstasimus
 
A quick review of Python and Graph Databases
A quick review of Python and Graph DatabasesA quick review of Python and Graph Databases
A quick review of Python and Graph DatabasesNicholas Crouch
 
Marcel Kornacker: Impala tech talk Tue Feb 26th 2013
Marcel Kornacker: Impala tech talk Tue Feb 26th 2013Marcel Kornacker: Impala tech talk Tue Feb 26th 2013
Marcel Kornacker: Impala tech talk Tue Feb 26th 2013Modern Data Stack France
 
Cloudera Impala: A Modern SQL Engine for Apache Hadoop
Cloudera Impala: A Modern SQL Engine for Apache HadoopCloudera Impala: A Modern SQL Engine for Apache Hadoop
Cloudera Impala: A Modern SQL Engine for Apache HadoopCloudera, Inc.
 
Cloudera Impala presentation
Cloudera Impala presentationCloudera Impala presentation
Cloudera Impala presentationmarkgrover
 
HPTS 2011: The NoSQL Ecosystem
HPTS 2011: The NoSQL EcosystemHPTS 2011: The NoSQL Ecosystem
HPTS 2011: The NoSQL EcosystemAdam Marcus
 
The NoSQL Ecosystem
The NoSQL Ecosystem The NoSQL Ecosystem
The NoSQL Ecosystem yarapavan
 
Cassandra Talk: Austin JUG
Cassandra Talk: Austin JUGCassandra Talk: Austin JUG
Cassandra Talk: Austin JUGStu Hood
 
On Rails with Apache Cassandra
On Rails with Apache CassandraOn Rails with Apache Cassandra
On Rails with Apache CassandraStu Hood
 
Facebook architecture
Facebook architectureFacebook architecture
Facebook architecturedrewz lin
 
Facebook architecture
Facebook architectureFacebook architecture
Facebook architecturemysqlops
 
Qcon 090408233824-phpapp01
Qcon 090408233824-phpapp01Qcon 090408233824-phpapp01
Qcon 090408233824-phpapp01jgregory1234
 
Facebook的架构
Facebook的架构Facebook的架构
Facebook的架构yiditushe
 
Getting started with Graph Databases & Neo4j
Getting started with Graph Databases & Neo4jGetting started with Graph Databases & Neo4j
Getting started with Graph Databases & Neo4jSuroor Wijdan
 
MongoDB: Advantages of an Open Source NoSQL Database
MongoDB: Advantages of an Open Source NoSQL DatabaseMongoDB: Advantages of an Open Source NoSQL Database
MongoDB: Advantages of an Open Source NoSQL DatabaseFITC
 

Similar to GR8Conf 2011: Neo4j Plugin (20)

Neo4J and Grails
Neo4J and GrailsNeo4J and Grails
Neo4J and Grails
 
Neo4 + Grails
Neo4 + GrailsNeo4 + Grails
Neo4 + Grails
 
A quick review of Python and Graph Databases
A quick review of Python and Graph DatabasesA quick review of Python and Graph Databases
A quick review of Python and Graph Databases
 
Marcel Kornacker: Impala tech talk Tue Feb 26th 2013
Marcel Kornacker: Impala tech talk Tue Feb 26th 2013Marcel Kornacker: Impala tech talk Tue Feb 26th 2013
Marcel Kornacker: Impala tech talk Tue Feb 26th 2013
 
Cloudera Impala: A Modern SQL Engine for Apache Hadoop
Cloudera Impala: A Modern SQL Engine for Apache HadoopCloudera Impala: A Modern SQL Engine for Apache Hadoop
Cloudera Impala: A Modern SQL Engine for Apache Hadoop
 
Cloudera Impala presentation
Cloudera Impala presentationCloudera Impala presentation
Cloudera Impala presentation
 
HPTS 2011: The NoSQL Ecosystem
HPTS 2011: The NoSQL EcosystemHPTS 2011: The NoSQL Ecosystem
HPTS 2011: The NoSQL Ecosystem
 
The NoSQL Ecosystem
The NoSQL Ecosystem The NoSQL Ecosystem
The NoSQL Ecosystem
 
2014 hadoop wrocław jug
2014 hadoop   wrocław jug2014 hadoop   wrocław jug
2014 hadoop wrocław jug
 
Cassandra Talk: Austin JUG
Cassandra Talk: Austin JUGCassandra Talk: Austin JUG
Cassandra Talk: Austin JUG
 
On Rails with Apache Cassandra
On Rails with Apache CassandraOn Rails with Apache Cassandra
On Rails with Apache Cassandra
 
New paradigms
New paradigmsNew paradigms
New paradigms
 
Facebook architecture
Facebook architectureFacebook architecture
Facebook architecture
 
Facebook architecture
Facebook architectureFacebook architecture
Facebook architecture
 
Qcon 090408233824-phpapp01
Qcon 090408233824-phpapp01Qcon 090408233824-phpapp01
Qcon 090408233824-phpapp01
 
Facebook的架构
Facebook的架构Facebook的架构
Facebook的架构
 
Getting started with Graph Databases & Neo4j
Getting started with Graph Databases & Neo4jGetting started with Graph Databases & Neo4j
Getting started with Graph Databases & Neo4j
 
MongoDB: Advantages of an Open Source NoSQL Database
MongoDB: Advantages of an Open Source NoSQL DatabaseMongoDB: Advantages of an Open Source NoSQL Database
MongoDB: Advantages of an Open Source NoSQL Database
 
Introduction to Hadoop Administration
Introduction to Hadoop AdministrationIntroduction to Hadoop Administration
Introduction to Hadoop Administration
 
Introduction to Hadoop Administration
Introduction to Hadoop AdministrationIntroduction to Hadoop Administration
Introduction to Hadoop Administration
 

More from GR8Conf

DevOps Enabling Your Team
DevOps Enabling Your TeamDevOps Enabling Your Team
DevOps Enabling Your TeamGR8Conf
 
Creating and testing REST contracts with Accurest Gradle
Creating and testing REST contracts with Accurest Gradle Creating and testing REST contracts with Accurest Gradle
Creating and testing REST contracts with Accurest Gradle GR8Conf
 
Mum, I want to be a Groovy full-stack developer
Mum, I want to be a Groovy full-stack developerMum, I want to be a Groovy full-stack developer
Mum, I want to be a Groovy full-stack developerGR8Conf
 
Metaprogramming with Groovy
Metaprogramming with GroovyMetaprogramming with Groovy
Metaprogramming with GroovyGR8Conf
 
Scraping with Geb
Scraping with GebScraping with Geb
Scraping with GebGR8Conf
 
How to create a conference android app with Groovy and Android
How to create a conference android app with Groovy and AndroidHow to create a conference android app with Groovy and Android
How to create a conference android app with Groovy and AndroidGR8Conf
 
Ratpack On the Docks
Ratpack On the DocksRatpack On the Docks
Ratpack On the DocksGR8Conf
 
Groovy Powered Clean Code
Groovy Powered Clean CodeGroovy Powered Clean Code
Groovy Powered Clean CodeGR8Conf
 
Cut your Grails application to pieces - build feature plugins
Cut your Grails application to pieces - build feature pluginsCut your Grails application to pieces - build feature plugins
Cut your Grails application to pieces - build feature pluginsGR8Conf
 
Performance tuning Grails applications
 Performance tuning Grails applications Performance tuning Grails applications
Performance tuning Grails applicationsGR8Conf
 
Ratpack and Grails 3
 Ratpack and Grails 3 Ratpack and Grails 3
Ratpack and Grails 3GR8Conf
 
Grails & DevOps: continuous integration and delivery in the cloud
Grails & DevOps: continuous integration and delivery in the cloudGrails & DevOps: continuous integration and delivery in the cloud
Grails & DevOps: continuous integration and delivery in the cloudGR8Conf
 
Functional testing your Grails app with GEB
Functional testing your Grails app with GEBFunctional testing your Grails app with GEB
Functional testing your Grails app with GEBGR8Conf
 
Deploying, Scaling, and Running Grails on AWS and VPC
Deploying, Scaling, and Running Grails on AWS and VPCDeploying, Scaling, and Running Grails on AWS and VPC
Deploying, Scaling, and Running Grails on AWS and VPCGR8Conf
 
The Grails introduction workshop
The Grails introduction workshopThe Grails introduction workshop
The Grails introduction workshopGR8Conf
 
Idiomatic spock
Idiomatic spockIdiomatic spock
Idiomatic spockGR8Conf
 
The Groovy Ecosystem Revisited
The Groovy Ecosystem RevisitedThe Groovy Ecosystem Revisited
The Groovy Ecosystem RevisitedGR8Conf
 
Groovy 3 and the new Groovy Meta Object Protocol in examples
Groovy 3 and the new Groovy Meta Object Protocol in examplesGroovy 3 and the new Groovy Meta Object Protocol in examples
Groovy 3 and the new Groovy Meta Object Protocol in examplesGR8Conf
 
Integration using Apache Camel and Groovy
Integration using Apache Camel and GroovyIntegration using Apache Camel and Groovy
Integration using Apache Camel and GroovyGR8Conf
 
CRaSH the shell for the Java Virtual Machine
CRaSH the shell for the Java Virtual MachineCRaSH the shell for the Java Virtual Machine
CRaSH the shell for the Java Virtual MachineGR8Conf
 

More from GR8Conf (20)

DevOps Enabling Your Team
DevOps Enabling Your TeamDevOps Enabling Your Team
DevOps Enabling Your Team
 
Creating and testing REST contracts with Accurest Gradle
Creating and testing REST contracts with Accurest Gradle Creating and testing REST contracts with Accurest Gradle
Creating and testing REST contracts with Accurest Gradle
 
Mum, I want to be a Groovy full-stack developer
Mum, I want to be a Groovy full-stack developerMum, I want to be a Groovy full-stack developer
Mum, I want to be a Groovy full-stack developer
 
Metaprogramming with Groovy
Metaprogramming with GroovyMetaprogramming with Groovy
Metaprogramming with Groovy
 
Scraping with Geb
Scraping with GebScraping with Geb
Scraping with Geb
 
How to create a conference android app with Groovy and Android
How to create a conference android app with Groovy and AndroidHow to create a conference android app with Groovy and Android
How to create a conference android app with Groovy and Android
 
Ratpack On the Docks
Ratpack On the DocksRatpack On the Docks
Ratpack On the Docks
 
Groovy Powered Clean Code
Groovy Powered Clean CodeGroovy Powered Clean Code
Groovy Powered Clean Code
 
Cut your Grails application to pieces - build feature plugins
Cut your Grails application to pieces - build feature pluginsCut your Grails application to pieces - build feature plugins
Cut your Grails application to pieces - build feature plugins
 
Performance tuning Grails applications
 Performance tuning Grails applications Performance tuning Grails applications
Performance tuning Grails applications
 
Ratpack and Grails 3
 Ratpack and Grails 3 Ratpack and Grails 3
Ratpack and Grails 3
 
Grails & DevOps: continuous integration and delivery in the cloud
Grails & DevOps: continuous integration and delivery in the cloudGrails & DevOps: continuous integration and delivery in the cloud
Grails & DevOps: continuous integration and delivery in the cloud
 
Functional testing your Grails app with GEB
Functional testing your Grails app with GEBFunctional testing your Grails app with GEB
Functional testing your Grails app with GEB
 
Deploying, Scaling, and Running Grails on AWS and VPC
Deploying, Scaling, and Running Grails on AWS and VPCDeploying, Scaling, and Running Grails on AWS and VPC
Deploying, Scaling, and Running Grails on AWS and VPC
 
The Grails introduction workshop
The Grails introduction workshopThe Grails introduction workshop
The Grails introduction workshop
 
Idiomatic spock
Idiomatic spockIdiomatic spock
Idiomatic spock
 
The Groovy Ecosystem Revisited
The Groovy Ecosystem RevisitedThe Groovy Ecosystem Revisited
The Groovy Ecosystem Revisited
 
Groovy 3 and the new Groovy Meta Object Protocol in examples
Groovy 3 and the new Groovy Meta Object Protocol in examplesGroovy 3 and the new Groovy Meta Object Protocol in examples
Groovy 3 and the new Groovy Meta Object Protocol in examples
 
Integration using Apache Camel and Groovy
Integration using Apache Camel and GroovyIntegration using Apache Camel and Groovy
Integration using Apache Camel and Groovy
 
CRaSH the shell for the Java Virtual Machine
CRaSH the shell for the Java Virtual MachineCRaSH the shell for the Java Virtual Machine
CRaSH the shell for the Java Virtual Machine
 

Recently uploaded

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
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 organizationRadu Cotescu
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Recently uploaded (20)

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
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
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

GR8Conf 2011: Neo4j Plugin

  • 1. Grails and Neo4j Stefan Armbruster gr8conf CPH, 2011 May 19th
  • 2. About myself ● located in Munich/Germany ● freelancer since 10 years ● cofounder of Netjay ● Java +10 years, Groovy ~5 years, Grails 3+ years ● author of some Grails plugins ● cofounder of the usergroup in Munich ● passionate volunteer firefighter ● twitter: darthvader42 ● http://blog.armbruster-it.de
  • 3. What's wrong with SQL? What's about the hype of NoSQL?
  • 4.
  • 5.
  • 6. 4 trends much larger data sets: ● ● IDC comparison: 2010 to 2007 is 40 : 1 data gets more connected ● semi-structured data ● horizontal scalability – distributed architecture ●
  • 8. exploring the nosql-landscape Key-Value: Bigtable: ➢ RIAK * ➢ Hadoop / Hbase * ➢ Redis * ➢ SimpleDB ➢ Membase ➢ Cassandra ** Document: Document Graph: ➢ CouchDB * ➢ InfiniteGraph ➢ Mongo * ➢ Neo4j * *: GORM compliant implementation, **: Grails support without GORM
  • 9. nosql is not the silver bullet
  • 10. neo4j basic building blocks 1) nodes 2) relationships 3) properties on both, nodes and relationship that's it!
  • 11. neo4j
  • 12. querying neo4j simple way: navigate the relationships ● more powerful: use a traverser with callbacks for ● ● decide where to end ● decide if node should be part of the result
  • 13. SQL querying vs traversing SQL challenge: SQL statement that retrieves friends up to n'th grade. Anyone? Neo4j: using a traverser: Node node = // retrieve the starting poing def myFriendsAndFriends = node.traverse( BREADTH_FIRST, { it.depth()<3 } as StopEvaluator, { true } as RetrunableEvaluator, DynamicRelationshipType.withName('friend'), Direction.OUTGOING ).allNodes
  • 14. query performance some benchmark data: – each Person has 50 friends in avg Database # persons query time Relational 1.000 2000 ms Neo4j 1.000 2 ms Neo4j 1.000.000 2 ms
  • 15. accessing the database Choosing an implementation of GraphDatabase: ● EmbeddedGraphDatabase: just local to JVM ● RestGraphDatabase (https://github.com/jexp/neo4j-java-rest-binding) ● HighAvailableGraphDatabase: uses Zookeeper
  • 16. neo4j - Licensing 3 editions: community: GPL or $ advanced: AGPL or $ enterprise: AGPL or $
  • 17. history of nosql & neo4j for Grails end 2009: first version of neo4j plugin during 2010: GORM for nosql – 'inconsequential' -> 'spring-data-mapping' end 2010: 'spring-data-graph' – aspectj based injection of JPA like methods – focussed at Roo an POWAs – "not the right approach for Grails" (IMHO) May 2011: Neo4j for Grails using spring-data- mapping
  • 18. GORM: spring-data-mapping provides abstraction layer ● TCK ● various implementations: ● ● hibernate, jpa ● gemfire, redis, riak ● mongo, jcr ● neo4j <- the new child on the block
  • 20. interfaces/abstract base classes in GORM ● Datastore: ● create sessions ● manage connection to low-level storage ● MappingContext: ● holds metainformation about mapping domain classes to the underlying datastore (type conversion, list of EntityPersisters,...) ● EntityPersister: ● does the dirty work: interact with low level datastore ● Session: ● similar HibernateSession ● Query: ● knows how to query the datastore by criteria (criterion, projections,...)
  • 21. mapping domain model to nodespace reference node domain class subreference subreference node domain class instance instance domain instance properties property association
  • 22. praying to the demo god....
  • 23. currently working in neo4j plugin passing >90% of GORM TCK (hurray!) ● accessing embedded, REST and [HA datasources] ● property type conversion ● access to native API ● <DomainClass>.traverseStatic, <instance>.traverse ●
  • 24. currently not working in neo4j plugin nasty bug: some trouble if a domain class ● references itself -> StackOverflowException Transactions ● Optimistic Locking ● Query performance not as good as could be ● Indexing ●
  • 25. roadmap ● Write docs & publish ● Handle relationship to self (Neo4j 1.4?) ● Support for arbitrary attributes ● Support for indexing (and its usage in criteria queries) ● Embed some controller/servlet to visually navigate the nodespace (SVG?) ● Support for migrations? ● ... your suggestions?
  • 26. Q&A
  • 27. References general overview of nosql: – http://www.nosql-databases.org/ http://www.neo4j.org neo4j grails plugin: – source: https://github.com/sarmbruster/spring-data-mapping – issues: http://jira.grails.org/browse/GPNEO4J https://github.com/jexp/neo4j-java-rest-binding site running grails w/ neo4j: http://www.fanorakel.de my blog: http://blog.armbruster-it.de, twitter: darthvader42