Spring Data Graph is an integration library for the open source graph database Neo4j and has been around for over a year, evolving from its infancy as brainchild of Rod Johnson and Emil Eifrem. It supports transparent AspectJ based POJO to Graph Mapping, a Neo4jTemplate API and extensive support for Spring Data Repositories. It can work with an embedded graph database or with the standalone Neo4j Server.
The session starts with a short introduction to graph databases. Following that, the different approaches using Spring Data Graph are explored in the Cineasts.net web-app, a social movie database which is also the application of the tutorial in the Spring Data Graph Guidebook. The session will also cover creating a green-field project using the Spring Roo Addon for Spring Data Graph and deploying the App to CloudFoundry.
The Future is Big Graphs: A Community View on Graph Processing SystemsNeo4j
Alexandru Iosup, Full Professor, Vrije Universiteit Amsterdam (VU Amsterdam)
Angela Bonifati, Full Professor of Computer Science, Université de Lyon
Hannes Voigt, Software Engineer, Neo4j
This document appears to be from a Neo4j Innovation Lab presentation. It includes sections on future prediction, values and beliefs, unlearning, innovation, a decade of learning from enterprise adoption, connected insights, data use cases over time, the Dunning-Kruger effect, connecting with the presenter, Yoda quotes on unlearning, change curves, the innovation ambition matrix, design thinking models and processes, lead cars being identical except the one behind, the Neo4j Innovation Lab helping companies accelerate innovation through graph thinking, and an innovation lab sprint methodology.
This document provides an overview of graph databases and their use cases. It begins with definitions of graphs and graph databases. It then gives examples of how graph databases can be used for social networking, network management, and other domains where data is interconnected. It provides Cypher examples for creating and querying graph patterns in a social networking and IT network management scenario. Finally, it discusses the graph database ecosystem and how graphs can be deployed for both online transaction processing and batch processing use cases.
This introduction to graph databases is specifically designed for Enterprise Architects who need to map business requirements to architectural components like graph databases. It explains how and why graphs matter for Enterprise Architecture and reviews the architectural differences between relational and graph models.
The document introduces Neo4j, a graph database, and discusses its applications like social networks and fraud detection. It explains the labeled property graph model and shows examples of how it can represent relationships between people, locations, and objects. The document also lists several industries and use cases where Neo4j has helped companies connect disparate data and enable new insights through its graph capabilities.
Relational databases were conceived to digitize paper forms and automate well-structured business processes, and still have their uses. But, oftentimes with RDBMS, performance degrades with the increasing number and levels of data relationships and data size.
A graph database like Neo4j naturally stores, manages, analyzes, and uses data within the context of connections meaning Neo4j provides faster query performance and vastly improved flexibility in handling complex hierarchies than SQL.
This webinar explains why companies are shifting away from RDBMS towards graphs to unlock the business value in their data relationships.
GraphDay Stockholm - Graphs in the Real World: Top Use Cases for Graph DatabasesNeo4j
The document is an agenda for the Stockholm GraphDay event. It includes sessions on graph databases in a digital economy, graph use cases, a fraud detection use case using Neo4j, and training sessions. It encourages attendees to connect on social media using the event hashtag and provides the WiFi password.
This document discusses graph data science and Neo4j's capabilities. It describes how Neo4j can help simplify graph data science through its native graph database, graph data science library, and data visualization tool. Example use cases are also provided that demonstrate how Neo4j has helped companies with fraud detection, customer journey analysis, supply chain management, and patient outcomes.
Transforming Visibility & Automation: The Actioning Knowledge GraphNeo4j
This document discusses using knowledge graphs (KG) with Neo4j. It provides examples of how companies like Airbnb, Lyft and LinkedIn use KGs for metadata management and data pipelines. KGs can also be used for personalization and recommendation. The document discusses the differences between KGs and Resource Description Framework (RDF) models, and the use of ontologies to build KGs using natural language processing. It recommends identifying a clear purpose and building a semantic overlay on the data incrementally to check the value after each iteration.
Neo4j Innovation Lab – Bringing the Best of Data Science and Design Thinking ...Neo4j
The document discusses the importance of understanding data structures when designing products. It notes that product designers and data scientists both aim to reduce friction. Their work intersects as user experience depends on the underlying data architecture. Different data structures like relational databases, graphs, and knowledge graphs are suited to different problems. Case studies show how graphs power applications like image recognition and last-mile delivery by connecting product, inventory, logistics and other data. The document proposes a data thinking prototyping framework to map business problems, data models, value opportunities and applications when considering new solutions.
Emil Eifrem Keynote - GraphConnect Europe 2017Neo4j
The document discusses Neo4j, a graph database platform, including its adoption rates, use cases, and new features in version 3.2 like improved performance, global clustering capabilities, and security features. It also explores how graph databases and knowledge graphs are important for machine learning and how eBay uses Neo4j to power recommendations.
In diesem Webinar wollen wir einen Überblick über unser Angebot für Data Scientsts geben und zeigen, was heute schon relativ einfach und schnell möglich ist.
Introduction to the graph technologies landscapeLinkurious
Graph technologies allow modeling of complex relationships and connections through nodes and edges. There are three main layers of graph technologies: graph databases to store graph data, graph analysis frameworks to analyze large graphs, and graph visualization solutions to interact with graphs. Popular tools in each layer include Neo4j and Titan for databases, Giraph and GraphX for analysis, and Gephi and Cytoscape for visualization. Graph technologies are gaining more attention due to their ability to extract insights from connected data.
This document discusses graphs and graph databases. It provides examples of graphs and compares SQL queries to Gremlin queries on graphs. It also discusses different types of graph databases for online transaction processing (OLTP) and online analytical processing (OLAP). The document then discusses how a social and data graph could help address the problem of data going dark in life sciences research by enabling collaboration, data sharing and discovery of relevant experts and data. It proposes using bi-clustering algorithms to identify relevant groups within the social and data graph to facilitate data and expert discovery.
This document provides an overview of a Neo4j basic training session. The training will cover querying graph patterns with Cypher, designing and implementing a graph database model, and evolving existing graphs to support new requirements. Attendees will learn about graph modeling concepts like nodes, relationships, properties and labels. They will go through a modeling workflow example of developing a graph model to represent airport connectivity data from a CSV file and querying the resulting graph.
A comparison of relational and graph model theories, with an eye towards DataStax's implementation of Graph. Note: I'm working on a concise, formal mathematical definition of relational, based on Codd's 1970 paper. (Thanks to Artem Chebotko for suggesting this.)
This document provides an overview of graphs for artificial intelligence and machine learning. It discusses definitions of machine learning and AI, as well as common techniques like predictive analytics, transfer learning, and human-like AI. It then covers how graph databases and graph algorithms can be applied to domains like social networks, knowledge graphs, and recommender systems. Specific graph algorithms like triadic closure, structural balance, and graph partitioning are examined. The document also explores emerging areas like graph neural networks, graph convolutional networks, and using graph structures for causal models. It argues that representing data as graphs and applying graph algorithms can provide intelligent behavior without needing general human-level artificial intelligence.
Airbnb aims to democratize data within the company by building a graph database of all internal data resources connected by relationships. This graph is queried through a search interface to help employees explore, discover, and build trust in company data. Challenges include modeling complex data dependencies and proxy nodes, merging graph updates from different sources, and designing a data-dense interface simply. Future goals are to gamify content production, deliver recommendations, certify trusted content, and analyze the information network.
In this talk, Michael Hunger is going to shed some light over the new High Availability architecture for the popular Neo4j Graph Database. We are going to look at the different variants of the Paxos protocol, master failover strategies and cluster management state handling. This piece of infrastructure poses non-trivial challenges to distributed consensus-finding, an interesting session for anyone into scalable systems.
Each of the files or classes of a projects source code represents a tree (AST). Looking at dependencies to other classes besides inheritance creates a graph though. Field types and method parameters are also implicit dependencies. Storing this information in a graph database like Neo4j allows for interesting queries and insights. Class-Graph provides that and is available as open-source github project.
Graphs are everywhere. From websites adding social capabilities to Telcos providing personalized customer services, to innovative bioinformatics research, organizations are adopting graph databases as the best way to model and query connected data. If you can whiteboard, you can model your domain in a graph database.
In this session Emil Eifrem provides a close look at the graph model and offers best use cases for effective, cost-efficient data storage and accessibility.
Take Aways: Understand the model of a graph database and how it compares to document and relational databases Understand why graph databases are best suited for the storage, mapping and querying of connected data
Emil's presentation will be followed by a Hands-on Guide to Spring Data Neo4j. Spring Data Neo4j provides straightforward object persistence into the Neo4j graph database. Conceived by Rod Johnson and Neo Technology CEO Emil Eifrem, it is the founding project of the Spring Data effort. The library leverages a tight integration with the Spring Framework and the Spring Data infrastructure. Besides the easy to use object graph mapping it offers the powerful graph manipulation and query capabilities of Neo4j with a convenient API.
The talk introduces the different aspects of Spring Data Neo4j and shows applications in several example domains.
During the session we walk through the creation of a engaging sample application that starts with the setup and annotating the domain objects. We see the usage of Neo4jTemplate and the powerful repository abstraction. After deploying the application to a cloud PaaS we execute some interesting query use-cases on the collected data.
Third lecture in Java EE training series.
Covers:
- JPA entities and persistence units
- Mapping of JPA entities to SQL database
- Querying entities
- Lazy and eager loading
- Id generation
- Optimistic locking
O documento resume os principais conceitos de persistência de dados usando Java Persistence API (JPA) e Hibernate. Explica como mapear classes Java para tabelas de banco de dados, usar EntityManager para gerenciar entidades e realizar operações CRUD, e configurar Hibernate para persistir dados.
Have you ever wondered what the best way would be to test emails? Or how you would go about testing a messaging queue?
Making sure your components are correctly interacting with each other is both a tester and developer’s concern. Join us to get a better understanding of what you should test and how, both manually and automated.
This session is the first ever in which we will have two units working together to give you a nuanced insight on all aspects of integration testing. We’ll start off exploring the world of integration testing, defining the terminology, and creating a general understanding of what phases and kinds of testing exist. Later on we’ll delve into integration test automation, ranging from database integration testing to selenium UI testing and even as far as LDAP integration testing.
We have a wide variety of demos prepared where we will show you how easy it is to test various components of your infrastructure. Some examples:
- Database testing (JPA)
- Arquillian, exploring container testing, EJB testing and more
- Email testing
- SOAP testing using SoapUI
- LDAP testing
- JMS testing
This document provides a step-by-step guide for creating a Java application with an embedded database. It describes how to design a database from an Excel spreadsheet with normalized tables, create the database using Java DB, and link the tables. It then explains how to create a NetBeans project and connect it to the embedded database, and generate entity classes to represent the database tables in the Java application. The goal is to demonstrate how to link a database designed in Excel to a Java application using Java DB and JPA techniques.
This document provides a step-by-step guide for creating a Java application that connects to a Java DB database. It describes designing the database using normalized tables in Excel with a one-to-many relationship, creating the database and tables in Java DB using SQL commands, inserting sample data, generating entity classes from the database tables in Netbeans, and testing the connection between the Java application and the embedded Java DB database. The guide uses a pet owner database as an example to demonstrate these steps.
JustFit is a fitness app and service that helps people stay fit anywhere through their Android app. The app provides fitness routines, tracks users' activity, and offers a shop and fitness consultant service. JustFit has over 370,000 registered users with around 55,000 monthly active users and 9,000 daily active users. It was awarded second place in a 2014 government health app competition and was named a top 10 app in a 2014 business competition.
This document contains sample questions for a Java and SQL test on a pet database. It includes 9 questions on modifying and querying a Java program that manages pet data. It also includes 9 SQL questions to query tables in the pet database on information like pet names and owners, city counts, and outstanding amounts. Code answers are to be written directly in the provided Java program, while SQL answers are to be written in a text file with each question numbered.
Enterprise applications are complex making it difficult to fit everything in one model. NoSQL is taking a leading role in the next generation database technologies and polyglot persistence a good option to leverage the strength of multiple data stores. This talk will introduce the Spring Data project, an umbrella project that provides a familiar and consistent Spring-based programming model for a wide range of data access technologies such as Redis, MongoDB, HBase, Neo4j...while retaining store-specific features and capabilities.
This document discusses how to enable and use git's rerere feature to reuse recorded resolutions of merge or rebase conflicts. It recommends enabling rerere globally, then shows how rerere records the preimage used to resolve a conflict during a merge. Later, when rebasing the branch with the same conflict, rerere will reuse the previous resolution so the user does not need to resolve the conflict again.
Using the latest Java Persistence API 2 Features - Tech Days 2010 IndiaArun Gupta
This document provides an overview of new features in Java Persistence API (JPA) 2.0, including more flexible object/relational mapping capabilities like collections of basic types and embeddables with relationships. It describes the Criteria API, expanded query language, pessimistic locking support, and standardization of configuration options in JPA 2.0.
Webpack is a module bundler that bundles JavaScript files for use in a browser. It supports CommonJS and ES6 module syntax and bundles all dependencies. Webpack can bundle JavaScript files as well as other asset types like CSS, images, and fonts. It uses loaders to preprocess files and plugins to tap into the build pipeline. Webpack can be configured using a webpack.config.js file to specify options like entry points, output, loaders, plugins and optimization settings.
The document discusses starting a programming for kids initiative in Belgium. It notes strengths like freely available programming languages and computers, and weaknesses such as a lack of materials in local languages. Opportunities include organizing workshops and an online website with resources. Potential threats are lack of interest and existing competition. Ideas are presented like using robots and toys to make programming fun, and holding a roadshow workshop or working with companies and schools. Next steps proposed are setting up communication channels and an initial test workshop.
The document discusses Java persistence and JPA 2. It introduces entity beans as persistent objects mapped to database tables. An entity bean represents data from a database table as a Java object. The document covers the lifecycle of entity beans, associations between entity beans like one-to-one and many-to-many relationships, and using the entity manager to persist, find, and remove entity beans from the database. It provides examples of entity bean classes annotated with JPA annotations and a persistence configuration file.
This document discusses WebSockets and their APIs. It introduces WebSockets as enabling bi-directional, full-duplex communications over TCP, in contrast to traditional HTTP interactions which are half-duplex. It then covers the WebSocket handshake process, APIs for WebSocket in JavaScript and Java, and how to create and use WebSocket endpoints programmatically and using annotations in Java.
The webinar introduces Spring Data Neo4j 2.0. It is presented by Michael Hunger from Neo Technology. The webinar provides a brief overview of Spring Data, introduces Neo4j as a graph database, and discusses the key features and capabilities of Spring Data Neo4j for accessing Neo4j from Spring applications. It demonstrates how to perform basic graph operations in Neo4j and queries in Cypher.
The document discusses the rise of graph databases and their benefits over traditional SQL databases. It notes four trends driving growth in data size, connectivity, semi-structured data, and decoupled architectures that have led to the rise of NoSQL databases including key-value, column-oriented, document, and graph databases. It provides an overview of the graph database model, which represents data as nodes and relationships, and an example using the graph database Neo4j.
An Introduction to NOSQL, Graph Databases and Neo4jDebanjan Mahata
Neo4j is a graph database that stores data in nodes and relationships. It allows for efficient querying of connected data through graph traversals. Key aspects include nodes that can contain properties, relationships that connect nodes and also contain properties, and the ability to navigate the graph through traversals. Neo4j provides APIs for common graph operations like creating and removing nodes/relationships, running traversals, and managing transactions. It is well suited for domains that involve connected, semi-structured data like social networks.
A NOSQL Overview And The Benefits Of Graph Databases (nosql east 2009)Emil Eifrem
Presentation given at nosql east 2009 in Atlanta. Introduces the NOSQL space by offering a framework for categorization and discusses the benefits of graph databases. Oh, and also includes some tongue-in-cheek party poopers about sucky things in the NOSQL space.
This document discusses trends driving the adoption of NoSQL databases, including increasing data size, connectivity of information, semi-structured data, and distributed application architectures. It describes four categories of NoSQL databases - aggregate-oriented, key-value stores, column family (BigTable), and document databases - and provides examples and comparisons of their pros and cons.
The document introduces MongoDB as an open source, high performance database that is a popular NoSQL option. It discusses how MongoDB stores data as JSON-like documents, supports dynamic schemas, and scales horizontally across commodity servers. MongoDB is seen as a good alternative to SQL databases for applications dealing with large volumes of diverse data that need to scale.
This document discusses Grails integration with Neo4j graph databases. It begins with an introduction to graph databases and Neo4j. It then covers the Grails Neo4j plugin which allows using Neo4j as the persistence layer for Grails domain classes. Finally, it addresses some challenges in mapping the Grails domain model to the Neo4j nodespace and potential solutions.
GraphTalks Rome - Selecting the right TechnologyNeo4j
Dirk Möller discusses selecting the right database technology, with a focus on graph databases like Neo4j. He outlines the benefits of graph databases over relational and NoSQL databases for connected data, including high performance, easy maintenance, and seamless evolution. Möller also provides examples of common use cases where graph databases have business benefits in areas like recommendations, fraud detection, and network operations.
This document provides an overview of graph databases and Neo4j. It discusses how graph databases are better suited than relational databases for interconnected data and have simpler data models. Neo4j is highlighted as a graph database that uses nodes, edges and properties to represent data and uses the Cypher query language. It is fully ACID compliant, open source, and has a large active community.
Polyglot Persistence with MongoDB and Neo4jCorie Pollock
Learn how to enhance your application by using Neo4j and MongoDB together. Polyglot persistence is the concept of taking advantage of the strengths of different database technologies to improve functionality and enhance your application. In this webinar we will examine some use cases where it makes sense to use a document database (MongoDB) with a graph database (Neo4j) in a single application. Specifically, we will show how MongoDB can be used to provide search and browsing functionality for a product catalog while using Neo4j to provide personalized product recommendations. Finally we will look at the Neo4j Doc Manager project which facilitates syncing data from MongoDB to Neo4j to make polyglot persistence with MongoDB and Neo4j much easier.
This document discusses trends driving the emergence of NoSQL databases and provides an overview of NoSQL. The key trends include: (1) rapidly increasing data set sizes, (2) greater connectivity of data, and (3) more semi-structured and decentralized content. These trends have challenged the performance and architecture of traditional relational databases. NoSQL databases emerged in response and come in four main categories: key-value stores, BigTable clones, document databases, and graph databases. Each has a different data model suited to different types of use cases. Looking ahead, the best approach may be "polyglot persistence" using both SQL and NoSQL solutions.
Max De Marzi gave an introduction to graph databases using Neo4j as an example. He discussed trends in big, connected data and how NoSQL databases like key-value stores, column families, and document databases address these trends. However, graph databases are optimized for interconnected data by modeling it as nodes and relationships. Neo4j is a graph database that uses a property graph data model and allows querying and traversal through its Cypher query language and Gremlin scripting language. It is well-suited for domains involving highly connected data like social networks.
Graph databases store data in graph structures with nodes, edges, and properties. Neo4j is a popular open-source graph database that uses a property graph model. It has a core API for programmatic access, indexes for fast lookups, and Cypher for graph querying. Neo4j provides high availability through master-slave replication and scales horizontally by sharding graphs across instances through techniques like cache sharding and domain-specific sharding.
Choosing the Right Big Data Tools for the Job - A Polyglot ApproachDATAVERSITY
This document summarizes a webinar presented by Leon Guzenda of Objectivity, Inc. on choosing the right big data tools. It discusses how current big data analytics use separate technologies that are not well-suited for relationship analytics. A polyglot approach is recommended using the appropriate technologies like object databases and graph databases to efficiently store, manage and query relationships in complex data. Objectivity provides the InfiniteGraph massively scalable graph database and Objectivity/DB object database for managing interconnected data and hidden relationships.
Selecting the right database type for your knowledge management needs.Synaptica, LLC
This presentation looks at relational vs. graph databases and their advantages and disadvantages in storing semantic data for taxonomies and ontologies.
This document provides an introduction and overview of graph databases. It begins with an introduction to graphs and their history, then discusses what graph databases are and how they complement relational databases. It introduces Neo4j as an example graph database and describes its key aspects like the labeled property graph data model and Cypher query language. The document then discusses when graph databases are applicable and provides examples. It demonstrates graph querying and concludes with case studies and next steps.
Similar to Spring Data Neo4j Intro SpringOne 2011 (20)
Looming Marvelous - Virtual Threads in Java Javaland.pdfjexp
Nowadays we have 2 options for concurrency in Java:
* simple, synchronous, blocking code with limited scalability that tracks well linearly at runtime, or.
* complex, asynchronous libraries with high scalability that are harder to handle.
Project Loom aims to bring together the best aspects of these two approaches and make them available to developers.
In the talk, I'll briefly cover the history and challenges of concurrency in Java before we dive into Loom's approaches and do some behind-the-scenes implementation. To manage so many threads reasonably needs some structure - for this there are proposals for "Structured Concurrency" which we will also look at. Some examples and comparisons to test Loom will round up the talk.
Project Loom is included in Java 19 and 20 as a preview feature, it can already be tested how well it works with our applications and libraries.
Spoiler: Pretty good.
Easing the daily grind with the awesome JDK command line toolsjexp
Included in the JDK installation are a lot of handy tools for Java developers, from java, jshell and jcmd to jfr and jdeprscan. These allow you to analyze a running JVM, generate JRE's, run Java source code and much more. In this talk I would like to present a number of these tools with practical examples and thus expand the toolbox of the participants. With the command line tools, many tasks can be automated and executed more efficiently, leaving more time for the exciting things in developer life.
Today, we have 2 options for concurrency in Java:
Simple, synchronous, blocking code with limited scalability that tracks well linearly at runtime, or
complex, asynchronous libraries with high scalability, which are harder to handle
Project Loom aims to bring together the best aspects of these two approaches and make them available to developers.
In the talk, I'll briefly discuss the history and challenges of concurrency in Java before we dive into Loom's approaches and look a bit behind the scenes.
Project Loom is included since Java 17 as a preview feature, it can already be tested to see how well it works with our applications and libraries. Spoiler: Pretty good.
GraphConnect 2022 - Top 10 Cypher Tuning Tips & Tricks.pptxjexp
I was there when Cypher was invented in 2012
and have been using it ever since. The language is
extremely powerful and easy to learn. But to truly
master it, you need to understand how it works
internally and how the database executes your
queries. In this session, you'll learn to look behind
the scenes at execution plans with PROFILE and
EXPLAIN and which specific clauses, expressions,
structures, and operations help you minimize
Cypher and database operations. After this talk,
you should be able to speed up your Cypher
statements quite a bit.
The newly released Neo4j Connector for Apache Spark can be used to read and write data between the two systems.
In this demo I show how to use the investigative Data from the FinCEN files to have a full pipeline up an running.
Notebook is in https://github.com/jexp/fincen
How Graphs Help Investigative Journalists to Connect the Dotsjexp
Investigative journalists use graphs and graph databases like Neo4j to connect disparate pieces of data and uncover hidden relationships. The Panama Papers investigation involved loading over 2.6 TB of leaked data into Neo4j to allow over 370 journalists from 80 countries to collaborate and find connections between entities, addresses, intermediaries and officers. Visualizing the data in Neo4j helped journalists tell the full story and have a global impact, exposing offshore dealings of world leaders and others.
Who doesn't know him, the office hero, who sat in the office late into the evening and repaired production? The fact that perhaps another colleague sat on the sofa at home and had an equal share in this success is unfortunately not so appreciated in most company cultures. But why is that? Because we are not used to working at home? Because we think that you are not so productive at home? Because you have family, garden or other activities at home? Michael has been working for distributed companies for a long time, but has also worked in offices for a long time. He will take you on his journey through different working environments and tell you what worked well for him.
This document provides a high-level summary of GraalVM and its capabilities for running applications and languages on the Java Virtual Machine. Specifically, it discusses how GraalVM allows running JavaScript, Python, Ruby, R, Java and C/C++ efficiently on the JVM through projects like Truffle and Substrate. It also summarizes GraalVM's polyglot capabilities for interoperability between languages and ahead-of-time compilation of Java into native binaries.
Neo4j Graph Streaming Services with Apache Kafkajexp
This document discusses Neo4j Streams, which enables real-time streaming of Neo4j database changes to Apache Kafka. It includes a change data capture plugin that streams transaction events from Neo4j to Kafka, a sink plugin that ingests data from Kafka into Neo4j based on custom rules, and procedures to consume and produce data directly from Cypher. The presenters demonstrate how Neo4j Streams can be used to build real-time data pipelines and streaming applications integrated with Neo4j. They encourage attendees to try the integration and provide feedback.
How Graph Databases efficiently store, manage and query connected data at s...jexp
Graph Databases try to make it easy for developers to leverage huge amounts of connected information for everything from routing to recommendations. Doing that poses a number of challenges on the implementation side. In this talk we want to look at the different storage, query and consistency approaches that are used behind the scenes. We’ll check out current and future solutions used in Neo4j and other graph databases for addressing global consistency, query and storage optimization, indexing and more and see which papers and research database developers take inspirations from.
APOC Pearls - Whirlwind Tour Through the Neo4j APOC Procedures Libraryjexp
APOC has become the de-facto standard utility library for Neo4j. In this talk, I will demonstrate some of the lesser known but very useful components of APOC that will save you a lot of work. You will also learn how to combine individual functions into powerful constructs to achieve impressive feats
This will be a fast-paced demo/live-coding talk.
Video: https://neo4j.com/graphconnect-2018/session/neo4j-utility-library-apoc-pearls
Unicorn images by TeeTurtle.com (Unstable Unicorns is a fun game & cool t-shirts)
This document discusses refactoring and summarizes the key points from Martin Fowler's book Refactoring. It covers what refactoring is, when it should be used by recognizing code smells, and how it should be done through small, incremental changes backed by thorough testing. The benefits of refactoring include improving code quality by reducing bugs and technical debt, while making the code easier to understand and modify. Tools now make refactoring easier by providing code analysis, refactoring suggestions, and quick fixes.
New Features in Neo4j 3.4 / 3.3 - Graph Algorithms, Spatial, Date-Time & Visu...jexp
Highlighting the progress in Neo4j 3.3 and 3.4 especially
Neo4j Desktop, Graph Algorithms, NLP, Date-Time, Geospatial, and performance.
Also featuring the new visualization tool Neo4j Bloom.
GraphQL - The new "Lingua Franca" for API-Developmentjexp
Three years ago, with the release of the GraphQL specification, Facebook took a fresh stab at the topic of "API design between remote services and applications." The key aspects of GraphQL provide a common, schema-based, domain-specific language and flexible, dynamic queries at interface boundaries.
In the talk, I'd like to compare GraphQL and REST and showcase benefits for developers and architects using a concrete example in application and API development, data source and system integration.
This document provides an overview of GraphDB and Neo4j. It discusses why graphs are useful for modeling connected data and common use cases. It also summarizes Neo4j's transactional graph database capabilities, performance advantages, and deployment options. Key topics covered include causal clustering, query planning, and driver and tooling support for developers.
We recently released the Neo4j graph algorithms library.
You can use these graph algorithms on your connected data to gain new insights more easily within Neo4j. You can use these graph analytics to improve results from your graph data, for example by focusing on particular communities or favoring popular entities.
We developed this library as part of our effort to make it easier to use Neo4j for a wider variety of applications. Many users expressed interest in running graph algorithms directly on Neo4j without having to employ a secondary system.
We also tuned these algorithms to be as efficient as possible in regards to resource utilization as well as streamlined for later management and debugging.
In this session we'll look at some of these graph algorithms and the types of problems that you can use them for in your applications.
Despite the “Graph” in the name, GraphQL is mostly used to query relational databases, object models or APIs. But it is really easy to support GraphQL endpoints from graph databases too. In this talk, I’ll demonstrate how we implemented a GraphQL extension for the Neo4j graph database. It uses the GraphQL schema definition map arbitrary GraphQL queries into single graph queries and runs them against the data in the Graph database. Using directives in the schema, we added some cool features that are transparent to the end user like computed fields and auto-generated mutations and query types. That allows you to create GraphQL APIs of some complexity without writing a single line of code.
I will show how to use the Neo4j-GraphQL extension, by creating an endpoint for the Game of Thrones dataset, and how we then can use our well-known tools (GraphiQL, apollo-client, graphql-cli, voyager) to interact with it.
Despite the “Graph” in the name, GraphQL is mostly used to query relational databases or object models. But it is really well suited to querying graph databases too. In this talk, I’ll demonstrate how I implemented a GraphQL endpoint for the Neo4j graph database and how you would use it in your app.
The world around us is full of connected information. Neo4j was originally developed to solve two complex "network" problems in a document management system, as it was too hard to manage rich connection information efficiently in traditional and new "NOSQL" databases.During this meetup, we will talk about the technology, and about the journey that a couple of technologists from Malmö took. You will learn* how Neo Technology grew from just the three founders in to a global database company with use-cases in every domain imaginable.* how focusing on customer and community feedback allows us to provide a solution for managing connected data to everyone, not just the large internet companies.
Of course we will also introduce the graph model, it's whiteboard friendlyness and how you get started with Neo4j and it's easy and powerful query language Cypher. We'll also compare the graph and relational data model to see how they differ in shape and capabilities. Finally we discuss the foundations that enable Graph databases to provide higher join performance, faster development processes and more inclusive software for all stakeholders. With use-cases from Gaming, Dating and Finance we'll see how to apply the graph capabilities to these domains to realize new functionality or opportunities that were not possible before.
Finally, if there's a question you've always wanted to ask/discuss, we'll have plenty of time for that at the end of Michael's presentation.
Putting your data in a graph database is easy. We wanted to make it as easy to query the data. That's why we set out to create the cypher query language. This session introduces cypher shows a lot of examples and explains how it is used.
Implementations of Fused Deposition Modeling in real worldEmerging Tech
The presentation showcases the diverse real-world applications of Fused Deposition Modeling (FDM) across multiple industries:
1. **Manufacturing**: FDM is utilized in manufacturing for rapid prototyping, creating custom tools and fixtures, and producing functional end-use parts. Companies leverage its cost-effectiveness and flexibility to streamline production processes.
2. **Medical**: In the medical field, FDM is used to create patient-specific anatomical models, surgical guides, and prosthetics. Its ability to produce precise and biocompatible parts supports advancements in personalized healthcare solutions.
3. **Education**: FDM plays a crucial role in education by enabling students to learn about design and engineering through hands-on 3D printing projects. It promotes innovation and practical skill development in STEM disciplines.
4. **Science**: Researchers use FDM to prototype equipment for scientific experiments, build custom laboratory tools, and create models for visualization and testing purposes. It facilitates rapid iteration and customization in scientific endeavors.
5. **Automotive**: Automotive manufacturers employ FDM for prototyping vehicle components, tooling for assembly lines, and customized parts. It speeds up the design validation process and enhances efficiency in automotive engineering.
6. **Consumer Electronics**: FDM is utilized in consumer electronics for designing and prototyping product enclosures, casings, and internal components. It enables rapid iteration and customization to meet evolving consumer demands.
7. **Robotics**: Robotics engineers leverage FDM to prototype robot parts, create lightweight and durable components, and customize robot designs for specific applications. It supports innovation and optimization in robotic systems.
8. **Aerospace**: In aerospace, FDM is used to manufacture lightweight parts, complex geometries, and prototypes of aircraft components. It contributes to cost reduction, faster production cycles, and weight savings in aerospace engineering.
9. **Architecture**: Architects utilize FDM for creating detailed architectural models, prototypes of building components, and intricate designs. It aids in visualizing concepts, testing structural integrity, and communicating design ideas effectively.
Each industry example demonstrates how FDM enhances innovation, accelerates product development, and addresses specific challenges through advanced manufacturing capabilities.
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Chris Swan
Have you noticed the OpenSSF Scorecard badges on the official Dart and Flutter repos? It's Google's way of showing that they care about security. Practices such as pinning dependencies, branch protection, required reviews, continuous integration tests etc. are measured to provide a score and accompanying badge.
You can do the same for your projects, and this presentation will show you how, with an emphasis on the unique challenges that come up when working with Dart and Flutter.
The session will provide a walkthrough of the steps involved in securing a first repository, and then what it takes to repeat that process across an organization with multiple repos. It will also look at the ongoing maintenance involved once scorecards have been implemented, and how aspects of that maintenance can be better automated to minimize toil.
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfjackson110191
These fighter aircraft have uses outside of traditional combat situations. They are essential in defending India's territorial integrity, averting dangers, and delivering aid to those in need during natural calamities. Additionally, the IAF improves its interoperability and fortifies international military alliances by working together and conducting joint exercises with other air forces.
Are you interested in dipping your toes in the cloud native observability waters, but as an engineer you are not sure where to get started with tracing problems through your microservices and application landscapes on Kubernetes? Then this is the session for you, where we take you on your first steps in an active open-source project that offers a buffet of languages, challenges, and opportunities for getting started with telemetry data.
The project is called openTelemetry, but before diving into the specifics, we’ll start with de-mystifying key concepts and terms such as observability, telemetry, instrumentation, cardinality, percentile to lay a foundation. After understanding the nuts and bolts of observability and distributed traces, we’ll explore the openTelemetry community; its Special Interest Groups (SIGs), repositories, and how to become not only an end-user, but possibly a contributor.We will wrap up with an overview of the components in this project, such as the Collector, the OpenTelemetry protocol (OTLP), its APIs, and its SDKs.
Attendees will leave with an understanding of key observability concepts, become grounded in distributed tracing terminology, be aware of the components of openTelemetry, and know how to take their first steps to an open-source contribution!
Key Takeaways: Open source, vendor neutral instrumentation is an exciting new reality as the industry standardizes on openTelemetry for observability. OpenTelemetry is on a mission to enable effective observability by making high-quality, portable telemetry ubiquitous. The world of observability and monitoring today has a steep learning curve and in order to achieve ubiquity, the project would benefit from growing our contributor community.
Measuring the Impact of Network Latency at TwitterScyllaDB
Widya Salim and Victor Ma will outline the causal impact analysis, framework, and key learnings used to quantify the impact of reducing Twitter's network latency.
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...Toru Tamaki
Jindong Gu, Zhen Han, Shuo Chen, Ahmad Beirami, Bailan He, Gengyuan Zhang, Ruotong Liao, Yao Qin, Volker Tresp, Philip Torr "A Systematic Survey of Prompt Engineering on Vision-Language Foundation Models" arXiv2023
https://arxiv.org/abs/2307.12980
The DealBook is our annual overview of the Ukrainian tech investment industry. This edition comprehensively covers the full year 2023 and the first deals of 2024.
Choose our Linux Web Hosting for a seamless and successful online presencerajancomputerfbd
Our Linux Web Hosting plans offer unbeatable performance, security, and scalability, ensuring your website runs smoothly and efficiently.
Visit- https://onliveserver.com/linux-web-hosting/
Details of description part II: Describing images in practice - Tech Forum 2024BookNet Canada
This presentation explores the practical application of image description techniques. Familiar guidelines will be demonstrated in practice, and descriptions will be developed “live”! If you have learned a lot about the theory of image description techniques but want to feel more confident putting them into practice, this is the presentation for you. There will be useful, actionable information for everyone, whether you are working with authors, colleagues, alone, or leveraging AI as a collaborator.
Link to presentation recording and transcript: https://bnctechforum.ca/sessions/details-of-description-part-ii-describing-images-in-practice/
Presented by BookNet Canada on June 25, 2024, with support from the Department of Canadian Heritage.
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfNeo4j
Presented at Gartner Data & Analytics, London Maty 2024. BT Group has used the Neo4j Graph Database to enable impressive digital transformation programs over the last 6 years. By re-imagining their operational support systems to adopt self-serve and data lead principles they have substantially reduced the number of applications and complexity of their operations. The result has been a substantial reduction in risk and costs while improving time to value, innovation, and process automation. Join this session to hear their story, the lessons they learned along the way and how their future innovation plans include the exploration of uses of EKG + Generative AI.
RPA In Healthcare Benefits, Use Case, Trend And Challenges 2024.pptxSynapseIndia
Your comprehensive guide to RPA in healthcare for 2024. Explore the benefits, use cases, and emerging trends of robotic process automation. Understand the challenges and prepare for the future of healthcare automation
How Social Media Hackers Help You to See Your Wife's Message.pdfHackersList
In the modern digital era, social media platforms have become integral to our daily lives. These platforms, including Facebook, Instagram, WhatsApp, and Snapchat, offer countless ways to connect, share, and communicate.
Coordinate Systems in FME 101 - Webinar SlidesSafe Software
If you’ve ever had to analyze a map or GPS data, chances are you’ve encountered and even worked with coordinate systems. As historical data continually updates through GPS, understanding coordinate systems is increasingly crucial. However, not everyone knows why they exist or how to effectively use them for data-driven insights.
During this webinar, you’ll learn exactly what coordinate systems are and how you can use FME to maintain and transform your data’s coordinate systems in an easy-to-digest way, accurately representing the geographical space that it exists within. During this webinar, you will have the chance to:
- Enhance Your Understanding: Gain a clear overview of what coordinate systems are and their value
- Learn Practical Applications: Why we need datams and projections, plus units between coordinate systems
- Maximize with FME: Understand how FME handles coordinate systems, including a brief summary of the 3 main reprojectors
- Custom Coordinate Systems: Learn how to work with FME and coordinate systems beyond what is natively supported
- Look Ahead: Gain insights into where FME is headed with coordinate systems in the future
Don’t miss the opportunity to improve the value you receive from your coordinate system data, ultimately allowing you to streamline your data analysis and maximize your time. See you there!
Quantum Communications Q&A with Gemini LLM. These are based on Shannon's Noisy channel Theorem and offers how the classical theory applies to the quantum world.
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Bert Blevins
Today’s digitally connected world presents a wide range of security challenges for enterprises. Insider security threats are particularly noteworthy because they have the potential to cause significant harm. Unlike external threats, insider risks originate from within the company, making them more subtle and challenging to identify. This blog aims to provide a comprehensive understanding of insider security threats, including their types, examples, effects, and mitigation techniques.
7. What does NOSQL stand for?
It’s not “No to SQL”
It’s not “Never SQL”
8. What does NOSQL stand for?
It’s not “No to SQL”
It’s not “Never SQL”
It’s “Not Only SQL”
9. What does NOSQL stand for?
It’s not “No to SQL”
It’s not “Never SQL”
It’s “Not Only SQL”
NOSQL no-seek-wool n. Describes ongoing
trend where developers increasingly opt for
non-relational databases to help solve their
problems, in an effort to use the right tool for
the right job.
10. Why NOSQL now?
We have observed four trends:
๏ Trend 1: Size of data is growing
๏ Trend 2: Data is increasingly connected
๏ Trend 3: Data is increasingly semi-structured
๏ Trend 4: Change in architecture
12. NOSQL categories
We see four main categories in the NOSQL space:
Key-Value
•Redis
•Riak
•Voldemort
13. NOSQL categories
We see four main categories in the NOSQL space:
Column-family/
Key-Value
BigTable
•Redis
•Riak •Cassandra
•Voldemort •HBase
14. NOSQL categories
We see four main categories in the NOSQL space:
Column-family/
Key-Value
BigTable
•Redis
•Riak •Cassandra
•Voldemort •HBase
Document
•MongoDB
•CouchDB
15. NOSQL categories
We see four main categories in the NOSQL space:
Column-family/
Key-Value
BigTable
•Redis
•Riak •Cassandra
•Voldemort •HBase
Document Graph
•Neo4j
•MongoDB
•InfiniteGraph
•CouchDB
•OrientDB
•DEX
16. Scaling to size vs. Scaling to complexity
Size
Key-Value stores
Bigtable clones
Document databases
Graph databases
Complexity
8
17. Scaling to size vs. Scaling to complexity
Size
Key-Value stores
Bigtable clones
Document databases
Graph databases
Billions of nodes
and relationships
Complexity
8
18. Scaling to size vs. Scaling to complexity
Size
Key-Value stores
Bigtable clones
Document databases
Graph databases
Billions of nodes
and relationships
> 90% of use cases
Complexity
8
20. What is Spring Data
๏ VMWare/SpringSource initiative to give Spring developers easy
access to the emerging world of NOSQL, including:
• Non-relational databases
• MapReduce
• Grails NOSQL support
• Cross-store persistence
• Object Persistence Mapping Infrastructure
• Generic Repository Infrastructure
• upcoming Spring Roo add-ons
10
21. Spring Data projects
๏ Code is in SpringSource git repository:
• http://springsource.org/spring-data
• https://github.com/SpringSource/spring-data-*
๏ Includes:
• data-commons
• spring-data-graph-neo4j
• spring-data-{redis,riak}
• spring-data-mongo
• spring-data-jdbc
• spring-data-jpa
22. Spring Data Neo4j
๏ Focus on Spring Data Neo4j
๏ VMWare is collaborating with Neo Technology, the company behind
the Neo4j graph database.
๏ Improved programming model: Annotation-based
programming model for graph applications
๏ Cross-store persistence: Extend existing JPA application with
NOSQL persistence
๏ Spring Roo support: Add graph persistence with Roo add-on
26. Good Relationships
๏ the world is rich, messy and related data
๏ relationships are as least as important as the things they connect
๏ Graphs = Whole > Sum of all parts
๏ complex interactions
๏ always changing, change of structures as well
๏ Graph: Relationships are part of the data
๏ RDBMS: Relationships part of the fixed schema
16
27. Questions and Answers
๏ Complex Questions
๏ Answers lie between the lines (things)
๏ Locality of the information
๏ Global searches / operations very expensive
๏ constant query time, regardless of data volume
17
28. Categories ?
๏ Categories == Classes, Trees ?
๏ What if more than one category fits?
๏ Tags
๏ Categories vi relationships like „IS_A“
๏ any number, easy change
๏ „virtual“ Relationships - Traversals
๏ Category dynamically derived from queries
18
43. For example
WORKS_WITH
project: spring-data
name: Oliver name: Michael
44. For example
WORKS_WITH
project: spring-data
name: Oliver name: Michael
EM
PL
LIVES_IN
OY
E
D_
BY
city: Dresden
company: VMware country: DE
45. For example
name: Rod
KN
S OW
OW S
KN
WORKS_WITH
project: spring-data
name: Oliver name: Michael
EM
PL
LIVES_IN
OY
E
D_
BY
city: Dresden
company: VMware country: DE
46. For example
name: Rod
KN
S OW
OW S
KN
WORKS_WITH
project: spring-data
name: Oliver name: Michael
EM
PL
LIVES_IN
S
OY
LIKE
E
D_
BY
city: Dresden
food: Chinese
company: VMware country: DE
47. Best NOSQL Database for Spring ?
Why ? Explain !
•Written in Java
•Embeddable or standalone Server
•Schema-free - perfect for rich domains
•Fully transactional (ACID)
•Persistent to custom on-disk file structure
•Traversal speeds of 1,000+ hops per ms
•24/7 production since 2003
•Integrated indexing
•Plenthora of language bindings
50. Whiteboard friendly
Blog
Post BEL
ON
GS
_TO
Ally’s
Blog
WROTE
BE
LO
NG
NS
S_
W
O
OT
Blog
Allison WROTE Post 2
51. Whiteboard friendly
Blog
Post BEL
ON
GS
_TO
Ally’s
Blog
WROTE
BE
LO
NG
NS
S_
W
O
T O
Blog
Allison WROTE Post 2 CO
MM
EN
T_
OR
FO
R
COMMENT_F
Comment
Comment
52. Whiteboard friendly
Blog
Post BEL
ON
GS
_TO
Ally’s
Blog
WROTE
BE
LO
NG
NS
S_
W
O
T O
Blog
Allison WROTE Post 2 CO
MM
EN
T_
OR
FO
R
COMMENT_F
Comment
Comment
53. Show me some code, please
GraphDatabaseService graphDb =
new EmbeddedGraphDatabase(“var/neo4j”);
Node david = graphDb.createNode();
Node andreas = graphDb.createNode();
david.setProperty(“name”, “David Montag”);
andreas.setProperty(“name”, “Andreas Kollegger”);
Relationship presentedWith = david.createRelationshipTo(
andreas, PresentationTypes.PRESENTED_WITH);
presentedWith.setProperty(“date”, System.currentTimeMillis());
54. Show me some code, please
GraphDatabaseService graphDb =
new EmbeddedGraphDatabase(“var/neo4j”);
Transaction tx = graphDb.beginTx();
try {
Node david = graphDb.createNode();
Node andreas = graphDb.createNode();
david.setProperty(“name”, “David Montag”);
andreas.setProperty(“name”, “Andreas Kollegger”);
Relationship presentedWith = david.createRelationshipTo(
andreas, PresentationTypes.PRESENTED_WITH);
presentedWith.setProperty(“date”, System.currentTimeMillis());
tx.success();
} finally {
tx.finish();
}
61. Traversal framework
Example: a dependency graph
Query: Find all dependencies of A, transitively A
B
D
C
TraversalDescription desc = Traversal.description()
.relationships(ExampleTypes.DEPENDS_ON, Direction.OUTGOING);
Node a = ...;
for (Node dependency : desc.traverse(a).nodes()) {
print(dependency);
}
63. So how do I find a node
to traverse from?
g!
in
ex
i nd
i ng
us
B y ?
64. So how do I find a node
to traverse from?
g!
in
ex
i nd
i ng
us
B y name: David
?
65. So how do I find a node
to traverse from?
g!
in
ex
i nd
i ng
us
B y name: David
?
David
66. So how do I find a node
to traverse from?
g! Andreas
in
ex
i nd Michael
i ng
us
B y name: David
?
David
Ed
Allison
67. Cypher Query Language
๏ Declarative query language
• Describe what you want, not how
• Based on pattern matching
๏ Examples:
START david=node:people(name=”David M”) # index lookup
MATCH david-[:knows]-()-[:knows]-foaf
WHERE foaf.age > 18
RETURN foaf
START user=node(5, 15, 26, 28) # node IDs
MATCH user--friend
RETURN user, COUNT(friend), SUM(friend.money)
30
68. Cypher Query Language (E
xp
๏ Declarative query language en er
ta im
• Describe what you want, not how l)
• Based on pattern matching
๏ Examples:
START david=node:people(name=”David M”) # index lookup
MATCH david-[:knows]-()-[:knows]-foaf
WHERE foaf.age > 18
RETURN foaf
START user=node(5, 15, 26, 28) # node IDs
MATCH user--friend
RETURN user, COUNT(friend), SUM(friend.money)
30
69. Beyond basics
๏ Graph algorithm library
• Cheapest path (Dijkstra, A*)
• Shortest path
• Simple paths
• All paths
๏ REST API access to Neo4j Standalone Server
๏ High availability and online backups
• Provides fault tolerance and horizontal scaling of reads
31
71. Spring Framework Conveniences
๏ default enterprise development framework
๏ future Java Cloud stack
๏ POJO centric application design
๏ made AspectJ aspects socially acceptable (tx-config, @Configurable)
๏ Template programming model
๏ Inversion of Control / Dependency Injection
๏ Spring Java Config, configuration XML-namespaces
๏ lots of powerful libraries and library abstractions
๏ existing, well-known persistence framework for JDBC
๏ Spring Data project
72. Programming model overview
๏ SDN is the brain child of Rod Johnson and Emil Eifrém
• Wrote functional initial prototype
• Developed by Neo Technology and SpringSource teams
๏ Uses annotations to define POJO entities
๏ Entity state backed by graph database
๏ Two modes of Object Graph Mapping
• Spring Data Mapping
• seamless object mapping leverages AspectJ
๏ Spring Roo add-on available
73. Spring Data Neo4j features
๏ Annotation-based programming model
๏ Spring Data Commons Repository support
๏ Neo4j Query (Cypher, Gremlin) and Traversal support
• on dynamic fields and via repository methods
๏ Neo4j indexing support (includes fulltext and numeric range queries)
๏ Entity types stored in the graph database as well
๏ Dynamic type projection (duck typing)
๏ Cross-store support for partial JPA / graph entities
๏ Support for JSR-303 (bean validation)
๏ Support for the Neo4j Server (remote server and in server extension)
๏ Neo4jTemplate with exception translation, optional transaction management and
more
35
74. Classic Neo4j domain class
public class Actor {
private final Node underlyingNode;
Actor( final Node node ) {
underlyingNode = node;
}
public Node getUnderlyingNode() {
return underlyingNode;
}
public final String getName() {
return (String) underlyingNode.getProperty( “name” );
}
public void setName( final String name ) {
underlyingNode.setProperty( “name”, name );
}
}
75. Spring Data Neo4j domain class
@NodeEntity
public class Actor {
@Indexed
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
76. What about relationships
@NodeEntity
class Actor {
...
public Iterable
<Movie> getMovi
final List<Movi es() {
e> movies = new
for ( Relations LinkedList<Movi
hip rel : under e>();
RelTypes.ACTS_I lyingNode.getRe
N, Direction.OU lationships(
movies.add( new TGOING ) ) {
Movie( rel.getE
Old
} ndNode() ) );
return movies;
}
class)
@RelatedTo(type="ACTS_ IN", elementClass = Movie.
;
private Set<Movie> movies
public Iterable<Movie> ge
tMovies() {
New
return movies;
}
78. Defining entity classes
• @NodeEntity
• Represents a node in the graph
• Fields saved as properties on node
• References stored as relationships between nodes
• Instantiated using Java ‘new’ keyword, like any POJO
• Also returned by lookup mechanisms
• Type information stored in the graph
80. Defining entity classes
• @RelationshipEntity
• Represents a relationship in the graph
• Fields saved as properties on relationship
• Special fields for start- and end-nodes
• Only returned by lookup methods
81. Fields in node entities (@NodeEntity)
• Primitive types and strings are directly persisted
• For all other types, Spring conversion support can be used
• Enum and Date conversion is provided out-of-the-box
• Transient fields not persisted
@NodeEntity
public class Actor {
private String name;
private int age;
private HairColor hairColor;
private transient String nickname;
}
41
82. Fields in node entities (@NodeEntity)
• Fields of types that represent a node (@NodeEntity)
42
83. Fields in node entities (@NodeEntity)
• Fields of types that represent a node (@NodeEntity)
@NodeEntity
public class Movie {}
@NodeEntity
public class Person {
private Movie favoriteMovie;
}
42
84. Fields in node entities (@NodeEntity)
• Fields of types that represent a node (@NodeEntity)
@NodeEntity
public class Movie {}
@NodeEntity
public class Person {
private Movie favoriteMovie;
}
@NodeEntity
public class Movie {
private Actor topActor;
}
@NodeEntity
public class Actor {
// Mirrors topActor in Movie
@RelatedTo(type = ”topActor”, direction = Direction.INCOMING)
private Movie wasTopActorIn;
}
42
85. Fields in node entities (@NodeEntity)
• Fields of collections of node entities: @RelatedTo
@NodeEntity
public class Movie {}
@NodeEntity
public class Actor {
@RelatedTo(type = “ACTS_IN”)
private Set<Movie> movies;
}
43
86. Fields in node entities (@NodeEntity)
๏ Fields of collections of relationship entities: @RelatedToVia
@RelationshipEntity
public class Role {
@StartNode private Actor actor;
@EndNode private Movie movie;
private String roleName;
}
@NodeEntity
public class Actor {
@RelatedToVia(type = “ACTS_IN”)
private Iterable<Role> roles;
}
๏ Read only view of relationship entities 44
87. Fields in relationship entities
(@RelationshipEntity)
• Primitive and convertible types work just the same
• @StartNode and @EndNode provide access to the start and
end node entities for the relationship entity
@RelationshipEntity
public class Role {
@StartNode private Actor actor;
@EndNode private Movie movie;
private String title;
}
88. Indexing
By annotating an entity field with @Indexed it becomes searchable:
@NodeEntity
public class Actor {
@Indexed private String name;
@Indexed private HairColor hairColor;
It can then be looked up:
GraphRepository<Actor> actorRepo =
template.repositoryFor(Actor.class);
Actor kevin =
actorRepo.findByPropertyValue(“name”, “Kevin Bacon”);
Iterable<Actor> allBlondActors =
actorRepo.findAllByPropertyValue(“hairColor”, “blond”);
89. Indexing
@NodeEntity
public class Actor {
@Indexed(type = FULLTEXT)
private String name;
๏ Index name defaults to domain class name
๏ Index key defaults to field name
๏ Fulltext and spatial index types
๏ Repository query methods for any Lucene query, including ranges:
Iterable<Actor> allKevinsOlderThan32 =
actorRepo.findAllByQuery(“name:Kevin* AND age>32”);
Iterable<Actor> youngActors =
actorRepo.findAllByRange(“age”, 3, 18);
90. Traversal
@NodeEntity
public class Actor {
@GraphTraversal(
traversalBuilder = CoactorsTraversalDescriptionBuilder.class)
private Iterable<Actor> coactors;
}
public class CoactorsTraversalDescriptionBuilder implements
FieldTraversalDescriptionBuilder {
public TraversalDescription build(...) {
return Traversal.description()
.evaluator(Evaluators.atDepth(2))
.relationships(RelTypes.ACTS_IN);
}
}
Example for dynamic field computation
48
91. Cypher query language
@NodeEntity
public class Actor {
@Query(“START actor=({self}) ” +
“MATCH (actor)-[:ACTS_IN]->(movie)<-[:ACTS_IN]-(coactor) ” +
“RETURN coactor”)
private Iterable<Actor> coactors;
}
@NodeEntity
public class Actor {
@Query(“START actor=({self}) ” +
“MATCH (actor)-[:ACTS_IN]->(movie)<-[:ACTS_IN]-(coactor) ” +
“RETURN movie.title, coactor.name”)
private Iterable<Map<String, Object>> movieCoactorPairs;
}
49
92. Spring-Data-Mapping
๏ Based on Spring-Data-Commons infrastructure
• Extract Mapping Meta Information
‣Neo4jPersistentEntity, Neo4jPersistentProperty
• Entity-Converter Implementations for Object-Graph-Mapping
‣Type-resolution
‣Entity construction
‣Transfer properties
‣loaed for eagerly fetched relationships
• Neo4j-Template for Graph-Interaction
50
93. AspectJ
๏ Introduces interface to entities:
• NodeBacked into @NodeEntity classes
• RelationshipBacked into @RelationshipEntity classes
๏ NodeBacked introduces methods such as:
• relateTo
• findByQuery
• findAllByTraversal
• ...
๏ going to be pulled out in separate Active-Record-Mixin
51
94. AspectJ - Tooling
๏ IDE‘s
• latest versions of STS / Eclipse with current AJDT plugin
• IntelliJ IDEA 10.5 compile + run, some editor quirks
‣full AspectJ support in IDEA 11
๏ Build Systems
• Maven
• Gradle
• Ant / Ivy
• ...
52
95. AspectJ - NodeBacked.relateTo
<T extends RelationshipBacked> T NodeBacked.relateTo(
NodeBacked node,
Class<T> relationshipEntityType,
String relationshipType
);
usage:
@NodeEntity
public class Actor {
public Role actsIn(Movie movie, String roleName) {
Role role = relateTo(movie, Role.class, “ACTS_IN”);
role.setName(roleName);
return role;
}
}
53
96. Interface based Repositories
๏ based on Repository infrastructure in Spring Data Commons
๏ just define the interface and the namespace configuration
๏ provide out-of-the-box support for
• CRUD-Operations
• Index-Lookups
• Traversal-Execution
• Graph-Queries (Cypher, Gremlin)
• derived Queries
• Spatial Queries
๏ extensible via custom methods with provided implementations
54
97. Repositories
interface MovieRepository extends GraphRepository<Movie> {
Movie findById(String id);
Page<Movie> findByTitle(String title, Pageable page);
}
<neo4j:repositories base-package=“com.example.repositories„/
@Controller
public class MovieController {
@Autowired MovieRepository moviesRepository;
@RequestMapping(value = "/movies/{movieId}",...)
public String show(Model model, @PathVariable String movieId) {
Movie movie = moviesRepository.findByPropertyValue("id", movieId);
Movie movie = moviesRepository.findById(movieId);
model.addAttribute("movie", movie);
return "/movies/show";
}}
55
99. Repository-Query-Support
interface MovieRepository extends GraphRepository<Movie> {
@Query("start m=({movie}) match m-[ACTS_IN]-actor return actor")
Iterable<Actor> getActorsCypher(@Param("movie") Movie m);
@Query("start movie =({0}) match (movie)<-[role:ACTS_IN]-(actor)
return actor.name, role.title")
Iterable<Map<String,Object>> getCast(Movie m);
@Query(value = "g.v(movie).out('ACTS_IN')", type = QueryType.Gremlin)
Iterable<Person> getActorsGremlin(@Param("movie") Movie m);
}
57
100. Neo4j-Template (I)
๏ well known Spring Template Pattern
๏ Resource / Transaction Management
๏ Convenience Methods
๏ Nodes and Entities handling & conversion
๏ Fluent Query Result Handling
๏ Works also via REST with Neo4j-Server
๏ Exception Translation
58
101. Neo4j-Template (II)
template.lookup("node", "name", "David")
.to(String.class, new PropertyContainerNameConverter()).single()
template.traverse(node, traversal)
.to(Integer.class,new ResultConverter<Path,Integer>() {
public Integer convert(Path path, Class<String> type) {
return path.length();
}})
template.query("start movie=(Movies,title, {m}) match movie-->actor return actor",
map("m","Matrix")).to(Actor.class)
template.execute("g.v(ref).outE", map("ref",0)).to(Relationship.class)
59
102. REST-Client-Support
<bean id="restGraphDatabaseService"
class="org.sf.data.neo4j.rest.SpringRestGraphDatabase">
<constructor-arg value="http://localhost:7473/db/data" />
</bean>
<datagraph:config graphDatabaseService="restGraphDatabaseService"/>
๏ drop-in replacement for the embedded GraphDatabase
๏ works transparently with POJO-Entity-Mapping and
Neo4j-Template
60
103. REST-Server-Support
public class HelloWorldInitializer extends SpringPluginInitializer {
public HelloWorldInitializer() {
super(new String[]{"spring/helloWorldServer-Context.xml"},
Pair.of("worldRepository", WorldRepository.class),
Pair.of("graphRepositoryFactory",
GraphRepositoryFactory.class));
}
}
๏ integrate Spring Data Neo4j config with already running
Graph-Database in Neo4j-Server
๏ expose Spring Beans as Jersey Injectables
61
105. A scenario...
You have a traditional web app using JPA to persist data to a relational
database
106. Option C: Introducing cross-store
persistence
๏ JPA data and NOSQL data can share a data model
๏ Could be the entire entity, or some fields of an entity
๏ We call this cross-store persistence
• One transaction managerdatabase the NOSQL database
with the JPA relational
to coordinate
• AspectJ support to manage the NOSQL entities and fields
107. The JPA data model
Restaurant UserAccount
@Entity @Entity
public class Restaurant { @Table(name = "user_account")
@Id @GeneratedValue public class UserAccount {
private Long id; @Id @GeneratedValue
private String name; private Long id;
private String city; private String userName;
private String state; private String firstName;
private String zipCode; private String lastName;
@Temporal(TemporalType.TIMESTAMP)
private Date birthDate;
@ManyToMany(cascade = CascadeType.ALL)
private Set<Restaurant> favorites;
108. Adding to the data model
Restaurant UserAccount
@Entity @Entity
@NodeEntity(partial = true) @Table(name = "user_account")
public class Restaurant { @NodeEntity(partial = true)
@Id @GeneratedValue public class UserAccount {
private Long id; @Id @GeneratedValue
private String name; private Long id;
private String city; private String userName;
private String state; private String firstName;
private String zipCode; private String lastName;
@Temporal(TemporalType.TIMESTAMP)
private Date birthDate;
@ManyToMany(cascade = CascadeType.ALL)
Recommendation private Set<Restaurant> favorites;
@RelationshipEntity @GraphProperty
public class Recommendation { String nickname;
@StartNode @RelatedTo(type = "friends",
private UserAccount user; elementClass = UserAccount.class)
@EndNode Set<UserAccount> friends;
private Restaurant restaurant; @RelatedToVia(type = "recommends",
private int stars; elementClass = Recommendation.class)
private String comment; Iterable<Recommendation> recommendations;
109. Adding to the data model
Restaurant UserAccount
@Entity @Entity
@NodeEntity(partial = true) @Table(name = "user_account")
public class Restaurant { @NodeEntity(partial = true)
@Id @GeneratedValue public class UserAccount {
private Long id; @Id @GeneratedValue
private String name; private Long id;
private String city; private String userName;
private String state; private String firstName;
private String zipCode; private String lastName;
@Temporal(TemporalType.TIMESTAMP)
private Date birthDate;
@ManyToMany(cascade = CascadeType.ALL)
Recommendation private Set<Restaurant> favorites;
@RelationshipEntity @GraphProperty
public class Recommendation { String nickname;
@StartNode @RelatedTo(type = "friends",
private UserAccount user; elementClass = UserAccount.class)
@EndNode Set<UserAccount> friends;
private Restaurant restaurant; @RelatedToVia(type = "recommends",
private int stars; elementClass = Recommendation.class)
private String comment; Iterable<Recommendation> recommendations;
110. Adding to the data model
Restaurant UserAccount
@Entity @Entity
@NodeEntity(partial = true) @Table(name = "user_account")
public class Restaurant { @NodeEntity(partial = true)
@Id @GeneratedValue public class UserAccount {
private Long id; @Id @GeneratedValue
private String name; private Long id;
private String city; private String userName;
private String state; private String firstName;
private String zipCode; private String lastName;
@Temporal(TemporalType.TIMESTAMP)
private Date birthDate;
@ManyToMany(cascade = CascadeType.ALL)
Recommendation private Set<Restaurant> favorites;
@RelationshipEntity @GraphProperty
public class Recommendation { String nickname;
@StartNode @RelatedTo(type = "friends",
private UserAccount user; elementClass = UserAccount.class)
@EndNode Set<UserAccount> friends;
private Restaurant restaurant; @RelatedToVia(type = "recommends",
private int stars; elementClass = Recommendation.class)
private String comment; Iterable<Recommendation> recommendations;
111. Adding to the data model
Restaurant UserAccount
@Entity @Entity
@NodeEntity(partial = true) @Table(name = "user_account")
public class Restaurant { @NodeEntity(partial = true)
@Id @GeneratedValue public class UserAccount {
private Long id; @Id @GeneratedValue
private String name; private Long id;
private String city; private String userName;
private String state; private String firstName;
private String zipCode; private String lastName;
@Temporal(TemporalType.TIMESTAMP)
private Date birthDate;
@ManyToMany(cascade = CascadeType.ALL)
Recommendation private Set<Restaurant> favorites;
@RelationshipEntity @GraphProperty
public class Recommendation { String nickname;
@StartNode @RelatedTo(type = "friends",
private UserAccount user; elementClass = UserAccount.class)
@EndNode Set<UserAccount> friends;
private Restaurant restaurant; @RelatedToVia(type = "recommends",
private int stars; elementClass = Recommendation.class)
private String comment; Iterable<Recommendation> recommendations;
112. Adding to the data model
Restaurant UserAccount
@Entity @Entity
@NodeEntity(partial = true) @Table(name = "user_account")
public class Restaurant { @NodeEntity(partial = true)
@Id @GeneratedValue public class UserAccount {
private Long id; @Id @GeneratedValue
private String name; private Long id;
private String city; private String userName;
private String state; private String firstName;
private String zipCode; private String lastName;
@Temporal(TemporalType.TIMESTAMP)
private Date birthDate;
@ManyToMany(cascade = CascadeType.ALL)
Recommendation private Set<Restaurant> favorites;
@RelationshipEntity @GraphProperty
public class Recommendation { String nickname;
@StartNode @RelatedTo(type = "friends",
private UserAccount user; elementClass = UserAccount.class)
@EndNode Set<UserAccount> friends;
private Restaurant restaurant; @RelatedToVia(type = "recommends",
private int stars; elementClass = Recommendation.class)
private String comment; Iterable<Recommendation> recommendations;
113. Spring Data Neo4j Roo add-on
๏ Roo adding support for non-JPA
persistence providers
๏ Spring Data Neo4j was the first
NOSQL persistence Roo
Add-On
๏ See the chapter on Spring Data
Neo4j in the latest O’Reilly
Roo book, Getting Started with
Roo.
67
114. Spring Data Neo4j Roo add-on
roo> project --topLevelPackage org.neo4j.imdb
roo> graph setup --provider NEO4J --databaseLocation target/imdb
roo> graph entity --class ~.model.Movie
roo> field string title
roo> field number --fieldName year --type java.lang.Integer --permitReservedWords --primitive
roo> graph entity --class ~.model.Actor
roo> field string name
roo> graph relationship --to Movie --from Actor --fieldName movies --type ACTS_IN
--cardinality ONE_TO_MANY
roo> graph relationship --via ~.model.Role --to Movie --from Actor --fieldName roles
--type ACTS_IN --cardinality ONE_TO_MANY
roo> graph relationship --from Movie --to Actor --type ACTS_IN --fieldName actors
--direction INCOMING --cardinality MANY_TO_ONE
roo> field string --fieldName title --class ~.model.Role
roo> controller scaffold --class ~.web.ActorController --entity ~.model.Actor
roo> controller scaffold --class ~.web.MovieController --entity ~.model.Movie
68
115. Spring Data Neo4j Guidebook
“Good Relationships”
“I’m excited about Spring Data Neo4j.... Spring Data Neo4j makes working
with Neo4j amazingly easy, and therefore has the potential to make you
more successful as a developer.”
Rod Johnson, founder of Spring
๏ Spring Data Neo4j comes with a great Guide Book, featuring:
• Forewords by Rod Johnson and Emil Eifrem
• An easy to read, narrative tutorial walkthrough for cineasts.net
• A comprehensive reference for all the details
• Check it out here: http://spring.neo4j.org/guide
69
116. The end (and the beginning!)
๏ See the Spring Data Neo4j site for more info:
http://spring.neo4j.org
๏ Check out the developer notes at GitHub:
http://spring.neo4j.org/notes
๏ Again, don’t miss our fantastic e-book on Spring Data Neo4j:
http://spring.neo4j.org/guide
๏ Spring Data Forum at
http://spring.neo4j.org/discussions
๏ All about Neo4j:
http://neo4j.org
๏ Neo4j videos and webinars:
http://video.neo4j.org
social networks (our actions in them work life health)\nthe internet\nits hardware\nits software\nour interactions\nour body\nnature environment\npolitical economic networks\nzusammenhaenge\nhistory\nscience\nzeit gr&#xFC;nen abgeordneter handy\n
social networks (our actions in them work life health)\nthe internet\nits hardware\nits software\nour interactions\nour body\nnature environment\npolitical economic networks\nzusammenhaenge\nhistory\nscience\nzeit gr&#xFC;nen abgeordneter handy\n
messy world\nfast changing world\nbez um graph sind teil der daten\nim rdbms teil des starren schemas\nkomplexe zusammenhaenge\nkomplexe fragen\nimmer neue kategorien - rels\ndynamisch - traversals\ntags attribute\ntemporale attribute\ndyn sprachen besser geeignet \n
messy world\nfast changing world\nbez um graph sind teil der daten\nim rdbms teil des starren schemas\nkomplexe zusammenhaenge\nkomplexe fragen\nimmer neue kategorien - rels\ndynamisch - traversals\ntags attribute\ntemporale attribute\ndyn sprachen besser geeignet \n
messy world\nfast changing world\nbez um graph sind teil der daten\nim rdbms teil des starren schemas\nkomplexe zusammenhaenge\nkomplexe fragen\nimmer neue kategorien - rels\ndynamisch - traversals\ntags attribute\ntemporale attribute\ndyn sprachen besser geeignet \n
\n
\n
\n
\n
Neo4j is a graph database. \n\nNodes, rels, key-value props on nodes and rels.\n
Neo4j is a graph database. \n\nNodes, rels, key-value props on nodes and rels.\n
Neo4j is a graph database. \n\nNodes, rels, key-value props on nodes and rels.\n
Neo4j is a graph database. \n\nNodes, rels, key-value props on nodes and rels.\n
Neo4j is a graph database. \n\nNodes, rels, key-value props on nodes and rels.\n
Neo4j is a graph database. \n\nNodes, rels, key-value props on nodes and rels.\n
Neo4j is a graph database. \n\nNodes, rels, key-value props on nodes and rels.\n
Neo4j is a graph database. \n\nNodes, rels, key-value props on nodes and rels.\n
Neo4j is a graph database. \n\nNodes, rels, key-value props on nodes and rels.\n
Neo4j is a graph database. \n\nNodes, rels, key-value props on nodes and rels.\n
... so like I&#x2019;m a node, Thomas is a node, and there&#x2019;s a PRESENTED_WITH relationship between us.\n
... so like I&#x2019;m a node, Thomas is a node, and there&#x2019;s a PRESENTED_WITH relationship between us.\n
... so like I&#x2019;m a node, Thomas is a node, and there&#x2019;s a PRESENTED_WITH relationship between us.\n
... so like I&#x2019;m a node, Thomas is a node, and there&#x2019;s a PRESENTED_WITH relationship between us.\n
... so like I&#x2019;m a node, Thomas is a node, and there&#x2019;s a PRESENTED_WITH relationship between us.\n
... so like I&#x2019;m a node, Thomas is a node, and there&#x2019;s a PRESENTED_WITH relationship between us.\n
... so like I&#x2019;m a node, Thomas is a node, and there&#x2019;s a PRESENTED_WITH relationship between us.\n
schema-free evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
evolve data separately\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Traversing is great, but it needs to start from somewhere. How do we find that place?\n
Traversing is great, but it needs to start from somewhere. How do we find that place?\n
Traversing is great, but it needs to start from somewhere. How do we find that place?\n
Traversing is great, but it needs to start from somewhere. How do we find that place?\n
Traversing is great, but it needs to start from somewhere. How do we find that place?\n
Traversing is great, but it needs to start from somewhere. How do we find that place?\n
Traversing is great, but it needs to start from somewhere. How do we find that place?\n
Traversing is great, but it needs to start from somewhere. How do we find that place?\n
\n
\n
\n
No need for persistence contexts or entity managers.\n\n
No need for persistence contexts or entity managers.\n\n
\n
Jumping right into code\n
\n
\n
\n
\n
Anonymous relationships\n
Anonymous relationships\n
Anonymous relationships\n
Anonymous relationships\n
Anonymous relationships\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
This does not apply to Neo4j.\nIn Neo4j, transactions MUST be used.\n