graph-databases

IllegalStateException : Gremlin Server must be configured to use the JanusGraphManager

流过昼夜 提交于 2019-12-04 05:53:30
问题 Set<String> graphNames = JanusGraphFactory.getGraphNames(); for(String name:graphNames) { System.out.println(name); } The above snippet produces the following exception java.lang.IllegalStateException: Gremlin Server must be configured to use the JanusGraphManager. at com.google.common.base.Preconditions.checkState(Preconditions.java:173) at org.janusgraph.core.JanusGraphFactory.getGraphNames(JanusGraphFactory.java:175) at com.JanusTest.controllers.JanusController.getPersonDetail

Using as a graph database for finding “friends” of “friends” in MongoDb

血红的双手。 提交于 2019-12-04 05:32:32
I have been investigating a graph database and I have found neo4j and although this seems ideal I have also come across Mongodb. Mongodb is not an official graph database but I wondered if it could be used for my scenario. I am writing an application where users can have friends and those friends can have friends etc, the typical social part of a social network. I was wondering in my situation whether Mongodb might suffice. How easy would it be to implement or do I really need to focus on REAL graph databases? I do notice foursquare are using Mongodb so I presume it supports their

Select a node by name in NEO4J in Java

我的梦境 提交于 2019-12-03 18:10:22
问题 I am working in NEO4J embedded in Java. Say there is a node named NODE_abc and it has a few properties. I want to select the node so that i can get the properties using getProperty(). I want to select the NODE_abc as mynode so that i can use mynode.getProperty() to get the properties of the node "NODE_abc". The name of node "NODE_abc" is stored in a variable, say String str="NODE_abc" 回答1: I agree with tstorms about indexing and execution of cypher queries. I would point out, however, that

Representing (and incrementing) relationship strength in Neo4j

倾然丶 夕夏残阳落幕 提交于 2019-12-03 17:43:45
问题 I would like to represent the changing strength of relationships between nodes in a Neo4j graph. For a static graph, this is easily done by setting a "strength" property on the relationship: A --knows--> B | strength | 3 However, for a graph that needs updating over time, there is a problem, since incrementing the value of the property can't be done atomically (via the REST interface) since a read-before-write is required. Incrementing (rather than merely updating) is necessary if the graph

Looking for distributed, in-memory Graph DB [closed]

一笑奈何 提交于 2019-12-03 16:32:39
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Is there a database which will satisfy all (or at least most) of this requirements? Graph oriented - optimized for storing graphs and traversal(e.g HyperGraphDB, Neo4j) Running in memory, but having a persisted storage (e.g. Redis) Distributed (e.g. membase) Had .NET adapter (TCP/IP, not HTTP REST) Or am I asking too much? Thanks in advance. It seems hard to find .NET based one... I hope this might

What is the fastest ArangoDB friends-of-friends query (with count)

痴心易碎 提交于 2019-12-03 15:20:45
问题 I'm trying to use ArangoDB to get a list of friends-of-friends. Not just a basic friends-of-friends list, I also want to know how many friends the user and the friend-of-a-friend have in common and sort the result. After several attempts at (re)writing the best performing AQL query, this is what I ended up with: LET friends = ( FOR f IN GRAPH_NEIGHBORS('graph', @user, {"direction": "any", "includeData": true, "edgeExamples": { name: "FRIENDS_WITH"}}) RETURN f._id ) LET foafs = (FOR friend IN

Get visited edges in OrientDB's shortestPath()

北战南征 提交于 2019-12-03 14:11:36
I am new to OrientDB and I want to use the new shortestPath() method to get the edges that are between two vertices. What I do is: OSQLSynchQuery<T> sql = new OSQLSynchQuery<T>("select shortestpath(" + firstVertex + ", " + secondVertex + ").asString()"); List<ODocument> execute = db.query(sql); and what I can only get is [#-2:1{shortestpath:[#8:1, #8:3]} v0] . So, I wanted to know how could I extract the edges (well, only one edge in this case, because these two vertices are directly connected) from this output or from the output that I get without asString() : [#-2:1{shortestpath:[2]} v0]

When developing web applications when would you use a Graph database versus a Document database?

夙愿已清 提交于 2019-12-03 13:13:32
I am developing a web-based application using Rails. I am debating between using a Graph Database, such as InfoGrid, or a Document Database, such as MongoDB. My application will need to store both small sets of data, such as a URL, and very large sets of data, such as Virtual Machines. This data will be tied to a single user. I am interested in learning about peoples experiences with either Graph or Document databases and why they would use either of the options. Thank you I don't feel enough experienced with both worlds to properly and fully answer your question, however I'm using a document

Neo4j node property type

假装没事ソ 提交于 2019-12-03 12:41:54
I'm playing around with neo4j, and I was wondering, is it common to have a type property on nodes that specify what type of Node it is? I've tried searching for this practice, and I've seen some people use name for a purpose like this, but I was wondering if it was considered a good practice or if indexes would be the more practical method? An example would be a "User" node, which would have type: user , this way if the index was bad, I would be able to do an all-node scan and look for types of user . True, it does depend on your use case. If you add a type property and then wish to find all

Is it possible to work with OrientDB using C#?

冷暖自知 提交于 2019-12-03 12:09:16
Are there any implementations, api or examples of OrientDB and C#. The reason I am looking at OrientDB is becuase it's the only one that I found that is a combination of Graph and Document. Any suggestions on how I should try this. My next choice is RavenDB, but I am not sure if it supports joins or linked documents? Any thoughts... I just developed a first version of a REST client for OrientDB. http://netorientdb.codeplex.com Roman Gordon OrientDB has an official binary driver for .NET look here http://orientdb.com/docs/3.0.x/ Example of usage OrientDB-NET.binary string release = OClient