Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Reference Node (again...)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
tcb  
View profile  
 More options Jan 24 2012, 6:49 pm
From: tcb <thecolourblu...@gmail.com>
Date: Tue, 24 Jan 2012 23:49:46 +0000
Local: Tues, Jan 24 2012 6:49 pm
Subject: Reference Node (again...)

Hi,

Just starting to use neo4j for working with large graphs (mostly social
networks) and it looks very promising. After getting some mysterious
results I discovered the reference node (ok, I should have read the docs
more carefully...). Browsing the discussion lists, it has come up before
[1] and I'm in agreement that it should be removed, although I couldn't see
any decision on what was to be done or any outstanding issue. I have my own
graph data which I load into neo4j, creating the nodes and relationships as
I go- I don't want or need the reference node and it's really an
inconvenience. I decided the best thing to do was just delete it when I
create the database:

graphdb = neo4j.GraphDatabase(path)

with graphdb.transaction:

    graphdb.getReferenceNode().delete()

but I'm not sure now if this might cause problems later on. I can work
around it, but it is sometimes handy to have a 0-referenced (by id) list of
nodes.

The notion of a fixed reference node is flawed in several ways. The
database is creating data you didn't ask it to- how do you start with a
clean database (first node with id=0?). If you delete the reference node,
and then try to access it later you get a NotFoundException- but adding and
removing nodes are fairly fundamental uses of such graph databases. It
seems the idea behind the reference node is to give you a starting point
for traversals- but why not just choose the first node

 referenceNode = graphdb.nodes[0]

or a random one:

referenceNode = graphdb.getRandomNode()

In general, one would not expect the reference node to be the root node of
your graph from which all other nodes are reachable- this assumes your
graph is fully connected. If you know this is the case (its not for any of
my datasets), then why not just set the reference yourself in your own
code- is it really that difficult to track a reference to one node?

myReferenceNode = node0

or if its really easier, then the graph db could store the reference for
you:

graphdb.setReferenceNode(myRootNode)

- at least this would allow you to set a specific node as the reference
node after you had created it, and change it if required.

Obviously, since some people have already come to depend on the presence of
the referenceNode, perhaps there could be some option to create it or not
when the database is created:

graphdb = neo4j.GraphDatabase(path, withReferenceNode=False)

and I think this would solve most of the problems, without too much
inconvenience.

[1] http://neo4j.org/nabble/#nabble-td2065121


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jim Webber  
View profile  
 More options Jan 27 2012, 5:08 am
From: Jim Webber <j...@neotechnology.com>
Date: Fri, 27 Jan 2012 10:08:33 +0000
Local: Fri, Jan 27 2012 5:08 am
Subject: Re: [Neo4j] Reference Node (again...)
Hello,

I concur with you - I almost always remove the reference node before writing to my database with actual data from my domain.

I don't see SQL databases giving us a "reference table" so I'd be in favour of nuking it and its corresponding API calls.

Jim


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Johnny Weng Luu  
View profile  
 More options Jan 27 2012, 8:03 am
From: Johnny Weng Luu <johnny.weng....@gmail.com>
Date: Fri, 27 Jan 2012 05:03:15 -0800 (PST)
Local: Fri, Jan 27 2012 8:03 am
Subject: Re: Reference Node (again...)

I totally agree with you. Let the user decide instead.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pablo Pareja  
View profile  
 More options Jan 27 2012, 8:08 am
From: Pablo Pareja <ppar...@era7.com>
Date: Fri, 27 Jan 2012 14:08:35 +0100
Local: Fri, Jan 27 2012 8:08 am
Subject: Re: [Neo4j] Re: Reference Node (again...)

+ 1 to get rid of the reference node

On Fri, Jan 27, 2012 at 2:03 PM, Johnny Weng Luu
<johnny.weng....@gmail.com>wrote:

> I totally agree with you. Let the user decide instead.

--
Pablo Pareja Tobes

My site     http://about.me/pablopareja
LinkedIn    http://www.linkedin.com/in/pabloparejatobes
Twitter       http://www.twitter.com/pablopareja

Creator of Bio4j --> http://www.bio4j.com

http://www.ohnosequences.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Neubauer  
View profile  
 More options Jan 27 2012, 4:45 pm
From: Peter Neubauer <peter.neuba...@neotechnology.com>
Date: Fri, 27 Jan 2012 22:45:09 +0100
Local: Fri, Jan 27 2012 4:45 pm
Subject: Re: [Neo4j] Re: Reference Node (again...)
Done,

https://github.com/neo4j/community/issues/203

Now there is a number of projects and code depending on the reference
node, but we could start with deprecating it if there is enough
opinion behind it. Will check with the others.

Thanks for picking this up!

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Neo4j 1.6 released                 - dzone.com/6S4K
The Neo4j Heroku Challenge   - http://neo4j-challenge.herokuapp.com/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Jackson  
View profile  
 More options May 3 2012, 3:05 pm
From: Paul Jackson <paul_jack...@g1.com>
Date: Thu, 3 May 2012 12:05:17 -0700 (PDT)
Local: Thurs, May 3 2012 3:05 pm
Subject: Re: [Neo4j] Re: Reference Node (again...)

I am not sure where this stands. I run into issues if I create an empty
graph, remove the reverence node, shut down, start up, and add new nodes.
The first new node added is given an id of 0. This was OK until I started
working in a High Availability environment, because I would know if I am
creating a new graph or opening an existing one. In HA, if I create a "new"
graph, I am in the dark as to whether I am the actual creator or if it
already exists in the system and updates will be injected into my graph
(including reference node removal) under the covers. If I then remove the
reference node, I can get exceptions if it was already removed by another
instance, or I can end up removing a non-reference node if id 0 was reused
as can happen.

I suggest two improvements:
1) Never reuse id 0, unless the method used to do so is explicitly called
"createReferenceNode" or the like.
2) Allow a user to create a graph with no reference node. I saw comments in
another thread (dated 2010) about making the creation lazy - was this done?
If so, in what release?

Many thanks,
-Paul


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mattias Persson  
View profile  
 More options May 5 2012, 5:00 am
From: Mattias Persson <matt...@neotechnology.com>
Date: Sat, 5 May 2012 11:00:37 +0200
Local: Sat, May 5 2012 5:00 am
Subject: Re: [Neo4j] Re: Reference Node (again...)

Hi Paul,

basically Neo4j doesn't handle deletion of the reference node very well and
nowadays it makes much sense to have it created on demand and that all dbs
are created without it. Also, would named reference nodes be of any use, in
that by default there are none but you can get or create reference nodes by
name when needed? It's a slightly redundant feature though (there are
indexes of course).

2012/5/3 Paul Jackson <paul_jack...@g1.com>

--
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Jackson  
View profile  
 More options May 6 2012, 10:01 pm
From: Paul Jackson <paul_jack...@g1.com>
Date: Sun, 6 May 2012 19:01:58 -0700 (PDT)
Local: Sun, May 6 2012 10:01 pm
Subject: Re: [Neo4j] Re: Reference Node (again...)

Hi Mattias,

Thanks for the reply. This is good to know.

I can't offer an opinion on the named reference node because I wouldn't use
them - index nodes throw off the SNA metrics.

-Paul


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »