[Neo4j] Looking for wisdom (rule of thumb) for labels/indexes versus relationships...

2017-09-25 Thread Alan Robertson
Hi,

When looking at which IP addresses are part of which subnets, for IPv4,
it's possible that up to 1024 (or maybe) more IP addresses could be part
of a subnet. For IPv6, there's no obvious limit to how many IP addresses
could be on a subnet (2^64 for example).

I could represent this as a relationship to a subnet object - with a
large number of relationships - typically no more than 200 or so at a
time, but there could be many more. Or I could create a label for each
subnet, or a value with an index associated with it.

Is there a rule of thumb for how the maximum number of relationships
should exist to a single node?

At what point does it make sense to take the relational approach and go
with an index of some kind (a label, or an indexed attribute)?

-- 
  Alan Robertson
  al...@unix.sh

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Re: allshortestPaths problem - new with 3.2.x versions...

2017-09-05 Thread Alan Robertson
Created GitHub Issue https://github.com/neo4j/neo4j/issues/9992

I forgot to say - yes, I did restart Neo4j (several times).

--
  Alan Robertson
  al...@unix.sh



On Tue, Sep 5, 2017, at 08:47 AM, Alan Robertson wrote:
> I'm getting an error message when running the query below:
> 
> MATCH p = allshortestPaths( (start:Class_Drone)-
> [:tcpclient|:tcpservice|:hosting|:baseip|:nicowner|:monitoring|:wired-
> to|:ipowner*]-(m) )> WHERE m.nodetype IN ['IPaddrNode', 'SystemNode',
> 'MonitorAction', 'ProcessNode', 'IPtcpportNode', 'Drone',
> 'NICNode']> UNWIND nodes(p) AS n
> UNWIND rels(p) AS r
> RETURN [x in COLLECT(DISTINCT n) WHERE x.nodetype in
> ['IPaddrNode', 'SystemNode', 'MonitorAction', 'ProcessNode',
> 'IPtcpportNode', 'Drone', 'NICNode']] AS nodes,> 
> COLLECT(DISTINCT r) AS relationships
> 
> I have this statement in my neo4j config file:
> 
> cypher.forbid_shortestpath_common_node=false
> 
> And I get this message:
> The shortest path algorithm does not work when the start and end nodes
> are the same. This can happen if you> perform a shortestPath search after a 
> cartesian product that might
> have the same start and end nodes for some> of the rows passed to 
> shortestPath. If you would rather not experience
> this exception, and can accept the> possibility of missing results for those 
> rows, disable this in the
> Neo4j configuration by setting> *`cypher.forbid_shortestpath_common_node` to 
> fals**e*. If you cannot
> accept missing results, and really want the> shortestPath between two common 
> nodes, then re-write the query using a
> standard Cypher variable length pattern> expression followed by ordering by 
> path length and limiting to
> one result.> 
> I did this, but still get that message...
> 
> FWIW, this query used to work in earlier (3.0.x) versions of Neo4j.
> The intent of the query is to return the selected portions of the
> graph  as a subgraph. This particular one returns basically the entire
> graph, but other variations are more selective. They all get the same
> message...> 
> 
> --
>   Alan Robertson
>   al...@unix.sh

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] allshortestPaths problem - new with 3.2.x versions...

2017-09-05 Thread Alan Robertson
I'm getting an error message when running the query below:

MATCH p = allshortestPaths( (start:Class_Drone)-
[:tcpclient|:tcpservice|:hosting|:baseip|:nicowner|:monitoring|:wiredto-
|:ipowner*]-(m) )WHERE m.nodetype IN ['IPaddrNode', 'SystemNode',
'MonitorAction', 'ProcessNode', 'IPtcpportNode', 'Drone',
'NICNode']UNWIND nodes(p) AS n
UNWIND rels(p) AS r
RETURN [x in COLLECT(DISTINCT n) WHERE x.nodetype in
['IPaddrNode', 'SystemNode', 'MonitorAction', 'ProcessNode',
'IPtcpportNode', 'Drone', 'NICNode']] AS nodes,COLLECT(DISTINCT 
r) AS relationships

I have this statement in my neo4j config file:

cypher.forbid_shortestpath_common_node=false

And I get this message:
The shortest path algorithm does not work when the start and end nodes
are the same. This can happen if youperform a shortestPath search after a 
cartesian product that might have
the same start and end nodes for someof the rows passed to shortestPath. If you 
would rather not experience
this exception, and can accept thepossibility of missing results for those 
rows, disable this in the Neo4j
configuration by setting*`cypher.forbid_shortestpath_common_node` to fals**e*. 
If you cannot
accept missing results, and really want theshortestPath between two common 
nodes, then re-write the query using a
standard Cypher variable length patternexpression followed by ordering by path 
length and limiting to
one result.
I did this, but still get that message...

FWIW, this query used to work in earlier (3.0.x) versions of Neo4j. The
intent of the query is to return the selected portions of the graph  as
a subgraph. This particular one returns basically the entire graph, but
other variations are more selective. They all get the same message...

--
  Alan Robertson
  al...@unix.sh

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Create legacy indexes gets permission denied? py2neo 2.0.8 and neo4j 3.2.1

2017-07-05 Thread Alan Robertson
I wrote this simple little test program...

> import py2neo
> from py2neo import neo4j
> py2neo.authenticate("localhost:7474", "neo4j", "SomeRandomPasswordString")> 
> graph = neo4j.Graph("https://localhost:7474";)
> graph.legacy.get_or_create_index(neo4j.Node, "FooBar")

It goes into an infinite recursion loop in get_or_create_index().

Is this a problem with using 3.2? With the version of py2neo? Or something else?
--
  Alan Robertson
  al...@unix.sh

On Wed, Jul 5, 2017, at 08:09 PM, Alan Robertson wrote:
> I'm trying to get back to the Assimilation project and update it to more> 
> modern versions of Neo4j and py2neo.
>
> Because of limitations of Neo4j and the history of the code it makes
> extensive use of legacy indexes, and doesn't use labels at all.
>
> So, I'm doing a legacy.get_or_create_index() and getting permission
> denied.
>
> Has that finally gone away? Or did I break something?
>
> --
>   Alan Robertson
>   al...@unix.sh
>
> --
> You received this message because you are subscribed to the Google Groups> 
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an> 
> email to neo4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Create legacy indexes gets permission denied? py2neo 2.0.8 and neo4j 3.2.1

2017-07-05 Thread Alan Robertson
I'm trying to get back to the Assimilation project and update it to more
modern versions of Neo4j and py2neo.

Because of limitations of Neo4j and the history of the code it makes
extensive use of legacy indexes, and doesn't use labels at all.

So, I'm doing a legacy.get_or_create_index() and getting permission
denied.

Has that finally gone away? Or did I break something?

-- 
  Alan Robertson
  al...@unix.sh

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] How to validate an update cypher query against a schema?

2017-05-31 Thread Alan Robertson
In general, this is very hard indeed. You have to not only know the
labels of existing nodes, but the meaning of the Cypher query. Although
Cypher isn't likely Turing-complete, it is nearly certain that there are
legal queries that you can't  easily (or at all) *prove *are legal. This
is equivalent to the question of "What does this program do?" - which is
known to be impossible to answer for Turing-complete languages.
Michael's suggestion of a query generator which only generates updates
which conform to the schema is likely your best bet.
--
  Alan Robertson
  al...@unix.sh



On Tue, May 30, 2017, at 06:48 PM, Clark Richey wrote:
> This is quite challenging to implement. That being said we have
> implemented this in our application (http://factgem.com) and would be
> happy to discuss with you directly.> 
> Sent from my iPhone
> 
> On May 30, 2017, at 12:20, Yash Sharma  wrote:>> 


>> I have a neo4j database and I want it to conform to a predefined
>> schema (model).>> 
>> 


>> This schema has some constraints like a node with label x should  be
>> related to a node with label y with relation type r only. No other
>> relationship type between x and y is allowed. For example, only nodes
>> labeled :Person can be at the two ends of a :friend_of relationship,
>> but a node with label :Object cannot be at any end of the :friend_of
>> relationship. Another constraint can be what type of properties are
>> allowed on a node having a particular label or a relationship of a
>> particular type. For example a node with label :Person can only have
>> properties name and age. No other property is allowed.>> 


>> So I want to create a method which takes input an update cypher query
>> and checks if it updates the database as per the existing schema or
>> not. Assume that the schema exists in JSON or XML format. Can someone
>> guide me how can I go about solving the problem? Should I perhaps
>> parse the query using CypherParser and then do something?>> 


>> --
>>  You received this message because you are subscribed to the Google
>>  Groups "Neo4j" group.>>  To unsubscribe from this group and stop receiving 
>> emails from it,
>>  send an email to neo4j+unsubscr...@googlegroups.com.>>  For more options, 
>> visit https://groups.google.com/d/optout.
> 


> --
>  You received this message because you are subscribed to the Google
>  Groups "Neo4j" group.>  To unsubscribe from this group and stop receiving 
> emails from it,
>  send an email to neo4j+unsubscr...@googlegroups.com.>  For more options, 
> visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Rest API doesn't support empty arrays

2016-10-20 Thread Alan Robertson
On 10/19/2016 03:38 PM, 'Nigel Small' via Neo4j wrote:
> Hi
>
> As Alan mentions, this is a side-effect of both Neo4j's type system
> and the JSON format used by the HTTP server. The type system at store
> level has no concept of an untyped array and JSON has no way to
> transmit type information independent of value, so it's impossible for
> the server to determine what type the received array should be stored
> as. Clark's suggestion of using a null would be typically used here;
> your application can then choose to interpret a null/missing property
> as an empty list.

To elaborate a little further on what Nigel said...
JSON doesn't restrict arrays to requiring all elements to be of the same
type, but Neo4j's relatively strongly-typed type system (based on Java)
/does/ make this requirement.

For example, this is a perfectly legitimate JSON array value:
[true, 1.0, 3, null, "fred", {"a": "b"}]

This is also legal in Python - but Neo4j doesn't support values like
this at all.

To be fair, the last value (a hash table) isn't allowed anywhere in
Neo4j. But even if you leave it out, the rest of the array elements
can't be mixed either.

JSON supports /lots/ of //values which can't be stored by Neo4j - but
your example seems common to me.

And to be fair to the original questioner: It is semantically different
to say that a value doesn't exist than it to say that it does exist and
is an empty array. Often you don't care about the difference, but
sometimes you do.

Myself, I would love for Neo4j to support full JSON value power and
flexibility - but it doesn't. That's life.

For my two cents worth - allowing hash tables (JSON objects) as values
is far more interesting to me than empty arrays. I can fake up something
for empty arrays (like the solution Nigel suggested), but not for JSON
objects.

-- Alan




> Nigel
>
> On 19 October 2016 at 21:02, Clark Richey  <mailto:clark.ric...@gmail.com>> wrote:
>
> Maybe I'm missing something but why do you want to store an empty
> array as a property? An empty array is logically equivalent to
> null. Null is logically equivalent to not storing a value for hat
> property. Not storing a value for a property is more efficient
>     than writing value = null to disk. 
>
> So, shouldn't you just not store a cars property in your example?
>
> Sent from my iPhone
>
> On Oct 19, 2016, at 14:49, Alan Robertson  <mailto:al...@unix.sh>> wrote:
>
>> In their data typing system, they need to know the type of the
>> array elements.
>>
>> For example: Is it an array of strings, or ints, or floats?
>>
>> There is no "array of to-be-determined"...
>>
>> So, they don't consider it a bug...
>>
>> In my case either I don't set that attribute to a value when I
>> create the object, or I set it to a single empty string as the
>> value - like [""] and my code understands what this means.
>>
>> It definitely makes you have to work harder...
>>
>> -- Alan
>>
>>
>> On 10/10/2016 01:02 AM, Red wrote:
>>> |
>>> CREATE (root {name: "foobar", cars: []}) RETURN root|
>>>
>>> Queries, like above are impossible through rest
>>>
>>> https://github.com/philippkueng/node-neo4j/issues/12
>>> <https://github.com/philippkueng/node-neo4j/issues/12>
>>> https://github.com/versae/neo4j-rest-client/issues/130
>>> <https://github.com/versae/neo4j-rest-client/issues/130>
>>>
>>> Isn't it a bug?
>>> -- 
>>> You received this message because you are subscribed to the
>>> Google Groups "Neo4j" group.
>>> To unsubscribe from this group and stop receiving emails from
>>> it, send an email to neo4j+unsubscr...@googlegroups.com
>>> <mailto:neo4j+unsubscr...@googlegroups.com>.
>>> For more options, visit https://groups.google.com/d/optout
>>> <https://groups.google.com/d/optout>.
>>
>>
>> -- 
>> You received this message because you are subscribed to the
>> Google Groups "Neo4j" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to neo4j+unsubscr...@googlegroups.com
>> <mailto:neo4j+unsubscr...@googlegroups.com>.
>> For more options, visit https://groups.google.com/d/optout
>> <https://groups.google.com/d/optout>.
> -- 
> You received

Re: [Neo4j] Rest API doesn't support empty arrays

2016-10-19 Thread Alan Robertson
In their data typing system, they need to know the type of the array
elements.

For example: Is it an array of strings, or ints, or floats?

There is no "array of to-be-determined"...

So, they don't consider it a bug...

In my case either I don't set that attribute to a value when I create
the object, or I set it to a single empty string as the value - like
[""] and my code understands what this means.

It definitely makes you have to work harder...

-- Alan


On 10/10/2016 01:02 AM, Red wrote:
> |
> CREATE (root {name: "foobar", cars: []}) RETURN root|
>
> Queries, like above are impossible through rest
>
> https://github.com/philippkueng/node-neo4j/issues/12
> https://github.com/versae/neo4j-rest-client/issues/130
>
> Isn't it a bug?
> -- 
> You received this message because you are subscribed to the Google
> Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to neo4j+unsubscr...@googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Neo4j fails to start with certain kinds of corruption?? WAS: Re: [Neo4j] Neo4j failed to start under Docker: "Already closed exception"

2016-09-22 Thread Alan Robertson
But I know how to work around it for my particular case...

Remove all the files under /var/lib/neo4j/data/databases/graph.db (!)

That seems a little extreme... But I didn't need that data for my
particular circumstance - so it works for me.

Presumably someone else will run into circumstances where they /will/
need their data...

-- Alan

On 09/22/2016 03:47 PM, Alan Robertson wrote:
> Wrong. I didn't test what I thought I did - it's still broken - Sigh...
>
> For some reason I didn't have the initial failure messages in the logs
> below - but here are some additional messages.
>
> [o.n.k.i.s.f.RecordFormatSelector] Selected
> RecordFormat:StandardV3_0[v0.A.7] record format from store
> /var/lib/neo4j/data/databases/graph.db
> [o.n.k.i.s.f.RecordFormatSelector] Format not configured. Selected
> format from the store: RecordFormat:StandardV3_0[v0.A.7]
> *[o.n.k.NeoStoreDataSource] Recovery required from position
> LogPosition{logVersion=0, byteOffset=362783}*
> *ERROR [o.n.k.i.DatabaseHealth] Database panic: Database has
> encountered some problem, please perform necessary action (tx
> recovery/restart) this IndexReader is closed*
>
>
> On 09/22/2016 03:39 PM, Alan Robertson wrote:
>> It looks like this is some kind of bug related to Docker and
>> apparmor. Disabling apparmor makes it go away...
>>
>>
>> On 09/01/2016 11:11 AM, Alan Robertson wrote:
>>> Hi,
>>>
>>> I've been having trouble with getting Neo4j to start in a docker
>>> image. This image was produced by a Dockerfile which built my
>>> software and installed and ran Neo4j and my tests without any
>>> issues. But when I try and start the resulting image, Neo4j declines
>>> to start for mysterious reasons. The logs from trying to start it
>>> are below:
>>>
>>> NEO4J_CONF=/etc/neo4j /usr/share/neo4j/bin/neo4j console
>>> Starting Neo4j.
>>> 2016-09-01 16:53:40.342+ INFO  Starting...
>>> 2016-09-01 16:53:40.613+ INFO  Bolt enabled on localhost:7687.
>>> 2016-09-01 16:53:43.864+ ERROR Failed to start Neo4j: Starting
>>> Neo4j failed: Component
>>> 'org.neo4j.server.database.LifecycleManagingDatabase@1377f3c' was
>>> successfully initialized, but failed to start. Please see attached
>>> cause exception. Starting Neo4j failed: Component
>>> 'org.neo4j.server.database.LifecycleManagingDatabase@1377f3c' was
>>> successfully initialized, but failed to start. Please see attached
>>> cause exception.
>>> org.neo4j.server.ServerStartupException: Starting Neo4j failed:
>>> Component
>>> 'org.neo4j.server.database.LifecycleManagingDatabase@1377f3c' was
>>> successfully initialized, but failed to start. Please see attached
>>> cause exception.
>>> at
>>> org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:68)
>>> at
>>> org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:217)
>>> at
>>> org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:90)
>>> at
>>> org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:67)
>>> at
>>> org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:28)
>>> Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component
>>> 'org.neo4j.server.database.LifecycleManagingDatabase@1377f3c' was
>>> successfully initialized, but failed to start. Please see attached
>>> cause exception.
>>> at
>>> org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
>>> at
>>> org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
>>> at
>>> org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:189)
>>> ... 3
>>> more
>>> 
>>> 
>>>
>>> Caused by: java.lang.RuntimeException: Error starting
>>> org.neo4j.kernel.impl.factory.CommunityFacadeFactory,
>>> /var/lib/neo4j/data/databases/graph.db  
>>>   
>>>
>>> at
>>> org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:144)
>>>  

Re: [Neo4j] Neo4j failed to start under Docker: "Already closed exception"

2016-09-22 Thread Alan Robertson
Wrong. I didn't test what I thought I did - it's still broken - Sigh...

For some reason I didn't have the initial failure messages in the logs
below - but here are some additional messages.

[o.n.k.i.s.f.RecordFormatSelector] Selected
RecordFormat:StandardV3_0[v0.A.7] record format from store
/var/lib/neo4j/data/databases/graph.db
[o.n.k.i.s.f.RecordFormatSelector] Format not configured. Selected
format from the store: RecordFormat:StandardV3_0[v0.A.7]
[o.n.k.NeoStoreDataSource] Recovery required from position
LogPosition{logVersion=0, byteOffset=362783}
ERROR [o.n.k.i.DatabaseHealth] Database panic: Database has encountered
some problem, please perform necessary action (tx recovery/restart) this
IndexReader is closed


On 09/22/2016 03:39 PM, Alan Robertson wrote:
> It looks like this is some kind of bug related to Docker and apparmor.
> Disabling apparmor makes it go away...
>
>
> On 09/01/2016 11:11 AM, Alan Robertson wrote:
>> Hi,
>>
>> I've been having trouble with getting Neo4j to start in a docker
>> image. This image was produced by a Dockerfile which built my
>> software and installed and ran Neo4j and my tests without any issues.
>> But when I try and start the resulting image, Neo4j declines to start
>> for mysterious reasons. The logs from trying to start it are below:
>>
>> NEO4J_CONF=/etc/neo4j /usr/share/neo4j/bin/neo4j console
>> Starting Neo4j.
>> 2016-09-01 16:53:40.342+ INFO  Starting...
>> 2016-09-01 16:53:40.613+ INFO  Bolt enabled on localhost:7687.
>> 2016-09-01 16:53:43.864+ ERROR Failed to start Neo4j: Starting
>> Neo4j failed: Component
>> 'org.neo4j.server.database.LifecycleManagingDatabase@1377f3c' was
>> successfully initialized, but failed to start. Please see attached
>> cause exception. Starting Neo4j failed: Component
>> 'org.neo4j.server.database.LifecycleManagingDatabase@1377f3c' was
>> successfully initialized, but failed to start. Please see attached
>> cause exception.
>> org.neo4j.server.ServerStartupException: Starting Neo4j failed:
>> Component
>> 'org.neo4j.server.database.LifecycleManagingDatabase@1377f3c' was
>> successfully initialized, but failed to start. Please see attached
>> cause exception.
>> at
>> org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:68)
>> at
>> org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:217)
>> at
>> org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:90)
>> at
>> org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:67)
>> at
>> org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:28)
>> Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component
>> 'org.neo4j.server.database.LifecycleManagingDatabase@1377f3c' was
>> successfully initialized, but failed to start. Please see attached
>> cause exception.
>> at
>> org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
>> at
>> org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
>> at
>> org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:189)
>> ... 3
>> more 
>>  
>>   
>>
>> Caused by: java.lang.RuntimeException: Error starting
>> org.neo4j.kernel.impl.factory.CommunityFacadeFactory,
>> /var/lib/neo4j/data/databases/graph.db   
>>  
>>
>> at
>> org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:144)
>>  
>>
>>
>> at
>> org.neo4j.kernel.impl.factory.CommunityFacadeFactory.newFacade(CommunityFacadeFactory.java:40)
>>  
>> 
>>
>> at
>> org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:108)
>>  
>>
>>
>> at
>> org.neo4j.server.CommunityNeoServer.lambda$static$0(CommunityNeoServer.java:55)
>>

Re: [Neo4j] Neo4j failed to start under Docker: "Already closed exception"

2016-09-22 Thread Alan Robertson
It looks like this is some kind of bug related to Docker and apparmor.
Disabling apparmor makes it go away...


On 09/01/2016 11:11 AM, Alan Robertson wrote:
> Hi,
>
> I've been having trouble with getting Neo4j to start in a docker
> image. This image was produced by a Dockerfile which built my software
> and installed and ran Neo4j and my tests without any issues. But when
> I try and start the resulting image, Neo4j declines to start for
> mysterious reasons. The logs from trying to start it are below:
>
> NEO4J_CONF=/etc/neo4j /usr/share/neo4j/bin/neo4j console
> Starting Neo4j.
> 2016-09-01 16:53:40.342+ INFO  Starting...
> 2016-09-01 16:53:40.613+ INFO  Bolt enabled on localhost:7687.
> 2016-09-01 16:53:43.864+ ERROR Failed to start Neo4j: Starting
> Neo4j failed: Component
> 'org.neo4j.server.database.LifecycleManagingDatabase@1377f3c' was
> successfully initialized, but failed to start. Please see attached
> cause exception. Starting Neo4j failed: Component
> 'org.neo4j.server.database.LifecycleManagingDatabase@1377f3c' was
> successfully initialized, but failed to start. Please see attached
> cause exception.
> org.neo4j.server.ServerStartupException: Starting Neo4j failed:
> Component
> 'org.neo4j.server.database.LifecycleManagingDatabase@1377f3c' was
> successfully initialized, but failed to start. Please see attached
> cause exception.
> at
> org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:68)
> at
> org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:217)
> at
> org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:90)
> at
> org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:67)
> at
> org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:28)
> Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component
> 'org.neo4j.server.database.LifecycleManagingDatabase@1377f3c' was
> successfully initialized, but failed to start. Please see attached
> cause exception.
> at
> org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
> at
> org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
> at
> org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:189)
> ... 3
> more  
>   
> 
>
> Caused by: java.lang.RuntimeException: Error starting
> org.neo4j.kernel.impl.factory.CommunityFacadeFactory,
> /var/lib/neo4j/data/databases/graph.db
> 
>
> at
> org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:144)
>   
>   
>
> at
> org.neo4j.kernel.impl.factory.CommunityFacadeFactory.newFacade(CommunityFacadeFactory.java:40)
>   
>
>
> at
> org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:108)
>   
>   
>
> at
> org.neo4j.server.CommunityNeoServer.lambda$static$0(CommunityNeoServer.java:55)
>   
>   
>
> at
> org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:89)
>   
>  
>
> at
> org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
> ... 5 more
> Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component
> 'org.neo4j.kernel.recovery.Recovery@5ddaeea7' failed to initialize.
> Please see attached cause exception.
> at
> org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:416)
> at
> org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:62)
> at
> org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:98)
> at
> org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:511)
> at
> org.neo

[Neo4j] Neo4j failed to start under Docker: "Already closed exception"

2016-09-01 Thread Alan Robertson
yClosedException: this
IndexReader is closed
at
org.apache.lucene.index.IndexReader.ensureOpen(IndexReader.java:274)
at
org.apache.lucene.index.CompositeReader.getContext(CompositeReader.java:101)
at
org.apache.lucene.index.CompositeReader.getContext(CompositeReader.java:55)
at org.apache.lucene.index.IndexReader.leaves(IndexReader.java:438)
at
org.apache.lucene.index.MultiFields.getFields(MultiFields.java:63)
at
org.apache.lucene.index.MultiFields.getTerms(MultiFields.java:120)
at
org.apache.lucene.search.IndexSearcher.collectionStatistics(IndexSearcher.java:964)
at
org.apache.lucene.search.TermQuery$TermWeight.(TermQuery.java:65)
at
org.apache.lucene.search.TermQuery.createWeight(TermQuery.java:198)
at
org.apache.lucene.search.IndexSearcher.createWeight(IndexSearcher.java:904)
at
org.apache.lucene.search.IndexSearcher.createNormalizedWeight(IndexSearcher.java:887)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:535)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:744)
at
org.apache.lucene.search.IndexSearcher.searchAfter(IndexSearcher.java:460)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:489)
at
org.neo4j.index.impl.lucene.legacy.LuceneDataSource.findDocument(LuceneDataSource.java:436)
at
org.neo4j.index.impl.lucene.legacy.CommitContext.getDocument(CommitContext.java:71)
at
org.neo4j.index.impl.lucene.legacy.LuceneCommandApplier.visitIndexAddCommand(LuceneCommandApplier.java:88)
at
org.neo4j.index.impl.lucene.legacy.LuceneCommandApplier.visitIndexAddNodeCommand(LuceneCommandApplier.java:62)
at
org.neo4j.kernel.impl.api.LegacyIndexTransactionApplier.visitIndexAddNodeCommand(LegacyIndexTransactionApplier.java:166)
at
org.neo4j.kernel.impl.index.IndexCommand$AddNodeCommand.handle(IndexCommand.java:233)
at
org.neo4j.kernel.impl.api.TransactionApplierFacade.visit(TransactionApplierFacade.java:61)
at
org.neo4j.kernel.impl.api.TransactionApplierFacade.visit(TransactionApplierFacade.java:35)
at
org.neo4j.kernel.impl.transaction.log.PhysicalTransactionRepresentation.accept(PhysicalTransactionRepresentation.java:69)
at
org.neo4j.kernel.impl.api.TransactionToApply.accept(TransactionToApply.java:108)
at
org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageEngine.apply(RecordStorageEngine.java:341)
at
org.neo4j.kernel.impl.transaction.state.RecoveryVisitor.applyQueue(RecoveryVisitor.java:87)
at
org.neo4j.kernel.impl.api.TransactionQueue.empty(TransactionQueue.java:67)
at
org.neo4j.kernel.impl.transaction.state.RecoveryVisitor.close(RecoveryVisitor.java:93)
at
org.neo4j.kernel.impl.transaction.log.LogFileRecoverer.visit(LogFileRecoverer.java:80)
at
org.neo4j.kernel.impl.transaction.log.LogFileRecoverer.visit(LogFileRecoverer.java:30)
at org.neo4j.kernel.recovery.Recovery.init(Recovery.java:86)
at
org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:406)



-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] I want a query which returns a subgraph...

2016-08-21 Thread Alan Robertson
Thanks Michael!

I looked for a function like that, but I sure missed it!

Thanks again!

On August 20, 2016 4:33:11 AM MDT, Michael Hunger 
 wrote:
>Hey,
>
>
>sorry for the delay. You could use the allShortestPaths option too.
>
>And shortest paths actually take predicates into account that follow it
>in
>the where clause.
>
>I don't know how you got this query to run, because UNWIND is not a
>function but a clause:
>
>match path = shortestPath( (n)-[*]->(m) )
>return collect(distinct unwind(nodes(path))), collect(distinct
>unwind(rels(path)))
>
>
>For your other query, the initial lookup of those nodes will be slow
>(it has to scan the full graph) b/c you don't have a label (using an
>index) on them.
>
>You probably also want to add a direction (if it makes sense)
>
>
>Sorry I wrote the original statement just out of the top of my head,
>here
>is the fixed version
>
>// bind n, m, limit rel-type(s)
>match path = shortestPath( (n)-[*]->(m) )
>// optionally WHERE with predicates for the shortest paths
>unwind nodes(path) as node
>with collect(distinct node) as nodes, collect(path) as paths
>unwind paths as path
>unwind rels(path) as r
>with collect(distinct r) as relationships, nodes
>return count(*)
>
>// enable use of indexes, even if "Node" is just a generic label (I
>still
>think that using label-sets instad of nodetype is better
>MATCH (start:Node) WHERE start.nodetype = 'Drone' AND
>start.designation = {name}
>MATCH (m:Node) WHERE m.nodetype IN {nodetypes}
>MATCH p = shortestPath( (start)-[:`*%s`**]-(m) )
>// this spans up a cross product between ALL nodes and ALL rels of the
>paths which can potentially become huge
>// you can check it with returning count(*), count(distinct n),
>count(distinct r) after the two unwinds
>UNWIND nodes(p) AS n
>    UNWIND rels(p) AS r
>  RETURN [x in COLLECT(DISTINCT n) WHERE x.nodetype in {nodetypes}]
>AS nodes,
>COLLECT(DISTINCT r) AS relationships
>
>On Mon, Aug 8, 2016 at 12:40 PM, Alan Robertson  wrote:
>
>> I had written up my problem here too:
>>  http://assimilationsystems.com/2016/07/03/assimilation-
>> subgraph-queries/
>>
>> Here's a thought which occurred to me while sleeping last night...
>> The two ways I've done it are:
>>
>>1. shortest paths from initial node set
>>2. all paths
>>
>> As noted in the original email thread below, the problems I ran into
>are:
>>
>>1. Shortest paths produces all nodes, but misses some
>relationships I
>>care about.
>>2. All paths produces all nodes and relationships but takes a
>really
>>long time and often times out.
>>
>> A way which occurred to me while sleeping tonight was to create a
>2-step
>> query like this:
>>
>> Compute the set of shortest paths to get the set of nodes (as in (1)
>> above). Ignore the relationships produced.
>> From that set of nodes (n) compute (n)-[:a|b|c|d]-(n) and return 'n',
>> relationships.
>>
>> If Cypher won't let me compute from 'n' to 'n', then compute the from
>> n-[:a|b|c|d]-m WHERE m.nodetype is in the same set of node types as
>was in
>> the original constraint. Then return n, relationships. [Although it's
>> obvious, I'll mention that the difference is that the second query
>only
>> follows a single level of relationship].
>>
>> It still might need a little experimentation...
>>
>> Any thoughts?
>>
>> I'm going back to bed now. Will look into it some more in the
>morning...
>> ;-)
>>
>>
>>
>> On 07/21/2016 02:09 PM, Alan Robertson wrote:
>>
>> On 04/28/2016 03:32 PM, Alan Robertson wrote:
>>
>> The query isn't quite right. It has an error in it (variable n
>already
>> used) and something about the order of operations causes it to return
>more
>> than one row - with duplicates ;-)
>>
>> But this one seems to do the trick:
>>
>> match path = shortestPath( (n)-[*]->(m) )
>> return collect(distinct unwind(nodes(path))), collect(distinct
>unwind(rels(path)))
>>
>> That query is quite fast -- but...
>>
>> I don't actually want *only* the shortest paths, I want all the paths
>> that involve those relationships.
>>
>> But if I delete the shortestPath() function call it runs so long I
>get an
>> HTTP timeout on many of these queries. I restrict the types of
>> relationships with [:rel1type|:rel2type|:etctype*]. And even though
>the
>> res

Re: [Neo4j] Cypher results without repeated sub-paths

2016-08-08 Thread Alan Robertson
Hi Jaroslav,

Although I need more sleep at the moment - your problem seems to have
similar issues to my question about a "query which returns a subgraph"
problem which I've been looking at...

The problem I have with the * operator is that it can is *very* slow.
You also complain that it does redundant paths (which probably
/explains/ why it's so slow).

The problem I have with the shortestPath() function is that it doesn't
include all paths.

I would imagine that if you really have all the flights in the world in
your database, that the arbitrary length paths would wind up including
every airport in the world. This may not be what you want ;-).

You and I both want all paths, but all paths has problems... It visits
the same node multiple times. But shortestPath doesn't include all
relationships.

This part of the problem seems to be the same. We want all paths, but
with each node occurring no more than once or twice...

I can certainly see the need for a *-type operator (or function) that
does something more like this.

My guess is that if you allow cycles, that you'll wind up with cycles in
the middle of the path as well as the one you say you want (cycles back
to the original airport).



On 08/08/2016 02:19 AM, Jaroslav Ramba wrote:
> Hi,
>
> I have graph of flights. I want find all flights between two airports
> without cycles. How can I clean/disable result of cycles = repeated
> sub-paths A-->B-->A-->B.
>
> OK  *A-->B-->A*
> NOT OK *A-->B-->A-->B*
>
> MATCH path=(source:Airport)-[flights:FLIGHT*]->(destination:Airport)
>
> Thank you for help
> -- 
> You received this message because you are subscribed to the Google
> Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to neo4j+unsubscr...@googlegroups.com
> <mailto:neo4j+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] I want a query which returns a subgraph...

2016-08-08 Thread Alan Robertson
I had written up my problem here too:

http://assimilationsystems.com/2016/07/03/assimilation-subgraph-queries/

Here's a thought which occurred to me while sleeping last night...
The two ways I've done it are:

 1. shortest paths from initial node set
 2. all paths

As noted in the original email thread below, the problems I ran into are:

 1. Shortest paths produces all nodes, but misses some relationships I
care about.
 2. All paths produces all nodes and relationships but takes a really
long time and often times out.

A way which occurred to me while sleeping tonight was to create a 2-step
query like this:

Compute the set of shortest paths to get the set of nodes (as in (1)
above). Ignore the relationships produced.
>From that set of nodes (n) compute (n)-[:a|b|c|d]-(n) and return 'n',
relationships.

If Cypher won't let me compute from 'n' to 'n', then compute the from
n-[:a|b|c|d]-m WHERE m.nodetype is in the same set of node types as was
in the original constraint. Then return n, relationships. [Although it's
obvious, I'll mention that the difference is that the second query only
follows a single level of relationship].

It still might need a little experimentation...

Any thoughts?

I'm going back to bed now. Will look into it some more in the morning... ;-)



On 07/21/2016 02:09 PM, Alan Robertson wrote:
> On 04/28/2016 03:32 PM, Alan Robertson wrote:
>> The query isn't quite right. It has an error in it (variable n
>> already used) and something about the order of operations causes it
>> to return more than one row - with duplicates ;-)
>>
>> But this one seems to do the trick:
>> |match path = shortestPath( (n)-[*]->(m) ) return collect(distinct
>> unwind(nodes(path))), collect(distinct unwind(rels(path)))|
> That query is quite fast -- but...
>
> I don't actually want /only/ the shortest paths, I want all the paths
> that involve those relationships.
>
> But if I delete the shortestPath() function call it runs so long I get
> an HTTP timeout on many of these queries. I restrict the types of
> relationships with [:rel1type|:rel2type|:etctype*]. And even though
> the result only includes one or two additional paths, it runs like 100
> times slower - and often just times out via REST (via Py2neo).
>
> That's really disappointing.
>
> Does anyone have a suggestion on how to make this faster - or at least
> not time out?
>


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] I want a query which returns a subgraph...

2016-07-21 Thread Alan Robertson
On 04/28/2016 03:32 PM, Alan Robertson wrote:
> The query isn't quite right. It has an error in it (variable n already
> used) and something about the order of operations causes it to return
> more than one row - with duplicates ;-)
>
> But this one seems to do the trick:
> |match path = shortestPath( (n)-[*]->(m) ) return collect(distinct
> unwind(nodes(path))), collect(distinct unwind(rels(path)))|
That query is quite fast -- but...

I don't actually want /only/ the shortest paths, I want all the paths
that involve those relationships.

But if I delete the shortestPath() function call it runs so long I get
an HTTP timeout on many of these queries. I restrict the types of
relationships with [:rel1type|:rel2type|:etctype*]. And even though the
result only includes one or two additional paths, it runs like 100 times
slower - and often just times out via REST (via Py2neo).

That's really disappointing.

Does anyone have a suggestion on how to make this faster - or at least
not time out?


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Re: Grass files are cool...

2016-05-09 Thread Alan Robertson
Where is Grass documented?

I see Michael's Hunger's post here:
http://jexp.de/blog/2014/06/styling-neo4j-server-visualisation/

This includes some great examples.

Is there more detailed documentation on it?

I see some W3C info on graph style sheets - are they the same as what
Neo4j uses?

Thanks!

-- Alan


On 05/09/2016 06:37 AM, 'Michael Hunger' via Neo4j wrote:
> Probably a parsing issue. I forwarded your find to the team. 
>
> In 3.0.1 you can also use :style with an Url or literal grass text
> following. 
>
> Von meinem iPhone gesendet
>
> Am 06.05.2016 um 10:00 schrieb koen  <mailto:kdwykleing...@gmail.com>>:
>
>> Hi, i noticed the same. Btw when you use an other character such as
>> an equal sign it "works" 'K= {key}'
>>
>> I was also not able to show both he TYPE and an attribute/property
>> value on the caption of a relationship.. so for example the combined
>> caption of  '{weight} '  doe not work.. is there a way to do this ?
>>
>> regards koen
>>
>> Op vrijdag 6 mei 2016 04:53:30 UTC+2 schreef Tim Colson:
>>
>> TIL that I can export a grass file, edit the colors in Intellij,
>> drag it to the Neo browser, /et voila/ - my "Space" wiki nodes
>> are *always* a purrrty blue.*Nice!!! *
>>
>> One weird thing... if I put a colon inside the caption element,
>> the Neo Browser only displays the text that is pre-colon, for
>> example 'K:{key}' will display "K". Other symbols like equals or
>> dash display the full string.
>>  
>> I searched for grass docs, to see if this is expected behavior,
>> but didn't find a lot of info beyond Issue 2112 on Github
>> <https://github.com/neo4j/neo4j/issues/2112>. 
>>
>> Are there more docs, additional parameters possible? (Oh, and is
>> the colon thing a bug?)
>>
>> 
>> <https://lh3.googleusercontent.com/-B749x3G1tSQ/VywGN799mYI/Aus/qiGbb2qsnEsELdF4Dpj7syj8WwWOLb3kgCLcB/s1600/neo_grass_caption_error.png>
>>
>>
>> 
>> <https://lh3.googleusercontent.com/-dUI5VXsNPmI/VywGQK7AHBI/Auw/IwfRcHgxbdoarrg742aU9ScA_AJZzymWgCLcB/s1600/neo_caption.png>
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Neo4j" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to neo4j+unsubscr...@googlegroups.com
>> <mailto:neo4j+unsubscr...@googlegroups.com>.
>> For more options, visit https://groups.google.com/d/optout.
> -- 
> You received this message because you are subscribed to the Google
> Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to neo4j+unsubscr...@googlegroups.com
> <mailto:neo4j+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


BUG in Py2neo/Neo4j? WAS: Re: [Neo4j] I want a query which returns a subgraph...

2016-04-29 Thread Alan Robertson
Hi,

I started looking at the results from this, and changing my code to deal
with Relationships returned from a query - and discovered that this
query didn't return a list of Relationships, it returned a list of Paths.

Not sure where the bug /really/ is, but I filed it against Nigel as a
py2neo issue.

https://github.com/nigelsmall/py2neo/issues/502

The best thing about this bug is that the query should work unmodified
on any database with at least one relationship in it. The results will
be different, but the types returned should not be.  I've quoted the bug
report below for your reading pleasure ;-).


The query below should work on any database with at least one
relationship in it. It should return one row with these fields:
1. nodes: list-of-Nodes
2. relationships: list-of-Relationships

|MATCH start MATCH p = shortestPath( (start)-[*]-(m) ) UNWIND nodes(p) as
n UNWIND rels(p) as r RETURN collect(distinct n) as nodes,
collect(distinct r) as relationships |

But when I look at what py2neo is giving me, it returns
1. nodes: list-of-Nodes
2. relationships: list-of-/*Paths*/

This is with Neo4j 3.0.0, and Py2neo 2.0.8. It possible it's not your
problem, but a Neo4j problem, or even a bug/deficiency in the REST API.
But from reading your code, it looked like you weren't expecting this
kind of result.

"neo4j::all":"3.0.0",
"py2neo": "2.0.8",



On 04/28/2016 03:32 PM, Alan Robertson wrote:
> The query isn't quite right. It has an error in it (variable n already
> used) and something about the order of operations causes it to return
> more than one row - with duplicates ;-)
>
> But this one seems to do the trick:
> |match path = shortestPath( (n)-[*]->(m) ) return collect(distinct
> unwind(nodes(path))), collect(distinct unwind(rels(path)))|
>
> What do you think?
>
>
>
> On 04/28/2016 07:59 AM, Alan Robertson wrote:
>> Hi,
>>
>> Michael Hunger separately provided me this query - which is a
>> prototype query which looks like it will do what I want. It includes
>> features of Cypher I was not familiar with (particularly unwind):
>>
>>> | match path = shortestPath( (n)-[*]->(m) ) unwind nodes(path) as
>>> n with collect(distinct n) as nodes unwind rels(path) as r return
>>> collect(distinct r), nodes|
>> If I understand it correctly, this returns a single tuple with two
>> elements:
>>
>>  1. List of all individual relationships (no duplicates)
>>  2. List of all individual nodes (no duplicates)
>>
>> I'll have to try this out!
>>
>> I kind of wonder how this gets mapped into py2neo - what type are the
>> tuple elements -- list(Relationship) and list(Node) or something like
>> that...
>>
>> *Nigel?*
>>
>> I know my code won't currently handle this - but I can fix that ;-)
>>
>> -- Alan
>>
>
>
> -- 
>
> Alan Robertson / CTO
> al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/
> +1 303.947.7999
>
> Assimilation Systems Limited
> http://AssimilationSystems.com
>
> Twitter <https://twitter.com/ossalanr> Linkedin
> <https://www.linkedin.com/in/alanr> skype
> <https://htmlsig.com/skype?username=alanr_unix.sh>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to neo4j+unsubscr...@googlegroups.com
> <mailto:neo4j+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] I want a query which returns a subgraph...

2016-04-28 Thread Alan Robertson
The query isn't quite right. It has an error in it (variable n already
used) and something about the order of operations causes it to return
more than one row - with duplicates ;-)

But this one seems to do the trick:

|match path = shortestPath( (n)-[*]->(m) ) return collect(distinct
unwind(nodes(path))), collect(distinct unwind(rels(path)))|


What do you think?



On 04/28/2016 07:59 AM, Alan Robertson wrote:
> Hi,
>
> Michael Hunger separately provided me this query - which is a
> prototype query which looks like it will do what I want. It includes
> features of Cypher I was not familiar with (particularly unwind):
>
>> | match path = shortestPath( (n)-[*]->(m) ) unwind nodes(path) as
>> n with collect(distinct n) as nodes unwind rels(path) as r return
>> collect(distinct r), nodes|
> If I understand it correctly, this returns a single tuple with two
> elements:
>
>  1. List of all individual relationships (no duplicates)
>  2. List of all individual nodes (no duplicates)
>
> I'll have to try this out!
>
> I kind of wonder how this gets mapped into py2neo - what type are the
> tuple elements -- list(Relationship) and list(Node) or something like
> that...
>
> *Nigel?*
>
> I know my code won't currently handle this - but I can fix that ;-)
>
> -- Alan
>


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] I want a query which returns a subgraph...

2016-04-28 Thread Alan Robertson
Hi,

Michael Hunger separately provided me this query - which is a prototype
query which looks like it will do what I want. It includes features of
Cypher I was not familiar with (particularly unwind):

> | match path = shortestPath( (n)-[*]->(m) ) unwind nodes(path) as n
> with collect(distinct n) as nodes unwind rels(path) as r return
> collect(distinct r), nodes|
If I understand it correctly, this returns a single tuple with two elements:

 1. List of all individual relationships (no duplicates)
 2. List of all individual nodes (no duplicates)

I'll have to try this out!

I kind of wonder how this gets mapped into py2neo - what type are the
tuple elements -- list(Relationship) and list(Node) or something like
that...

*Nigel?*

I know my code won't currently handle this - but I can fix that ;-)

-- Alan



On 04/25/2016 08:28 AM, Alan Robertson wrote:
> Hi,
>
> Is there a way to specify a query which returns an intact subgraph?
>
> For example:
>
> starting from node "X" (by some specification), return the subgraph
> reachable through a collection of relationship types {T}, through some
> maximum distance (d), return a JSON representation of this subgraph -
> possibly with some WHERE specifications, but possibly not. In our
> nodes we include a nodetype in every node, we might want to say "WHERE
> node.nodetype IN {N}" as our where clause.
>
> Result should be in some JSON graph format, perhaps like JSON Graph
> Format (JGF) http://jsongraphformat.info/ or
> https://github.com/bruth/json-graph-spec.
>
> This is exactly what's needed for visualization of a subgraph from a
> Javascript program. Since Neo4j graphs are often huge, even monstrous,
> having a query that does this would be incredibly handy...
>
> Otherwise you have to go through and put this graph together a piece
> at a time (or so it seems to me).
>
> I think I can write a query which returns  all the paths through this
> subgraph, but then I have to do the duplication elimination and so on
> myself. A single node might be returned many times in the possible
> paths result. Not an ideal situation...
>
> This seems like a very common thing to want to do...
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to neo4j+unsubscr...@googlegroups.com
> <mailto:neo4j+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] 3.0.0 on Ubuntu passing my tests. YAY!

2016-04-27 Thread Alan Robertson
This morning, my OS offered me the opportunity to upgrade my Neo4j to
3.0.0 - so I upgraded.

I ran my tests on the Assimilation project, and they all passed.

YAY!

Thanks to everyone at Neo4j for their continual progress, along with
excellent testing!

-- Alan



-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] I want a query which returns a subgraph...

2016-04-25 Thread Alan Robertson
Hi,

Is there a way to specify a query which returns an intact subgraph?

For example:

starting from node "X" (by some specification), return the subgraph
reachable through a collection of relationship types {T}, through some
maximum distance (d), return a JSON representation of this subgraph -
possibly with some WHERE specifications, but possibly not. In our nodes
we include a nodetype in every node, we might want to say "WHERE
node.nodetype IN {N}" as our where clause.

Result should be in some JSON graph format, perhaps like JSON Graph
Format (JGF) http://jsongraphformat.info/ or
https://github.com/bruth/json-graph-spec.

This is exactly what's needed for visualization of a subgraph from a
Javascript program. Since Neo4j graphs are often huge, even monstrous,
having a query that does this would be incredibly handy...

Otherwise you have to go through and put this graph together a piece at
a time (or so it seems to me).

I think I can write a query which returns  all the paths through this
subgraph, but then I have to do the duplication elimination and so on
myself. A single node might be returned many times in the possible paths
result. Not an ideal situation...

This seems like a very common thing to want to do...


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Cannot install py2neo: cannot import name SSLContext

2016-03-31 Thread Alan Robertson
Hi,

When I try and do a pip install "py2neo>2.0.7", I get the same error on
exactly two versions of Linux:
*Ubuntu precise* and *Debian wheezy*. The errors are reproducible.
Re-creating a clean build environment from scratch doesn't help. The
builds are exactly the same ones that I used to put out the 1.0.3
version at the end of February - and it all worked then. See
https://github.com/nigelsmall/py2neo/issues/487 for the GitHub issue.

These versions all work:
Konsole output
CentOS centos7
CentOS6
openSUSE 13.2
openSUSE 42.1
Ubuntu trusty
Ubuntu vivid
Ubuntu wily
Debian jessie
Fedora 21
Fedora 22


Here's the error from Ubuntu precise:

Konsole output
Step 14 : RUN *pip install ctypesgen 'py2neo>2.0.7' getent*
---> Running in 6a80194d49c4
Downloading/unpacking ctypesgen
 Running setup.py egg_info for package ctypesgen

Downloading/unpacking py2neo>2.0.7
 Running setup.py egg_info for package py2neo
   Traceback (most recent call last):
 File "", line 14, in 
 File "/build/py2neo/setup.py", line 26, in 
   from py2neo import __author__, __email__, __license__,
__package__, __version__
 File "py2neo/__init__.py", line 28, in 
   from py2neo.database import *
 File "py2neo/database/__init__.py", line 26, in 
   from py2neo.database.cypher import cypher_escape, cypher_repr
 File "py2neo/database/cypher.py", line 24, in 
   from py2neo.types import Node, Relationship, Path
 File "py2neo/types.py", line 23, in 
   from py2neo.database.http import Resource
 File "py2neo/database/http.py", line 20, in 
   from py2neo.database.auth import ServerAddress, keyring
 File "py2neo/database/auth.py", line 22, in 
   from py2neo.packages.neo4j.v1 import basic_auth
 File "py2neo/packages/neo4j/v1/__init__.py", line 22, in 
   from .session import *
 File "py2neo/packages/neo4j/v1/session.py", line 32, in 
   from ssl import SSLContext, PROTOCOL_SSLv23, OP_NO_SSLv2,
CERT_REQUIRED
   *ImportError:* *cannot import name SSLContext*


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] An alternative "shortest path" problem...

2016-02-11 Thread Alan Robertson
No one has any suggestions on how to write a query like this?

Do I just find all possible paths and sort on length of path?


On 12/23/2015 11:18 AM, Alan Robertson wrote:
> I want to find the shortest path to any node which has a specific
> property.
>
>  +-[:rulemember]->(r="rule1")
> /
> (ruleset1)-[:basedon]->(ruleset2)-[:basedon]->(ruleset3)-[:rulemember]->(r="rule1")
> \
>  +-[:rulemember]->(r="rule1")
>
> The context is this:
> This is a set of rules, based on [:basedon] other sets of rules.
> The rulesets contain member rules [:rulemember].
> The rule closest to the starting point is the rule that is in effect.
>
> If I want to know which version of rule1 (the one with r="rule1") is
> in effect for ruleset1, then the answer would be the rule1 below the
> line. You get different answers if you give ruleset2 or ruleset3 as
> the starting point.
>
> If the graph looks like the one below and the starting point is
> ruleset1, then the answer should be the "rule1" above the starting line.
>
>  +-[:rulemember]->(r="rule1")
> /
> (ruleset1)-[:basedon]->(ruleset2)-[:basedon]->(ruleset3)-[:rulemember]->(r="rule1")
>   
>
>
> This is analogous to a question like "Where is the closest ATM?". I
> want the shortest path to a node with a particular property (i.e.,
> that satisfies a particular predicate).
> ATM == Cash machine == Geldautomat and no doubt other
> names ;-)
>
>
> -- 
>
> Alan Robertson / CTO
> al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/
> +1 303.947.7999
>
> Assimilation Systems Limited
> http://AssimilationSystems.com
>
> Twitter <https://twitter.com/ossalanr> Linkedin
> <https://www.linkedin.com/in/alanr> skype
> <https://htmlsig.com/skype?username=alanr_unix.sh>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to neo4j+unsubscr...@googlegroups.com
> <mailto:neo4j+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Neo4j certificate expired...

2016-01-01 Thread Alan Robertson
Konsole output
Hi,

When trying to get a copy of neo4j with one of my scripts today, I ran
into this...


ERROR: cannot verify neo4j.com's certificate, issued by ‘CN=Go Daddy
Secure Certificate Authority -
G2,OU=http://certs.godaddy.com/repository/,O=GoDaddy.com\\,
Inc.,L=Scottsdale,ST=Arizona,C=US’:
 Issued certificate has expired.
ERROR: no certificate subject alternative name matches
   requested host name ‘neo4j.com’.
To connect to neo4j.com insecurely, use `--no-check-certificate'.
servidor:~/monitor/src/docker/installertest $

-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] An alternative "shortest path" problem...

2015-12-23 Thread Alan Robertson
I want to find the shortest path to any node which has a specific property.

 +-[:rulemember]->(r="rule1")
/
(ruleset1)-[:basedon]->(ruleset2)-[:basedon]->(ruleset3)-[:rulemember]->(r="rule1")
\
 +-[:rulemember]->(r="rule1")

The context is this:
This is a set of rules, based on [:basedon] other sets of rules.
The rulesets contain member rules [:rulemember].
The rule closest to the starting point is the rule that is in effect.

If I want to know which version of rule1 (the one with r="rule1") is in
effect for ruleset1, then the answer would be the rule1 below the line.
You get different answers if you give ruleset2 or ruleset3 as the
starting point.

If the graph looks like the one below and the starting point is
ruleset1, then the answer should be the "rule1" above the starting line.

 +-[:rulemember]->(r="rule1")
/
(ruleset1)-[:basedon]->(ruleset2)-[:basedon]->(ruleset3)-[:rulemember]->(r="rule1")
  


This is analogous to a question like "Where is the closest ATM?". I want
the shortest path to a node with a particular property (i.e., that
satisfies a particular predicate).
ATM == Cash machine == Geldautomat and no doubt other names ;-)


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] how to create a byte[] object using the py2neo?

2015-10-29 Thread Alan Robertson
On 10/28/2015 06:53 PM, Michael Hunger wrote:
> Yes, Neo itself internally can handle byte[] just fine.
>
> there would be a need for a toBytes(base64String)  function to handle it.
>
> What's your use-case?
>
> I think the 3.0 binary API will have support for byte[] too.


It's that nasty really-long-string case we talked about - where I would
like to store them as compressed byte arrays...

Any chance they'll fix this horrible storage layout for large attributes
in 3.0?

Given how slow long strings are in Neo4j, storing them compressed would
speed handling them by a factor of the compression ratio - which seems
to run 5:1 or better...

Today I started moving those huge attributes to be in their own nodes so
that they don't travel over the REST interface except when I know I want
them.

There's an N^2 kind of thing that goes on now...

I add an 20K string attribute
I add another 20K attribute - which involves fetching 20K and writing 40K
I add another 20K attribute which involves fetching 40K and writing 60K

and so on and so on...

And since every 60 bytes of the attribute requires a round trip to the
disk, the performance is beyond horrible...
A 20K attribute takes at least 333 round trips to the disk to fetch(!).
Since it's a linked list, they have to be performed one at a time...

So, the first time, it takes 333 disk accesses to retrieve, then 666,
then 999, then 1332 and so on as more long attributes are added to the
nodes.

It makes simple queries take /seconds/ to perform.

Now at least, there shouldn't be any N^2 stuff going on.

It's still slow, but shouldn't get worse and worse like it does now...

What I did turns out to have been stupid.
The implementation of strings > 60 bytes is REALLY stupid.

The result was not 2*REALLY*stupid, but instead was REALLY*(stupid)^2).


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] how to create a byte[] object using the py2neo?

2015-10-28 Thread Alan Robertson
On 10/23/2015 08:46 AM, Nigel Small wrote:
> Hi Alan
>
> Due to the limitations of JSON, there's no way to do byte arrays with
> py2neo.
So, if I understand this correctly, this is a general limitation of the
REST API, and not of Neo4j, yes?

Sigh...
>
> Nigel
>
> On 23 October 2015 at 15:29, Alan Robertson  <mailto:al...@unix.sh>> wrote:
>
> What is the Python type which corresponds to byte[] for py2neo?
>
> [and of course, does this work ;-)]
>
>
> Thanks!
>
>
> -- 
>
> Alan Robertson / CTO
> al...@assimilationsystems.com
> <mailto:al...@assimilationsystems.com>/ +1 303.947.7999
> 
>
> Assimilation Systems Limited
> http://AssimilationSystems.com
>
> Twitter <https://twitter.com/ossalanr> Linkedin
> <https://www.linkedin.com/in/alanr> skype
> <https://htmlsig.com/skype?username=alanr_unix.sh>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to neo4j+unsubscr...@googlegroups.com
> <mailto:neo4j+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.
>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to neo4j+unsubscr...@googlegroups.com
> <mailto:neo4j+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] how to create a byte[] object using the py2neo?

2015-10-23 Thread Alan Robertson
What is the Python type which corresponds to byte[] for py2neo?

[and of course, does this work ;-)]


Thanks!


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Neo4j RPM java dependencies...

2015-09-28 Thread Alan Robertson
Hi,

I'm writing a cool installer for the Neo4j-based Assimilation software.
Part of what the installer does is install Neo4j.

When I try and install it on Fedora 21 or 22, I can't - because the
Neo4j RPM is locked into 1.7.0, and 1.8.0 is all that's available from
Fedora.

I think the RPM could have the dependency just be on java, and then it
would accept any package that provided java. Then I could install on
Fedora and be happy :-D.

I realize that Fedora isn't a production system, but I also assume that
1.7.0 is going to go away in the foreseeable future.

Suggestions?




-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] modelling DNS log records

2015-09-25 Thread Alan Robertson
Completely agree with Michael.

Are you looking at this data to find insecure DNS servers? To find evil
web sites? To do demographic research? To look for people engaged in
illegal activities?

And, for things like payload, you might have the payload be unique - and
located by the hash of the result. You could then more easily do certain
kinds of frequency analysis.

But ... What is it you intend to do with this very detailed and
explosively growing data?

-- Alan


On 09/24/2015 11:47 PM, Michael Hunger wrote:
> Hi,
>
> first of all there is no "best" practice. it always *depends on the
> use-cases* (ie. what do you want to do with the data).
>
> You could for instance have in your model the DSN server, the
> originator, the IP's and hosts that are part of the payload, and then
> the message (request-response) linking them all together.
>
> As you said you can also have other models.
>
> So perhaps you could elaborate a bit on how you want to use the data.
>
> Cheers, Michael
>
>
>
>> Am 23.09.2015 um 20:27 schrieb mgs...@gmail.com
>> <mailto:mgs...@gmail.com>:
>>
>> Hello
>>
>> If you wanted to create a data model for DNS transactions, where each
>> record has the timestamp, source IP+port, destination IP+port, query,
>> query_response and a few other fields, I can think of at least a
>> couple of ways of modelling this, and I'm after some opinion on the
>> 'best' or 'best practice' way to do it.
>>
>> The first way would be to create nodes that represent the src or dst
>> IP address, and a relationship like "dns_flow", which has properties
>> like timestamp,query,query_response etc.
>> This will result in *a lot* of relationships with quite a few
>> properties - is that a 'bad thing'?
>>
>> Or you could have IP addresses as nodes as well as the domain name in
>> the query field as a node.  The srcIP would have a relationship to
>> the query node called 'resolved' with properties like timestamp,
>> dns_server(dstIP) etc - but that would mean a node (dstIP) would be
>> the value of a property of a relationship - I guess that isn't a good
>> idea - or can you have a node as a value of a property?
>>
>> Or as directly above but somehow creating a 'via' type relationship
>> where it is clear the srcIP tried to resolve query via dstIP.
>>
>> Does that make sense?
>>
>> Happy to hear any ideas at all.
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Neo4j" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to neo4j+unsubscr...@googlegroups.com
>> <mailto:neo4j+unsubscr...@googlegroups.com>.
>> For more options, visit https://groups.google.com/d/optout.
>


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] WORKAROUND FOUND: WAS What debian package contains the debian.neo4j.org certificate authority?

2015-09-17 Thread Alan Robertson
OK. I stand corrected (see the discussion on serverfault). This is
neo4j's issue. Please fix.

On 09/17/2015 08:58 AM, Alan Robertson wrote:
> I got the answer on serverfault at the link below.
> It looks like godaddy isn't doing their job of hosting certificates
> correctly.
>
> Here's a workaround from serverfault:
> wget -q https://certs.godaddy.com/repository/gdig2.crt
> wget -q --ca-certificate gdig2.crt -O - 
> https://debian.neo4j.org/neotechnology.gpg.key |  apt-key add -
>
> *Could someone harangue godaddy and get them to fix this?*
>
> But now I know that this is really *your* gpg key for sure.
>
>
> On 09/16/2015 09:56 AM, Alan Robertson wrote:
>>
>> I also asked this question on serverfault:
>> http://serverfault.com/questions/722770/which-ubuntu-package-has-the-ca-for-debian-neo4j-org-godaddy
>>
>> The neo4j site shows that I should get the neo4j GPG signing key
>> using |wget -q -O - http://debian.neo4j.org/neotechnology.gpg.key|
>>
>> This of course, could allow the certificate to be hacked, and I would
>> not be able to tell. Bad news. So, I really should
>> use*https*://debian.neo4j.org/neotechnology.gpg.key instead. But when
>> I do, neither wget nor curl can find the certificate. On the other
>> hand, Chrome seems perfectly happy with it. Here's the detailed
>> message from wget:
>>
>> ERROR: cannot verify debian.neo4j.org's certificate, issued by
>> ‘CN=Go Daddy Secure Certificate Authority -
>> G2,OU=http://certs.godaddy.com/repository/,O=GoDaddy.com\,
>> Inc.,L=Scottsdale,ST=Arizona,C=US’:
>>
>> I have to use a command line tool in this context, and it really
>> needs to be gotten via https or it doesn't do what it's intended to
>> do... Which debian/Ubuntu package will install the needed certificate
>> authority?
>>
>> [I already know about *--no-check-certificate*. That doesn't solve
>> the problem]
>>
>> -- 
>>
>> Alan Robertson / CTO
>> al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/
>> +1 303.947.7999
>>
>> Assimilation Systems Limited
>> http://AssimilationSystems.com
>>
>> Twitter <https://twitter.com/ossalanr> Linkedin
>> <https://www.linkedin.com/in/alanr> skype
>> <https://htmlsig.com/skype?username=alanr_unix.sh>
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Neo4j" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to neo4j+unsubscr...@googlegroups.com
>> <mailto:neo4j+unsubscr...@googlegroups.com>.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> -- 
>
> Alan Robertson / CTO
> al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/
> +1 303.947.7999
>
> Assimilation Systems Limited
> http://AssimilationSystems.com
>
> Twitter <https://twitter.com/ossalanr> Linkedin
> <https://www.linkedin.com/in/alanr> skype
> <https://htmlsig.com/skype?username=alanr_unix.sh>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to neo4j+unsubscr...@googlegroups.com
> <mailto:neo4j+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] WORKAROUND FOUND: WAS What debian package contains the debian.neo4j.org certificate authority?

2015-09-17 Thread Alan Robertson
I got the answer on serverfault at the link below.
It looks like godaddy isn't doing their job of hosting certificates
correctly.

Here's a workaround from serverfault:
wget -q https://certs.godaddy.com/repository/gdig2.crt
wget -q --ca-certificate gdig2.crt -O - 
https://debian.neo4j.org/neotechnology.gpg.key |  apt-key add -

*Could someone harangue godaddy and get them to fix this?*

But now I know that this is really *your* gpg key for sure.


On 09/16/2015 09:56 AM, Alan Robertson wrote:
>
> I also asked this question on serverfault:
> http://serverfault.com/questions/722770/which-ubuntu-package-has-the-ca-for-debian-neo4j-org-godaddy
>
> The neo4j site shows that I should get the neo4j GPG signing key
> using |wget -q -O - http://debian.neo4j.org/neotechnology.gpg.key|
>
> This of course, could allow the certificate to be hacked, and I would
> not be able to tell. Bad news. So, I really should
> use*https*://debian.neo4j.org/neotechnology.gpg.key instead. But when
> I do, neither wget nor curl can find the certificate. On the other
> hand, Chrome seems perfectly happy with it. Here's the detailed
> message from wget:
>
> ERROR: cannot verify debian.neo4j.org's certificate, issued by
> ‘CN=Go Daddy Secure Certificate Authority -
> G2,OU=http://certs.godaddy.com/repository/,O=GoDaddy.com\,
> Inc.,L=Scottsdale,ST=Arizona,C=US’:
>
> I have to use a command line tool in this context, and it really needs
> to be gotten via https or it doesn't do what it's intended to do...
> Which debian/Ubuntu package will install the needed certificate authority?
>
> [I already know about *--no-check-certificate*. That doesn't solve the
> problem]
>
> -- 
>
> Alan Robertson / CTO
> al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/
> +1 303.947.7999
>
> Assimilation Systems Limited
> http://AssimilationSystems.com
>
> Twitter <https://twitter.com/ossalanr> Linkedin
> <https://www.linkedin.com/in/alanr> skype
> <https://htmlsig.com/skype?username=alanr_unix.sh>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to neo4j+unsubscr...@googlegroups.com
> <mailto:neo4j+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] What debian package contains the debian.neo4j.org certificate authority?

2015-09-16 Thread Alan Robertson
I also asked this question on serverfault:
http://serverfault.com/questions/722770/which-ubuntu-package-has-the-ca-for-debian-neo4j-org-godaddy

The neo4j site shows that I should get the neo4j GPG signing key
using |wget -q -O - http://debian.neo4j.org/neotechnology.gpg.key|

This of course, could allow the certificate to be hacked, and I would
not be able to tell. Bad news. So, I really should
use*https*://debian.neo4j.org/neotechnology.gpg.key instead. But when I
do, neither wget nor curl can find the certificate. On the other hand,
Chrome seems perfectly happy with it. Here's the detailed message from wget:

ERROR: cannot verify debian.neo4j.org's certificate, issued by
‘CN=Go Daddy Secure Certificate Authority -
G2,OU=http://certs.godaddy.com/repository/,O=GoDaddy.com\
<http://certs.godaddy.com/repository/,O=GoDaddy.com%5C>,
Inc.,L=Scottsdale,ST=Arizona,C=US’:

I have to use a command line tool in this context, and it really needs
to be gotten via https or it doesn't do what it's intended to do...
Which debian/Ubuntu package will install the needed certificate authority?

[I already know about *--no-check-certificate*. That doesn't solve the
problem]

-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Batch weirdness with current py2neo

2015-09-09 Thread Alan Robertson
Merge all complete. Next release of my code will require the new version
of py2neo.

On 09/04/2015 12:48 PM, Alan Robertson wrote:
> Thanks again for your response.
>
> I'm making good progress in getting going with your newer APIs.
> Unfortunately, I had to go on and do a bunch of work while waiting for
> the response, and now after I get all this working, I'll have a
> substantial merge job ahead of me because  I had to touch a good bit
> of the same code for the new features I added to my code :-(.
>
> As soon as that's done and working, then I can switch over to Cypher
> transactions.
>
> stream(/statement/, /parameters=None/, /**kwparameters/)
>
> Execute the query and return a result iterator.
>
> Parameters:   
>
>   * *statement* – A Cypher statement to execute.
>   * *parameters* – A dictionary of parameters.
>
> Return type:  
>
> py2neo.cypher.RecordStream
> <http://py2neo.org/2.0/cypher.html#py2neo.cypher.RecordStream>
>
>
> OK. I see it returns a RecordStream. Unfortunately it doesn't document
> what's in the RecordStream :-(
>
> What's fields are in the Records in the RecordStream?
>
> Will I get one Record per transaction element?
>
> What do those Records look like for various kinds of Cypher queries?
>
> When I add a node where do I find the newly-created Node object?
>
> When I add a relationship, where do I find the newly-created
> Relationship object?
>
>
> Thanks!
>
> -- Alan
>
>
>
>
> On 08/26/2015 03:02 AM, Nigel Small wrote:
>> Hi Alan
>>
>> So IIRC, there are outstanding faults with the uniqueness modes that
>> underpin the *add_to_index_or_fail* function. I forget the exact
>> nature of these but I put a warning in the py2neo docs about using them:
>> http://py2neo.org/2.0/legacy.html#py2neo.legacy.LegacyWriteBatch.add_to_index_or_fail
>>
>> If memory serves (which it often doesn't) the issue was related to this:
>> https://github.com/neo4j/neo4j/issues/906
>>
>> Going forward, I'd advise moving to labels and schema indexes rather
>> than using legacy indexes. Additionally, Cypher transactions are
>> generally superior to the old HTTP batches which have some functional
>> limitations. Both of these features (schema indexes and Cypher
>> transactions) are now mature and still in active development so will
>> often provide better results.
>>
>> Cheers
>> Nigel
>>
>>
>> On 19 August 2015 at 13:30, Alan Robertson > <mailto:al...@unix.sh>> wrote:
>>
>> I turned on Nigel's debugging. This is the error this time (same
>> but different node number mentioned)
>> BatchError: Batch job 2 failed with NotFoundException
>> Node 35832 not found
>> Here's what Nigel's debugging says:
>>
>> > Sending batch request with 3 jobs
>> > {0} POST node
>> 
>> {"domain":"global","nodetype":"Person","firstname":"Annika","lastname":"Hansen","time_create_iso8601":"2015-08-18
>> 20:28:46","time_create_ms":1439929726819,"dateofbirth":"unknown"}
>> > {1} POST {0}/relationships {"to":"node/35910","type":"IS_A"}
>> > {2} POST index/node/Person?uniqueness=create_or_fail
>> {"value":"Annika","key":"Hansen","uri":"{0}"}
>> < Received batch response for 3 jobs
>> < {0} 201 http://localhost:7474/db/data/'
>> ref=u'node/35917' labels=set([]) properties={u'domain':
>> u'global', u'node
>> type': u'Person', u'firstname': u'Annika', u'lastname':
>> u'Hansen', u'time_create_iso8601': u'2015-08-18 20:28:46',
>> u'time_create_
>> ms': 1439929726819, u'dateofbirth': u'unknown'}>
>> < {1} 201 http://localhost:7474/db/data/'
>> ref=u'relationship/60444' start=u'node/35917' end=u'node/35910' t
>> ype=u'IS_A' properties={}>
>> It points to the problem as being with the index/node/Person update.
>>
>>
>> On 08/17/2015 11:50 AM, Alan Robertson wrote:
>> > Hi,
>> >
>> > Twice I've tried to convert to py2neo 2.x. Both times I ran
>> into this problem. The first time I

[Neo4j] Two py2neo Exceptions...

2015-09-04 Thread Alan Robertson
I ran across two similar problems with the /write_node()/ function in
the py2neo code. The problem seems to be that the code makes too many
assumptions about the node its been given to format.

I made an issue for it here:
https://github.com/nigelsmall/py2neo/issues/434
and a pull request for the patch I created here:
https://github.com/nigelsmall/py2neo/pull/433

My code creates nodes using the legacy.batch() code.
*
**Here's the first exception:*
Traceback (most recent call last):
File "./query.py", line 602, in 
qstore.commit()
File "/home/alanr/monitor/src/cma/store.py", line 999, in commit
self./batch_construct_relate_nodes() # These return new relationships
File "/home/alanr/monitor/src/cma/store.py", line 877,
in /batch_construct_relate_nodes
print >> sys.stderr, (' Performing batch.create(%s): node
relationships' % absrel)
File "/usr/local/lib/python2.7/dist-packages/py2neo/core.py", line 2475,
in __str//
return xstr(self.*unicode*())
File "/usr/local/lib/python2.7/dist-packages/py2neo/core.py", line 2484,
in unicode
writer.write_relationship(self)
File "/usr/local/lib/python2.7/dist-packages/py2neo/cypher/lang.py",
line 184, in write_relationship
self.write_node(relationship.start_node)
File "/usr/local/lib/python2.7/dist-packages/py2neo/cypher/lang.py",
line 150, in write_node
for label in sorted(node.labels):
*AttributeError: 'NodePointer' object has no attribute 'labels'*

*Here's the second exception:*

File "./query.py", line 602, in 
qstore.commit()
File "/home/alanr/monitor/src/cma/store.py", line 999, in commit
self./batch_construct_relate_nodes() # These return new relationships
File "/home/alanr/monitor/src/cma/store.py", line 877,
in /batch_construct_relate_nodes
print >> sys.stderr, (' Performing batch.create(%s): node
relationships' % absrel)
File "/usr/local/lib/python2.7/dist-packages/py2neo/core.py", line 2475,
in __str//
return xstr(self.unicode())
File "/usr/local/lib/python2.7/dist-packages/py2neo/core.py", line 2484,
in unicode
writer.write_relationship(self)
File "/usr/local/lib/python2.7/dist-packages/py2neo/cypher/lang.py",
line 185, in write_relationship
self.write_node(relationship.start_node)
File "/usr/local/lib/python2.7/dist-packages/py2neo/cypher/lang.py",
line 154, in write_node
if node.properties:
*AttributeError: 'NodePointer' object has no attribute 'properties'
*

-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Batch weirdness with current py2neo

2015-09-04 Thread Alan Robertson
Thanks again for your response.

I'm making good progress in getting going with your newer APIs.
Unfortunately, I had to go on and do a bunch of work while waiting for
the response, and now after I get all this working, I'll have a
substantial merge job ahead of me because  I had to touch a good bit of
the same code for the new features I added to my code :-(.

As soon as that's done and working, then I can switch over to Cypher
transactions.

stream(/statement/, /parameters=None/, /**kwparameters/)

Execute the query and return a result iterator.

Parameters: 

  * *statement* – A Cypher statement to execute.
  * *parameters* – A dictionary of parameters.

Return type:

py2neo.cypher.RecordStream
<http://py2neo.org/2.0/cypher.html#py2neo.cypher.RecordStream>


OK. I see it returns a RecordStream. Unfortunately it doesn't document
what's in the RecordStream :-(

What's fields are in the Records in the RecordStream?

Will I get one Record per transaction element?

What do those Records look like for various kinds of Cypher queries?

When I add a node where do I find the newly-created Node object?

When I add a relationship, where do I find the newly-created
Relationship object?


Thanks!

-- Alan




On 08/26/2015 03:02 AM, Nigel Small wrote:
> Hi Alan
>
> So IIRC, there are outstanding faults with the uniqueness modes that
> underpin the *add_to_index_or_fail* function. I forget the exact
> nature of these but I put a warning in the py2neo docs about using them:
> http://py2neo.org/2.0/legacy.html#py2neo.legacy.LegacyWriteBatch.add_to_index_or_fail
>
> If memory serves (which it often doesn't) the issue was related to this:
> https://github.com/neo4j/neo4j/issues/906
>
> Going forward, I'd advise moving to labels and schema indexes rather
> than using legacy indexes. Additionally, Cypher transactions are
> generally superior to the old HTTP batches which have some functional
> limitations. Both of these features (schema indexes and Cypher
> transactions) are now mature and still in active development so will
> often provide better results.
>
> Cheers
> Nigel
>
>
> On 19 August 2015 at 13:30, Alan Robertson  <mailto:al...@unix.sh>> wrote:
>
> I turned on Nigel's debugging. This is the error this time (same
> but different node number mentioned)
> BatchError: Batch job 2 failed with NotFoundException
> Node 35832 not found
> Here's what Nigel's debugging says:
>
> > Sending batch request with 3 jobs
> > {0} POST node
> 
> {"domain":"global","nodetype":"Person","firstname":"Annika","lastname":"Hansen","time_create_iso8601":"2015-08-18
> 20:28:46","time_create_ms":1439929726819,"dateofbirth":"unknown"}
> > {1} POST {0}/relationships {"to":"node/35910","type":"IS_A"}
> > {2} POST index/node/Person?uniqueness=create_or_fail
> {"value":"Annika","key":"Hansen","uri":"{0}"}
> < Received batch response for 3 jobs
> < {0} 201 http://localhost:7474/db/data/'
> ref=u'node/35917' labels=set([]) properties={u'domain': u'global',
> u'node
> type': u'Person', u'firstname': u'Annika', u'lastname': u'Hansen',
> u'time_create_iso8601': u'2015-08-18 20:28:46', u'time_create_
> ms': 1439929726819, u'dateofbirth': u'unknown'}>
> < {1} 201 http://localhost:7474/db/data/'
> ref=u'relationship/60444' start=u'node/35917' end=u'node/35910' t
> ype=u'IS_A' properties={}>
> It points to the problem as being with the index/node/Person update.
>
>
> On 08/17/2015 11:50 AM, Alan Robertson wrote:
> > Hi,
> >
> > Twice I've tried to convert to py2neo 2.x. Both times I ran into
> this problem. The first time I had to revert the 2.0 changes and
> put out the release anyway. This time I'm sticking with it until I
> get past it somehow...
> >
> > The symptom is that I get this result from a transaction:
> >
> > BatchError: Batch job 2 failed with NotFoundException
> > Node 34950 not found
> >
> > I can assure you that the number 34950 does not appear anywhere
> in my code (I put in lots of debug). The transaction consists of
> three things:
> > Create a new node
> >

Re: [Neo4j] Cypher question...

2015-09-04 Thread Alan Robertson
Thanks  Michael and Wes!

I suspect it says "Oh, I can't evaluate the '(()-[:nicowner]->(nic))'
expression", because NIC is NULL, so it fails the WHERE clause. My guess
is that reversing the order of the OR would also fail.


On 09/04/2015 01:04 AM, Michael Hunger wrote:
> Ah cool !!
>
> I thought that it would automatically handle the NULL case :)
>
> M
>
>> Am 04.09.2015 um 00:54 schrieb Alan Robertson > <mailto:al...@unix.sh>>:
>>
>> But this one looks like it works!
>>
>>START ip=node:IPaddrNode('*:*')
>>OPTIONAL MATCH (nic)-[:ipowner]->(ip)
>>WITH nic,ip
>>WHERE nic IS NULL OR NOT (()-[:nicowner]->(nic))
>>    RETURN ip, nic
>>ORDER BY ip.ipaddr
>>
>> Konsole output
>>
>>
>>
>>
>> On 09/03/2015 04:46 PM, Alan Robertson wrote:
>>> Hi Michael,
>>>
>>> I finally had time to try your suggestion. Thanks much for your
>>> reply! Unfortunately it's still not quite here yet...
>>>
>>>
>>> On 09/01/2015 05:37 PM, Michael Hunger wrote:
>>>>
>>>> START ip=node:IPaddrNode('*:*') 
>>>> OPTIONAL MATCH (nic)-[:ipowner]->(ip) 
>>>> WITH nic,ip
>>>> WHERE NOT (()-[:nicowner]->(nic))
>>>> RETURN ip, nic
>>>> ORDER BY ip.ipaddr
>>>>
>>> Well... It produces output including the MAC address for every node
>>> which *has* a MAC address.
>>>
>>> But it omits any which doesn't have a MAC address (NIC).
>>>
>>> Here's what I mean:
>>> Konsole output
>>> *$ cma/assimcli.py query allips* 
>>> 2601:280:4080:79e5:ca0a:a9ff:fe88:1d52 c8-0a-a9-88-1d-52 ubuntu72
>>> :::10.10.10.100 00-c0-48-21-92-9f undefined
>>> :::10.10.10.12 00-1e-c0-89-40-7f undefined
>>> :::10.10.10.130 c8-0a-a9-88-1d-52 ubuntu72
>>> :::10.10.10.21 6c-62-6d-84-98-4b undefined
>>> :::10.10.10.249 a0-21-b7-a1-83-5f a0-21-b7-a1-83-5f
>>> :::10.10.10.254 c4-3d-c7-a8-1b-5b undefined
>>> *:::10.10.10.5 undefined undefined*
>>> :::10.10.10.66 00-26-18-21-8b-58 undefined
>>> :::10.10.10.95 00-11-d9-5f-f8-ca undefined
>>> :::172.17.42.1 56-84-7a-fe-97-99 ubuntu72
>>> :::192.168.122.1 ca-1d-7f-2a-80-c5 ubuntu72
>>> *ubuntu72:~/monitor/secure.src $ cma/assimcli.py query unknownips *
>>> :::10.10.10.100 MAC(00-c0-48-21-92-9f)
>>> :::10.10.10.12  MAC(00-1e-c0-89-40-7f)
>>> :::10.10.10.21  MAC(6c-62-6d-84-98-4b)
>>> :::10.10.10.254 MAC(c4-3d-c7-a8-1b-5b)
>>> :::10.10.10.66  MAC(00-26-18-21-8b-58)
>>> :::10.10.10.95  MAC(00-11-d9-5f-f8-ca)
>>>
>>> The address *10.10.10.5* doesn't have an associated NIC (MAC
>>> address), and it is not included in the "unknown" IPs - and it
>>> should be.
>>>
>>> We have two different mechanisms to discover IP addresses. One is
>>> through client connections - in which case we typically don't know
>>> the MAC address. The other is through listening to ARP packets - in
>>> which case we will know the MAC address.
>>>
>>> In our software, we equate a MAC address with a NIC. It may not be
>>> strictly true, but it's not a bad first approximation ;-).
>>>
>>>
>>> -- 
>>>
>>> Alan Robertson / CTO
>>> al...@assimilationsystems.com
>>> <mailto:al...@assimilationsystems.com>/ +1 303.947.7999
>>>
>>> Assimilation Systems Limited
>>> http://AssimilationSystems.com <http://assimilationsystems.com/>
>>>
>>>  <https://twitter.com/ossalanr> 
>>> <https://www.linkedin.com/in/alanr> 
>>> <https://htmlsig.com/skype?username=alanr_unix.sh>
>>>
>>
>>
>> -- 
>>
>> Alan Robertson / CTO
>> al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/
>> +1 303.947.7999
>>
>> Assimilation Systems Limited
>> http://AssimilationSystems.com <http://assimilationsystems.com/>
>>
>>  <https://twitter.com/ossalanr> 
>> <https://www.linkedin.com/in/alanr> 
>> <https://htmlsig.com/skype?username=alanr_unix.sh>
>>
>


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Cypher question...

2015-09-03 Thread Alan Robertson
But this one looks like it works!

   START ip=node:IPaddrNode('*:*')
   OPTIONAL MATCH (nic)-[:ipowner]->(ip)
   WITH nic,ip
   WHERE nic IS NULL OR NOT (()-[:nicowner]->(nic))
   RETURN ip, nic
   ORDER BY ip.ipaddr

Konsole output




On 09/03/2015 04:46 PM, Alan Robertson wrote:
> Hi Michael,
>
> I finally had time to try your suggestion. Thanks much for your reply!
> Unfortunately it's still not quite here yet...
>
>
> On 09/01/2015 05:37 PM, Michael Hunger wrote:
>>
>> START ip=node:IPaddrNode('*:*') 
>> OPTIONAL MATCH (nic)-[:ipowner]->(ip) 
>> WITH nic,ip
>> WHERE NOT (()-[:nicowner]->(nic))
>> RETURN ip, nic
>> ORDER BY ip.ipaddr
>>
> Well... It produces output including the MAC address for every node
> which *has* a MAC address.
>
> But it omits any which doesn't have a MAC address (NIC).
>
> Here's what I mean:
> Konsole output
> *$ cma/assimcli.py query allips* 
> 2601:280:4080:79e5:ca0a:a9ff:fe88:1d52 c8-0a-a9-88-1d-52 ubuntu72
> :::10.10.10.100 00-c0-48-21-92-9f undefined
> :::10.10.10.12 00-1e-c0-89-40-7f undefined
> :::10.10.10.130 c8-0a-a9-88-1d-52 ubuntu72
> :::10.10.10.21 6c-62-6d-84-98-4b undefined
> :::10.10.10.249 a0-21-b7-a1-83-5f a0-21-b7-a1-83-5f
> :::10.10.10.254 c4-3d-c7-a8-1b-5b undefined
> *:::10.10.10.5 undefined undefined*
> :::10.10.10.66 00-26-18-21-8b-58 undefined
> :::10.10.10.95 00-11-d9-5f-f8-ca undefined
> :::172.17.42.1 56-84-7a-fe-97-99 ubuntu72
> :::192.168.122.1 ca-1d-7f-2a-80-c5 ubuntu72
> *ubuntu72:~/monitor/secure.src $ cma/assimcli.py query unknownips *
> :::10.10.10.100 MAC(00-c0-48-21-92-9f)
> :::10.10.10.12  MAC(00-1e-c0-89-40-7f)
> :::10.10.10.21  MAC(6c-62-6d-84-98-4b)
> :::10.10.10.254 MAC(c4-3d-c7-a8-1b-5b)
> :::10.10.10.66  MAC(00-26-18-21-8b-58)
> :::10.10.10.95  MAC(00-11-d9-5f-f8-ca)
>
> The address *10.10.10.5* doesn't have an associated NIC (MAC address),
> and it is not included in the "unknown" IPs - and it should be.
>
> We have two different mechanisms to discover IP addresses. One is
> through client connections - in which case we typically don't know the
> MAC address. The other is through listening to ARP packets - in which
> case we will know the MAC address.
>
> In our software, we equate a MAC address with a NIC. It may not be
> strictly true, but it's not a bad first approximation ;-).
>
>
> -- 
>
> Alan Robertson / CTO
> al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/
> +1 303.947.7999
>
> Assimilation Systems Limited
> http://AssimilationSystems.com
>
> Twitter <https://twitter.com/ossalanr> Linkedin
> <https://www.linkedin.com/in/alanr> skype
> <https://htmlsig.com/skype?username=alanr_unix.sh>
>


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Cypher question...

2015-09-03 Thread Alan Robertson
Hi Michael,

I finally had time to try your suggestion. Thanks much for your reply!
Unfortunately it's still not quite here yet...


On 09/01/2015 05:37 PM, Michael Hunger wrote:
>
> START ip=node:IPaddrNode('*:*') 
> OPTIONAL MATCH (nic)-[:ipowner]->(ip) 
> WITH nic,ip
> WHERE NOT (()-[:nicowner]->(nic))
> RETURN ip, nic
> ORDER BY ip.ipaddr
>
Well... It produces output including the MAC address for every node
which *has* a MAC address.

But it omits any which doesn't have a MAC address (NIC).

Here's what I mean:
Konsole output
*$ cma/assimcli.py query allips* 
2601:280:4080:79e5:ca0a:a9ff:fe88:1d52 c8-0a-a9-88-1d-52 ubuntu72
:::10.10.10.100 00-c0-48-21-92-9f undefined
:::10.10.10.12 00-1e-c0-89-40-7f undefined
:::10.10.10.130 c8-0a-a9-88-1d-52 ubuntu72
:::10.10.10.21 6c-62-6d-84-98-4b undefined
:::10.10.10.249 a0-21-b7-a1-83-5f a0-21-b7-a1-83-5f
:::10.10.10.254 c4-3d-c7-a8-1b-5b undefined
*:::10.10.10.5 undefined undefined*
:::10.10.10.66 00-26-18-21-8b-58 undefined
:::10.10.10.95 00-11-d9-5f-f8-ca undefined
:::172.17.42.1 56-84-7a-fe-97-99 ubuntu72
:::192.168.122.1 ca-1d-7f-2a-80-c5 ubuntu72
*ubuntu72:~/monitor/secure.src $ cma/assimcli.py query unknownips *
:::10.10.10.100 MAC(00-c0-48-21-92-9f)
:::10.10.10.12  MAC(00-1e-c0-89-40-7f)
:::10.10.10.21  MAC(6c-62-6d-84-98-4b)
:::10.10.10.254 MAC(c4-3d-c7-a8-1b-5b)
:::10.10.10.66  MAC(00-26-18-21-8b-58)
:::10.10.10.95  MAC(00-11-d9-5f-f8-ca)

The address *10.10.10.5* doesn't have an associated NIC (MAC address),
and it is not included in the "unknown" IPs - and it should be.

We have two different mechanisms to discover IP addresses. One is
through client connections - in which case we typically don't know the
MAC address. The other is through listening to ARP packets - in which
case we will know the MAC address.

In our software, we equate a MAC address with a NIC. It may not be
strictly true, but it's not a bad first approximation ;-).


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Cypher question...

2015-09-01 Thread Alan Robertson

I made the change, and now it returns *every* IP address.

Some it shows as having a NULL nic, but in the database, the nic is 
there - as is the host.


It is now producing about the same results as my "allips" query except 
/much/ faster and without the host information...


On 09/01/2015 09:37 AM, Wes Freeman wrote:

just take out host and make it WHERE NOT ()-[:nicowner]->(nic)


On Tue, Sep 1, 2015 at 10:53 AM, Alan Robertson <mailto:al...@unix.sh>> wrote:


I tried the old syntax, and it said that host was undefined.


On 09/01/2015 08:45 AM, Michael Hunger wrote:

Hi Alan

can you try this:

START ip=node:IPaddrNode('*:*')
OPTIONAL MATCH (nic)-[:ipowner]->(ip)
WHERE NOT ((host)-[:nicowner]->(nic))
RETURN ip, nic
ORDER BY ip.ipaddr

in 2.x syntax

MATCH (ip:IPAddress)
OPTIONAL MATCH (nic)-[:ipowner]->(ip)
WHERE NOT ((host)-[:nicowner]->(nic))
RETURN ip, nic
ORDER BY ip.ipaddr

On Tue, Sep 1, 2015 at 2:43 PM, Alan Robertson mailto:al...@unix.sh>> wrote:

I just read my email, and it didn't seem like I gave good
context and explained things very clearly...

Let me try again and see if I can be a little clearer...

My problem domain is modelling IT environments (data centers,
clouds, etc). In this world, there are IP addresses, ethernet
chips (NICs) [which have MAC addresses], and hosts, to which
NICs are attached. We discover the interrelationships between
these different things. Sometimes we have all the
information, sometimes we have 2/3 of it and sometimes only
1/3 (IP addresses).

So...

I have IPs which are related to NICs, which are related to
(attached to) hosts.

I want to find all the (IP, NIC) pairs which have no
relationship to any host.

Some IPs will have an associated NIC, and some will not.

I want to retrieve all (IP, NIC) pairs where there is an
associated NIC, and (IP, NULL) for the cases where there is
no NIC.

In effect I want to know all the IP addresses which I don't
know everything about...



On 08/31/2015 09:59 PM, Alan Robertson wrote:

Hi,

I have a question about how to write a cypher query...

Here's the query that comes close to working ;-)

START ip=node:IPaddrNode('*:*')
OPTIONAL MATCH host-[:nicowner]->nic-[:ipowner]->ip
WITH ip, nic, host
WHERE host IS NULL
RETURN ip, nic
ORDER BY ip.ipaddr

This always returns ip, NULL. :-(

It returns the right ips, but I would like the nic for the
case that a nic exists in an ipowner relationship to an IP
address.

Sometimes there's just a standalone IP (with no associated NIC)
Sometimes there's an IP, NIC pair
and sometimes there's a host, IP, MAC triple.

I want to return the IP, NIC pair if it exists, and the IP
and NULL if there is no related NIC. But I want the NIC if
    it exists.

How should I do this?

Thanks!

    -- Alan Robertson
al...@unix.sh <mailto:al...@unix.sh>




-- 


Alan Robertson / CTO
al...@assimilationsystems.com
<mailto:al...@assimilationsystems.com>/ +1 303.947.7999


Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the

Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails
from it, send an email to neo4j+unsubscr...@googlegroups.com
<mailto:neo4j+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.



-- 


Alan Robertson / CTO
al...@assimilationsystems.com
<mailto:al...@assimilationsystems.com>/ +1 303.947.7999


Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the

Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to neo4j+unsubscr...@googlegroups.com
<mailto:neo4j+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this

Re: [Neo4j] Cypher question...

2015-09-01 Thread Alan Robertson
I tried the old syntax, and it said that host was undefined.

On 09/01/2015 08:45 AM, Michael Hunger wrote:
> Hi Alan
>
> can you try this:
>
> START ip=node:IPaddrNode('*:*') 
> OPTIONAL MATCH (nic)-[:ipowner]->(ip) 
> WHERE NOT ((host)-[:nicowner]->(nic))
> RETURN ip, nic
> ORDER BY ip.ipaddr
>
> in 2.x syntax
>
> MATCH (ip:IPAddress) 
> OPTIONAL MATCH (nic)-[:ipowner]->(ip)
> WHERE NOT ((host)-[:nicowner]->(nic))
> RETURN ip, nic
> ORDER BY ip.ipaddr
>
> On Tue, Sep 1, 2015 at 2:43 PM, Alan Robertson  <mailto:al...@unix.sh>> wrote:
>
> I just read my email, and it didn't seem like I gave good context
> and explained things very clearly...
>
> Let me try again and see if I can be a little clearer...
>
> My problem domain is modelling IT environments (data centers,
> clouds, etc). In this world, there are IP addresses, ethernet
> chips (NICs) [which have MAC addresses], and hosts, to which NICs
> are attached. We discover the interrelationships between these
> different things. Sometimes we have all the information, sometimes
> we have 2/3 of it and sometimes only 1/3 (IP addresses).
>
> So...
>
> I have IPs which are related to NICs, which are related to
> (attached to) hosts.
>
> I want to find all the (IP, NIC) pairs which have no relationship
> to any host.
>
> Some IPs will have an associated NIC, and some will not.
>
> I want to retrieve all (IP, NIC) pairs where there is an
> associated NIC, and (IP, NULL) for the cases where there is no NIC.
>
> In effect I want to know all the IP addresses which I don't know
> everything about...
>
>
>
> On 08/31/2015 09:59 PM, Alan Robertson wrote:
>> Hi,
>>
>> I have a question about how to write a cypher query...
>>
>> Here's the query that comes close to working ;-)
>>
>> START ip=node:IPaddrNode('*:*')
>> OPTIONAL MATCH host-[:nicowner]->nic-[:ipowner]->ip
>> WITH ip, nic, host
>> WHERE host IS NULL
>> RETURN ip, nic
>> ORDER BY ip.ipaddr
>>
>> This always returns ip, NULL. :-(
>>
>> It returns the right ips, but I would like the nic for the case
>> that a nic exists in an ipowner relationship to an IP address.
>>
>> Sometimes there's just a standalone IP (with no associated NIC)
>> Sometimes there's an IP, NIC pair
>> and sometimes there's a host, IP, MAC triple.
>>
>> I want to return the IP, NIC pair if it exists, and the IP and
>> NULL if there is no related NIC. But I want the NIC if it exists.
>>
>> How should I do this?
>>
>> Thanks!
>>
>> -- Alan Robertson
>>al...@unix.sh <mailto:al...@unix.sh>
>>
>>
>>
>>
>> -- 
>>
>> Alan Robertson / CTO
>> al...@assimilationsystems.com
>> <mailto:al...@assimilationsystems.com>/ +1 303.947.7999
>> 
>>
>> Assimilation Systems Limited
>> http://AssimilationSystems.com
>>
>> Twitter <https://twitter.com/ossalanr> Linkedin
>> <https://www.linkedin.com/in/alanr> skype
>> <https://htmlsig.com/skype?username=alanr_unix.sh>
>>
>> -- 
>> You received this message because you are subscribed to the
>> Google Groups "Neo4j" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to neo4j+unsubscr...@googlegroups.com
>> <mailto:neo4j+unsubscr...@googlegroups.com>.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> -- 
>
> Alan Robertson / CTO
> al...@assimilationsystems.com
> <mailto:al...@assimilationsystems.com>/ +1 303.947.7999
> 
>
> Assimilation Systems Limited
> http://AssimilationSystems.com
>
> Twitter <https://twitter.com/ossalanr> Linkedin
> <https://www.linkedin.com/in/alanr> skype
> <https://htmlsig.com/skype?username=alanr_unix.sh>
>
> -- 
>     You received this message because you are subscribed to the Google
> Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to neo4j+unsubscr...@googlegroups.com
> <mailto:neo4j+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.
>
>
> -- 
> You received this message because you are subscribed to the Go

Re: [Neo4j] Cypher question...

2015-09-01 Thread Alan Robertson
I just read my email, and it didn't seem like I gave good context and
explained things very clearly...

Let me try again and see if I can be a little clearer...

My problem domain is modelling IT environments (data centers, clouds,
etc). In this world, there are IP addresses, ethernet chips (NICs)
[which have MAC addresses], and hosts, to which NICs are attached. We
discover the interrelationships between these different things.
Sometimes we have all the information, sometimes we have 2/3 of it and
sometimes only 1/3 (IP addresses).

So...

I have IPs which are related to NICs, which are related to (attached to)
hosts.

I want to find all the (IP, NIC) pairs which have no relationship to any
host.

Some IPs will have an associated NIC, and some will not.

I want to retrieve all (IP, NIC) pairs where there is an associated NIC,
and (IP, NULL) for the cases where there is no NIC.

In effect I want to know all the IP addresses which I don't know
everything about...


On 08/31/2015 09:59 PM, Alan Robertson wrote:
> Hi,
>
> I have a question about how to write a cypher query...
>
> Here's the query that comes close to working ;-)
>
> Konsole output
> START ip=node:IPaddrNode('*:*')
> OPTIONAL MATCH host-[:nicowner]->nic-[:ipowner]->ip
> WITH ip, nic, host
> WHERE host IS NULL
> RETURN ip, nic
> ORDER BY ip.ipaddr
>
> This always returns ip, NULL. :-(
>
> It returns the right ips, but I would like the nic for the case that a
> nic exists in an ipowner relationship to an IP address.
>
> Sometimes there's just a standalone IP (with no associated NIC)
> Sometimes there's an IP, NIC pair
> and sometimes there's a host, IP, MAC triple.
>
> I want to return the IP, NIC pair if it exists, and the IP and NULL if
> there is no related NIC. But I want the NIC if it exists.
>
> How should I do this?
>
> Thanks!
>
> -- Alan Robertson
>al...@unix.sh
>
>
>
>
> -- 
>
> Alan Robertson / CTO
> al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/
> +1 303.947.7999
>
> Assimilation Systems Limited
> http://AssimilationSystems.com
>
> Twitter <https://twitter.com/ossalanr> Linkedin
> <https://www.linkedin.com/in/alanr> skype
> <https://htmlsig.com/skype?username=alanr_unix.sh>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to neo4j+unsubscr...@googlegroups.com
> <mailto:neo4j+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Cypher question...

2015-08-31 Thread Alan Robertson
Hi,

I have a question about how to write a cypher query...

Here's the query that comes close to working ;-)

Konsole output
START ip=node:IPaddrNode('*:*')
OPTIONAL MATCH host-[:nicowner]->nic-[:ipowner]->ip
WITH ip, nic, host
WHERE host IS NULL
RETURN ip, nic
ORDER BY ip.ipaddr

This always returns ip, NULL. :-(

It returns the right ips, but I would like the nic for the case that a
nic exists in an ipowner relationship to an IP address.

Sometimes there's just a standalone IP (with no associated NIC)
Sometimes there's an IP, NIC pair
and sometimes there's a host, IP, MAC triple.

I want to return the IP, NIC pair if it exists, and the IP and NULL if
there is no related NIC. But I want the NIC if it exists.

How should I do this?

Thanks!

-- Alan Robertson
   al...@unix.sh




-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Batch weirdness with current py2neo

2015-08-19 Thread Alan Robertson
I turned on Nigel's debugging. This is the error this time (same but
different node number mentioned)
BatchError: Batch job 2 failed with NotFoundException
Node 35832 not found
Here's what Nigel's debugging says:

> Sending batch request with 3 jobs
> {0} POST node
{"domain":"global","nodetype":"Person","firstname":"Annika","lastname":"Hansen","time_create_iso8601":"2015-08-18
20:28:46","time_create_ms":1439929726819,"dateofbirth":"unknown"}
> {1} POST {0}/relationships {"to":"node/35910","type":"IS_A"}
> {2} POST index/node/Person?uniqueness=create_or_fail
{"value":"Annika","key":"Hansen","uri":"{0}"}
< Received batch response for 3 jobs
< {0} 201 http://localhost:7474/db/data/'
ref=u'node/35917' labels=set([]) properties={u'domain': u'global', u'node
type': u'Person', u'firstname': u'Annika', u'lastname': u'Hansen',
u'time_create_iso8601': u'2015-08-18 20:28:46', u'time_create_
ms': 1439929726819, u'dateofbirth': u'unknown'}>
< {1} 201 http://localhost:7474/db/data/'
ref=u'relationship/60444' start=u'node/35917' end=u'node/35910' t
ype=u'IS_A' properties={}>
It points to the problem as being with the index/node/Person update.


On 08/17/2015 11:50 AM, Alan Robertson wrote:
> Hi,
>
> Twice I've tried to convert to py2neo 2.x. Both times I ran into this
problem. The first time I had to revert the 2.0 changes and put out the
release anyway. This time I'm sticking with it until I get past it
somehow...
>
> The symptom is that I get this result from a transaction:
>
> BatchError: Batch job 2 failed with NotFoundException
> Node 34950 not found
>
> I can assure you that the number 34950 does not appear anywhere in my
code (I put in lots of debug). The transaction consists of three things:
> Create a new node
> Relate the newly created node to an old node (which has node id
35031).
> Insert the newly-created node into a legacy index.
>
> This all works with the 1.6 series of code.
>
> Here's a little of the debug from the transaction:
>  Performing
batch.create(0:({dateofbirth:"unknown",domain:"global",
firstname:"Annika", lastname:"Hansen",
nodetype:"Person",time_create_iso8601:"2015-08-17 17:23:50",
time_create_ms:1439832230360})) - for new node
>  RELATIONSHIP(0 -[IS_A]-> (n35031
{domain:"metadata",name:"Person",nodetype:"CMAclass"}))
>  add_to_index_or_fail: node 0; index Index(Node,
u'http://localhost:7474/db/data/index/node/Person')("Hansen","Annika")
> Here's the explanation of the debug output:
> The 0 in "batch.create(0:(..." means that this newly-created node has
index 0 in the transaction (as it should).
> The "RELATIONSHIP(0 -[IS_A]-> (n35031 {..." means that we created a
relationship between a node 0 and a Py2neo Node whose id is 35031.
> The "add_to_index_or_fail" line means we called the
legacy.add_to_index_or_fail function on node 0, putting it into the
Person legacy index with the values "Hansen" and "Annika" as the index
values.
>
> This is all exactly the same code which worked before. I mainly added
"legacy." to a bunch of calls, changed a few imports and added more
debug when it didn't work.
>
> This looks a bit like a bug in py2neo to me.  Suggestions on how to
proceed?
> --
>
> Alan Robertson / CTO
> al...@assimilationsystems.com / +1 303.947.7999
>
> Assimilation Systems Limited
> http://AssimilationSystems.com
>
> Twitter Linkedin skype
> --
> You received this message because you are subscribed to the Google
Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send
an email to neo4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


-- 

Alan Robertson / CTO
al...@assimilationsystems.com / +1 303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter Linkedin skype

-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Batch weirdness with current py2neo

2015-08-17 Thread Alan Robertson
Hi,

Twice I've tried to convert to py2neo 2.x. Both times I ran into this
problem. The first time I had to revert the 2.0 changes and put out the
release anyway. This time I'm sticking with it until I get past it
somehow...

The symptom is that I get this result from a transaction:
Konsole output

BatchError: Batch job 2 failed with NotFoundException
Node 34950 not found

I can assure you that the number 34950 does not appear anywhere in my
code (I put in lots of debug). The transaction consists of three things:
Create a new node
Relate the newly created node to an old node (which has node id 35031).
Insert the newly-created node into a legacy index.

This all works with the 1.6 series of code.

Here's a little of the debug from the transaction:
Konsole output
 Performing batch.create(0:({dateofbirth:"unknown",domain:"global",
firstname:"Annika", lastname:"Hansen",
nodetype:"Person",time_create_iso8601:"2015-08-17 17:23:50",
time_create_ms:1439832230360})) - for new node
Konsole output
 RELATIONSHIP(0 -[IS_A]-> (n35031
{domain:"metadata",name:"Person",nodetype:"CMAclass"}))
Konsole output
 add_to_index_or_fail: node 0; index Index(Node,
u'http://localhost:7474/db/data/index/node/Person')("Hansen","Annika")

Here's the explanation of the debug output:
The 0 in "batch.create(*0*:(..." means that this newly-created node has
index 0 in the transaction (as it should).
The "RELATIONSHIP(0 -[IS_A]-> (n35031 {..." means that we created a
relationship between a node 0 and a Py2neo Node whose id is 35031.
The "add_to_index_or_fail" line means we called the
legacy.add_to_index_or_fail function on node 0, putting it into the
Person legacy index with the values "Hansen" and "Annika" as the index
values.

This is all exactly the same code which worked before. I mainly added
"legacy." to a bunch of calls, changed a few imports and added more
debug when it didn't work.

This looks a bit like a bug in py2neo to me.  Suggestions on how to proceed?


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Re: need py2neo introspection on query results

2015-08-17 Thread Alan Robertson
OK. It used to be an attribute of the individual rows as well. That went
away.

That's what I'd been using.



On 08/16/2015 01:38 AM, Nigel Small wrote:
> The *RecordList* returned from *cypher.execute* has a *columns*
> attribute that contains this information:
>
> >>> rl = graph.cypher.execute("MERGE (a:Person) RETURN a")
> >>> rl.columns
> ('a',)
>
> It looks like this has not been included in the docs though for some
> reason so I'll get that added in.
>
> Nigel
>
> On 14 August 2015 at 20:36, Alan Robertson  <mailto:al...@unix.sh>> wrote:
>
> Hi Nigel,
>
> There is an issue what has caused me grief nearly every release
> you've put out.
>
> When one issues a cypher stream query, there is some kind of an
> object which you return which has rows and columns. Its name has
> changed from time to time, and its structure has changed from time
> to time.
>
> But there is one thing which I need and which you have never
> provided in a way that works from release to release. As a result,
> I've had to do delve into your source code and create a series of
> hacks to do this for me.
>
> I need to know (introspect) the names of the columns in the return
> result from the query. This is a very reasonable thing to want to
> know. I think in the 2.6 releases you called it "columns". Now, it
> appears that the only way to get the list of columns (labels,
> whatever) from the result of a query is to use this expression:
> row.__producer__.columns
>
> Pylint objects to my doing this, as it should. And I object to
> having to do this as well. Because this is at least the 3rd
> iteration of how one goes about getting the list of columns from
> the result of a Cypher query.
>
> Since I'm building an API on top of your API -- without parsing
> and understanding Cypher (which has even *more* pitfalls), of
> knowing what columns are going to come back from the query.  So, I
> need to introspect the results of the Cypher return result.
>
> *Could you have mercy on me and provide a stable and documented
> interface for returning the names of the columns from the result
> of a Cypher query?*
>
> Thanks!
>
>
> -- 
>
> Alan Robertson / CTO
> al...@assimilationsystems.com
> <mailto:al...@assimilationsystems.com>/ +1 303.947.7999
> 
>
> Assimilation Systems Limited
> http://AssimilationSystems.com
>
> Twitter <https://twitter.com/ossalanr> Linkedin
> <https://www.linkedin.com/in/alanr> skype
> <https://htmlsig.com/skype?username=alanr_unix.sh>
>
>


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] need py2neo introspection on query results

2015-08-14 Thread Alan Robertson
Hi Nigel,

There is an issue what has caused me grief nearly every release you've
put out.

When one issues a cypher stream query, there is some kind of an object
which you return which has rows and columns. Its name has changed from
time to time, and its structure has changed from time to time.

But there is one thing which I need and which you have never provided in
a way that works from release to release. As a result, I've had to do
delve into your source code and create a series of hacks to do this for me.

I need to know (introspect) the names of the columns in the return
result from the query. This is a very reasonable thing to want to know.
I think in the 2.6 releases you called it "columns". Now, it appears
that the only way to get the list of columns (labels, whatever) from the
result of a query is to use this expression:
row.__producer__.columns

Pylint objects to my doing this, as it should. And I object to having to
do this as well. Because this is at least the 3rd iteration of how one
goes about getting the list of columns from the result of a Cypher query.

Since I'm building an API on top of your API -- without parsing and
understanding Cypher (which has even *more* pitfalls), of knowing what
columns are going to come back from the query.  So, I need to introspect
the results of the Cypher return result.

*Could you have mercy on me and provide a stable and documented
interface for returning the names of the columns from the result of a
Cypher query?*

Thanks!


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] How to have Object-Graph mapping (OGM) as an analogous to Object-Relational mapping (ORM) ?

2015-06-06 Thread Alan Robertson
I have also built an implementation of this on top of the rest of
Py2neo, and I /love/ how it simplifies the rest of my code. It's similar
to the py2neo version of it, but is simpler to use and includes
transactions. Source for it is here:

http://hg.linux-ha.org/assimilation/file/tip/cma/store.py

It needs a little work to do everything one might need - which I'll no
doubt get around to ;-).

It also includes transactional semantics through the REST interface.  I
haven't compared it to the spring implementation.

You basically create python objects (using the interface), and from then
on, you only worry about your objects (not Neo4j), then when you're
ready, you commit the transaction you created. I think this was also
included in a talk I gave at GraphConnect a couple of years ago.


The basic idea is like this:
obj = store.load_or_create(constructor parameters) # instead of
calling a constructor
obj.attribute = value # and so on
store.commit()

The only real oddity that the object can't set any attributes that Neo4j
won't support in a node. That can be pretty restrictive, but not much I
can do about that... If you want to set a temporary attribute that I
won't try and write to the database, start it with an _ in it's name. Of
course there are abilities to query, and create relationships, and so on.

The most surprising thing is a Neo4j node can't have an empty array as
an attribute. It can be None, or it can be an array of ints or strings,
but it can't be empty...

Email me directly if you have questions.



On 05/20/2015 10:49 AM, Gelli Ravikumar wrote:
> Hello to all,
>
> I am looking for the concept of how to develop a Object-Graph mapping
> (OGM) as an analogous to Object-Relational mapping (ORM).
>
> However, I have came across some information from these links: 
>
>  1. http://py2neo.org/2.0/ext/ogm.html
>  2. http://nigelsmall.com/py2neo/1.6/ogm/
>  3. http://www.slideshare.net/neo4j/ogm-withsdn30
>  4. https://vimeo.com/80618455
>  5. 
> https://github.com/spring-projects/spring-data-neo4j/tree/4.0/neo4j-ogm/src/main/java/org/neo4j/ogm
> 6.
>
> But, if there are any other references to get to know a deeper
> understanding of OGM, please post them here.
>
> Also, if there are any comparisons for ORM and OGM, please let me know.
>
> Thanks so much for your reply!
>
>
>
>
>
>
>
>
> --
> with Regards
> 
> Gelli Ravikumar
> Research Scholar (Ph.D),
> Field Computations Lab,
> Dept. of Electrical Engineering,
> IIT Bombay, Powai, Mumbai 400076
> Ph: 022-2576 4424, 089 765 983 96
> My publications: http://tinyurl.com/gelliPapers
>
> Gandhian Young Technological Innovation Award - 2013
> POSOCO Power System Award: PPSA - 2013
> IITB PhD Executive Member - 2013-14
> IITB SARC Core Technical Member - 2014-15
>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to neo4j+unsubscr...@googlegroups.com
> <mailto:neo4j+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.


-- 

Alan Robertson / CTO
al...@assimilationsystems.com <mailto:al...@assimilationsystems.com>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Having trouble adding batch labels with py2neo 1.6.4

2015-01-08 Thread Alan Robertson
Hi,

I'm adding code to add labels to the nodes I create.  All the updates I
perform are through batch operations.  When I try this, I get an
"Unsupported URI scheme None" error.

Here's the code I'm running:
print >> sys.stderr, 'ADDING LABELS for', type(node),
cls.__meta_labels__()
self.batch.add_labels(node, *cls.__meta_labels__())

[I tried the code with and without the */*/* -- it makes no difference]

cls.__meta_labels__() returns an array/list of strings (one in the case
below):

The results of running it are below:
USING PYTHON VERSION 2.7.8 (default, Oct 20 2014, 15:05:19)
[GCC 4.9.1]
USING NEO4J VERSION (2, 1, 3, u'')
USING py2neo VERSION 1.6.4
*ADDING LABELS for  ['Class_CMAclass']*
cma.tests.store_test TestCreateOps.test_drone ... error:
cma.tests.store_test TestCreateOps.test_drone
Traceback (most recent call last):
  File "./cma/tests/store_test.py", line 210, in test_drone
store = initstore()
  File "./cma/tests/store_test.py", line 202, in initstore
CMAinit(None)
  File "cma/cmainit.py", line 95, in __init__
CMAdb.store.commit()
  File "cma/store.py", line 967, in commit
self._batch_construct_add_labels()  # Not sure what these return
  File "cma/store.py", line 830, in _batch_construct_add_labels
self.batch.add_labels(node, *cls.__meta_labels__())
  File "/usr/local/lib/python2.7/dist-packages/py2neo/neo4j.py", line
2923, in add_labels
uri = self._uri_for(node, "labels")
  File "/usr/local/lib/python2.7/dist-packages/py2neo/neo4j.py", line
2615, in _uri_for
offset = len(resource.service_root.graph_db.__uri__)
  File "/usr/local/lib/python2.7/dist-packages/py2neo/neo4j.py", line
462, in graph_db
return GraphDatabaseService.get_instance(self.__metadata__["data"])
  File "/usr/local/lib/python2.7/dist-packages/py2neo/neo4j.py", line
338, in __metadata__
self.refresh()
  File "/usr/local/lib/python2.7/dist-packages/py2neo/neo4j.py", line
360, in refresh
self._metadata = ResourceMetadata(self._get().content)
  File "/usr/local/lib/python2.7/dist-packages/py2neo/neo4j.py", line
365, in _get
product=self._product)
  File
"/usr/local/lib/python2.7/dist-packages/py2neo/packages/httpstream/http.py",
line 803, in get
return rq.submit(redirect_limit=redirect_limit, **kwargs)
  File
"/usr/local/lib/python2.7/dist-packages/py2neo/packages/httpstream/http.py",
line 388, in submit
http, rs = submit(self.method, uri, self.body, headers)
  File
"/usr/local/lib/python2.7/dist-packages/py2neo/packages/httpstream/http.py",
line 264, in submit
raise ValueError("Unsupported URI scheme " + repr(uri.scheme))
*ValueError: Unsupported URI scheme None*

Suggestions?

Thanks in advance!

-- Alan Robertson
al...@unix.sh

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Fwd: Neo4j.rb 3.0 Release Candidates

2014-09-26 Thread Alan Robertson
Hi Brian,

Are there Ubuntu and/or RedHat packages for these release candidates?

2.0 testing wasn't very good. 2.0.0 was broken out of the gate and it
took a few months for 2.0.1 to come out.

Earlier I sent a Dockerfile that runs tests using Neo4j and py2neo.  If
something like this had been done for 2.0, that would have caught the
problems before they came out.

Are you considering doing better testing using some of the bindings? 
[Hint:  feel free to use my Dockerfile :-D]

    -- Alan Robertson
al...@unix.sh


On 09/24/2014 04:33 PM, Michael Hunger wrote:
>
> -- Forwarded message --
> From: *Brian Underwood*  <mailto:br...@semi-sentient.com>>
> Date: Wed, Sep 24, 2014 at 10:22 PM
> Subject: Re: Neo4j.rb 3.0 Release Candidates
> To: neo4...@googlegroups.com <mailto:neo4...@googlegroups.com>
>
>
> Quick update for those that are following, we release new release
> candidates for neo4j and neo4j-core yesterday which we plan on making
> the final candidates.  Try them out (or continue to update from master
> if you're running off the latest from github) and let us know if you
> have any problems before we make a final release!
>
> One big change is that UUIDs (primary keys) are now on by default in
> your models, so you'll need to run a migration if you've been using a
> previous release candidate.  See:
> https://github.com/neo4jrb/neo4j/wiki/Neo4j-v3-Migrations#add_id_property
>
> Some neo4j gem changes:
> * UUIDs are now automatically specified on models as neo IDs won't be
> reliable
> in future versions of neo4j
> * Migrations now supported (including built-in migrations to migrate
> UUIDs and
> insert the _classname property which is used for performance)
> * Association reflection
> * Model.find supports ids/node objects as well as arrays of id/node
> objects
> * rake tasks now get automatically included into rails app
>
> Some neo4j-core gem changes:
> * Misc fixes
> * Changes to support neo4j gem
> * Using faraday gem with net-http-persistent instead of httparty
>
> Brian
> ;p
>
> On Mon, Sep 1, 2014 at 9:11 AM, Chris Grigg  <mailto:ch...@subvertallmedia.com>> wrote:
> > We have entered the RC stage and just released RC3! Lots of updates,
> more
> > coming almost every day. Changes since RC1, last Wednesday.
> >
> > == 3.0.0.rc.3
> > * Thread safety improvements
> > * Scope and general refactoring
> > * Added ability to create relationships on init (persisted on save)
> >
> > == 3.0.0.rc.2
> > * Use newer neo4j-core release
> >
> > == 3.0.0.rc.1
> > * Support for count, size, length, empty, blank? for has_many
> relationship
> > * Support for rails logger of cypher queries in development
> > * Support for distinct count
> > * Optimized methods:
> > https://github.com/andreasronge/neo4j/wiki/Optimized-Methods
> > * Queries should respect mapped label names (#421)
> > * Warn if no session is available
> > * Fix broken == and equality (#424)
> >
> > The gem and all related projects have also been moved to a Github
> > Organization, https://github.com/neo4jrb.
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups
> > "neo4jrb" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send an
> > email to neo4jrb+unsubscr...@googlegroups.com
> <mailto:neo4jrb%2bunsubscr...@googlegroups.com>.
> > To post to this group, send email to neo4...@googlegroups.com
> <mailto:neo4...@googlegroups.com>.
> > Visit this group at http://groups.google.com/group/neo4jrb.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google
> Groups "neo4jrb" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to neo4jrb+unsubscr...@googlegroups.com
> <mailto:neo4jrb%2bunsubscr...@googlegroups.com>.
> To post to this group, send email to neo4...@googlegroups.com
> <mailto:neo4...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/neo4jrb.
> For more options, visit https://groups.google.com/d/optout.
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to neo4j+unsubscr...@googlegroups.com
> <mailto:neo4j+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Neo4j Monitoring Practices

2014-09-05 Thread Alan Robertson
Hi,

If all you need is to tell if it's operating correctly (like for
alerting), I wrote an OCF resource agent for that:
http://hg.linux-ha.org/assimilation/file/tip/ocf/neo4j

It performs a simple query and verifies the result.

    -- Alan Robertson
al...@unix.sh


On 09/03/2014 11:19 AM, Avindra Goolcharan wrote:
> Hi,
>
> Are there standard practices for monitoring Neo4j? JMX is quite
> confusing... perhaps someone can point me to documentation regarding that.
>
> My goal is to check Neo4j status from a regular linux command line.
>
> Thanks,
>
> Avindra.
> -- 
> You received this message because you are subscribed to the Google
> Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to neo4j+unsubscr...@googlegroups.com
> <mailto:neo4j+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Add more than one relationship type

2014-09-03 Thread Alan Robertson
Any given relationship is of exactly one type.

Two nodes can have any number of relationships of different types
between them.

Relationships can also have attributes - a potentially large number of
attributes.


On 09/03/2014 06:57 AM, Jeyaganeshan Jeyatharsini wrote:
> Am I able to add more than one relationship type to relationships in
> neo4j?
> -- 
> You received this message because you are subscribed to the Google
> Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to neo4j+unsubscr...@googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Configure a path for storing logical logs?

2014-08-29 Thread Alan Robertson
I haven't watched neo4j run for long periods of time, but I would try 
this to start:

- put everything on HDD
- shut down Neo4j
- move everything under graph.db, keystore, and possibly rrd on SSD
- create symlinks for the graph.db directory and the keystore and 
possibly rrd files
- create a symlink from messages.log back to somewhere on HDD [but 
see notes below]

- start Neo4j back up again
- create a github issue for Neo4j to put *all* log files under the 
log directory - or better yet see my file location note below


However, this won't work the way it should if Neo4j is constantly 
creating new messages.log files under graph.db


If it does, then you could create a cron job to move old ones back to 
SSD.  Most apps never reference the old log files.  You could use 
Michael Hunger's suggestion to limit the size of messages.log file.


To tell the truth, I really don't like the idea that they mix code and 
data in the same directory structure during install.  That's generally a 
bad practice - kind of Windows 3.11 thinking - where everyone just 
slapped everything under C:\  That went out in the last millennium.


Apps should be able to locate things into three areas:
apps - which should go in the standard place for the OS [NOT /var]
data - which should default to a standard location but be be 
controllable
logs - which should go into a standard location for the OS - or 
better yet use the OS logging mechanism [like syslog]
 and you should probably use logrotate for those OSes that 
use it.


Linux and I suspect POSIX has standards for these things, and they don't 
mix everything together on /var.


A note about using syslog -- if your app is going to log a lot, it can 
get blocked by syslog calls - so you may want to log in a separate 
process or thread



On 08/28/2014 10:52 PM, Frandro wrote:

Do I have to link newly created files via symlinks?

They are growing really fast.

2014년 8월 29일 금요일 오전 9시 34분 8초 UTC+9, AlanR 님의 말:

Run it on a Linux/UNIX system and use symlinks :-D. Symlinks are
your friend.

There's probably also a config option -- but this is universal --
and easy.


On 08/28/2014 06:29 PM, Frandro wrote:

Logical logs are big files as you know.

I'd like to separate them from the database file as follows since
SSD costs a lot.

Graph DB main files are stored in an SSD partition.
Logical log files are stored in a HDD partition.

Is it possible?


-- 
You received this message because you are subscribed to the

Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to neo4j+un...@googlegroups.com .
For more options, visit https://groups.google.com/d/optout
.


--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to neo4j+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Configure a path for storing logical logs?

2014-08-28 Thread Alan Robertson
Run it on a Linux/UNIX system and use symlinks :-D.  Symlinks are your 
friend.


There's probably also a config option -- but this is universal -- and easy.


On 08/28/2014 06:29 PM, Frandro wrote:

Logical logs are big files as you know.

I'd like to separate them from the database file as follows since SSD 
costs a lot.


Graph DB main files are stored in an SSD partition.
Logical log files are stored in a HDD partition.

Is it possible?


--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to neo4j+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Alchemy.js - Graph Visualization for the Web

2014-08-28 Thread Alan Robertson
I was just trying to encourage the folks at Alchemy.js to consider 
addressing them - not intending to criticize the demo.


Sorry if it came across otherwise.


On 08/28/2014 06:22 PM, Michael Hunger wrote:

Right but none of those was ever focus for this demo.
We should take that topic into a different thread.

For your second question there was an excellent post on that topic lately:
http://npzr.tumblr.com/post/93209569476/graph-visualization-is-harder-than-it-needs-to-be

Michael

Am 29.08.2014 um 02:18 schrieb Alan Robertson <mailto:al...@unix.sh>>:


One thing that's a concern for my application is security -- and I 
doubt that Neo4j will ever have the right kind of security for 
user-level access.  This is often the case -- because the 
application's visibility rules are typically domain-specific.


Most web apps I know of implement their own security (RBAC or 
similar) - and don't allow direct access to the database because of 
security concerns.


The other aspect that my app has which is a more general problem with 
rich and complex graphs is that it's hard to know what to present 
that would give insight -- and not make the user run for the door 
with a headache because of the complexity of the display.


If you have ideas on how to solve these things in general that would 
be awesome!




On 08/28/2014 03:18 PM, Huston Hedinger wrote:

Hi Everyone,

There seems to be a lot of questions about open source technologies 
for building graph/network visualization apps.  I wanted to make you 
aware of our application Alchemy.js 
<http://graphalchemist.github.io/Alchemy/>.


Alchemy makes it easy to create graph viz apps with search, 
filtering, and other features completely through configuration.  e.g.

`Alchemy.begin({some_config});`

You can find the website for Alchemy.js here 
<http://graphalchemist.github.io/Alchemy/>, the docs are here 
<http://graphalchemist.github.io/Alchemy/docs/>, and the repo is 
here <http://github.com/GraphAlchemist/alchemy>.


We are heavily considering out of the box support for Neo4j if the 
community feels that there would be value in it.  Feel free to let 
us know!


Huston

--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, 
send an email to neo4j+unsubscr...@googlegroups.com 
<mailto:neo4j+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.



--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, 
send an email to neo4j+unsubscr...@googlegroups.com 
<mailto:neo4j+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to neo4j+unsubscr...@googlegroups.com 
<mailto:neo4j+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Alchemy.js - Graph Visualization for the Web

2014-08-28 Thread Alan Robertson
One thing that's a concern for my application is security -- and I doubt 
that Neo4j will ever have the right kind of security for user-level 
access.  This is often the case -- because the application's visibility 
rules are typically domain-specific.


Most web apps I know of implement their own security (RBAC or similar) - 
and don't allow direct access to the database because of security concerns.


The other aspect that my app has which is a more general problem with 
rich and complex graphs is that it's hard to know what to present that 
would give insight -- and not make the user run for the door with a 
headache because of the complexity of the display.


If you have ideas on how to solve these things in general that would be 
awesome!




On 08/28/2014 03:18 PM, Huston Hedinger wrote:

Hi Everyone,

There seems to be a lot of questions about open source technologies 
for building graph/network visualization apps.  I wanted to make you 
aware of our application Alchemy.js 
.


Alchemy makes it easy to create graph viz apps with search, filtering, 
and other features completely through configuration.  e.g.

`Alchemy.begin({some_config});`

You can find the website for Alchemy.js here 
, the docs are here 
, and the repo is here 
.


We are heavily considering out of the box support for Neo4j if the 
community feels that there would be value in it.  Feel free to let us 
know!


Huston

--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to neo4j+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] SDN: Node not created

2014-08-25 Thread Alan Robertson
I have a similar issue - but *only* on RHEL 6 installed via the RPM.  
But I don't have it on any other platform or installation method.  So, 
it doesn't sound like the same problem.



On 08/25/2014 09:49 AM, Moop wrote:

I'm on Windows 8.1.

I installed Neo4j 2.1.2 Community (dev mode i.e. not the .exe file) 
and using it in the embedded mode.


I hope these info help you figure our the problem.
--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to neo4j+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] SDN: Node not created

2014-08-25 Thread Alan Robertson

What OS are you testing on, and how did you install Neo4j?



On 08/25/2014 01:15 AM, Moop wrote:
I'm getting a strange behaviour in trying to set up and run an Spring 
Data Neo4j project.


Here is my starting simple 
project: https://github.com/MohamedNadjibMAMI/Spring-Data-Neo4j


I created a test that creates two nodes and checks if one of them is 
created. The tests fails saying that (Full console message here 
):
/org.springframework.dao.DataRetrievalFailureException: Node 1204 not 
found; nested exception is org.neo4j.graphdb.NotFoundException: Node 1 
not found/


/
/
The problem is that only the label and one property have been saved:
/
/



What am I missing right here?

PS: I tried to deploy the same project manually to Tomcat 6 but I got 
another problem (lock taken by another process). This will possibly go 
to another post, and depends on your help here.

/
/
--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to neo4j+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Re: Efficient way to query for cliques & possibility of undirected edges

2014-08-25 Thread Alan Robertson
I'm not sure what you mean by "belong to different classes".  Perhaps 
others have the same confusion.



On 08/25/2014 06:56 AM, Mohana Krishna wrote:
Thanks for the info. Any help regarding the 2nd question? (efficient 
way of querying for cliques of different sizes such that each of the 
nodes in a clique belong to different class)


On Saturday, 23 August 2014 20:02:17 UTC+5:30, Mohana Krishna wrote:

1) Does Neo4j allow undirected edges between two nodes? If so,
what is syntax?

2) I want to query my graph db to find cliques of fixed size but
each node in the clique is of different class.
Eg: If there are nodes of three classes say A,B,C,D in graph db, I
wish to find all size-3 cliques and size-4 cliques such that each
of nodes in a given clique belong to different classes.

 I was not able to formulate query precisely. What is the
*efficient way* of querying this?


Somebody please help. Thanks.

--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to neo4j+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Ubuntu 14.04 warnings upon start of service

2014-08-20 Thread Alan Robertson
But that's not how neo4j gets started, in all likelihood.  The fact that 
you're getting different results points to the same conclusion.


Most likely, it gets started as root (that part is certain), then it 
reads its config, and changes use id of the running process to neo4j.


This is not an Ubuntu thing - or even a Linux thing -- it's a UNIX thing.


On 08/20/2014 12:41 PM, Daniel Wertheim wrote:
If I am root and do "su neo4j" and then check the limig "ulimit -n" 
it's correct.


On Wednesday, 20 August 2014 14:04:36 UTC+2, AlanR wrote:

From what I know, those things are affected by the userid *you
start as*, not by the userid you become.

Changing userid (except if you do an su - neo4j "startup script")
does not change your inherited limits (or at least that's what I
recall).

So, I suspect if you use a userid there, it has to be root - not
neo4j.  That's what I recall that I did that worked. [Then I did a
complete reinstall, and haven't looked at it since then].


-- Alan Robertson
al...@unix.sh 

On 08/20/2014 12:51 AM, Johannes Mockenhaupt wrote:

If you're using the tar achive from the Neo4j website (as opposed
to a .deb package): did you set the 'wrapper.user=' variable in
'conf/neo4j-wrapper.conf?'

Am Dienstag, 19. August 2014 21:23:42 UTC+2 schrieb Daniel Wertheim:

Still the same.

//Daniel

On Tuesday, 19 August 2014 09:58:12 UTC+2, Stefan Armbruster
wrote:

Regarding the first warning: on Ubuntu you need to set
the limits in a
seperate file within `/etc/security/limits.d` directory.
E.g. I'm
using `/etc/security/limits.d/neo4j.conf` with these
contents:
*   softnofile  4
*   hardnofile  4

Cheers,
Stefan

2014-08-18 21:14 GMT+02:00 Daniel Wertheim
:
> After install, the service and all is running under the
neo4j user, but when
> restarting the service there are two warnings being
promted.
>
> The first one: "Warning: Max 1024 open files"; has
various suggestions
> on Stackoverflow and the manual I followed the steps
listed in the manual
> but when restarting the service (I have tried to reboot
as well), it still
> prompts about the same number of files.
>
> The second: "Warning: not changing user".
>
> Anyone that has input on how to actually solve these
two warnings? For the
> first warning people seem to configure it for root
instead of neo4j, but
> that feels wrong.
>
> //Daniel
>
> --
> You received this message because you are subscribed to
the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving
emails from it, send an
> email to neo4j+un...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the

Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to neo4j+un...@googlegroups.com .
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.


--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to neo4j+unsubscr...@googlegroups.com 
<mailto:neo4j+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Ubuntu 14.04 warnings upon start of service

2014-08-20 Thread Alan Robertson
From what I know, those things are affected by the userid *you start 
as*, not by the userid you become.


Changing userid (except if you do an su - neo4j "startup script") does 
not change your inherited limits (or at least that's what I recall).


So, I suspect if you use a userid there, it has to be root - not neo4j.  
That's what I recall that I did that worked. [Then I did a complete 
reinstall, and haven't looked at it since then].



-- Alan Robertson
al...@unix.sh

On 08/20/2014 12:51 AM, Johannes Mockenhaupt wrote:
If you're using the tar achive from the Neo4j website (as opposed to a 
.deb package): did you set the 'wrapper.user=' variable in 
'conf/neo4j-wrapper.conf?'


Am Dienstag, 19. August 2014 21:23:42 UTC+2 schrieb Daniel Wertheim:

Still the same.

//Daniel

On Tuesday, 19 August 2014 09:58:12 UTC+2, Stefan Armbruster wrote:

Regarding the first warning: on Ubuntu you need to set the
limits in a
seperate file within `/etc/security/limits.d` directory. E.g. I'm
using `/etc/security/limits.d/neo4j.conf` with these contents:
*   softnofile  4
*   hardnofile  4

Cheers,
Stefan

2014-08-18 21:14 GMT+02:00 Daniel Wertheim :
> After install, the service and all is running under the
neo4j user, but when
> restarting the service there are two warnings being promted.
>
> The first one: "Warning: Max 1024 open files"; has
various suggestions
> on Stackoverflow and the manual I followed the steps listed
in the manual
> but when restarting the service (I have tried to reboot as
well), it still
> prompts about the same number of files.
>
> The second: "Warning: not changing user".
>
> Anyone that has input on how to actually solve these two
warnings? For the
> first warning people seem to configure it for root instead
of neo4j, but
> that feels wrong.
>
> //Daniel
>
> --
> You received this message because you are subscribed to the
Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails
from it, send an
> email to neo4j+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.

--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to neo4j+unsubscr...@googlegroups.com 
<mailto:neo4j+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Re: About Neo4j's licenses, especially Personal License

2014-08-17 Thread Alan Robertson
Gotta be careful how you say things... I completely understand a better 
performing lock manager.


When parallel systems step on each others locks, usually data corruption 
is the result.  Those kinds of words make me nervous.


That's what I get for spending 15 years worrying about clustering and 
high-availability.


Thanks for the clarification!

-- Alan



On 08/17/2014 04:45 PM, Philip Rathle wrote:
Right. It definitely does not mean data corruption; just less (or 
more) waiting.



On Sun, Aug 17, 2014 at 5:22 PM, Chris Vest 
mailto:chris.v...@neotechnology.com>> 
wrote:


It means the enterprise lock manager copes better with higher
contention. In other words, it performs better than the community
lock manager.

--
Chris Vest
System Engineer, Neo Technology
[ skype: mr.chrisvest, twitter: chvest ]


On 17 Aug 2014, at 14:16, Alan Robertson mailto:al...@unix.sh>> wrote:


the_Enterprise Lock Manager_ *keeps locks from stepping on each
other*on machines with > 5 cores.



"/Stepping on each other/" generally means data corruption.  My
test machine has 8 cores.  So, I should expect database corruption?





--

*Philip Rathle*
VP of Products | Neo Technology
+1.650.918.9595 | @prathle

--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to neo4j+unsubscr...@googlegroups.com 
<mailto:neo4j+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Re: About Neo4j's licenses, especially Personal License

2014-08-17 Thread Alan Robertson

On 08/17/2014 03:52 AM, philip.rat...@neotechnology.com wrote:


*Question:* /Evaluating Neo4j's scalability isn't possible with 
Community Edition?/


*Answer:* That’s generally true. Neo4j Community is just as fast for 
single queries. But for large databases with highly concurrent 
workload, Enterprise includes extra scaling features. _Clustering_ 
gives you linear read scalability. The _High-Performance 
Cache_ improves latency & throughput by up to 10x for concurrent 
workloads with > 8 GB caches. And the _Enterprise Lock Manager_ *keeps 
locks from stepping on each other* on machines with > 5 cores.




"/Stepping on each other/" generally means data corruption.  My test 
machine has 8 cores.  So, I should expect database corruption?




-- Alan Robertson
   al...@unix.sh

--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Relationship Index on Neo4j

2014-08-16 Thread Alan Robertson

On 08/16/2014 08:13 AM, Michael Hunger wrote:


4. What you mean when you put relationship index in legacy index?


The relationship index IS a legacy index


will it be replaced by another index like label index for node?


No


So, does that mean it will eventually go away?

Usually when people use pejorative phrases like "legacy index", that 
means you shouldn't make new applications that use it -- it's going away.


Thanks!

    -- Alan Robertson
   al...@assimilationsystems.com

--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Wildcard character in CYPHER

2014-08-12 Thread Alan Robertson

Would it speed up (via indexes) if you added /'n.name >= "Michael"'/   ?


On 08/12/2014 01:13 PM, Wes Freeman wrote:

The way you need to do this (currently) is with the regex syntax:

MATCH (n) where n.name  =~ "Michael.*" RETURN n

http://docs.neo4j.org/chunked/milestone/query-where.html#_regular_expressions

Wes
--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to neo4j+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Neo4j: Command not found Ubuntu 12.04

2014-08-04 Thread Alan Robertson

On 08/04/2014 05:15 PM, Chaoteng Liu wrote:
I have installed neo4j on ubuntu. I can use it through localhost:7474 
but in terminal I cant use neo4j bash.


And there is even no /bin/neo4j/ dir in my ubuntu.

How can I solve it to take advantage of neo4j shell? Thx ahead!!!


The shell name is neo4j-shell -- not neo4j-bash.

There is no command named neo4j.  What is it exactly that you're looking 
for?


Where it is found depends on how you installed it.  How did you install it?

In any case, it doesn't normally get installed in any default bin directory.


--
Alan Robertson  - @OSSAlanR

"Openness is the foundation and preservative of friendship...  Let me claim from you 
at all times your undisguised opinions." - William Wilberforce

--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Re: py2neo 1.6.4 doesn't work with Neo4j 2.1.2 - "Cannot find node..."

2014-08-04 Thread Alan Robertson

Julian:

Have you had a chance to look at this bug yet?  Any prognosis on when?

On 07/30/2014 08:02 PM, Alan Robertson wrote:
OK.  This is an RPM problem *only*. It works fine if I install 2.1.3 
from tar ball - but not from the RPM.  I'll update the github issue.



On 07/30/2014 07:35 PM, Alan Robertson wrote:
Our project bug report for this is here: 
https://trello.com/c/B41LtH8K The github issue is: 
https://github.com/neo4j/neo4j/issues/2771. You can reproduce this in 
a clean-room environment by using this Dockerfile: 
http://hg.linux-ha.org/assimilation/file/tip/docker/testNeo/Dockerfile


the DEB package of 2.1.0 works fine on all versions of Ubuntu, but 
the RPM of 2.1.3 fails under CentOS6.  Slightly different versions of 
Python, same version of Py2neo.  Installing 2.0.1 from tar ball on 
CentOS6 also works fine.


This looks more like a Neo4j problem than a py2neo problem...

Also: Why is the .DEB unstable package so far behind the .RPM package?



More details below:

This combination doesn't work with CentOS6 under Docker:

Python 2.7.5
USING PYTHON VERSION 2.7.5 (default, Oct 29 2013, 22:46:38)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]
USING NEO4J VERSION (2, 1, 3, u'')
USING py2neo VERSION 1.6.4

3 minutes ago-Edit 
<https://trello.com/c/B41LtH8K/8-assimilation-py2neo-are-incompatible-with-current-neo4j#>-Delete 
<https://trello.com/c/B41LtH8K/8-assimilation-py2neo-are-incompatible-with-current-neo4j#>


Alan Robertson (ossalanr)
Alan Robertson <https://trello.com/4ff61affd6fb4b394c9788e8>

This combination of versions works fine with Ubuntu under Docker: 
USING PYTHON VERSION 2.7.6 (default, Mar 22 2014, 22:59:56)

[GCC 4.8.2]
USING NEO4J VERSION (2, 1, 0, u'RC2')
USING py2neo VERSION 1.6.4






On 07/19/2014 03:37 PM, Alan Robertson wrote:
Since the result said "cannot find node" the question is: Was that a 
correct result?   So, I used neo4j-shell to look at the database 
after the failure - and it looked like the updates were not done.  
There is no node zero (as indicated by the REST return), nor (for 
good measure) a node 1 or 2.  So the result was correct for the 
current database.  The database was wrong, but that result was 
correct (given the incorrect database).


We appear to have gotten a successful return from the REST update 
transaction, but in spite of that, the node I created wasn't there.


I will look further into what we got back from the REST transaction 
-- but right now, *this is looking like a Neo4j 2.1 bug*.  I use 
Nigel's latest version quite successfully with 2.0.1.  I know you 
guys are at OSCON.  If you read this and can tell me what you want 
to see to diagnose it, that would be awesome.



On 07/19/2014 12:09 PM, Alan Robertson wrote:

A little more detail about the failure mode:
I added a single node to the database, related it to itself 
three ways, added it to the index.
committed the transaction - returned results from the commit 
looked correct
Tried a get_properties() on the object returned from the 
transaction commit
Just before the get_properties() failed, I printed that 
object (Nigel's Neo4j node object), and got this result:

{"a":52,"c":3.14159,"b":2,"name":"Drone121"}
[I also printed the node _id value -- which was 0]

I updated the test in source control to add debug statements, and 
run the test with debug on.  If you run the Dockerfile, or just 
wget using the URLs I supplied before, you'll have the newest 
version of the test.  Keep in mind that docker caches results, so 
if you've cached the results of the Dockerfile, you'll have to 
tweak it somehow (change the echo or something) to make sure it 
grabs the latest source.


As a reminder, this works just fine with 2.0.x (where x >= 1) 
versions of Neo4j.   It only fails with 2.1.x versions of Neo4j.


The output with the current debug turned on looks like this:

Python 2.7.5
('COMMITTING THIS THING:', "{\n\tdb: 
Resource(u'http://localhost:7474/db/data/'),\n\tclasses: {'__main__.Drone'>: True},\n\tuniqueindexmap: {'Drone': 
True},\n\tclasskeymap: {'Drone': {'index': 'Drone', 'vattr': 
'name', 'key': 'Drone'}}\n\tbatchindex: None,\n\t   clients: 
\n[<__main__.Drone object at 0x27211d0>,\n\t   newrels: \n[{'to': 
<__main__.Drone object at 0x27211d0>, 'props': None, 'from': 
<__main__.Drone object at 0x27211d0>, 'type': 'ISA'}, {'to': 
<__main__.Drone object at 0x27211d0>, 'props': None, 'from': 
<__main__.Drone object at 0x27211d0>, 'type': 'WASA'}, {'to': 
<__main__.Drone object at 0x27211d0>, 'props': None, 'from': 
<__main__.Drone o

Re: [Neo4j] has any used neo4j server with siteminder or kerberos

2014-07-31 Thread Alan Robertson
Is it the case that everyone getting access to your database should be 
able to see everything, and run any kind of query (even updates)?


Given the complexity of a graph database, and the lack of most kinds of 
schema enforcement, at least in my case, that would be a bit dangerous...




On 07/30/2014 07:22 PM, amarnath gadepalli wrote:
i haven't seen any examples or discussions about integration of 
siteminder or kerberos with Neo4j for authentication. Have you done 
one? if so please share how?

--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to neo4j+unsubscr...@googlegroups.com 
<mailto:neo4j+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.



--
Alan Robertson  - @OSSAlanR

"Openness is the foundation and preservative of friendship...  Let me claim from you 
at all times your undisguised opinions." - William Wilberforce

--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Re: py2neo 1.6.4 doesn't work with Neo4j 2.1.2 - "Cannot find node..."

2014-07-30 Thread Alan Robertson
OK.  This is an RPM problem *only*.  It works fine if I install 2.1.3 
from tar ball - but not from the RPM.  I'll update the github issue.



On 07/30/2014 07:35 PM, Alan Robertson wrote:
Our project bug report for this is here: https://trello.com/c/B41LtH8K 
The github issue is: https://github.com/neo4j/neo4j/issues/2771. You 
can reproduce this in a clean-room environment by using this 
Dockerfile: 
http://hg.linux-ha.org/assimilation/file/tip/docker/testNeo/Dockerfile


the DEB package of 2.1.0 works fine on all versions of Ubuntu, but the 
RPM of 2.1.3 fails under CentOS6.  Slightly different versions of 
Python, same version of Py2neo.  Installing 2.0.1 from tar ball on 
CentOS6 also works fine.


This looks more like a Neo4j problem than a py2neo problem...

Also: Why is the .DEB unstable package so far behind the .RPM package?



More details below:

This combination doesn't work with CentOS6 under Docker:

Python 2.7.5
USING PYTHON VERSION 2.7.5 (default, Oct 29 2013, 22:46:38)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]
USING NEO4J VERSION (2, 1, 3, u'')
USING py2neo VERSION 1.6.4

3 minutes ago-Edit 
<https://trello.com/c/B41LtH8K/8-assimilation-py2neo-are-incompatible-with-current-neo4j#>-Delete 
<https://trello.com/c/B41LtH8K/8-assimilation-py2neo-are-incompatible-with-current-neo4j#>


Alan Robertson (ossalanr)
Alan Robertson <https://trello.com/4ff61affd6fb4b394c9788e8>

This combination of versions works fine with Ubuntu under Docker: 
USING PYTHON VERSION 2.7.6 (default, Mar 22 2014, 22:59:56)

[GCC 4.8.2]
USING NEO4J VERSION (2, 1, 0, u'RC2')
USING py2neo VERSION 1.6.4






On 07/19/2014 03:37 PM, Alan Robertson wrote:
Since the result said "cannot find node" the question is: Was that a 
correct result?   So, I used neo4j-shell to look at the database 
after the failure - and it looked like the updates were not done.  
There is no node zero (as indicated by the REST return), nor (for 
good measure) a node 1 or 2.  So the result was correct for the 
current database.  The database was wrong, but that result was 
correct (given the incorrect database).


We appear to have gotten a successful return from the REST update 
transaction, but in spite of that, the node I created wasn't there.


I will look further into what we got back from the REST transaction 
-- but right now, *this is looking like a Neo4j 2.1 bug*.  I use 
Nigel's latest version quite successfully with 2.0.1.  I know you 
guys are at OSCON.  If you read this and can tell me what you want to 
see to diagnose it, that would be awesome.



On 07/19/2014 12:09 PM, Alan Robertson wrote:

A little more detail about the failure mode:
I added a single node to the database, related it to itself 
three ways, added it to the index.
committed the transaction - returned results from the commit 
looked correct
Tried a get_properties() on the object returned from the 
transaction commit
Just before the get_properties() failed, I printed that 
object (Nigel's Neo4j node object), and got this result:

{"a":52,"c":3.14159,"b":2,"name":"Drone121"}
[I also printed the node _id value -- which was 0]

I updated the test in source control to add debug statements, and 
run the test with debug on.  If you run the Dockerfile, or just wget 
using the URLs I supplied before, you'll have the newest version of 
the test.  Keep in mind that docker caches results, so if you've 
cached the results of the Dockerfile, you'll have to tweak it 
somehow (change the echo or something) to make sure it grabs the 
latest source.


As a reminder, this works just fine with 2.0.x (where x >= 1) 
versions of Neo4j.   It only fails with 2.1.x versions of Neo4j.


The output with the current debug turned on looks like this:

Python 2.7.5
('COMMITTING THIS THING:', "{\n\tdb: 
Resource(u'http://localhost:7474/db/data/'),\n\tclasses: {'__main__.Drone'>: True},\n\tuniqueindexmap: {'Drone': 
True},\n\tclasskeymap: {'Drone': {'index': 'Drone', 'vattr': 'name', 
'key': 'Drone'}}\n\tbatchindex: None,\n\t   clients: 
\n[<__main__.Drone object at 0x27211d0>,\n\t   newrels: \n[{'to': 
<__main__.Drone object at 0x27211d0>, 'props': None, 'from': 
<__main__.Drone object at 0x27211d0>, 'type': 'ISA'}, {'to': 
<__main__.Drone object at 0x27211d0>, 'props': None, 'from': 
<__main__.Drone object at 0x27211d0>, 'type': 'WASA'}, {'to': 
<__main__.Drone object at 0x27211d0>, 'props': None, 'from': 
<__main__.Drone object at 0x27211d0>, 'type': 'WILLBEA'},\n\t 
deletions: \n\n\tweaknoderefs: {}\n\tstat

Re: [Neo4j] Re: py2neo 1.6.4 doesn't work with Neo4j 2.1.2 - "Cannot find node..."

2014-07-30 Thread Alan Robertson
Our project bug report for this is here: https://trello.com/c/B41LtH8K 
The github issue is: https://github.com/neo4j/neo4j/issues/2771. You can 
reproduce this in a clean-room environment by using this Dockerfile: 
http://hg.linux-ha.org/assimilation/file/tip/docker/testNeo/Dockerfile


the DEB package of 2.1.0 works fine on all versions of Ubuntu, but the 
RPM of 2.1.3 fails under CentOS6.  Slightly different versions of 
Python, same version of Py2neo.  Installing 2.0.1 from tar ball on 
CentOS6 also works fine.


This looks more like a Neo4j problem than a py2neo problem...

Also: Why is the .DEB unstable package so far behind the .RPM package?



More details below:

This combination doesn't work with CentOS6 under Docker:

Python 2.7.5
USING PYTHON VERSION 2.7.5 (default, Oct 29 2013, 22:46:38)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]
USING NEO4J VERSION (2, 1, 3, u'')
USING py2neo VERSION 1.6.4

3 minutes ago-Edit 
<https://trello.com/c/B41LtH8K/8-assimilation-py2neo-are-incompatible-with-current-neo4j#>-Delete 
<https://trello.com/c/B41LtH8K/8-assimilation-py2neo-are-incompatible-with-current-neo4j#>


Alan Robertson (ossalanr)
Alan Robertson <https://trello.com/4ff61affd6fb4b394c9788e8>

This combination of versions works fine with Ubuntu under Docker: USING 
PYTHON VERSION 2.7.6 (default, Mar 22 2014, 22:59:56)

[GCC 4.8.2]
USING NEO4J VERSION (2, 1, 0, u'RC2')
USING py2neo VERSION 1.6.4






On 07/19/2014 03:37 PM, Alan Robertson wrote:
Since the result said "cannot find node" the question is: Was that a 
correct result?   So, I used neo4j-shell to look at the database after 
the failure - and it looked like the updates were not done.  There is 
no node zero (as indicated by the REST return), nor (for good measure) 
a node 1 or 2.  So the result was correct for the current database. 
The database was wrong, but that result was correct (given the 
incorrect database).


We appear to have gotten a successful return from the REST update 
transaction, but in spite of that, the node I created wasn't there.


I will look further into what we got back from the REST transaction -- 
but right now, *this is looking like a Neo4j 2.1 bug*.  I use Nigel's 
latest version quite successfully with 2.0.1.  I know you guys are at 
OSCON.  If you read this and can tell me what you want to see to 
diagnose it, that would be awesome.



On 07/19/2014 12:09 PM, Alan Robertson wrote:

A little more detail about the failure mode:
I added a single node to the database, related it to itself three 
ways, added it to the index.
committed the transaction - returned results from the commit 
looked correct
Tried a get_properties() on the object returned from the 
transaction commit
Just before the get_properties() failed, I printed that 
object (Nigel's Neo4j node object), and got this result:

{"a":52,"c":3.14159,"b":2,"name":"Drone121"}
[I also printed the node _id value -- which was 0]

I updated the test in source control to add debug statements, and run 
the test with debug on.  If you run the Dockerfile, or just wget 
using the URLs I supplied before, you'll have the newest version of 
the test.  Keep in mind that docker caches results, so if you've 
cached the results of the Dockerfile, you'll have to tweak it somehow 
(change the echo or something) to make sure it grabs the latest source.


As a reminder, this works just fine with 2.0.x (where x >= 1) 
versions of Neo4j.   It only fails with 2.1.x versions of Neo4j.


The output with the current debug turned on looks like this:

Python 2.7.5
('COMMITTING THIS THING:', "{\n\tdb: 
Resource(u'http://localhost:7474/db/data/'),\n\tclasses: {'__main__.Drone'>: True},\n\tuniqueindexmap: {'Drone': 
True},\n\tclasskeymap: {'Drone': {'index': 'Drone', 'vattr': 'name', 
'key': 'Drone'}}\n\tbatchindex: None,\n\t clients: \n[<__main__.Drone 
object at 0x27211d0>,\n\t newrels: \n[{'to': <__main__.Drone object 
at 0x27211d0>, 'props': None, 'from': <__main__.Drone object at 
0x27211d0>, 'type': 'ISA'}, {'to': <__main__.Drone object at 
0x27211d0>, 'props': None, 'from': <__main__.Drone object at 
0x27211d0>, 'type': 'WASA'}, {'to': <__main__.Drone object at 
0x27211d0>, 'props': None, 'from': <__main__.Drone object at 
0x27211d0>, 'type': 'WILLBEA'},\n\t deletions: \n\n\tweaknoderefs: 
{}\n\tstats: {'totaltime': datetime.timedelta(0), 'index': 0, 
'nodecreate': 0, 'separate': 0, 'relate': 0, 'lastcommit': None, 
'nodedelete&

Re: [Neo4j] Neo4j Benchmarks

2014-07-24 Thread Alan Robertson
This seems like a reasonable idea, but there are so many kinds and 
characteristics of the databases and access patterns.


For example, my application is update-heavy (not ideal for a graph db) 
and almost all queries are trivial - mainly to figure out how to 
properly do the updates.  More complex queries are important, but not 
generally that expensive - and not as much a bottleneck as the updates.


Maybe a good way to think about it would be to find a dozen or so 
patterns for use of graph databases, and characterize these patterns.


And of course, when you're done, your access pattern is not likely to 
look that much like any of the standard patterns.


But still, relative measures for different types of access patterns 
would be interesting.



On 07/24/2014 07:58 AM, jer wrote:

Hi all,

I would like to measure the Neo4j performance in hardware. Right not I 
use the sample data set provided from your website and self created 
some traversals for measurement. However, I doubt if this is fair for 
Neo4j. My aim is to measure the most "typical" behaviour of Neo4j. 
Therefore I'm curious if any of such "benchmark" that I can use.


If there is no such benchmark, could you give some examples in 
creating one? Maybe the benchmark should be divided into several 
groups, eg small/medium/large datasets, traversal/pattern matching 
queries. That''s what comes to my mind now. Please point out if it is 
inappropriate. Thanks!


Best WIshes,
Jer
--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to neo4j+unsubscr...@googlegroups.com 
<mailto:neo4j+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.



--
Alan Robertson  - @OSSAlanR

"Openness is the foundation and preservative of friendship...  Let me claim from you 
at all times your undisguised opinions." - William Wilberforce

--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Re: py2neo 1.6.4 doesn't work with Neo4j 2.1.2 - "Cannot find node..."

2014-07-19 Thread Alan Robertson
Since the result said "cannot find node" the question is: Was that a 
correct result?   So, I used neo4j-shell to look at the database after 
the failure - and it looked like the updates were not done.  There is no 
node zero (as indicated by the REST return), nor (for good measure) a 
node 1 or 2.  So the result was correct for the current database.  The 
database was wrong, but that result was correct (given the incorrect 
database).


We appear to have gotten a successful return from the REST update 
transaction, but in spite of that, the node I created wasn't there.


I will look further into what we got back from the REST transaction -- 
but right now, *this is looking like a Neo4j 2.1 bug*.  I use Nigel's 
latest version quite successfully with 2.0.1.  I know you guys are at 
OSCON.  If you read this and can tell me what you want to see to 
diagnose it, that would be awesome.



On 07/19/2014 12:09 PM, Alan Robertson wrote:

A little more detail about the failure mode:
I added a single node to the database, related it to itself three 
ways, added it to the index.
committed the transaction - returned results from the commit 
looked correct
Tried a get_properties() on the object returned from the 
transaction commit
Just before the get_properties() failed, I printed that object 
(Nigel's Neo4j node object), and got this result:

{"a":52,"c":3.14159,"b":2,"name":"Drone121"}
[I also printed the node _id value -- which was 0]

I updated the test in source control to add debug statements, and run 
the test with debug on.  If you run the Dockerfile, or just wget using 
the URLs I supplied before, you'll have the newest version of the 
test.  Keep in mind that docker caches results, so if you've cached 
the results of the Dockerfile, you'll have to tweak it somehow (change 
the echo or something) to make sure it grabs the latest source.


As a reminder, this works just fine with 2.0.x (where x >= 1) versions 
of Neo4j.   It only fails with 2.1.x versions of Neo4j.


The output with the current debug turned on looks like this:

Python 2.7.5
('COMMITTING THIS THING:', "{\n\tdb: 
Resource(u'http://localhost:7474/db/data/'),\n\tclasses: {'__main__.Drone'>: True},\n\tuniqueindexmap: {'Drone': 
True},\n\tclasskeymap: {'Drone': {'index': 'Drone', 'vattr': 'name', 
'key': 'Drone'}}\n\tbatchindex: None,\n\t clients: \n[<__main__.Drone 
object at 0x27211d0>,\n\t newrels: \n[{'to': <__main__.Drone object at 
0x27211d0>, 'props': None, 'from': <__main__.Drone object at 
0x27211d0>, 'type': 'ISA'}, {'to': <__main__.Drone object at 
0x27211d0>, 'props': None, 'from': <__main__.Drone object at 
0x27211d0>, 'type': 'WASA'}, {'to': <__main__.Drone object at 
0x27211d0>, 'props': None, 'from': <__main__.Drone object at 
0x27211d0>, 'type': 'WILLBEA'},\n\t deletions: \n\n\tweaknoderefs: 
{}\n\tstats: {'totaltime': datetime.timedelta(0), 'index': 0, 
'nodecreate': 0, 'separate': 0, 'relate': 0, 'lastcommit': None, 
'nodedelete': 0, 'attrupdate': 0}\n\tbatch: None\n}")
Performing batch.create(0: 
({"a":52,"c":3.14159,"b":2,"name":"Drone121"})) - for new node

Performing batch.create(0-[:ISA]->0): node relationships
ADDING rel 0-[:ISA]->0
Performing batch.create(0-[:WASA]->0): node relationships
ADDING rel 0-[:WASA]->0
Performing batch.create(0-[:WILLBEA]->0): node relationships
ADDING rel 0-[:WILLBEA]->0
add_to_index_or_fail: node 0; index Index(Node, 
u'http://localhost:7474/db/data/index/node/Drone')("Drone","Drone121")
('Batch Updates constructed: Committing THIS THING:', "{\n\tdb: 
Resource(u'http://localhost:7474/db/data/'),\n\tclasses: {'__main__.Drone'>: True},\n\tuniqueindexmap: {'Drone': 
True},\n\tclasskeymap: {'Drone': {'index': 'Drone', 'vattr': 'name', 
'key': 'Drone'}}\n\tbatchindex: 4,\n\t clients: \n[<__main__.Drone 
object at 0x27211d0>,\n\t newrels: \n[{'from': <__main__.Drone object 
at 0x27211d0>, 'seqno': 1, 'abstract': rel(0, 'ISA', 0), 'to': 
<__main__.Drone object at 0x27211d0>, 'props': None, 'type': 'ISA'}, 
{'from': <__main__.Drone object at 0x27211d0>, 'seqno': 2, 'abstract': 
rel(0, 'WASA', 0), 'to': <

Re: [Neo4j] Re: py2neo 1.6.4 doesn't work with Neo4j 2.1.2 - "Cannot find node..."

2014-07-19 Thread Alan Robertson

A little more detail about the failure mode:
I added a single node to the database, related it to itself three 
ways, added it to the index.
committed the transaction - returned results from the commit looked 
correct
Tried a get_properties() on the object returned from the 
transaction commit
Just before the get_properties() failed, I printed that object, 
and got this result:

{"a":52,"c":3.14159,"b":2,"name":"Drone121"}
[I also printed the node _id -- which was 0]

I updated the test in source control to add debug statements, and run 
the test with debug on.  If you run the Dockerfile, or just wget using 
the URLs I supplied before, you'll have the newest version of the test.  
Keep in mind that docker caches results, so if you've cached the results 
of the Dockerfile, you'll have to tweak it somehow (change the echo or 
something) to make sure it grabs the latest source.


As a reminder, this works just fine with 2.0.x (where x >= 1) versions 
of Neo4j.   It only fails with 2.1.x versions of Neo4j.


The output with the current debug turned on looks like this:

Python 2.7.5
('COMMITTING THIS THING:', "{\n\tdb: 
Resource(u'http://localhost:7474/db/data/'),\n\tclasses: {'__main__.Drone'>: True},\n\tuniqueindexmap: {'Drone': 
True},\n\tclasskeymap: {'Drone': {'index': 'Drone', 'vattr': 'name', 
'key': 'Drone'}}\n\tbatchindex: None,\n\t clients: \n[<__main__.Drone 
object at 0x27211d0>,\n\t newrels: \n[{'to': <__main__.Drone object at 
0x27211d0>, 'props': None, 'from': <__main__.Drone object at 0x27211d0>, 
'type': 'ISA'}, {'to': <__main__.Drone object at 0x27211d0>, 'props': 
None, 'from': <__main__.Drone object at 0x27211d0>, 'type': 'WASA'}, 
{'to': <__main__.Drone object at 0x27211d0>, 'props': None, 'from': 
<__main__.Drone object at 0x27211d0>, 'type': 'WILLBEA'},\n\t deletions: 
\n\n\tweaknoderefs: {}\n\tstats: {'totaltime': datetime.timedelta(0), 
'index': 0, 'nodecreate': 0, 'separate': 0, 'relate': 0, 'lastcommit': 
None, 'nodedelete': 0, 'attrupdate': 0}\n\tbatch: None\n}")
Performing batch.create(0: 
({"a":52,"c":3.14159,"b":2,"name":"Drone121"})) - for new node

Performing batch.create(0-[:ISA]->0): node relationships
ADDING rel 0-[:ISA]->0
Performing batch.create(0-[:WASA]->0): node relationships
ADDING rel 0-[:WASA]->0
Performing batch.create(0-[:WILLBEA]->0): node relationships
ADDING rel 0-[:WILLBEA]->0
add_to_index_or_fail: node 0; index Index(Node, 
u'http://localhost:7474/db/data/index/node/Drone')("Drone","Drone121")
('Batch Updates constructed: Committing THIS THING:', "{\n\tdb: 
Resource(u'http://localhost:7474/db/data/'),\n\tclasses: {'__main__.Drone'>: True},\n\tuniqueindexmap: {'Drone': 
True},\n\tclasskeymap: {'Drone': {'index': 'Drone', 'vattr': 'name', 
'key': 'Drone'}}\n\tbatchindex: 4,\n\t   clients: \n[<__main__.Drone 
object at 0x27211d0>,\n\t   newrels: \n[{'from': <__main__.Drone object 
at 0x27211d0>, 'seqno': 1, 'abstract': rel(0, 'ISA', 0), 'to': 
<__main__.Drone object at 0x27211d0>, 'props': None, 'type': 'ISA'}, 
{'from': <__main__.Drone object at 0x27211d0>, 'seqno': 2, 'abstract': 
rel(0, 'WASA', 0), 'to': <__main__.Drone object at 0x27211d0>, 'props': 
None, 'type': 'WASA'}, {'from': <__main__.Drone object at 0x27211d0>, 
'seqno': 3, 'abstract': rel(0, 'WILLBEA', 0), 'to': <__main__.Drone 
object at 0x27211d0>, 'props': None, 'type': 'WILLBEA'},\n\t deletions: 
\n\n\tweaknoderefs: {}\n\tstats: {'totaltime': datetime.timedelta(0), 
'index': 1, 'nodecreate': 1, 'separate': 0, 'relate': 3, 'lastcommit': 
None, 'nodedelete': 0, 'attrupdate': 0}\n\tbatch: 
\n}")

SUBMITRESULT: (0 {"a":52,"c":3.14159,"b":2,"name":"Drone121"})
LOOKING at new node with batch index 0
NEW NODE looks like (0 {"a":52,"c":3.14159,"b":2,"name":"Drone121"})
SUBJ (our copy) looks like <__main__.Drone object at 0

Re: [Neo4j] Re: py2neo 1.6.4 doesn't work with Neo4j 2.1.2 - "Cannot find node..."

2014-07-17 Thread Alan Robertson
And for good measure, if you use the Dockerfile quoted below (and 
attached), this is a clean-room reproduction of the problem in CentOS6 
(with Python 2.7).


###
FROM centos:latest
# Would prefer headless, but not available in CentOS6
RUN yum -y install wget java-1.7.0-openjdk scl-utils redhat-lsb-core
RUN wget -qO- http://dev.centos.org/centos/6/SCL/scl.repo >> 
/etc/yum.repos.d/centos.scl.repo

RUN yum -y install python27-python python27-python-setuptools
###  Neo4j RPM
RUN wget http://debian.neo4j.org/neotechnology.gpg.key -O 
/tmp/neo4j.key  && rpm --import /tmp/neo4j.key && rm -f /tmp/neo4j.key
RUN echo '[neo4j]' > /etc/yum.repos.d/neo4j.repo && echo 'name=Neo4j Yum 
Repo' >> /etc/yum.repos.d/neo4j.repo && echo 
'baseurl=http://yum.neo4j.org' >> /etc/yum.repos.d/neo4j.repo && echo 
'enabled=1' >> /etc/yum.repos.d/neo4j.repo && echo 'gpgcheck=1' >> 
/etc/yum.repos.d/neo4j.repo && yum -y install neo4j

RUN scl enable python27 'easy_install pip'
RUN scl enable python27 'pip install py2neo'
RUN echo "Pulling Assimilation project source"
RUN mkdir /tmp/neotest && cd /tmp/neotest && wget -q 
http://hg.linux-ha.org/assimilation/raw-file/tip/cma/store.py && wget -q 
http://hg.linux-ha.org/assimilation/raw-file/tip/cma/assimevent.py
RUN NEO=neo4j; cd /tmp/neotest && /etc/init.d/${NEO} start && sleep 15 
&& scl enable python27 '/usr/bin/env python --version; python store.py'

##

Do this:
make a directory
cd into the directory you just made
copy the above text into a file in that directory - named Dockerfile
docker.io build .

This is a completely clean-room demonstration of the problem in CentOS6.


On 07/17/2014 08:16 AM, Alan Robertson wrote:

Hi Nigel,

Many thanks for your quick reply!

I can reproduce it with what I think is a smallish environment.

If you download my code from here: 
http://hg.linux-ha.org/assimilation/archive/tip.tar.gz


Untar it, and go into the cma directory.  Run the python script *store.py*

It will fail.  Each time you run it, it will give a higher node in the 
graph that it cannot find.


If it doesn't fail, then we can try the docker thing to reproduce the 
environment more exactly.


To try the docker version, you just need to install docker and say 
"docker build ." (or docker.io) with my Dockerfile in your directory.  
It will do the rest - grab the OS, libraries, things we need, build my 
code and run my tests.  It just takes longer. For this environment, it 
helps to understand docker when you want to debug it.


It's pretty awesome.  But hopefully you won't need to do that.

I also have a more complex set of tests that only require python that 
will likely fail if there's a Neo4j/Py2neo issue that affects me.  
Maybe I should create a separate test environment for that - that you 
could easily run.





On 07/15/2014 04:42 PM, Nigel Small wrote:

Familiar with the concept but have never actually used it.


On 15 July 2014 23:41, Alan Robertson <mailto:al...@unix.sh>> wrote:


Yes.  There are lots of ways to do that.  After all, it's all
open source :-D.

Are you familiar with docker?



On 07/15/2014 04:19 PM, Nigel Small wrote:

Can you share some code that I can run to recreate the issue?

Cheers
Nigel


On 15 July 2014 23:09, Alan Robertson mailto:al...@unix.sh>> wrote:

Neo4j package: neo4j-2.1.2-1.noarch

# pip list | grep py2neo
py2neo (1.6.4)

The context is this:
I just did a commit of a transaction which added nodes to
the database, and am now trying to retrieve these same nodes
by the ids for them which were returned by the transaction.


tests.cma_test TestCMABasic.test_several_startups ... error:
tests.cma_test TestCMABasic.test_several_startups
Traceback (most recent call last):
  File "./tests/cma_test.py", line 506, in test_several_startups
CMAinit(io, cleanoutdb=True, debug=DEBUG)
  File "./cmainit.py", line 75, in __init__
CMAdb.store.commit()
  File "./store.py", line 912, in commit
for attr in newnode.get_properties():
  File

"/opt/rh/python27/root/usr/lib64/python2.7/site-packages/py2neo/neo4j.py",
line 1398, in get_properties
self._properties =
assembled(self._properties_resource._get()) or {}
  File

"/opt/rh/python27/root/usr/lib64/python2.7/site-packages/py2neo/neo4j.py",
line 367, in _get
raise ClientError(e)
ClientError: Cannot find node with id [0] in datab

[Neo4j] Re: py2neo 1.6.4 doesn't work with Neo4j 2.1.2 - "Cannot find node..."

2014-07-17 Thread Alan Robertson

Hi Nigel,

Many thanks for your quick reply!

I can reproduce it with what I think is a smallish environment.

If you download my code from here: 
http://hg.linux-ha.org/assimilation/archive/tip.tar.gz


Untar it, and go into the cma directory.  Run the python script *store.py*

It will fail.  Each time you run it, it will give a higher node in the 
graph that it cannot find.


If it doesn't fail, then we can try the docker thing to reproduce the 
environment more exactly.


To try the docker version, you just need to install docker and say 
"docker build ." (or docker.io) with my Dockerfile in your directory.  
It will do the rest - grab the OS, libraries, things we need, build my 
code and run my tests.  It just takes longer. For this environment, it 
helps to understand docker when you want to debug it.


It's pretty awesome.  But hopefully you won't need to do that.

I also have a more complex set of tests that only require python that 
will likely fail if there's a Neo4j/Py2neo issue that affects me.  Maybe 
I should create a separate test environment for that - that you could 
easily run.





On 07/15/2014 04:42 PM, Nigel Small wrote:

Familiar with the concept but have never actually used it.


On 15 July 2014 23:41, Alan Robertson <mailto:al...@unix.sh>> wrote:


Yes.  There are lots of ways to do that.  After all, it's all open
source :-D.

Are you familiar with docker?



On 07/15/2014 04:19 PM, Nigel Small wrote:

Can you share some code that I can run to recreate the issue?

Cheers
Nigel


On 15 July 2014 23:09, Alan Robertson mailto:al...@unix.sh>> wrote:

Neo4j package: neo4j-2.1.2-1.noarch

# pip list | grep py2neo
py2neo (1.6.4)

The context is this:
I just did a commit of a transaction which added nodes to the
database, and am now trying to retrieve these same nodes by
the ids for them which were returned by the transaction.


tests.cma_test TestCMABasic.test_several_startups ... error:
tests.cma_test TestCMABasic.test_several_startups
Traceback (most recent call last):
  File "./tests/cma_test.py", line 506, in test_several_startups
CMAinit(io, cleanoutdb=True, debug=DEBUG)
  File "./cmainit.py", line 75, in __init__
CMAdb.store.commit()
  File "./store.py", line 912, in commit
for attr in newnode.get_properties():
  File

"/opt/rh/python27/root/usr/lib64/python2.7/site-packages/py2neo/neo4j.py",
line 1398, in get_properties
self._properties =
assembled(self._properties_resource._get()) or {}
  File

"/opt/rh/python27/root/usr/lib64/python2.7/site-packages/py2neo/neo4j.py",
line 367, in _get
raise ClientError(e)
ClientError: Cannot find node with id [0] in database.

ERROR in 2.49s
tests.cma_test TestCMABasic.test_startup ... error:
tests.cma_test TestCMABasic.test_startup
Traceback (most recent call last):
  File "./tests/cma_test.py", line 433, in test_startup
CMAinit(io, cleanoutdb=True, debug=DEBUG)
  File "./cmainit.py", line 75, in __init__
CMAdb.store.commit()
  File "./store.py", line 912, in commit
for attr in newnode.get_properties():
  File

"/opt/rh/python27/root/usr/lib64/python2.7/site-packages/py2neo/neo4j.py",
line 1398, in get_properties
self._properties =
assembled(self._properties_resource._get()) or {}
  File

"/opt/rh/python27/root/usr/lib64/python2.7/site-packages/py2neo/neo4j.py",
    line 367, in _get
raise ClientError(e)
ClientError: Cannot find node with id [1] in database.

-- 
Alan Robertson  <mailto:al...@unix.sh> -

@OSSAlanR

"Openness is the foundation and preservative of friendship...
 Let me claim from you at all times your undisguised
opinions." - William Wilberforce





-- 
 Alan Robertson  <mailto:al...@unix.sh>  - @OSSAlanR


"Openness is the foundation and preservative of friendship...  Let me claim from 
you at all times your undisguised opinions." - William Wilberforce





--
Alan Robertson  - @OSSAlanR

"Openness is the foundation and preservative of friendship...  Let me claim from you 
at all times your undisguised opinions." - William Wilberforce

--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Any plans for an optional "schema"?

2014-07-16 Thread Alan Robertson

Hi Jason,

From your examples, you should look at the Assimilation Project!

http://assimilationsystems.com/
http://assimproj.org/

This is exactly the kind of data modeling we're doing - together with 
automating the collection of the data and keeping it up to date.  It's a 
very interesting project (IMHO).



On 07/16/2014 02:28 PM, Jason Gillman Jr. wrote:
I was just wondering if the ability to utilize a schema of sorts was 
on the road map.


When I say schema, I'm thinking more along the lines of relational 
constraints.


Let's use the following simple example.

We have the following types of entities represented by node labels
(:`Server`)
(:`Switch`)
(:`Physical Interface`)

Then we would want to enforce the following relations (I would think 
these restrictions would seem intuitive):


(:`Server`)-[:`Contains`]->(:`Physical Interface`)
(:`Switch`)-[:`Contains`]->(:`Physical Interface`)
(:`Physical Interface`)-[:`Connects`]-(:`Physical Interface`)


Basically, to ensure data consistency without having to build it into 
an application, we would want it so that Neo4j would not allow, for 
example, a Server to connect to another Server, or a Switch, nor would 
we want to make a Physical Interface contain a Server.


Is something like this in the plans? Of course the use of these 
constraints would be completely optional.


Thanks!

-Jason
--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to neo4j+unsubscr...@googlegroups.com 
<mailto:neo4j+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.



--
Alan Robertson  - @OSSAlanR

"Openness is the foundation and preservative of friendship...  Let me claim from you 
at all times your undisguised opinions." - William Wilberforce

--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Neo4j RPM / yum repository?

2014-07-14 Thread Alan Robertson

It says it's not suitable for production work.  Is that still true?


On 07/14/2014 02:29 PM, Wes Freeman wrote:

This one:
http://yum.neo4j.org/

On Mon, Jul 14, 2014 at 4:25 PM, Alan Robertson <mailto:al...@unix.sh>> wrote:


You've had .deb packages of Neo4j for a long time.

Do you have a YUM (RPM) repository for Neo4j?

    -- 
    Alan Robertson  - @OSSAlanR


"Openness is the foundation and preservative of friendship...  Let
me claim from you at all times your undisguised opinions." -
William Wilberforce

-- 
You received this message because you are subscribed to the Google

Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to neo4j+unsubscr...@googlegroups.com
<mailto:neo4j%2bunsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to neo4j+unsubscr...@googlegroups.com 
<mailto:neo4j+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.



--
Alan Robertson  - @OSSAlanR

"Openness is the foundation and preservative of friendship...  Let me claim from you 
at all times your undisguised opinions." - William Wilberforce

--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Neo4j RPM / yum repository?

2014-07-14 Thread Alan Robertson

You've had .deb packages of Neo4j for a long time.

Do you have a YUM (RPM) repository for Neo4j?

--
    Alan Robertson  - @OSSAlanR

"Openness is the foundation and preservative of friendship...  Let me claim from you 
at all times your undisguised opinions." - William Wilberforce

--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] What are the plans for mixed-type arrays

2014-07-09 Thread Alan Robertson

On 7/9/2014 5:44 PM, Clark Richey wrote:
Just to chime in, more complex types such as maps would be immensely 
valuable!

Agreed.

I absolutely require maps -- so I store mine in JSON. Unfortunately, I 
can't query them.  But at least I have the data, and my software can 
process it.






Sent from my iPhone

On Jul 9, 2014, at 17:46, Michael Hunger 
> wrote:


There are no plans for that, rather for more complex data types at 
some point (maps, nested documents) but not in the close future.


What do you want to do?

Michael


On Wed, Jul 9, 2014 at 7:13 PM, Jason Gillman Jr. 
mailto:mackdaddydie...@gmail.com>> wrote:


Hello!

I was just wondering what, if any, plans there are in regard to
mixed-type arrays for properties.

Thanks!

-Jason
-- 
You received this message because you are subscribed to the

Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to neo4j+unsubscr...@googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, 
send an email to neo4j+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to neo4j+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Re: BadStatusLine with py2neo on CentOS6.4

2014-04-05 Thread Alan Robertson
Lots of Ubuntu clients, but in terms of servers, Red Hat (and CentOS and
Scientific Linux) are more than 70% of the market.  In the cloud,
perhaps a little less so...

On 04/05/2014 05:01 PM, Nigel Small wrote:
> You must move in different server circles to me as I see far more
> Ubuntu boxes than anything else :-)
>
> As always, though, I'm happy to review pull requests on py2neo to fix
> issues for the operating system(s) you're using.
>
> Cheers
> Nige
>
>
> On 5 April 2014 23:33, Alan Robertson  <mailto:al...@unix.sh>> wrote:
>
> It's worth noting that RHEL6 is probably the most popular Linux
> server out there, and RHEL7 isn't out yet...
>
> I appreciate the difficulty, and I don't want to support it
> either.  Unfortunately, as a practical matter, it seems that it's
> not something I'll likely be able to avoid...
>
>
>
>
> On 04/05/2014 03:41 PM, Nigel Small wrote:
>> Hi Alan
>>
>> A *BadStatusLine* is generally an indication that the remote
>> server has disconnected, normally due to a timeout. Py2neo will
>> usually retry when it sees one of these but the handling isn't
>> bullet-proof and may not work at all under Python 2.6. I don't
>> know about Red Hat either - maybe it provides different versions
>> of Python across those two OS's - would be worth checking.
>>
>> As a related side note, although the vast majority of the code
>>     will work with 2.6 as it stands right now, I'm not supporting
>> Python 2.6 at all going forward - only 2.7 and 3.3.
>>
>> Cheers
>> Nigel
>>
>>
>> On 5 April 2014 21:24, Alan Robertson > <mailto:al...@unix.sh>> wrote:
>>
>> Hi,
>>
>> When I run my tests on CentOS6.4 (python 2.6) I get a
>> BadStatusLine error.  When I run them on CentOS 6.5, they run
>> fine.
>>
>> The code is just asking what version of Neo4j we have - and
>> it fails...  This is about the first thing I do with it.  The
>> stack traceback is below:
>>
>>
>> fail: tests.cma_test TestCMABasic.test_several_startups
>> Traceback (most recent call last):
>> File "./tests/cma_test.py", line 550, in test_several_startups
>> CMAinit(io, cleanoutdb=True, debug=DEBUG)
>>
>>
>>
>>
>> File "./cmainit.py", line 60, in __init__
>> self.delete_all()
>> File "./cmainit.py", line 91, in delete_all
>> dbvers = *self.db.neo4j_version*
>> File "/usr/lib/python2.6/site-packages/py2neo/neo4j.py", line
>> 798, in neo4j_version
>>
>>
>>
>>
>> return version_tuple(self.__metadata__["neo4j_version"])
>> File "/usr/lib/python2.6/site-packages/py2neo/neo4j.py", line
>> 338, in __metadata__
>> self.refresh()
>> File "/usr/lib/python2.6/site-packages/py2neo/neo4j.py", line
>> 360, in refresh
>>
>> self._metadata = ResourceMetadata(self._get().content)
>> File "/usr/lib/python 2.6/site- packages/py2neo/neo4j.py",
>> line 365, in _get
>> product=self._product)
>> File
>> 
>> "/usr/lib/python2.6/site-packages/py2neo/packages/httpstream/http.py",
>> line 803, in get
>> return rq.submit(redirect_limit=redirect_limit, **kwargs)
>>
>>
>>
>>
>> File
>> 
>> "/usr/lib/python2.6/site-packages/py2neo/packages/httpstream/http.py",
>> line 388, in submit
>> http, rs = submit(self.method, uri, self.body, headers)
>> File
>> 
>> "/usr/lib/python2.6/site-packages/py2neo/packages/httpstream/http.py",
>> line 288, in submit
>>
>>
>>
>>
>> response = send()
>> File
>> 
>> "/usr/lib/python2.6/site-packages/py2neo/packages/httpstream/http.py",
>> line 284, in s end
>> return http.getresponse()
>>     File "/usr/lib64/python2.6/httplib.py", line 990, in getresponse
>> response.begin()
>> File "/usr/lib64/python2.6/httplib.py", line 391, in begin
>>
>>
>>
>>
>> version, status, reason = self._read_status()
>> File "/usr/lib64/python2.6/httplib.p

[Neo4j] Re: BadStatusLine with py2neo on CentOS6.4

2014-04-05 Thread Alan Robertson
It's worth noting that RHEL6 is probably the most popular Linux server
out there, and RHEL7 isn't out yet...

I appreciate the difficulty, and I don't want to support it either. 
Unfortunately, as a practical matter, it seems that it's not something
I'll likely be able to avoid...



On 04/05/2014 03:41 PM, Nigel Small wrote:
> Hi Alan
>
> A *BadStatusLine* is generally an indication that the remote server
> has disconnected, normally due to a timeout. Py2neo will usually retry
> when it sees one of these but the handling isn't bullet-proof and may
> not work at all under Python 2.6. I don't know about Red Hat either -
> maybe it provides different versions of Python across those two OS's -
> would be worth checking.
>
> As a related side note, although the vast majority of the code will
> work with 2.6 as it stands right now, I'm not supporting Python 2.6 at
> all going forward - only 2.7 and 3.3.
>
> Cheers
> Nigel
>
>
> On 5 April 2014 21:24, Alan Robertson  <mailto:al...@unix.sh>> wrote:
>
> Hi,
>
> When I run my tests on CentOS6.4 (python 2.6) I get a
> BadStatusLine error.  When I run them on CentOS 6.5, they run fine.
>
> The code is just asking what version of Neo4j we have - and it
> fails...  This is about the first thing I do with it.  The stack
> traceback is below:
>
>
> fail: tests.cma_test TestCMABasic.test_several_startups
> Traceback (most recent call last):
> File "./tests/cma_test.py", line 550, in test_several_startups
> CMAinit(io, cleanoutdb=True, debug=DEBUG)
>
>
> File "./cmainit.py", line 60, in __init__
> self.delete_all()
> File "./cmainit.py", line 91, in delete_all
> dbvers = *self.db.neo4j_version*
> File "/usr/lib/python2.6/site-packages/py2neo/neo4j.py", line 798,
> in neo4j_version
>
>
> return version_tuple(self.__metadata__["neo4j_version"])
> File "/usr/lib/python2.6/site-packages/py2neo/neo4j.py", line 338,
> in __metadata__
> self.refresh()
> File "/usr/lib/python2.6/site-packages/py2neo/neo4j.py", line 360,
> in refresh
>
> self._metadata = ResourceMetadata(self._get().content)
> File "/usr/lib/python 2.6/site- packages/py2neo/neo4j.py", line
> 365, in _get
> product=self._product)
> File
> "/usr/lib/python2.6/site-packages/py2neo/packages/httpstream/http.py",
> line 803, in get
> return rq.submit(redirect_limit=redirect_limit, **kwargs)
>
>
> File
> "/usr/lib/python2.6/site-packages/py2neo/packages/httpstream/http.py",
> line 388, in submit
> http, rs = submit(self.method, uri, self.body, headers)
> File
> "/usr/lib/python2.6/site-packages/py2neo/packages/httpstream/http.py",
> line 288, in submit
>
>
> response = send()
> File
> "/usr/lib/python2.6/site-packages/py2neo/packages/httpstream/http.py",
> line 284, in s end
> return http.getresponse()
> File "/usr/lib64/python2.6/httplib.py", line 990, in getresponse
> response.begin()
> File "/usr/lib64/python2.6/httplib.py", line 391, in begin
>
>
> version, status, reason = self._read_status()
> File "/usr/lib64/python2.6/httplib.py", line 355, in _read_status
> raise BadStatusLine(line)
> BadStatusLine
>  
>
>
> What's up with this?  Working with RHEL6 seems to be a really good
> idea...
>
> -- 
> Alan Robertson  <mailto:al...@unix.sh> - @OSSAlanR
>
> "Openness is the foundation and preservative of friendship...  Let me 
> claim from you at all times your undisguised opinions." - William Wilberforce
>
>


-- 
Alan Robertson  - @OSSAlanR

"Openness is the foundation and preservative of friendship...  Let me claim 
from you at all times your undisguised opinions." - William Wilberforce

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] BadStatusLine with py2neo on CentOS6.4

2014-04-05 Thread Alan Robertson
Hi,

When I run my tests on CentOS6.4 (python 2.6) I get a BadStatusLine
error.  When I run them on CentOS 6.5, they run fine.

The code is just asking what version of Neo4j we have - and it fails... 
This is about the first thing I do with it.  The stack traceback is below:


fail: tests.cma_test TestCMABasic.test_several_startups
Traceback (most recent call last):
File "./tests/cma_test.py", line 550, in test_several_startups
CMAinit(io, cleanoutdb=True, debug=DEBUG)
File "./cmainit.py", line 60, in __init__
self.delete_all()
File "./cmainit.py", line 91, in delete_all
dbvers = *self.db.neo4j_version*
File "/usr/lib/python2.6/site-packages/py2neo/neo4j.py", line 798, in
neo4j_version
return version_tuple(self.__metadata__["neo4j_version"])
File "/usr/lib/python2.6/site-packages/py2neo/neo4j.py", line 338, in
__metadata__
self.refresh()
File "/usr/lib/python2.6/site-packages/py2neo/neo4j.py", line 360, in
refresh
self._metadata = ResourceMetadata(self._get().content)
File "/usr/lib/python2.6/site-packages/py2neo/neo4j.py", line 365, in _get
product=self._product)
File
"/usr/lib/python2.6/site-packages/py2neo/packages/httpstream/http.py",
line 803, in get
return rq.submit(redirect_limit=redirect_limit, **kwargs)
File
"/usr/lib/python2.6/site-packages/py2neo/packages/httpstream/http.py",
line 388, in submit
http, rs = submit(self.method, uri, self.body, headers)
File
"/usr/lib/python2.6/site-packages/py2neo/packages/httpstream/http.py",
line 288, in submit
response = send()
File
"/usr/lib/python2.6/site-packages/py2neo/packages/httpstream/http.py",
line 284, in send
return http.getresponse()
File "/usr/lib64/python2.6/httplib.py", line 990, in getresponse
response.begin()
File "/usr/lib64/python2.6/httplib.py", line 391, in begin
version, status, reason = self._read_status()
File "/usr/lib64/python2.6/httplib.py", line 355, in _read_status
raise BadStatusLine(line)
BadStatusLine
 

What's up with this?  Working with RHEL6 seems to be a really good idea...

-- 
Alan Robertson  - @OSSAlanR

"Openness is the foundation and preservative of friendship...  Let me claim 
from you at all times your undisguised opinions." - William Wilberforce

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Cypher "in" operator weirdness...

2014-03-27 Thread Alan Robertson
Here's a sample Cypher query that I'm having trouble with...

   START service=node:ProcessNode('*:*')
   OPTIONAL MATCH service<-[:monitoring]->monitor
   WHERE "service" in service.roles
   WITH service, monitor, count(monitor) as moncount
   MATCH host-[:hosting]->service
   WHERE moncount = 0
   RETURN DISTINCT host, service
   ORDER BY service.roles[0], host.designation


When I run this query, the results include service nodes where "service"
is NOT in service.roles.  Sample output is below:
servidor /usr/bin/ssh ['client']
servidor /usr/bin/ssh ['client']
servidor /usr/bin/pidgin ['client']
servidor /usr/sbin/bacula-sd ['server', 'client']
servidor /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java ['server']
servidor /usr/bin/perl ['server']
servidor /home/alanr/.dropbox-dist/dropbox ['server', 'client']
servidor /usr/sbin/sshd ['server']
servidor /usr/bin/tprintdaemon ['server']
servidor /sbin/rpc.statd ['server']
servidor /sbin/rpcbind ['server']
servidor /usr/bin/skype ['server', 'client']
servidor /usr/sbin/bacula-dir ['server', 'client']
servidor /usr/sbin/dnsmasq ['server']

The fields printed here are host.designation, service.pathname, and
service.roles.

What's up with this?  I also tried service.roles[0] = "server" instead. 
It didn't help.



-- 
Alan Robertson  - @OSSAlanR

"Openness is the foundation and preservative of friendship...  Let me claim 
from you at all times your undisguised opinions." - William Wilberforce

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Re: py2neo 1.6.4 breaks my code again...

2014-03-22 Thread Alan Robertson
This was a clean install on CENTOS 6 under Docker. Thanks for the explanation.

On March 22, 2014 11:40:49 AM MDT, Nigel Small  wrote:
>The Record.columns attribute is accessible in both 1.6.3 and 1.6.4
>identically. Documentation is limited in a few areas, I'll admit, but
>that
>is largely due to a lack of time to work on the project.
>
>I see no such issue with installing py2neo 1.6.3:
>
>$ pip install py2neo==1.6.3
>Downloading/unpacking py2neo==1.6.3
>  Downloading py2neo-1.6.3.tar.gz (216kB): 216kB downloaded
>  Running setup.py (path:/home/elgin/venv/test/build/py2neo/setup.py)
>egg_info for package py2neo
>
>Installing collected packages: py2neo
>  Running setup.py install for py2neo
>building 'py2neo.packages.jsonstream.cjsonstream_2x' extension
>gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
>-Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c
>py2neo/packages/jsonstream/cjsonstream_2x.c -o
>build/temp.linux-x86_64-2.7/py2neo/packages/jsonstream/cjsonstream_2x.o
>gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions
>-Wl,-Bsymbolic-functions -Wl,-z,relro
>build/temp.linux-x86_64-2.7/py2neo/packages/jsonstream/cjsonstream_2x.o
>-o
>build/lib.linux-x86_64-2.7/py2neo/packages/jsonstream/cjsonstream_2x.so
>changing mode of build/scripts-2.7/neotool from 644 to 755
>
>changing mode of /home/elgin/venv/test/bin/neotool to 755
>Successfully installed py2neo
>Cleaning up...
>
>I can only assume there must be something non-standard about your
>environment.
>
>Nigel
>
>
>On 22 March 2014 13:46, Alan Robertson  wrote:
>
>>  You changed the access to columns - and I didn't see any column
>> attribute like there is now.  It could be that I missed it before. 
>In any
>> case, I'm now using it, and would love it if it would stay around.
>>
>> But since there is no documentation of this particular data
>structure, it
>> wasn't clear how one was supposed to use it.
>>
>> Regarding pip: specifying ==1.6.3 does NOT work - it gives me 1.6.4
>> anyway.  I have no idea why.  It knows I wanted 1.6.3, but it said
>> "installing 1.6.4 instead" or something like that.
>>
>>
>>
>> On 3/22/2014 5:04 AM, Nigel Small wrote:
>>
>> Hi Alan
>>
>>  I'm unclear as to how your code might be broken based on the 1.6.4
>> release. In terms of query results, there were some internal
>optimisations
>> that were carried out to improve performance but nothing should have
>> changed in the public API. If you can be clearer on what you perceive
>has
>> changed, I can either clarify correct usage or add a bug to be fixed.
>>
>>  Version 1.6.3 has not been removed either, as per standard pip
>usage,
>> you can install that specific version by using:
>>
>>  pip install py2neo==1.6.3
>>
>>  Nigel
>>
>>
>> On 21 March 2014 22:32, Alan Robertson  wrote:
>>
>>> Hi Nigel,
>>>
>>> When you return query results, you've had 3 different versions of
>how to
>>> introspect the column names of the resulting data (1.6.4 being the
>>> latest one).
>>>
>>> Could you *please* create a consistent method for me to use to
>extract
>>> the column names and then keep that working on your new versions?
>>> [Having it be an object method would be awesome].
>>>
>>> I really need to know the column names so I can create corresponding
>>> columns with Python objects of the same names as the Neo4j objects
>you
>>> deliver to me.
>>>
>>> If you could do this, it would be very helpful for me, and would
>>> eliminate the last two reasons I got extremely frustrated with
>py2neo.
>>>
>>> Of course, this is made more frustrating by the fact that 1.6.3 is
>not
>>> longer available.
>>>
>>> If you feel the need to break APIs, it would be good to allow the
>old
>>> version to stay around for those who haven't converted to the new
>>> version yet.
>>>
>>>
>>> --
>>> Alan Robertson   - @OSSAlanR
>>>
>>> "Openness is the foundation and preservative of friendship...  Let
>me
>>> claim from you at all times your undisguised opinions." - William
>>> Wilberforce
>>>
>>
>>
>>

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Re: py2neo 1.6.4 breaks my code again...

2014-03-22 Thread Alan Robertson
You changed the access to columns - and I didn't see any column  
attribute like there is now.  It could be that I missed it before.  In 
any case, I'm now using it, and would love it if it would stay around.


But since there is no documentation of this particular data structure, 
it wasn't clear how one was supposed to use it.


Regarding pip: specifying ==1.6.3 does NOT work - it gives me 1.6.4 
anyway.  I have no idea why.  It knows I wanted 1.6.3, but it said 
"installing 1.6.4 instead" or something like that.



On 3/22/2014 5:04 AM, Nigel Small wrote:

Hi Alan

I'm unclear as to how your code might be broken based on the 1.6.4 
release. In terms of query results, there were some internal 
optimisations that were carried out to improve performance but nothing 
should have changed in the public API. If you can be clearer on what 
you perceive has changed, I can either clarify correct usage or add a 
bug to be fixed.


Version 1.6.3 has not been removed either, as per standard pip usage, 
you can install that specific version by using:


pip install py2neo==1.6.3

Nigel


On 21 March 2014 22:32, Alan Robertson <mailto:al...@unix.sh>> wrote:


Hi Nigel,

When you return query results, you've had 3 different versions of
how to
introspect the column names of the resulting data (1.6.4 being the
latest one).

Could you *please* create a consistent method for me to use to extract
the column names and then keep that working on your new versions?
[Having it be an object method would be awesome].

I really need to know the column names so I can create corresponding
columns with Python objects of the same names as the Neo4j objects you
deliver to me.

If you could do this, it would be very helpful for me, and would
eliminate the last two reasons I got extremely frustrated with py2neo.

Of course, this is made more frustrating by the fact that 1.6.3 is not
longer available.

If you feel the need to break APIs, it would be good to allow the old
version to stay around for those who haven't converted to the new
version yet.


--
Alan Robertson  - @OSSAlanR

"Openness is the foundation and preservative of friendship...  Let
me claim from you at all times your undisguised opinions." -
William Wilberforce




--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] py2neo 1.6.4 breaks my code again...

2014-03-21 Thread Alan Robertson
Hi Nigel,

When you return query results, you've had 3 different versions of how to
introspect the column names of the resulting data (1.6.4 being the
latest one).

Could you *please* create a consistent method for me to use to extract
the column names and then keep that working on your new versions? 
[Having it be an object method would be awesome].

I really need to know the column names so I can create corresponding
columns with Python objects of the same names as the Neo4j objects you
deliver to me.

If you could do this, it would be very helpful for me, and would
eliminate the last two reasons I got extremely frustrated with py2neo.

Of course, this is made more frustrating by the fact that 1.6.3 is not
longer available.

If you feel the need to break APIs, it would be good to allow the old
version to stay around for those who haven't converted to the new
version yet.


-- 
Alan Robertson  - @OSSAlanR

"Openness is the foundation and preservative of friendship...  Let me claim 
from you at all times your undisguised opinions." - William Wilberforce

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Py2neo REST connection receives data one byte at a time(!?)

2014-02-15 Thread Alan Robertson
The trace below is from my code - which uses Py2Neo...

No doubt a performance issue...

socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 8
connect(8, {sa_family=AF_INET, sin_port=htons(7474),
sin_addr=inet_addr("127.0.0.1")}, 16) = 0
sendto(8, "GET /db/data/ HTTP/1.1\r\nAccept-E"..., 178, 0, NULL, 0) = 178
recvfrom(8, "H", 1, 0, NULL, NULL)  = 1
recvfrom(8, "T", 1, 0, NULL, NULL)  = 1
recvfrom(8, "T", 1, 0, NULL, NULL)  = 1
recvfrom(8, "P", 1, 0, NULL, NULL)  = 1
recvfrom(8, "/", 1, 0, NULL, NULL)  = 1
recvfrom(8, "1", 1, 0, NULL, NULL)  = 1
recvfrom(8, ".", 1, 0, NULL, NULL)  = 1
recvfrom(8, "1", 1, 0, NULL, NULL)  = 1
recvfrom(8, " ", 1, 0, NULL, NULL)  = 1
recvfrom(8, "2", 1, 0, NULL, NULL)  = 1
recvfrom(8, "0", 1, 0, NULL, NULL)  = 1
recvfrom(8, "0", 1, 0, NULL, NULL)  = 1
recvfrom(8, " ", 1, 0, NULL, NULL)  = 1
recvfrom(8, "O", 1, 0, NULL, NULL)  = 1
recvfrom(8, "K", 1, 0, NULL, NULL)  = 1
recvfrom(8, "\r", 1, 0, NULL, NULL) = 1
recvfrom(8, "\n", 1, 0, NULL, NULL) = 1
recvfrom(8, "C", 1, 0, NULL, NULL)  = 1
recvfrom(8, "o", 1, 0, NULL, NULL)  = 1
recvfrom(8, "n", 1, 0, NULL, NULL)  = 1
recvfrom(8, "t", 1, 0, NULL, NULL)  = 1
recvfrom(8, "e", 1, 0, NULL, NULL)  = 1
recvfrom(8, "n", 1, 0, NULL, NULL)  = 1
recvfrom(8, "t", 1, 0, NULL, NULL)  = 1
recvfrom(8, "-", 1, 0, NULL, NULL)  = 1
recvfrom(8, "T", 1, 0, NULL, NULL)  = 1
recvfrom(8, "y", 1, 0, NULL, NULL)  = 1
recvfrom(8, "p", 1, 0, NULL, NULL)  = 1
recvfrom(8, "e", 1, 0, NULL, NULL)  = 1
recvfrom(8, ":", 1, 0, NULL, NULL)  = 1
recvfrom(8, " ", 1, 0, NULL, NULL)  = 1
recvfrom(8, "a", 1, 0, NULL, NULL)  = 1
recvfrom(8, "p", 1, 0, NULL, NULL)  = 1
recvfrom(8, "p", 1, 0, NULL, NULL)  = 1
recvfrom(8, "l", 1, 0, NULL, NULL)  = 1
recvfrom(8, "i", 1, 0, NULL, NULL)  = 1
recvfrom(8, "c", 1, 0, NULL, NULL)  = 1
recvfrom(8, "a", 1, 0, NULL, NULL)  = 1
recvfrom(8, "t", 1, 0, NULL, NULL)  = 1
recvfrom(8, "i", 1, 0, NULL, NULL)  = 1
recvfrom(8, "o", 1, 0, NULL, NULL)  = 1
recvfrom(8, "n", 1, 0, NULL, NULL)  = 1
recvfrom(8, "/", 1, 0, NULL, NULL)  = 1
recvfrom(8, "j", 1, 0, NULL, NULL)  = 1
recvfrom(8, "s", 1, 0, NULL, NULL)  = 1
recvfrom(8, "o", 1, 0, NULL, NULL)  = 1
recvfrom(8, "n", 1, 0, NULL, NULL)  = 1
recvfrom(8, ";", 1, 0, NULL, NULL)  = 1
recvfrom(8, " ", 1, 0, NULL, NULL)  = 1
recvfrom(8, "c", 1, 0, NULL, NULL)  = 1
recvfrom(8, "h", 1, 0, NULL, NULL)  = 1
recvfrom(8, "a", 1, 0, NULL, NULL)  = 1
recvfrom(8, "r", 1, 0, NULL, NULL)  = 1
recvfrom(8, "s", 1, 0, NULL, NULL)  = 1
recvfrom(8, "e", 1, 0, NULL, NULL)  = 1

The other conversations (as far as I can tell) do the same thing...
 

-- 
Alan Robertson  - @OSSAlanR

"Openness is the foundation and preservative of friendship...  Let me claim 
from you at all times your undisguised opinions." - William Wilberforce

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Neo4j] Looking for 2.0.1 (milestone is OK)

2014-01-22 Thread Alan Robertson

Good to know!  Thanks!!

On 1/22/2014 6:08 PM, Michael Hunger wrote:

Hi Alan,

It is one to two weeks out.
Cheers

Michael


On Thu, Jan 23, 2014 at 2:06 AM, Alan Robertson <mailto:al...@unix.sh>> wrote:


Having asked the question, an answer would be appreciated :-D.

When is the first 2.0.1 milestone expected?




On 1/17/2014 3:15 PM, Michael Hunger wrote:

They have been, at least in master.

the most prominent one was breaking legacy indexing for
put-if-absent.

Michael

Am 17.01.2014 um 22:56 schrieb Mark Needham
mailto:m.h.need...@gmail.com>>:


Hi Alan,

Could I ask you to list the fatal bugs in 2.0.0 so I can check
when they'll be addressed/if they already have been.

Cheers
Mark


On 17 January 2014 22:48, Alan Robertson mailto:al...@unix.sh>> wrote:

Hi,

Because of the fatal bugs (or at least fatal to me) in
2.0.0, I really
need a version of 2.0.1 that I can use -- or I'm stuck in
the past
indefinitely...

Any word on a 2.0.1 milestone release?

Thanks!

    --
Alan Robertson mailto:al...@unix.sh>> -
@OSSAlanR

"Openness is the foundation and preservative of
friendship...  Let me claim from you at all times your
undisguised opinions." - William Wilberforce

--
You received this message because you are subscribed to the
Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails
from it, send an email to neo4j+unsubscr...@googlegroups.com
<mailto:neo4j%2bunsubscr...@googlegroups.com>.
For more options, visit
https://groups.google.com/groups/opt_out.



-- 
You received this message because you are subscribed to the

Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to neo4j+unsubscr...@googlegroups.com
<mailto:neo4j+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.


-- 
You received this message because you are subscribed to the

Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to neo4j+unsubscr...@googlegroups.com
<mailto:neo4j+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.


-- 
You received this message because you are subscribed to the Google

Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to neo4j+unsubscr...@googlegroups.com
<mailto:neo4j%2bunsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to neo4j+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Neo4j] Looking for 2.0.1 (milestone is OK)

2014-01-22 Thread Alan Robertson

Having asked the question, an answer would be appreciated :-D.

When is the first 2.0.1 milestone expected?



On 1/17/2014 3:15 PM, Michael Hunger wrote:

They have been, at least in master.

the most prominent one was breaking legacy indexing for put-if-absent.

Michael

Am 17.01.2014 um 22:56 schrieb Mark Needham <mailto:m.h.need...@gmail.com>>:



Hi Alan,

Could I ask you to list the fatal bugs in 2.0.0 so I can check when 
they'll be addressed/if they already have been.


Cheers
Mark


On 17 January 2014 22:48, Alan Robertson <mailto:al...@unix.sh>> wrote:


Hi,

Because of the fatal bugs (or at least fatal to me) in 2.0.0, I
really
need a version of 2.0.1 that I can use -- or I'm stuck in the past
indefinitely...

Any word on a 2.0.1 milestone release?

Thanks!

    --
Alan Robertson mailto:al...@unix.sh>> - @OSSAlanR

"Openness is the foundation and preservative of friendship...
 Let me claim from you at all times your undisguised opinions." -
William Wilberforce

--
You received this message because you are subscribed to the
Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to neo4j+unsubscr...@googlegroups.com
<mailto:neo4j%2bunsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, 
send an email to neo4j+unsubscr...@googlegroups.com 
<mailto:neo4j+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google 
Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to neo4j+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Neo4j] Looking for 2.0.1 (milestone is OK)

2014-01-17 Thread Alan Robertson
Hi,

Because of the fatal bugs (or at least fatal to me) in 2.0.0, I really
need a version of 2.0.1 that I can use -- or I'm stuck in the past
indefinitely...

Any word on a 2.0.1 milestone release?

Thanks!

-- 
    Alan Robertson  - @OSSAlanR

"Openness is the foundation and preservative of friendship...  Let me claim 
from you at all times your undisguised opinions." - William Wilberforce

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Neo4j] Re: Thoughts about JSON support in Cypher...

2013-12-30 Thread Alan Robertson
On 12/30/2013 03:54 PM, Huston Hedinger wrote:
> Michael, Wes, et all...
>
> Lots of good ideas hear in regards to how to handle and manipulate
> JSON directly in Cypher...  The UDF direction seems really promising -
> especially as cypher becomes more and more powerful.  Additionally, we
> have a couple use cases where we have stored entire JSON objects as
> strings.

Of course, this is _exactly_ what I'm doing.  My strings will sometimes
run over 60K bytes.  Perhaps as large as 250K...  (but not typically). 
So, at least I'm not alone ;-)

> A straightforward use case would be an "address" property.  I might
> want to store "address" on a node, and then nested I would have
> "street", "city", "etc."...  So the object might like like (some_node
> {"address": { "city": "New York", "street": ..., "number":...,
> etc.}..})  Obviously, a great way to deal with addresses in a graph is
> as hierarchies - but not every use case demands such a robust
> represenation of the data.  Nested key/values is a great short cut.
>
> On another note - we've taken an initial stab at a generalized
> GraphJSON format - to be used as a data interchange (mainly for the
> UI) and in a similiar vein to Nigel's Geoff within py2neo.  This is
> not too dissimilar from GraphSON (blueprints) or GEXF (an xml format
> for Graphs).  Additionally, we are drawing heavy inspiration from
> GeoJSON which is a standardized format form representating (you
> guessed it) map related data.  From a user standpoint I'd love to see
> an "Export as GraphJSON" in the browser or "RETURN GraphJSON(nodes)"
> or even "RETURN GraphJSON(some_path)"  directly in cypher.  The
> current "Export JSON" method in the browser is great, and I look
> forward to seeing Neo build on that.
>
> A draft/Alpha version of the specs are at www.GraphJSON.org
> <http://www.GraphJSON.org%20>- You an build GraphJSON documents at
> GraphJSON.io <http://GraphJSON.io>...  Experimental at best.
>
> Thoughts?
>
>
>
> On Saturday, December 7, 2013 1:58:29 AM UTC-8, Michael Hunger wrote:
>
> Let's move this whole discussion to the google group :)
>
> Map support for properties is planned and almost made it into the
> product some time ago but then were some considerations so that it
> sadly didn't work out.
>
> User defined functions would be a way to go but much better with
> real support by the storage engine and language.
>
> Wes, didn't you want to look into a UDF PoC?
>
> Michael
>
> Am 07.12.2013 um 05:22 schrieb Wes Freeman  >:
>
>> I don't think it would be easy in a plugin unless you did some
>> weird stuff intercepting the cypher. On the other hand, might be
>> an interesting use case for a user defined function--something
>> that takes a JSON string and returns a map. Actually--that might
>> be general purpose enough to go into Cypher itself, especially
>> since Cypher does have map support.
>>
>> Wes
>>
>> On Fri, Dec 6, 2013 at 10:48 PM, Alan Robertson > > wrote:
>>
>> Yes.
>>
>> It's not rocket science.  It's not always cheap, and it's
>> major stinky, but it works for me ;-)
>>
>> And cypher doesn't offer it, then I have to do the filtering
>> in the output from cypher, which can suck much worse than
>> that ;-).
>>
>> Maybe a skanky plugin that does it ;-)
>>
>> See even simple maps aren't enough for me in all cases...
>>
>> When I discover the network topology of a server -- NICs, and
>> IP addresses, and MAC addresses, and speeds, and MTUs and all
>> that stuff, it gets pretty complicated...
>>
>> Similar things happen when I discover all the service/client
>> information...
>>
>> One nice thing about storing it as a string -- I can easily
>> tell if anything has changed (my nanoprobes can ensure that
>>     the JSON comes back in "canonical" form) just by doing a
>> string compare ;-).
>>
>> If it's the same, then I don't have to walk the graph to
>> figure out what has changed...
>>
>>
>>
>>
>> On 12/06/2013 07:59 PM, Wes Freeman wrote:
>>> That's an interesting idea--you mean automatic parsing of
>>> string-based JSON in cypher 

Re: [Neo4j] Re: Thoughts about JSON support in Cypher...

2013-12-29 Thread Alan Robertson

On 12/29/2013 3:11 AM, Nigel Small wrote:
While I agree that JSON has very broad acceptance and use, I have to 
disagree on one very major point: JSON is a data interchange format, 
not a data type. The distinction is quite significant.


This thread was spawned from a previous closed conversation but my 
understanding is that you want to store arbitrarily nested maps as 
property values and that, up until now, you have been using JSON 
strings to hold these maps in serialised form. If that is the case, 
then the idea under discussion is perfectly appropriate for your use 
case and any map implementation would almost certainly use a 
Map internally to hold its data. This would then 
probably be converted to a JSON object over REST - although this would 
cause ambiguity with existing objects used for node and relationship 
representation.


Regardless of the precise implementation though, I think we're all 
broadly talking about the same thing.



I'd certainly rather have sufficiently powerful maps (semi-untyped) than 
JSON.  The JSON is a short-term response to that lack.


I also think we're trying to nudge Wes into making this his sample 
user-defined-function implementation ;-)


--
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Neo4j] Re: Thoughts about JSON support in Cypher...

2013-12-28 Thread Alan Robertson
JSON is a well-recognized data type with clear semantics which is 
well-supported by other NOSQL databases.  It is the lingua franca of 
user interfaces - with extremely broad acceptance and use.  In this 
sense, it's far more interesting than almost any other added type.  The 
syntax and semantics of handling it are clear and straightforward and 
documented as a standard.


Virtually everyone who writes a user interface will be dealing with JSON 
at some level.


They could implement maps of {map, bool, string, array, int, float, 
null) and that would be a cleaner final implementation - provided the 
arrays can be arrays with any given element being any one of the above 
types.





On 12/28/2013 3:49 PM, Nigel Small wrote:
Java can certainly handle Map which is the usual way 
to represent a JSON-esque object. The example I gave was simply an 
easier one to describe the idea as dates are built-in and JSON 
(de)serialisation requires a third-party library. The same theory 
should hold to be able to convert stringified *_json property values 
into Map values.


In terms of what Cypher could/should do with converted data, I'm not 
sure that Cypher would be the right place to do much manipulation 
anyway. Such values should probably simply be passed back to the 
calling application as opaque Objects and it would be up to that 
application to use/inspect them. Anything else would require Cypher to 
be extended in different directions for each new type supported.


Nige


On 28 December 2013 17:01, Alan Robertson <mailto:al...@unix.sh>> wrote:


I don't understand how this would help my use case. I don't have
any problem serializing/deserializing it. The example you gave
seems too trivial to be helpful.

Given that Java doesn't natively handle untyped/flexible data
structures like JSON objects, and Neo4j certainly isn't prepared
to handle them - this seems to be by far the more important part.

The issue really is what Cypher can do with data.  Or if you
prefer, why they don't have (untyped) maps that would be
JSON-compatible.

Either way, the serialization/deserialization doesn't seem nearly
sufficient to solve the problem.

Maybe I missed something.  Please enlighten me.



On 12/28/2013 3:23 AM, Nigel Small wrote:

I very much like Craig/Axel's idea of being able to tag certain
property keys such that their related values go through a
(de)serialisation handler on read/write. The implementation could
use the plugin mechanism to register converters that implement
custom read/write routines, something like:

public class StringToDateConverter implements
PropertyConverter {

private SimpleDateFormat formatter = new
SimpleDateFormat("-MM-dd");

public Date read(String value) {
return formatter.parse(value);
}

public String write(Date value) {
return formatter.format(value);
}

}

Then these could be registered in Cypher, much like indexes, to
match property keys that are named in a particular way...

CREATE HANDLER FOR '.*_date' USING 'StringToDateConverter'

There would certainly be some challenges to overcome though, not
least with exception handling and REST serialisation, but I
    daresay these aren't insurmountable.

Nige



On 28 December 2013 05:10, Alan Robertson mailto:al...@unix.sh>> wrote:

On 12/07/2013 02:58 AM, Michael Hunger wrote:

Let's move this whole discussion to the google group :)

Map support for properties is planned and almost made it
into the product some time ago but then were some
considerations so that it sadly didn't work out.

User defined functions would be a way to go but much better
with real support by the storage engine and language.

Wes, didn't you want to look into a UDF PoC?


Here is a very specific and real use case for such a user
defined function (or map capability) for JSON:

I have a discovery item in JSON which collects ulimit values
and looks like this:
{
  "discovertype": "ulimit",
  "description": "ulimit values for root",
  "host": "servidor",
  "source": "/usr/share/assimilation/discovery_agents/ulimit",
  "data": {
"hard":

{"c":null,"d":null,"f":null,"l":64,"m":null,*"n":1024*,"p":47013,"s":null,"t":null,"v":null},
"soft":

{"c":0,"d":null,"f":null,"l":64,"m":null,*"n":1024*,"p":47013,"s":8192,"t":null,"v":n

Re: [Neo4j] Re: Thoughts about JSON support in Cypher...

2013-12-28 Thread Alan Robertson
I don't understand how this would help my use case.  I don't have any 
problem serializing/deserializing it.  The example you gave seems too 
trivial to be helpful.


Given that Java doesn't natively handle untyped/flexible data structures 
like JSON objects, and Neo4j certainly isn't prepared to handle them - 
this seems to be by far the more important part.


The issue really is what Cypher can do with data.  Or if you prefer, why 
they don't have (untyped) maps that would be JSON-compatible.


Either way, the serialization/deserialization doesn't seem nearly 
sufficient to solve the problem.


Maybe I missed something.  Please enlighten me.


On 12/28/2013 3:23 AM, Nigel Small wrote:
I very much like Craig/Axel's idea of being able to tag certain 
property keys such that their related values go through a 
(de)serialisation handler on read/write. The implementation could use 
the plugin mechanism to register converters that implement custom 
read/write routines, something like:


public class StringToDateConverter implements 
PropertyConverter {


private SimpleDateFormat formatter = new 
SimpleDateFormat("-MM-dd");


public Date read(String value) {
return formatter.parse(value);
}

public String write(Date value) {
return formatter.format(value);
}

}

Then these could be registered in Cypher, much like indexes, to match 
property keys that are named in a particular way...


CREATE HANDLER FOR '.*_date' USING 'StringToDateConverter'

There would certainly be some challenges to overcome though, not least 
with exception handling and REST serialisation, but I daresay these 
aren't insurmountable.


Nige



On 28 December 2013 05:10, Alan Robertson <mailto:al...@unix.sh>> wrote:


On 12/07/2013 02:58 AM, Michael Hunger wrote:

Let's move this whole discussion to the google group :)

Map support for properties is planned and almost made it into the
product some time ago but then were some considerations so that
it sadly didn't work out.

User defined functions would be a way to go but much better with
real support by the storage engine and language.

Wes, didn't you want to look into a UDF PoC?


Here is a very specific and real use case for such a user defined
function (or map capability) for JSON:

I have a discovery item in JSON which collects ulimit values and
looks like this:
{
  "discovertype": "ulimit",
  "description": "ulimit values for root",
  "host": "servidor",
  "source": "/usr/share/assimilation/discovery_agents/ulimit",
  "data": {
"hard":

{"c":null,"d":null,"f":null,"l":64,"m":null,*"n":1024*,"p":47013,"s":null,"t":null,"v":null},
"soft":

{"c":0,"d":null,"f":null,"l":64,"m":null,*"n":1024*,"p":47013,"s":8192,"t":null,"v":null}
  }
}


This is the results of the ulimit discovery module.  I used the
JSON value null to represent the ulimit value unlimited.

One of those flags (-*n*) is the maximum number of open files.  As
you can see, this example is out of compliance with Neo4j best
practices ;-).

This is in a field called JSON_ulimit.

So, if I wanted to see if a machine had enough open files to
follow neo4j best practices, I would like to check
*/JSON_ulimit.data.soft.n/* and see if it was greater or equal to
5 (or null) on every machine running neo4j.

As it is now, I can't do this in Cypher.  I have to do it in
    python (or Java, or...)

I'd love to have a way to do this in Cypher.

*Michael: *Could I represent this data and perform this query with
the proposed map capability?
*Wes:* Could you make such a query work with a user-defined function?

Don't you want me to be able to tell your customers they're not in
compliance with Neo4j best practices?  :-D



-- 
 Alan Robertson  <mailto:al...@unix.sh>  - @OSSAlanR


"Openness is the foundation and preservative of friendship...  Let me claim from 
you at all times your undisguised opinions." - William Wilberforce

-- 
You received this message because you are subscribed to the Google

Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to neo4j+unsubscr...@googlegroups.com
<mailto:neo4j%2bunsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google 
Groups "Neo4j"

Re: [Neo4j] Re: Thoughts about JSON support in Cypher...

2013-12-27 Thread Alan Robertson
On 12/07/2013 02:58 AM, Michael Hunger wrote:
> Let's move this whole discussion to the google group :)
>
> Map support for properties is planned and almost made it into the
> product some time ago but then were some considerations so that it
> sadly didn't work out.
>
> User defined functions would be a way to go but much better with real
> support by the storage engine and language.
>
> Wes, didn't you want to look into a UDF PoC?

Here is a very specific and real use case for such a user defined
function (or map capability) for JSON:

I have a discovery item in JSON which collects ulimit values and looks
like this:
{
  "discovertype": "ulimit",
  "description": "ulimit values for root",
  "host": "servidor",
  "source": "/usr/share/assimilation/discovery_agents/ulimit",
  "data": {
"hard":
{"c":null,"d":null,"f":null,"l":64,"m":null,*"n":1024*,"p":47013,"s":null,"t":null,"v":null},
"soft":
{"c":0,"d":null,"f":null,"l":64,"m":null,*"n":1024*,"p":47013,"s":8192,"t":null,"v":null}
  }
}


This is the results of the ulimit discovery module.  I used the JSON
value null to represent the ulimit value unlimited.

One of those flags (-*n*) is the maximum number of open files.  As you
can see, this example is out of compliance with Neo4j best practices ;-).

This is in a field called JSON_ulimit.

So, if I wanted to see if a machine had enough open files to follow
neo4j best practices, I would like to check */JSON_ulimit.data.soft.n/*
and see if it was greater or equal to 5 (or null) on every machine
running neo4j.

As it is now, I can't do this in Cypher.  I have to do it in python (or
Java, or...)

I'd love to have a way to do this in Cypher.

*Michael:  *Could I represent this data and perform this query with the
proposed map capability?
*Wes:* Could you make such a query work with a user-defined function?

Don't you want me to be able to tell your customers they're not in
compliance with Neo4j best practices?  :-D


-- 
Alan Robertson  - @OSSAlanR

"Openness is the foundation and preservative of friendship...  Let me claim 
from you at all times your undisguised opinions." - William Wilberforce

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Neo4j] py2neo: "No handlers" message question

2013-12-26 Thread Alan Robertson
Hi,

How do I make this message go away?

No handlers could be found for logger "py2neo.packages.httpstream.http"

It doesn't happen all the time, but it does happen after I do certain
operations (not sure which ones).

-- 
    Alan Robertson  - @OSSAlanR

"Openness is the foundation and preservative of friendship...  Let me claim 
from you at all times your undisguised opinions." - William Wilberforce

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Neo4j] Re: An Open Cluster Framework (OCF) resource agent for Neo4j

2013-12-23 Thread Alan Robertson
As far as setting it up in the Assimilation project - that's completely
automatic.  There is nothing to do.  It does discovery, and then starts
monitoring it if the OCF agent is installed.

As far as setting it up in Pacemaker, etc. - a blog post would be
reasonable.  I should add the meta-data before writing the blog post -
because Pacemaker needs it ;-).  I should also eventually make use of
meta-data in the Assimilation project - but that will come later.

By the way, I patterned the metadata in my Query objects -- that is
graph nodes that describe queries, after the metadata in OCF - except
the Query object metadata is JSON instead of XML.

To correct a typo in the original note:
"Mine would also make a perfectly _fine_ init script".

In other words, it could easily serve both purposes.

In fact, it would make sense to distribute this as part of Neo4j.  You
would have to install it in /usr/lib/ocf/resource.d/neotechnology/neo4j
or something similar.  You could also install it under /etc/init.d/ as
well...

In my view, the provider of a system should ideally provide the scripts
that manage it under init and also as an HA resource.


On 12/21/2013 04:31 AM, Michael Hunger wrote:
> Would be cool to see a blog post on how to set it up and use it.
>
> Cool stuff.
>
> Michael
>
> On Saturday, December 21, 2013 5:16:41 AM UTC+1, AlanR wrote:
>
> Hi,
>
> I have a working OCF resource agent for Neo4j.  OCF resource
> agents are
> basically supersets of LSB init scripts.  Mine would also make a
> perfectly find init script.
>
> The main extra things are:
> You can configure them through environment variables - to support
> multiple instances and alternative configurations
> They support "real" monitoring, including multiple levels of
> monitoring difficulty/expense/depth
> They provide metadata describing how to configure them (I haven't
> added that to mine yet)
>
> Both the Pacemaker project and Red Hat's older cluster offerings
> support
> OCF resource agents.
>
> The code for this resource agent can be found here:
>
> http://hg.linux-ha.org/assimilation/file/ac5e22344a48/ocf/neo4j
> <http://hg.linux-ha.org/assimilation/file/ac5e22344a48/ocf/neo4j>
>
> This one supports two levels of monitoring depth - as we talked
> about my
> previous emails.
>
> I also have the code in the Assimilation project to recognize
> neo4j is
> running and automatically start monitoring it with this resource
> agent.
>
> So, now whenever I see neo4j, I start monitoring it for correct
> operation -- automatically ;-)
>
> [We do it for many other things as well, but the neo4j part seems
> most
> interesting to this mailing list].
>
> -- 
> Alan Robertson  - @OSSAlanR
>
> "Openness is the foundation and preservative of friendship...  Let
> me claim from you at all times your undisguised opinions." -
> William Wilberforce
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to neo4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.


-- 
Alan Robertson  - @OSSAlanR

"Openness is the foundation and preservative of friendship...  Let me claim 
from you at all times your undisguised opinions." - William Wilberforce

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Neo4j] An Open Cluster Framework (OCF) resource agent for Neo4j

2013-12-20 Thread Alan Robertson
Hi,

I have a working OCF resource agent for Neo4j.  OCF resource agents are
basically supersets of LSB init scripts.  Mine would also make a
perfectly find init script.

The main extra things are:
You can configure them through environment variables - to support
multiple instances and alternative configurations
They support "real" monitoring, including multiple levels of
monitoring difficulty/expense/depth
They provide metadata describing how to configure them (I haven't
added that to mine yet)

Both the Pacemaker project and Red Hat's older cluster offerings support
OCF resource agents.

The code for this resource agent can be found here:
http://hg.linux-ha.org/assimilation/file/ac5e22344a48/ocf/neo4j

This one supports two levels of monitoring depth - as we talked about my
previous emails.

I also have the code in the Assimilation project to recognize neo4j is
running and automatically start monitoring it with this resource agent.

So, now whenever I see neo4j, I start monitoring it for correct
operation -- automatically ;-)

[We do it for many other things as well, but the neo4j part seems most
interesting to this mailing list].

-- 
Alan Robertson  - @OSSAlanR

"Openness is the foundation and preservative of friendship...  Let me claim 
from you at all times your undisguised opinions." - William Wilberforce

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Neo4j] Sample monitoring code for neo4j and a question about REST output

2013-12-18 Thread Alan Robertson
The curl bug I ran into is known - number 30 on the list of known curl
bugs...
http://curl.haxx.se/docs/knownbugs.html

I just guessed on how to work around it.  My workaround has no
side-effects for my usage.  But it was kind of surprising and annoying...



On 12/18/2013 01:18 PM, Wes Freeman wrote:
> I think so, on the issue.
>
> // compatible with back until 1.8 and maybe earlier... will return
> fast as long as there aren't millions of empty nodes at the beginning
> of the file
> start n=node(*) return n limit 1;
>
> Wes
>
> On Wed, Dec 18, 2013 at 3:11 PM, Alan Robertson  <mailto:al...@unix.sh>> wrote:
>
> Should I open an issue on this?
>
>
>
> On 12/18/2013 11:47 AM, Wes Freeman wrote:
>>
>> And yeah you're right, ::1 doesn't work in the config file (which
>> is odd), but if you bind to :: you can connect to ::1. Just
>> tested with my go driver using the following connection string:
>>db, err := sql.Open("neo4j-cypher", "http://[::1]:7474/";
>> <http://[::1]:7474/>)
>>
>> Wes
>>
>> On Wed, Dec 18, 2013 at 1:22 PM, Alan Robertson > <mailto:al...@unix.sh>> wrote:
>>
>> I meant to say "::1".  Right now, it won't hear local only
>> ipv6 connections...
>>
>> But your suggested query doesn't have to touch the data store
>> at all.  Right?
>>
>> I would assume that either of the others I gave would touch
>> the data store, and would typically fail of the data store
>> was hung or broken...
>>
>> I would assume your suggested query would not touch the data
>> store.
>>
>> Is that a correct understanding?
>>
>>
>>
>>
>> On 12/18/2013 11:13 AM, Wes Freeman wrote:
>>> You can make it listen on :: if you set it in
>>> neo4j-server.properties:
>>> # Let the webserver only listen on the specified IP. Default
>>> is localhost (only
>>> # accept local connections). Uncomment to allow any
>>> connection. Please see the
>>> # security section in the neo4j manual before modifying this.
>>> org.neo4j.server.webserver.address=::
>>>
>>> My favorite ultra-simple 2.0 query is "RETURN 1;"--which
>>> works even if db is totally empty.
>>>
>>> Wes
>>>
>>> On Wed, Dec 18, 2013 at 10:56 AM, Alan Robertson
>>> mailto:al...@unix.sh>> wrote:
>>>
>>> Thanks for the explanation.  I have always (mistakenly)
>>> thought of the type of the relationship as a sort of
>>> property.
>>>
>>> In any case, the script seems to work quite nicely, and
>>> is easy to autogenerate the parameters for from
>>> Assimilation discovery information.
>>>
>>> I discovered something surprising (a bug?) about curl --
>>> unless I give it the -g flag (don't expand globs), then
>>> it doesn't like ipv6 IP/port combinations - like
>>> [:::127.0.0.1]:7474.  IMHO, it shouldn't be trying
>>> to glob IP addresses...
>>>
>>> I noticed that neo4j doesn't appear to be ipv6 compliant
>>> (i.e., it doesn't listen on '::').  Is that intentional?
>>>
>>> In any case, the script seems to give neo4j some
>>> trivial, but meaningful exercise.  You have to parse the
>>> query, optimize it, create a query plan, execute it,
>>> walk through the results, convert them to JSON and send
>>> them back out the REST interface.  Quite a few things
>>> have to be working for it to succeed.
>>>
>>> Do you have a favorite trivial query that will succeed
>>> in any non-empty neo4j database?
>>>
>>> Do you have a better grep pattern for matching correct
>>> output?
>>>
>>>
>>>
>>> On 12/17/2013 11:18 PM, Michael Hunger wrote:
>>>> return type(r)
>>>>
>>>> Empty curly braces mean no props
>>>>
>>>> Sent from mobile device
>>>>
>>>> Am 18.1

  1   2   >