Re: [Neo4j] Neo4J High Availability : embedded or server mode ?

2011-03-26 Thread Guru GV
Yes, that was my understanding too (probably because of other embedded dbs
like JavaDB etc). But from the responses of Jim and others it looks like
Neo4j can handle multiple connections. That's great and NOW HA in embedded
makes sense :)

On Fri, Mar 25, 2011 at 1:26 PM, Clement Honore honor...@gmail.com wrote:

 If I've well understood, you can have only one connection to the database
 for each VM. So, the service must be encapsulated in a singleton I guess.

 How many transactions each connection can handle ?

 2011/3/25 Guru GV guru...@gmail.com

  Though I don't see a reason not to support it, but I did not understand
 the
  point of HA in a embedded mode. Would be interested in hearing couple
 of
  examples of what that would be...
 
  Embedded would mean - same VM - so replication and concurrency - do they
  really mean much here ?
 
  Also, that brings me to another question - is the Embedded version of
 Neo4j
  concurrent for multiple threads ? Meaning can it have multiple
 simultaneous
  connections/transactions ongoing ?
 
  Thanks
  Guru
 
  On Thu, Mar 24, 2011 at 4:27 PM, Jim Webber j...@neotechnology.com
 wrote:
 
   Hi Kiiv,
  
   Both the embedded database *and* the server database can run in HA
 mode.
  
   We tend to think of the server as simply a wrapper around the database
  that
   provides a RESTful API to augment the local API.
  
   So go right ahead and pick the configuration that's right for you, and
   you'll be able to use HA whatever configuration you decide.
  
   Jim
   ___
   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 mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Adding multiple keys and values to index via REST API

2011-03-26 Thread Peter Neubauer
Ville,
you can easily write a plugin to take more than one operation at a
time and insert them in a batch-kind of way,
http://docs.neo4j.org/chunked/snapshot/server-plugins.html

Otherwise, Saikat is working on a Gremlin plugin that let's you script
this kind of stuff. We hope to have something usable next week ...

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 Fri, Mar 25, 2011 at 5:01 PM, Ville Mattila vi...@mattila.fi wrote:
 Hi there!

 I was wondering if it was possible to add multiple key and value pairs
 to the Neo4j via REST API? Something like posting a JSON array of node
 URLs with keys and values to the index root.

 POST /index/node/my_nodes

 {
  http://neo:7474/db/data/node/52; : {key1 : value1, key2 : value2},
  http://neo:7474/db/data/node/53; : {key1 : value1, key2 : value2}
 }

 This would remove much overhead while using REST API and indexing.

 Best regards,
 Ville
 ___
 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] simple traverse of tree

2011-03-26 Thread Matěj Plch
Hi, I have some graph and, part of it is a tree. I simple get root of 
this tree through id. How to simple tranverse only tree under this root 
node? From root goes three unique type relationship to three unique 
group type nodes. Under this three nodes are a lot of nodes. And I need 
to write a method which gives me all nodes under that group node.
Second question is if its possible ho to get from this group noe with 
the highest id (last added).
Matěj Plch

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


Re: [Neo4j] simple traverse of tree

2011-03-26 Thread Michael Hunger
Sure, if the tree from your root node is just a cluster that is not connected 
anywhere else (with those 3 relationship-types) it should be as simple as.
(Just written from my head, so please check the correct syntax).

Traversal.description().relationship(T1,OUTGOING).relationship(T2,OUTGOING).relationship(T3,OUTGOING).traverse(rootNode);

That returns an iterator of all paths going from your root node.

You can limit the nodes with .uniqueness() and then add the path's 
(path.nodes()) to a set to collect all nodes.

For getting the one with the highest id, you can use 
java.util.Collections.max(collection, new ComparatorNode(){});

How big is your tree? 

Something like that should be in Graph-Algo perhaps as subgraph or tree.

HTH

Michael

Am 26.03.2011 um 19:26 schrieb Matěj Plch:

 Thank you for so fast answer.
 I will look at it. I have milestone tomorrow so dont have a lot of 
 time=) and have never worked with Groovy.
 Well so there isnt any simple method how to do it in classic neo4j Java API?
 
 Dne 26.3.2011 19:16, Saikat Kanjilal napsal(a):
 You can do all of these things using gremlin and pipes.  Check out github 
 for more details.
 
 Sent from my iPhone
 
 On Mar 26, 2011, at 11:13 AM, Matěj Plchplchm...@fit.cvut.cz  wrote:
 
 Hi, I have some graph and, part of it is a tree. I simple get root of
 this tree through id. How to simple tranverse only tree under this root
 node? From root goes three unique type relationship to three unique
 group type nodes. Under this three nodes are a lot of nodes. And I need
 to write a method which gives me all nodes under that group node.
 Second question is if its possible ho to get from this group noe with
 the highest id (last added).
 Matěj Plch
 
 ___
 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 mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] simple traverse of tree

2011-03-26 Thread Matěj Plch
Well maybe the best one to show the graph:
https://webdev.fit.cvut.cz/~plchmate/mi-w20/neoclipse.png 
https://webdev.fit.cvut.cz/%7Eplchmate/mi-w20/neoclipse.png
There is a ticket node:1001 and I would like to get all nodes under for 
example node Status_Events. Now there is only one node, in real there 
will be more nodes. But not so much (not more than 100 Im quite sure).

Dne 26.3.2011 19:35, Michael Hunger napsal(a):
 Sure, if the tree from your root node is just a cluster that is not connected 
 anywhere else (with those 3 relationship-types) it should be as simple as.
 (Just written from my head, so please check the correct syntax).

 Traversal.description().relationship(T1,OUTGOING).relationship(T2,OUTGOING).relationship(T3,OUTGOING).traverse(rootNode);

 That returns an iterator of all paths going from your root node.

 You can limit the nodes with .uniqueness() and then add the path's 
 (path.nodes()) to a set to collect all nodes.

 For getting the one with the highest id, you can use 
 java.util.Collections.max(collection, new ComparatorNode(){});

 How big is your tree?

 Something like that should be in Graph-Algo perhaps as subgraph or tree.

 HTH

 Michael

 Am 26.03.2011 um 19:26 schrieb Matěj Plch:

 Thank you for so fast answer.
 I will look at it. I have milestone tomorrow so dont have a lot of
 time=) and have never worked with Groovy.
 Well so there isnt any simple method how to do it in classic neo4j Java API?

 Dne 26.3.2011 19:16, Saikat Kanjilal napsal(a):
 You can do all of these things using gremlin and pipes.  Check out github 
 for more details.

 Sent from my iPhone

 On Mar 26, 2011, at 11:13 AM, Matěj Plchplchm...@fit.cvut.cz   wrote:

 Hi, I have some graph and, part of it is a tree. I simple get root of
 this tree through id. How to simple tranverse only tree under this root
 node? From root goes three unique type relationship to three unique
 group type nodes. Under this three nodes are a lot of nodes. And I need
 to write a method which gives me all nodes under that group node.
 Second question is if its possible ho to get from this group noe with
 the highest id (last added).
 Matěj Plch

 ___
 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 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