Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!

Nicki Watt

Author
+ Follow
since Aug 20, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
3
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nicki Watt

Hi Sangel,

Please see this post which answers the main question about whether Neo4j can support spatial data, but in short, via an extension, yes it can.
https://coderanch.com/t/642319/neo/databases/Neo-action-Neo-work-geo.

Neo4j stores properties as key value pairs where the key is a string, and the values can be either a primitive or an array of one primitive type. For example String, int and int[]. You can however use an object graph mapping (OGM) type framework, such as Spring Data Neo4j (SDN) to provide a mechanism for converting between custom Java types and the primitive types stored in the physical database and back out again. You would need to write Spring custom converter for this. There is a chapter on SDN in the book, additionally you can also get more info from the website here: http://docs.spring.io/spring-data/data-neo4j/docs/current/reference/html

Nicki

5 years ago
Hi Sangel

You'll typically need to be familiar with the Java programming language, especially if you want to make use of some of the core API type features. The book currently has all examples in Java, however Neo4j run in server mode can be accessed by any client capable of talking to it via its HTTP REST API. Other than that, a willingness to learn and think a bit differently should suffice!
The book does indeed provide opinions and examples of where Neo4j would probably prove a better fit compared to, for example, a traditional RDBMS.

Nicki
5 years ago
Chris

Neo4j can be run in High Availability (HA) mode which essentially involves a master-slave replication setup.
The last chapter of the book does cover setting up a sample 3 node HA cluster, however it should be noted that the HA feature is only available in the Enterprise edition.

Nicki
5 years ago
Jacek,

I suggest the tutorial by Jim Webber, part of a broader course teaching Neo4j which can be found here:
https://github.com/jimwebber/neo4j-tutorial

Nicki

PS: It may help if you know who "Dr Who is"
5 years ago
Pankaj,

I guess this depends on exactly what you mean by 'dynamic'. With regards to 'managing' inheritance of properties from one node to another, one strategy would be to deal with this as part of your query / traversal gathering the data as you traversed 'up' your hierarchy, where, if a property was not there, you obtain it from the parent otherwise use the one which exists.

If you are thinking of a 'hierarchy' in terms of a Java class hierarchy, for example you have a Person class which has Customer and User as subclasses, this does not generally translate into two distinct nodes within the graph. If you wanted to store the details for the instance 'Bob' as a 'Customer', you would typically only have one node with all the properties (related to both Person and Customer) in this single node. You may well have two Neo4j labels associated with this one 'Bob' node, (a 'Person' and 'Customer' label). This is one of the strategies employed by Spring Data Neo4j (SDN) in terms of representing a Java based hierarchy in Neo4j.
For more info on this you can see the SDN website here: http://docs.spring.io/spring-data/data-neo4j/docs/3.2.1.RELEASE/reference/html/, specifically the section on "Entity Type Representation".

Hope this helps
Nicki
5 years ago
Hi Jacek,

So without more details its a bit hard to answer this question but in general I would say is that you should always look to use "the right tool for the job" Neo4j is great at answering certain connected data type questions, but not necessarily great if you are trying to scan through the entire DB and perform aggregations across it etc. Neo4j can indeed model time based graphs, with the following blog giving one such example of how to do this: http://neo4j.com/blog/modeling-a-multilevel-index-in-neoj4. Having said that Cassandra also excels at time series data, and there is no reason to not use both if required, depending on what you are trying to achieve! In this polyglot persistence world we now live in, there is generally no one size fits all.

For me the end solution is important, and in my experience this often involves having to use more than one technology to achieve the desired end result.

Nicki
5 years ago
Hi Ludoviko,

The book tries to use a consistent example of building a movie based recommendation engine where possible in the various chapters to try and illustrate points, though there is no final application built at the end of it all. The book also comes with access to sample code in the form of JUnit style tests which aims to demonstrate what was learned in the chapter, also accessible from here http://www.manning.com/Neo4jinAction

Nicki
5 years ago
Rrohit, there are various ways to secure Neo4j, and this page on the official website details how http://neo4j.com/docs/stable/security-server.html
5 years ago
Jacek

The book does actually cover some (though not all) of the enterprise level features in Neo4j, including things like the hot/online backups and high availability (HA aka clustering). The core graph functionality provided by the community and enterprise editions are the same and it is pretty easy to swap / upgrade from community to enterprise if/when you choose to. You would consider the enterprise edition if for example you had a mission critical app where you wanted to ensure your DB could handle fail over, i.e. if one node goes down, another one could take over. With the community edition there is only ever one instance, whilst the enterprise edition allows you to run multiple. The enterprise edition also provides the ability to take backups whilst the DB is running (no downtime) whilst with the community edition this would typically require a shutdown, backup and then restart. Also the enterprise edition also comes with 24/7 production support which is sometimes important for companies. So basically if you are after these enterprise level features then the enterprise edition may be for you.
Having said that, there are a fair few people out there still happily running on community edition too.

Nicki
5 years ago
Jacek,

I am afraid that book does not contain Scala examples.

Nicki
5 years ago
Hi Ayub

Jacek is spot on with pointing you at those two threads which look to answer your question. The book goes through a few different modelling scenarios to try and give a feel for this which includes an ACL (access control) type scenario, modelling entities from a physically connected network such as stations on the underground, as well as a band modelling example where you may want to keep track of which musicians played which instruments on recordings by various rock bands. These are but a few, but essentially anything where you want to query highly connected data is generally a good fit.

We also point you at the general Neo4j website as well which describes some high level scenarios where Neo4j has done well, available here http://neo4j.com/use-cases.
Additionally the following website provides a collection of various people who have used Neo4j for all sorts of different problems, and are happy to share their examples with all: http://gist.neo4j.org/

Nicki
5 years ago
Hi Rrohit

Thanks for the welcome!

1) No you do not necessarily need an internet connection to work with Neo4j (Although you will need it to at least download it).
Neo4j can run in two modes, embedded or server. When running in embedded mode, you just need to instruct/configure your code to point at the location of the directory which houses the database, whilst in server mode you will need to be able to access and communicate with it via its HTTP REST API. Depending on where you have installed the Neo4j server, you may or may not need an internet connection. By default, the Neo4j Server is bundled with a Web server that binds to host localhost on port 7474, answering only requests from the local machine, so for local development this is easily accessible, just point a browser at http://localhost:7474/browser and you are away. Otherwise it will more than likely be within some kind of private networking setup. If you don't need an internet connection for your network then this should be fine too. The book has a chapter dedicated to running Neo4j in these two different modes which provides more info on this.

2) Cypher is not a standalone installable tool, Cypher is the graph query language used to interact with Neo4j (a little bit like SQL for the RDBMS except this is for graphs You can use Cypher from within a number of tools including via the Neo4j console or shell which comes for free when you download and install Neo4j server.
If just want to get a feel for Cypher without installing Neo4j, you can visit the online Neo4j console which provides a way to get some insight into Cypher and the Neo4j world here: http://console.neo4j.org

Nicki
5 years ago
Hi Jacek,

Neo4j is an open source product and the community edition is free
There is a paid for enterprise edition, which comes with additional enterprise level features (like HA and 24/7 support etc,) but it really depends on what you are ultimately going to use it for. Many people happily use the community edition for certain commercial purposes too. So I would argue its certainly worth a look at least, you can play for free and see if you like it! This page provides some more info on the different editions: http://neo4j.com/editions/. What features did you feel it was missing as I think Neo4j has quite a strong and comprehensive offering in this space?

Regarding your specific question about whether book looks to compare Neo4j against other graph databases. The short answer is no, it is a Neo4j specific "in action" book, and hence it tries to pack in as much as possible to try and help you get the most out of using Neo4j, which we happen to feel is the best graph database out there too, and why we wrote a book on it

Hope this helps, and hope you think about looking at Neo4j - I think you will find it fits most graph based use cases pretty well.
Nicki
5 years ago
Hi Daniele,

Welcome and hope you are finding Neo4j interesting thus far!

Neo4j is a graph database, however like many other databases, it does provide some tools to help you interact with it. Neo4j server comes with a built in web interface which allows you to run traversals, queries and quickly visualise and interact with your data though, which is what I think what you are referring to when you say that the site says that you can "navigate objects with a web-based front-end". Neo4j does not store its data as objects, but rather "nodes" and "relationships" and this is what is actually visualised in the console. If you are running a Neo4j server locally, you can get to this console by going to http://localhost:7474 in your browser.

The core product does not specifically provide any built in tools for rapid front end based applications for CRUD style apps - you would need to chose an appropriate development framework like grails or the like to get this. The Neo4j community have written and developed a vast variety of different frameworks and plugins to help developers interact with Neo4j, one being a Neo4j Grails GORM plugin which could help out with rapid CRUD like prototyping, it depends on what language and framework you are developing in. The book does have a chapter dedicated to the Spring Data Neo4j (SDN) framework, which is an object graph mapping framework aimed at helping Java devs leverage their simple POJO based object models with data backed in Neo4j.
More information about the grails plugin, SDN, as well as various other frameworks and plugins supporting Neo4j development can be found here: http://neo4j.com/contrib/

Hope this helps!
Nicki
5 years ago
Thanks, but then I am very confused as to what Sun mean in their FAQ when they state, and I quote ... ( see http://java.sun.com/sfaq )

13 What is the difference between applets loaded over the net and applets loaded via the file system?

There are two different ways that applets are loaded by a Java system. The way an applet enters the system affects what it is allowed to do.

If an applet is loaded over the net, then it is loaded by the applet class loader, and is subject to the restrictions enforced by the applet security manager.

If an applet resides on the client's local disk, and in a directory that is on the client's CLASSPATH, then it is loaded by the file system loader. The most important differences are

* applets loaded via the file system are allowed to read and write files
* applets loaded via the file system are allowed to load libraries on the client
* applets loaded via the file system are allowed to exec processes
* applets loaded via the file system are allowed to exit the virtual machine
* applets loaded via the file system are not passed through the byte code verifier

Java-enabled browsers use the applet class loader to load applets specified with file: URLs. So, the restrictions and protections that accrue from the class loader and its associated security manager are now in effect for applets loaded via file: URLs.

This means that if you specify the URL like so:

Location: file:/home/me/public_html/something.html

and the file something.html contains an applet, the browser loads it using its applet class loader.
14 years ago