Re: [Neo4j] Embedded or Standalone?

2011-08-28 Thread Peter Neubauer
Aman,
Generally speaking the embeddded use of Neo4j is fase since there is no
network serialization overhead -the database runs in-process and is thus
much faster. However, the core engine in both versions is the same so how
big the network penalty is depends very much on your domain and use case .

/Peter

On Monday, August 29, 2011, Amandeep Jakhu 
wrote:
>
> Which method of using Neo4j is faster - Embedded or Standalone?
>
> --
> Aman
>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>

-- 

Cheers,

/peter neubauer

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

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Embedded or Standalone?

2011-08-28 Thread Amandeep Jakhu

Which method of using Neo4j is faster - Embedded or Standalone?

--
Aman
  
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] API adventures in Scalaland

2011-08-28 Thread Peter Neubauer
Niels,
Is that Scala code in the graph collections? If you want, ,you could use the
neo4j/neoviz project to output .dot graphs at any point and thus visualize
what's happening in the graph to illustrate :)

/Peter

On Monday, August 29, 2011, Niels Hoogeveen 
wrote:
>
> In the last week I have been working on a Neo4j API in Scala, taking
navigation in the graph as primary.
>
> Just like the Enhanced API written in Java, the Scala API generalizes each
element (Node, Relationship, RelationshipType, property name and property
value) of the Neo4j database as being a Vertex.
>
> Before digging into the details of the Scala API, let's start with some
example code.
>
>val name = Db(String("name"))
>val friend = Db(VertexOut("FRIEND"))
>val john = Db(NewVertex).put(name, "John")
>val pete = Db(NewVertex).put(name, "Pete").put(friend, john)
>
> This piece of code defines the PropertyType "name" and the EdgeTypes
"FRIEND", creates two vertices for the persons "John" and "Pete", and states
that John is a friend of Pete.
>
> In standard Neo4j API this could have been written as:
>
>  Node john = db.createNode();
>  Node pete = db.createNode();
>  john.setProperty("name", "John");
>  pete.setProperty("name", "Pete");
>  pete.createRelationshipTo(john,
DynamicRelationshipType.withName("FRIEND"));
>
> Apart from an obvious style difference, there is one immediate difference
noticeable between the two API's.
>
> In the Neo4j API it is possible to write:
>
>  john.setProperty("name", "John");
>  pete.setProperty("name", 99);
>
> While the following Scala program won't typecheck:
>
>  pete.put(name, 99) //ERROR
>
> The "name" property is defined as a String and the API enforces that type.
This also applies when fetching a property value. In the Neo4j API we write:
>
>  john.getProperty("name")  // returns java.lang.Object
>
> In the Scala API we write:
>
>  john(name)   // returns java.lang.String
>
> It is also possible to ask the names of pete's friend as follows:
>
>  pete(friend andThen name)
>
> This is equal to the Neo4j call:
>
>
 (String)pete.getSingleRelationship(DynamicRelationshipType.withName("FRIEND"),
Direction.OUTGOING).endNode.getProperty("name")
>
> If pete has more than one friend, we have to define a different key to
fetch them ( the VertexOut key refers to one single relationship, either the
one to be created, or a singular exisiting relationship ):
>
>  val friends = Db(Vertices("FRIEND"))
>
> We now have a key to all "FRIEND" relationships so we can ask:
>
>  pete(friends andThen name)
>
> This returns an Iterable[String] with the names of all Pete's friends.
>
> We can even do:
>
>  pete(Rec(friends) andThen name)
>
> This returns an Iterable[String] with the names of all Pete's friends of
friends (to the n-th degree). The Rec object recursively applies "friend" to
all vertices it traverses, remembering already taken paths, traversed
Relationships or traversed Nodes (settings are optional with sensible
defaults).
>
> We can also write:
>
>  pete(Rec(friend, 2) andThen name)
>
> This returns an Iterable[String] with the names of all Pete's friends of
friends (to the 2nd degree)
>
> It is even possible to write:
>
>  pete(Rec(friend andThen friend) andThen name)
>
> This returns an Iterable[String] with the names of all Pete's friends of
friends (to the n-th degree where n is even)
>
> Instead of having get methods for properties and relationships and
traversal methods on nodes, the Scala API uses one calling pattern for all
database related objects:
>
> object(traverser)
>
> So a call like Db(String("name")) is not just a call on the database to
return a PropertyType with name "name" and datatype String, it is a
traversal from the database to that PropertyType. What is being returned
with that call is a traverser itself.
>
> Traversers can be composed with "andThen", so the output of one traverser
is used as input for the next traverser.
>
> All traversers are typed, so the "andThen" connective can only be applied
when the type of the output of the left-hand-side traverser is equal to the
type as the input of the right-hand-side traverser. This is checked at
compile time.
>
> Traversals not only work on Vertex objects and it's subtypes (Property,
PropertyType, Edge, EdgeType...), it also works on Iterable[Vertex].
>
> Instead of fetching just pete's friends, as in:
>
> pete(friends)
>
> we can also fetch the friends of pete and john:
>
> val frnds = List(pete, john)
> frnds(friends)
>
> or if we don't need the "frnds" object later on, we simply state:
>
> List(pete, john)(friends)
>
> and if we want the names of those friends:
>
> List(pete, john)(friends andThen name)
>
> it is even possible to set properties or create relationships on
Iterable[Vertex]
>
> val age = Db(Int("age"))
> val nationality = Db(String("nationality"))
> List(pete, john).put(age, 40).put(nationality, "Irish")
>
> This sets the "age" property to 40 on both "pete" and "john".
>
> It is also possible to write this 

Re: [Neo4j] Neo4j .Net Api - Indexing

2011-08-28 Thread Romiko Derbynew
The Package and Source Code is now officially available here:
http://nuget.org/List/Packages/Neo4jClient
Source Code at:
http://hg.readify.net/neo4jclient/


-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Tatham Oddie
Sent: Sunday, 28 August 2011 8:14 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Neo4j .Net Api - Indexing

Hi Peter,

The client library is on NuGet: http://nuget.org/List/Packages/Neo4jClient.Edge

(NuGet is .NET's package manager.)

The source code is up at http://hg.tath.am/neo4jclient

I haven't pushed it to GitHub yet because of a bug in Dulwich affecting my 
version of Hg-Git. (Empty repo at https://github.com/tathamoddie/Neo4jClient 
where it'll go eventually.)



-- Tatham


-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Peter Neubauer
Sent: Sunday, 28 August 2011 5:55 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Neo4j .Net Api - Indexing

Romiko,
Nice writeup! Do you have the link to the full project for people to try? Is it 
on GIThub for people to try?

/peter

On Sunday, August 28, 2011, Romiko Derbynew 
wrote:
> Hi Guys,
>
> I have written a blog on using our .Net Api for indexes in .Net, so 
> any
.Net dudes out there might want to give it a bash, look forward hearing 
feedback.
>
> http://romikoderbynew.com/2011/08/28/lucene-full-text-indexing-with-ne
> o4j/
>
> Cheers
>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>

-- 

Cheers,

/peter neubauer

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

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] API adventures in Scalaland

2011-08-28 Thread Niels Hoogeveen

In the last week I have been working on a Neo4j API in Scala, taking navigation 
in the graph as primary.

Just like the Enhanced API written in Java, the Scala API generalizes each 
element (Node, Relationship, RelationshipType, property name and property 
value) of the Neo4j database as being a Vertex. 

Before digging into the details of the Scala API, let's start with some example 
code.

val name = Db(String("name"))
val friend = Db(VertexOut("FRIEND"))
val john = Db(NewVertex).put(name, "John")
val pete = Db(NewVertex).put(name, "Pete").put(friend, john)

This piece of code defines the PropertyType "name" and the EdgeTypes "FRIEND", 
creates two vertices for the persons "John" and "Pete", and states that John is 
a friend of Pete.

In standard Neo4j API this could have been written as:

  Node john = db.createNode();
  Node pete = db.createNode();
  john.setProperty("name", "John");
  pete.setProperty("name", "Pete");
  pete.createRelationshipTo(john, DynamicRelationshipType.withName("FRIEND"));

Apart from an obvious style difference, there is one immediate difference 
noticeable between the two API's.

In the Neo4j API it is possible to write:

  john.setProperty("name", "John");
  pete.setProperty("name", 99);

While the following Scala program won't typecheck:

  pete.put(name, 99) //ERROR

The "name" property is defined as a String and the API enforces that type. This 
also applies when fetching a property value. In the Neo4j API we write:

  john.getProperty("name")  // returns java.lang.Object

In the Scala API we write:

  john(name)   // returns java.lang.String

It is also possible to ask the names of pete's friend as follows:

  pete(friend andThen name)

This is equal to the Neo4j call:

  
(String)pete.getSingleRelationship(DynamicRelationshipType.withName("FRIEND"), 
Direction.OUTGOING).endNode.getProperty("name")

If pete has more than one friend, we have to define a different key to fetch 
them ( the VertexOut key refers to one single relationship, either the one to 
be created, or a singular exisiting relationship ):

  val friends = Db(Vertices("FRIEND"))

We now have a key to all "FRIEND" relationships so we can ask:

  pete(friends andThen name)

This returns an Iterable[String] with the names of all Pete's friends.

We can even do:

  pete(Rec(friends) andThen name)

This returns an Iterable[String] with the names of all Pete's friends of 
friends (to the n-th degree). The Rec object recursively applies "friend" to 
all vertices it traverses, remembering already taken paths, traversed 
Relationships or traversed Nodes (settings are optional with sensible defaults).

We can also write:

  pete(Rec(friend, 2) andThen name)

This returns an Iterable[String] with the names of all Pete's friends of 
friends (to the 2nd degree)

It is even possible to write:

  pete(Rec(friend andThen friend) andThen name)

This returns an Iterable[String] with the names of all Pete's friends of 
friends (to the n-th degree where n is even)

Instead of having get methods for properties and relationships and traversal 
methods on nodes, the Scala API uses one calling pattern for all database 
related objects:

object(traverser)

So a call like Db(String("name")) is not just a call on the database to return 
a PropertyType with name "name" and datatype String, it is a traversal from the 
database to that PropertyType. What is being returned with that call is a 
traverser itself. 

Traversers can be composed with "andThen", so the output of one traverser is 
used as input for the next traverser. 

All traversers are typed, so the "andThen" connective can only be applied when 
the type of the output of the left-hand-side traverser is equal to the type as 
the input of the right-hand-side traverser. This is checked at compile time.

Traversals not only work on Vertex objects and it's subtypes (Property, 
PropertyType, Edge, EdgeType...), it also works on Iterable[Vertex]. 

Instead of fetching just pete's friends, as in:

pete(friends)

we can also fetch the friends of pete and john:

val frnds = List(pete, john)
frnds(friends)

or if we don't need the "frnds" object later on, we simply state:

List(pete, john)(friends)

and if we want the names of those friends:

List(pete, john)(friends andThen name)

it is even possible to set properties or create relationships on 
Iterable[Vertex]

val age = Db(Int("age"))
val nationality = Db(String("nationality"))
List(pete, john).put(age, 40).put(nationality, "Irish")

This sets the "age" property to 40 on both "pete" and "john".

It is also possible to write this as a traversal:

List(pete, john)(Put(age, 40) andThen Put(nationality, "Irish"))

All traversers are function objects, so they can both be called as a function 
and can be treated as an object. This makes it possible to create traverers 
programmatically, allowing for the storage of traversers in the database, and 
many more nifty tricks.

Using the Put object, we could for example create 

Re: [Neo4j] Neo4j .Net Api - Indexing

2011-08-28 Thread Romiko Derbynew
Hi Peter,

We been doing some work on Azure Cloud deployment. At some point I will put a 
blog post up on it when I find a moment. Some aspects of it in regards to 
automatic deployment (not bootstrapping) is on this blog, you will notice the 
PowerShell scripts in the blog below pertain to getting neo4j binaries from 
blog storage. The next blog will cover the actual hosting of Neo4j as a worker 
role off the blob and cloud drive.

http://romikoderbynew.com/2011/08/12/automating-windows-azure-deployments-leveraging-teamcityartefacts-and-powershell/




-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Peter Neubauer
Sent: Monday, 29 August 2011 2:05 AM
To: Neo4j user discussions
Subject: Re: [Neo4j] Neo4j .Net Api - Indexing

Cool Tatham,
Thanks for sharing, let us know your progress - there is also work going on to 
deploy Neo4j Server on Azure, let me know if you are interested in testing or 
helping out there!

/peter

On Sunday, August 28, 2011, Tatham Oddie  wrote:
> Hi Peter,
>
> The client library is on NuGet:
http://nuget.org/List/Packages/Neo4jClient.Edge
>
> (NuGet is .NET's package manager.)
>
> The source code is up at http://hg.tath.am/neo4jclient
>
> I haven't pushed it to GitHub yet because of a bug in Dulwich 
> affecting my
version of Hg-Git. (Empty repo at
https://github.com/tathamoddie/Neo4jClientwhere it'll go eventually.)
>
>
>
> -- Tatham
>
>
> -Original Message-
> From: user-boun...@lists.neo4j.org 
> [mailto:user-boun...@lists.neo4j.org]
On Behalf Of Peter Neubauer
> Sent: Sunday, 28 August 2011 5:55 PM
> To: Neo4j user discussions
> Subject: Re: [Neo4j] Neo4j .Net Api - Indexing
>
> Romiko,
> Nice writeup! Do you have the link to the full project for people to try?
Is it on GIThub for people to try?
>
> /peter
>
> On Sunday, August 28, 2011, Romiko Derbynew 
> 
> wrote:
>> Hi Guys,
>>
>> I have written a blog on using our .Net Api for indexes in .Net, so 
>> any
> .Net dudes out there might want to give it a bash, look forward 
> hearing
feedback.
>>
>> http://romikoderbynew.com/2011/08/28/lucene-full-text-indexing-with-n
>> e
>> o4j/
>>
>> Cheers
>>
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
>
> --
>
> Cheers,
>
> /peter neubauer
>
> GTalk:  neubauer.peter
> Skype   peter.neubauer
> Phone   +46 704 106975
> LinkedIn   http://www.linkedin.com/in/neubauer
> Twitter  http://twitter.com/peterneubauer
>
> http://www.neo4j.org   - Your high performance graph database.
> http://startupbootcamp.org/- Öresund - Innovation happens HERE.
> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>

-- 

Cheers,

/peter neubauer

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

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Spatial query with property filter

2011-08-28 Thread faffi
Hey guys,

I'm seeing some kind of disconnect between the spatial and the regular graph
traversing query. I can't find a way of executing a spatial query like in
SimplePointLayer but also providing something like a ReturnEvaluator.

My use case is essentially for all nodes within a 10km radius, return all
with name "foo". Do I actually have to iterate through all the nodes
returned by the query in a list and individually check them?

Thanks,
faffi

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Spatial-query-with-property-filter-tp3291410p3291410.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Delete all contents in graph?

2011-08-28 Thread etc1
Thanks, Pete, this is perfect!

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On
Behalf Of Peter Neubauer
Sent: Saturday, August 27, 2011 6:47 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Delete all contents in graph?

Raffi,
you can do something like
https://github.com/neo4j/community/blob/master/kernel/src/test/java/org/neo4
j/test/ImpermanentGraphDatabase.java#L203,
basically walking all nodes and deleting the relationships, and delete the
nodes after that.

Would that work?

Otherwise, simple shutdown the DB, delete the database dir and start it
again.

Cheers,

/peter neubauer

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

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Sun, Aug 28, 2011 at 12:11 AM, etc1  wrote:

> Is there a function to delete all contents in the graph?
>
> Raffi
>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] More batch vs. single operation benchmarks

2011-08-28 Thread Jim Webber
I suspect (though I haven't profiled it) that the decreasing performance of 
batches could be due to JSON processing.

If so, we're going to have to switch to some kind of streamed approach for the 
REST batch API.

I'll add these notes into the job in the community backlog.

Thanks very much Josh!

Jim
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Cypher with sequenced relationships return empty

2011-08-28 Thread Peter Neubauer
What made it work?

On Sunday, August 28, 2011, noppanit  wrote:
> Solved!
>
> --
> View this message in context:
http://neo4j-community-discussions.438527.n3.nabble.com/Cypher-with-sequenced-relationships-return-empty-tp3289960p3291043.html
> Sent from the Neo4j Community Discussions mailing list archive at
Nabble.com.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>

-- 

Cheers,

/peter neubauer

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

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] More batch vs. single operation benchmarks

2011-08-28 Thread Rick Bullotta
Wow.  That's surprising data.  With Neo4J embedded, we can usually get about 
100X of that performance (including Lucene indexing of the nodes), so there 
clearly seem to be some big impacts from using the REST interface versus Neo4J 
embedded.

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of jadell
Sent: Sunday, August 28, 2011 3:55 PM
To: user@lists.neo4j.org
Subject: [Neo4j] More batch vs. single operation benchmarks

Here are the latest benchmarks of batch vs. individual entity creation using
the Neo4jPHP library.  Most of the processing time is spent on the server,
so I believe that these numbers are probably not specific to Neo4jPHP.  I'm
not implying that there is anything wrong or to be fixed; I just thought the
results might be of interest to others.  I'd love to see results from others
using a REST client in any language.

3 scenarios were run 10 times each for different batch sizes.  The scenarios
and averages of the 10 runs of each batch size are below.  First column is
the batch size, second column is the average time in seconds to create that
many entities in a batch, third column is the average time in seconds to
create that many entities with individual calls.

Benchmark script can be found here: http://gist.github.com/1177100


Results:

Scenario 1: Create nodes
sizebatchsingle
10  00
100 00.8
250 0.1  1.5
500 0.9  1.7
10001.5  3.8
25006.7  9.6
500023.5 13.2


Scenario 2: Create relationships
sizebatchsingle
10  00
100 0.2  0.2
250 0.3  0.5
500 0.6  1.1
10001.3  3
25007.1  9.7
500025.3 22.2


Scenario 3: Create 2 nodes and a relationship between them
sizebatchsingle
10  00.1
100 0.4  1.3
250 0.8  3
500 2.9  5.2
10009.2  11.9
250054.3 29.9
5000710.359.6


Note: in the 5000 run of the last scenario, 15000 operations are sent in a
single HTTP request.  10 runs of the 5000 batch size (15 operations
total operations in 10 batches) took almost 2 hours to complete.


-- Josh Adell


--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/More-batch-vs-single-operation-benchmarks-tp3291092p3291092.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] More batch vs. single operation benchmarks

2011-08-28 Thread jadell
Here are the latest benchmarks of batch vs. individual entity creation using
the Neo4jPHP library.  Most of the processing time is spent on the server,
so I believe that these numbers are probably not specific to Neo4jPHP.  I'm
not implying that there is anything wrong or to be fixed; I just thought the
results might be of interest to others.  I'd love to see results from others
using a REST client in any language.

3 scenarios were run 10 times each for different batch sizes.  The scenarios
and averages of the 10 runs of each batch size are below.  First column is
the batch size, second column is the average time in seconds to create that
many entities in a batch, third column is the average time in seconds to
create that many entities with individual calls.

Benchmark script can be found here: http://gist.github.com/1177100


Results:

Scenario 1: Create nodes
sizebatchsingle
10  00
100 00.8
250 0.1  1.5
500 0.9  1.7
10001.5  3.8
25006.7  9.6
500023.5 13.2


Scenario 2: Create relationships
sizebatchsingle
10  00
100 0.2  0.2
250 0.3  0.5
500 0.6  1.1
10001.3  3
25007.1  9.7
500025.3 22.2


Scenario 3: Create 2 nodes and a relationship between them
sizebatchsingle
10  00.1
100 0.4  1.3
250 0.8  3
500 2.9  5.2
10009.2  11.9
250054.3 29.9
5000710.359.6


Note: in the 5000 run of the last scenario, 15000 operations are sent in a
single HTTP request.  10 runs of the 5000 batch size (15 operations
total operations in 10 batches) took almost 2 hours to complete.


-- Josh Adell


--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/More-batch-vs-single-operation-benchmarks-tp3291092p3291092.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] [Solved] Cypher with sequenced relationships return empty

2011-08-28 Thread noppanit
Solved!

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Cypher-with-sequenced-relationships-return-empty-tp3289960p3291043.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Cypher with sequenced relationships return empty

2011-08-28 Thread noppanit
Hi Thank you for your reply, but I did this in embedded neo4j.

This is what I've done. 

String queryAllNotifications = String.format("start n=(%d), user=(%d) match
(n)-[:%s]-(x)-[:%s]-(user) return x", notificationsIndex.getId(),
userNode.getId(),
CONTAINS.name(),
MESSAGE_TO.name());

And I'm pretty sure that all the variables are correct.

And this is the printout of the string
start n=(6), user=(9) match (n)-[:Contains]-(x)-[:Message_To]-(user) return
x

Thanks a lot. 

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Cypher-with-sequenced-relationships-return-empty-tp3289960p3291022.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j .Net Api - Indexing

2011-08-28 Thread Peter Neubauer
Cool Tatham,
Thanks for sharing, let us know your progress - there is also work going on
to deploy Neo4j Server on Azure, let me know if you are interested in
testing or helping out there!

/peter

On Sunday, August 28, 2011, Tatham Oddie  wrote:
> Hi Peter,
>
> The client library is on NuGet:
http://nuget.org/List/Packages/Neo4jClient.Edge
>
> (NuGet is .NET's package manager.)
>
> The source code is up at http://hg.tath.am/neo4jclient
>
> I haven't pushed it to GitHub yet because of a bug in Dulwich affecting my
version of Hg-Git. (Empty repo at
https://github.com/tathamoddie/Neo4jClientwhere it'll go eventually.)
>
>
>
> -- Tatham
>
>
> -Original Message-
> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org]
On Behalf Of Peter Neubauer
> Sent: Sunday, 28 August 2011 5:55 PM
> To: Neo4j user discussions
> Subject: Re: [Neo4j] Neo4j .Net Api - Indexing
>
> Romiko,
> Nice writeup! Do you have the link to the full project for people to try?
Is it on GIThub for people to try?
>
> /peter
>
> On Sunday, August 28, 2011, Romiko Derbynew 
> wrote:
>> Hi Guys,
>>
>> I have written a blog on using our .Net Api for indexes in .Net, so
>> any
> .Net dudes out there might want to give it a bash, look forward hearing
feedback.
>>
>> http://romikoderbynew.com/2011/08/28/lucene-full-text-indexing-with-ne
>> o4j/
>>
>> Cheers
>>
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
>
> --
>
> Cheers,
>
> /peter neubauer
>
> GTalk:  neubauer.peter
> Skype   peter.neubauer
> Phone   +46 704 106975
> LinkedIn   http://www.linkedin.com/in/neubauer
> Twitter  http://twitter.com/peterneubauer
>
> http://www.neo4j.org   - Your high performance graph database.
> http://startupbootcamp.org/- Öresund - Innovation happens HERE.
> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>

-- 

Cheers,

/peter neubauer

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

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] RDF querying

2011-08-28 Thread Marko Rodriguez
Hello,

Note that with loadFile(), you are not incrementing your commit manager's 
counter and thus, if your RDF file is large, you may run out of memory. See the 
work of Claudio for a good model for large RDF graphs:
http://blog.acaro.org/entry/dbpedia4neo

https://github.com/claudiomartella/dbpedia4neo/tree/master/src/main/java/org/acaro/dbpedia4neo/inserter

Finally, you do not manager.close() at the end in order to commit your 
transaction.

Good luck,
Marko.

http://markorodriguez.com

On Aug 28, 2011, at 9:09 AM, Shri :) wrote:

> Hello everyone,
> 
>   I am very very new to Neo4j and OOP, I am working on a project using
> Neo4j system. I have already uploaded my RDF data into Neo4j using the
> following code (snippet)
> 
> 
> 
> Neo4jGraph neo = new Neo4jGraph("dataset");
>Sail sail = new GraphSail(neo);
>  sail.initialize();
>CommitManager manager =
> TransactionalGraphHelper.createCommitManager(neo, 10);
> 
>SailConnection sc= sail.getConnection();
> 
>for (String file: args) {
>System.out.println("Loading " + file + ": ");
>loadFile(file, sail.getConnection(), sail.getValueFactory(), manager);
>System.out.print('\n');
>}
> 
> 
> I now want to write write a separate code to make my connection with the
> already created RDF store using Sail, I am confused about how I can make
> this connection without creating any new store..Kindly throw some light on
> this, I am stuck very badly..Thanks in advance..
> 
> 
> shri
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] RDF querying

2011-08-28 Thread Peter Neubauer
Hi there,
the basics should be covered under
https://github.com/tinkerpop/blueprints/wiki/Sail-Ouplementation, let me
know if that helps!

Cheers,

/peter neubauer

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

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Sun, Aug 28, 2011 at 5:07 PM, shri  wrote:

> Hello everyone,
>
>   I am very very new to Neo4j and OOP, I am working on a project using
> Neo4j system. I have already uploaded my RDF data into Neo4j using the
> following code (snippet)
> 
>
>
> Neo4jGraph neo = new Neo4jGraph("dataset");
>Sail sail = new GraphSail(neo);
>  sail.initialize();
>CommitManager manager =
> TransactionalGraphHelper.createCommitManager(neo, 10);
>
>SailConnection sc= sail.getConnection();
>
>for (String file: args) {
>System.out.println("Loading " + file + ": ");
>loadFile(file, sail.getConnection(), sail.getValueFactory(),
> manager);
>System.out.print('\n');
>}
> 
>
> I now want to write write a separate code to make my connection with the
> already created RDF store using Sail, I am confused about how I can make
> this connection without creating any new store..Kindly throw some light on
> this, I am stuck very badly..Thanks in advance..
>
> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/RDF-querying-tp3290725p3290725.html
> Sent from the Neo4j Community Discussions mailing list archive at
> Nabble.com.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] RDF querying

2011-08-28 Thread Shri :)
Hello everyone,

   I am very very new to Neo4j and OOP, I am working on a project using
Neo4j system. I have already uploaded my RDF data into Neo4j using the
following code (snippet)



Neo4jGraph neo = new Neo4jGraph("dataset");
Sail sail = new GraphSail(neo);
  sail.initialize();
CommitManager manager =
TransactionalGraphHelper.createCommitManager(neo, 10);

SailConnection sc= sail.getConnection();

for (String file: args) {
System.out.println("Loading " + file + ": ");
loadFile(file, sail.getConnection(), sail.getValueFactory(), manager);
System.out.print('\n');
}


I now want to write write a separate code to make my connection with the
already created RDF store using Sail, I am confused about how I can make
this connection without creating any new store..Kindly throw some light on
this, I am stuck very badly..Thanks in advance..


shri
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] RDF querying

2011-08-28 Thread shri
Hello everyone,

   I am very very new to Neo4j and OOP, I am working on a project using
Neo4j system. I have already uploaded my RDF data into Neo4j using the
following code (snippet)



Neo4jGraph neo = new Neo4jGraph("dataset");
Sail sail = new GraphSail(neo);
  sail.initialize();
CommitManager manager =
TransactionalGraphHelper.createCommitManager(neo, 10);

SailConnection sc= sail.getConnection();

for (String file: args) {
System.out.println("Loading " + file + ": ");
loadFile(file, sail.getConnection(), sail.getValueFactory(), 
manager);
System.out.print('\n');
}


I now want to write write a separate code to make my connection with the
already created RDF store using Sail, I am confused about how I can make
this connection without creating any new store..Kindly throw some light on
this, I am stuck very badly..Thanks in advance..

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/RDF-querying-tp3290725p3290725.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Cypher with sequenced relationships return empty

2011-08-28 Thread Peter Neubauer
Did you do this in the webadmin? Remember to hit Enter twice, otherwise it
is just a line break for multiline statements ...

Cheers,

/peter neubauer

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

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Sun, Aug 28, 2011 at 1:40 AM, noppanit  wrote:

> Hi All,
>
> This is my graph,
>
> Notifications --[Contains]-- Notification --[Message_To]-- User
>
> start n=(6), user=(9) match (n)-[:Contains]-(x)-[:Message_To]-(user) return
> x
>
> But when I run this cypher I got nothing back, so I'm not sure if I'm
> missing nothing obvious?
>
> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/Cypher-with-sequenced-relationships-return-empty-tp3289960p3289960.html
> Sent from the Neo4j Community Discussions mailing list archive at
> Nabble.com.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Best library for Clojure?

2011-08-28 Thread Peter Neubauer
Don,
yes, this looks pretty hot. also,
https://github.com/mattrepl/clojure-neo4j/network seems to list some other
forks. Does anyone have pointers?

Cheers,

/peter neubauer

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

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.


On Mon, Jul 25, 2011 at 6:54 AM, Don Jackson <
neo4j-u...@clark-communications.com> wrote:

>
> Hello,
>
> Which is the best library for using Neo4j from Clojure?
>
> This fork:
>
>https://github.com/wagjo/borneo
>
> Seems active, and maintained.
>
> Any advice or pointers would be appreciated.
>
> Don
>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j .Net Api - Indexing

2011-08-28 Thread Romiko Derbynew
Thx man!

Sent from my iPhone

On 28/08/2011, at 8:18 PM, "Tatham Oddie"  wrote:

> Hi Peter,
> 
> The client library is on NuGet: 
> http://nuget.org/List/Packages/Neo4jClient.Edge
> 
> (NuGet is .NET's package manager.)
> 
> The source code is up at http://hg.tath.am/neo4jclient
> 
> I haven't pushed it to GitHub yet because of a bug in Dulwich affecting my 
> version of Hg-Git. (Empty repo at https://github.com/tathamoddie/Neo4jClient 
> where it'll go eventually.)
> 
> 
> 
> -- Tatham
> 
> 
> -Original Message-
> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
> Behalf Of Peter Neubauer
> Sent: Sunday, 28 August 2011 5:55 PM
> To: Neo4j user discussions
> Subject: Re: [Neo4j] Neo4j .Net Api - Indexing
> 
> Romiko,
> Nice writeup! Do you have the link to the full project for people to try? Is 
> it on GIThub for people to try?
> 
> /peter
> 
> On Sunday, August 28, 2011, Romiko Derbynew 
> wrote:
>> Hi Guys,
>> 
>> I have written a blog on using our .Net Api for indexes in .Net, so 
>> any
> .Net dudes out there might want to give it a bash, look forward hearing 
> feedback.
>> 
>> http://romikoderbynew.com/2011/08/28/lucene-full-text-indexing-with-ne
>> o4j/
>> 
>> Cheers
>> 
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>> 
> 
> -- 
> 
> Cheers,
> 
> /peter neubauer
> 
> GTalk:  neubauer.peter
> Skype   peter.neubauer
> Phone   +46 704 106975
> LinkedIn   http://www.linkedin.com/in/neubauer
> Twitter  http://twitter.com/peterneubauer
> 
> http://www.neo4j.org   - Your high performance graph database.
> http://startupbootcamp.org/- Öresund - Innovation happens HERE.
> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
> 
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Loading WordNet 3.0 RDF into Neo4j?

2011-08-28 Thread espeed

Peter Neubauer wrote:
> 
> I would try the blueprints rdf importer. look at my github home
> (peterneubauer) for a project to import rdf from dbpedia which should
> work for any rdf.
> 

Thanks Peter!

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Loading-WordNet-3-0-RDF-into-Neo4j-tp3289356p3290448.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j .Net Api - Indexing

2011-08-28 Thread Tatham Oddie
Hi Peter,

The client library is on NuGet: http://nuget.org/List/Packages/Neo4jClient.Edge

(NuGet is .NET's package manager.)

The source code is up at http://hg.tath.am/neo4jclient

I haven't pushed it to GitHub yet because of a bug in Dulwich affecting my 
version of Hg-Git. (Empty repo at https://github.com/tathamoddie/Neo4jClient 
where it'll go eventually.)



-- Tatham


-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Peter Neubauer
Sent: Sunday, 28 August 2011 5:55 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Neo4j .Net Api - Indexing

Romiko,
Nice writeup! Do you have the link to the full project for people to try? Is it 
on GIThub for people to try?

/peter

On Sunday, August 28, 2011, Romiko Derbynew 
wrote:
> Hi Guys,
>
> I have written a blog on using our .Net Api for indexes in .Net, so 
> any
.Net dudes out there might want to give it a bash, look forward hearing 
feedback.
>
> http://romikoderbynew.com/2011/08/28/lucene-full-text-indexing-with-ne
> o4j/
>
> Cheers
>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>

-- 

Cheers,

/peter neubauer

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

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j .Net Api - Indexing

2011-08-28 Thread Peter Neubauer
Romiko,
Nice writeup! Do you have the link to the full project for people to try? Is
it on GIThub for people to try?

/peter

On Sunday, August 28, 2011, Romiko Derbynew 
wrote:
> Hi Guys,
>
> I have written a blog on using our .Net Api for indexes in .Net, so any
.Net dudes out there might want to give it a bash, look forward hearing
feedback.
>
> http://romikoderbynew.com/2011/08/28/lucene-full-text-indexing-with-neo4j/
>
> Cheers
>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>

-- 

Cheers,

/peter neubauer

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

http://www.neo4j.org   - Your high performance graph database.
http://startupbootcamp.org/- Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user