-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gremlin-node integration? #9
Comments
I have looked at https://github.com/entrendipity/gremlin-node and I did not like the code, and how it has been written: it's full of *Sync stuff. There is one more little problem: Gremlin treats "vertexes" as special entities, while in LevelGraph they do cannot exists on their own: Vertexes are only part of a graph.
That's the problem I am trying to solve :). |
yes, their Java (sync) mentality is a problem - but would be great to overcome with an async streaming approach (which is what you are working toward). It is a tough problem to implement Gremlin in an async world. The ability to have vertex and edge attributes can be problematic - maybe a clever solution could be developed. Another possible alternative might be cypher (neo4j). They are about to roll out "labeling" (another layer of indexing) which I believe will be very useful in the practical graph world: http://blog.neo4j.org/2013/04/nodes-are-people-too.html http://bambuser.com/v/3461834 The cypher syntax (Neo4j) is focused on getting data rather how to get data (like Gremlin) and is pretty powerful. Maybe this would be better approach (and a more straightforward async implementation)... |
@Marketcentric exactly. Could you please take some time to review #4? Moreover, what are the most used features of Gremlin that I should port here? |
ahh, sorry I did not look at it in detail (and sorry for closing this too ... I have not left a comment before). This looks great. I like the suggestions in the thread. One of the most important features I think in gremlin is pattern matching (http://markorodriguez.com/2011/06/15/graph-pattern-matching-with-gremlin-1-1/) . I think your inclusion of variables in the fluent chain is a step in the right direction to achieving this. Some of Marko's pattern matching examples should be easy to implement - while others may be more difficult (i.e., recursion). I am not sure what is important here and what is not - I will have to think about it. |
I have a couple of examples written in iGraph (python) that I can port to use as examples here - when ready |
That can me super-nice. Chek out the latest changes in the fluent API pull-request, and let me know if you need something more. It's still a work in progress, though. |
yes, good stuff! How can we do the "table" interim storage in Gremlin? |
It's not that hard. I hope I'll work on it this evening :). |
Great! |
Hi @Marketcentric, the 'gremlin style' API is published on NPM. |
Great. Will do. I look forward to it. |
Hi @mcollina, have you given some thought to how properties might be assigned, used or queried such as commonly found in Directed Property Graphs? or should every vertex property be made into a separate node? Also, I find edge properties to be very useful. Any clever thoughts? |
There is no storage of a 'node' in LevelGraph, it knows only about triples. So, in order to create some properties you have to define them through triples. However, it should also be possible to store the properties directly in the key-value store. As for other methods, what do you need? Grouping? Counting? If you can make some example, I'll try to add the support for them. |
yes, my thoughts are that using a clever approach, the properties could be represented as triples pointing to the vertex, such as "member_of" predicate. I we can then use them in queries where the "member_of" properties are handled in the background. Something to think about. Grouping, counting...not sure yet. "Neighbors" would be handy (for a given vertex return a list of connected vertices). "Incident" is also handy (all the edges for a given vertex) - in a triple these two would most likely be the same. FYI - here is a list of methods I use with iGraph (http://igraph.sourceforge.net/doc/python/igraph.GraphBase-class.html) - 99% are specialized but interesting none the less. |
Yes, but for me it's another lib.
You can easily get the 'Neighbors' and "Incident" using a basic get:
I think all the basic operators are there, but a nicer and better-documented API is needed. |
Thanks for the .get -> neighbors relationship (I should have thought more about this before asking) |
I am closing this as there is not much more discussion on this issue. @Marketcentric if you have more question, feel free to reopen! |
Wow. Nice work so far. It would be great to add another level of abstraction such as that provided by Gremlin (https://github.com/tinkerpop/gremlin/wiki) and the very nice node implementation of gremlin (https://github.com/entrendipity/gremlin-node) either via the BluePrints api or a direct implementation.
If you have not been watching Gremlin's recent activity, it is emerging as the most popular method querying/traversing/pattern matching most of the leading graph databases - for good reason. Marko Rodriguez, Gremlin's author is very approachable and helpful (http://thinkaurelius.com/team/).
Perhaps borrowing some of the pieces from gremlin-node would make this effort easier (although they interface directly to Java(!) libraries from node). Maybe they would be interested in a collaboration.
Adopting the Gremlin approach to graph traversal would enhance the awesomeness of Levelgraph as a performant backend for Node. My assessment of graphDB alternatives for Node is that there are few high speed options (i.e., those not accessing the graphdb via REST). Levelgraph could fill this void.
The text was updated successfully, but these errors were encountered: