[Neo] Determine if a graph is disconnected

orla.spillane at sunlife.com orla.spillane at sunlife.com
Wed Aug 5 12:38:45 CEST 2009


Hey Peter,
First a bit of background  - The app I'm building is a means of tracking
information in an enterprise as it flows through various different
applications and systems. The idea behind it is that an enterprise has
possibly thousands of different applications and systems (i.e. nodes) and
information flows through each of these and gets transformed and passed on
etc. The main aim of the app is to provide a means to track information to
its source or destination and examine the changes it goes through.

My nodes have a type property i.e. database/ Mainframe / WebApp / J2EE App
etc. The user can select a node type and then view a list of nodes of this
type. Once they select the start node a traversal is done and the graph is
displayed (users can also enter keywords to filter the
traversals/searches).

The case for using disconnected graphs would be where the user wants to
search for nodes of a specific type - i.e. view all databases within the
organisation, or maybe view all databases with a specific keyword. To
return my results for these scenarios I am iterating over all nodes in the
graph as opposed to a traversal.
Also if the user would want to see the complete graph, its possible this
could be disconnected.  I don't want to go down the route of creating
seperate graphs as its possible these seperate graphs would join at some
point in the future.

I don't envision these scenarios being the main use of the application but
would like to provide them all the same.

Thanks,
Orla




                                                                           
                                                                           
  Peter Neubauer                                                           
  <neubauer.peter at gmail.co                                              To 
  m>                               Neo user discussions                    
  Sent by:                         <user at lists.neo4j.org>                  
  user-bounces at lists.neo4j                                              cc 
  .org                                                                     
  05/08/2009 07:13                                                 Subject 
                                   Re: [Neo] Determine if a graph is       
      Please respond to            disconnected                            
    Neo user discussions                                                   
   <user at lists.neo4j.org>                                                  
                                                                           
                                                                           
                                                                           
                                                                           




Hi Orla,
do you have a really strong use case for explicitly dealing with
disconnected graphs? Would be interesting to see what is forcing you
into that pattern, since we have not encountered the need for this
before.
While it is technically possible to have disconnected nodes, this is
at the moment not a pattern that is recommended, as it introduces a
number of subtle problems. Why not adding a NOT_CONNECTED relationship
to some root node or so?

If there is a need here, it would be great if you could explain it in
more detail - there might be potential for new thinking here ...

/peter

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org                - New Energy for Data - The Graph
Database.
http://www.ops4j.org                - New Energy for OSS Communities -
Open Participation Software.
http://www.linkedprocess.org   - Distributed computing on LinkedData scale



On Tue, Aug 4, 2009 at 11:31 PM, <orla.spillane at sunlife.com> wrote:
>
>
> Hi,
> I am trying to figure out how best to determine if my graph is
disconnected
> or not. I am iterating through all the nodes and if they match a certain
> criteria, I add them to a Graph VO that gets passed to my UI. The UI will
> handle disconnected graphs slightly different to connected ones so I only
> need a flag to say its either disconnected or not, I do not need any
other
> info like how many sub graphs are there etc.
> Has anyone done something like this before? Im not quite sure how to go
> about this? Maybe set the total number of nodes, then do a traversal and
> determine if the num of nodes from the traversal is the same, if so its
> fully connected, or is there something in Neo that flags this?
> Thanks,
> Orla
>
>
>
---------------------------------------------------------------------------
> This e-mail message (including attachments, if any) is intended for the
use
> of the individual or entity to which it is addressed and may contain
> information that is privileged, proprietary , confidential and exempt
from
> disclosure.  If you are not the intended recipient, you are notified that
> any dissemination, distribution or copying of this communication is
> strictly prohibited.  If you have received this communication in error,
> please notify the sender and erase this e-mail message immediately.
>
---------------------------------------------------------------------------
>
> _______________________________________________
> Neo mailing list
> User at lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo mailing list
User at lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user



---------------------------------------------------------------------------
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure.  If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---------------------------------------------------------------------------



More information about the User mailing list