Syncleus / Ferma

An ORM / OGM for the TinkerPop graph stack.
http://syncleus.com/Ferma
Apache License 2.0
136 stars 26 forks source link

AWS Neptune Support? #52

Open coder369 opened 6 years ago

coder369 commented 6 years ago

[HELP WANTED]

Amazon's graph db "Neptune" is now available. I'm looking to use Ferma as an OGM for an upcoming project. Amazon says Neptune supports Property Graphs by way of Apache TinkerPop. Does that mean by proxy Ferma will work with Neptune? I don't see it listed as an officially support graph db. If not what would it take to add support for it?

nachogarrone commented 5 years ago

did you find any solution?

sascha08-15 commented 3 years ago

Would be interested to know if that ever happened or if we have to use Gremlin directly when using Neptune.

freemo commented 3 years ago

Hey, sorry I missed this, going to catchup on FERMA updates and get a new version out soon. Havent tested on Neptune but since FERMA just translates everything to gremlin anyway its hard to see why it wouldnt work. Have you tried it?

spmallette commented 3 years ago

I think the issue is that Ferma needs a Graph instance to work and since that instance for a "remote" graph is technically an EmptyGraph instance, Ferma has some trouble. A similar question was posted on the Ferma "Getting Started" page:

http://syncleus.com/Ferma/getting_started/

syncleus-bot commented 3 years ago

Thanks so much for helping out there!

I havent looked into it, but I would think the DelegatingFramedGraph could take a EmptyGraph type, afterall it just inherits from the Graph type no?

On Thu, Jun 17, 2021 at 6:21 AM stephen mallette @.***> wrote:

I think the issue is that Ferma needs a Graph instance to work and since that instance for a "remote" graph is technically an EmptyGraph instance, Ferma has some trouble. A similar question was posted on the Ferma "Getting Started" page:

http://syncleus.com/Ferma/getting_started/

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Syncleus/Ferma/issues/52#issuecomment-863120206, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFRVQ3YPMH4R4TKTRMNBDRLTTHEDLANCNFSM4FQ6XBAA .

spmallette commented 3 years ago

In DelegatingFramedGraph it uses the structure API of Graph.addVertex():

https://github.com/Syncleus/Ferma/blob/9a45e2d696100424711956d8fba368925d8c359e/src/main/java/com/syncleus/ferma/DelegatingFramedGraph.java#L305

for mutations so I think that's perhaps where there is a problem as EmptyGraph has no method implementations...it's just a placeholder:

https://github.com/apache/tinkerpop/blob/0971b2b3992cc079d1d0affac5c1f6dafe7aa7b6/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/empty/EmptyGraph.java

For remote connections (and even for embedded cases) users really only interact by way of Gremlin through the GraphTraversalSource. There are likely other issues with remote use cases as well like:

https://tinkerpop.apache.org/docs/current/reference/#_properties_of_elements

though I hope TinkerPop can change that in the future - i believe there was some community discussion for it already. anyway, definitely a few tricks to sort out to make this work for remote cases, though there seems to be demand for it as some users seem to really like OGM-style development.

freemo commented 3 years ago

Oh yes, I recall that change.. it pissed off a lot of people at the time and lost a chunk of the userbase sadly. I suppose Ferma could replace the method calls to gremlin calls instead. Been a while since I made major changes to Ferma so ill have to get back up to speed to see what other hidden challenges there might be around that.

On Thu, Jun 17, 2021 at 7:53 AM stephen mallette @.***> wrote:

In DelegatingFramedGraph it uses the structure API of Graph.addVertex():

https://github.com/Syncleus/Ferma/blob/9a45e2d696100424711956d8fba368925d8c359e/src/main/java/com/syncleus/ferma/DelegatingFramedGraph.java#L305

for mutations so I think that's perhaps where there is a problem as EmptyGraph has no method implementations...it's just a placeholder:

https://github.com/apache/tinkerpop/blob/0971b2b3992cc079d1d0affac5c1f6dafe7aa7b6/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/empty/EmptyGraph.java

For remote connections (and even for embedded cases) users really only interact by way of Gremlin through the GraphTraversalSource. There are likely other issues with remote use cases as well like:

https://tinkerpop.apache.org/docs/current/reference/#_properties_of_elements

though I hope TinkerPop can change that in the future - i believe there was some community discussion for it already. anyway, definitely a few tricks to sort out to make this work for remote cases, though there seems to be demand for it as some users seem to really like OGM-style development.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

spmallette commented 3 years ago

thanks, i'd be curious as to what you run into. if you can itemize what you find as being troublesome, perhaps i can help brainstorm workarounds and/or help propose changes in TinkerPop to help smooth the path to get this all working nicely. i sense we've hit on the main trouble spots though at this point: (1) needing to use Gremlin as opposed to the Graph API and related (2) properties on elements.

freemo commented 3 years ago

1 is the big one, always has been since the major rewrite of tinkerpop. It

is the main reason Ferma development slowed down to maintenance level, it was just too big of a change and not in line with the original incentive to use Ferma/tinkerpop, that is, adding a robust type system on top of the Graph API.

All that said I am not willing to give up on it and would like to brainstorm ways I can bring Ferma back up to speed and still make it "feel" like its running on the graph API as a type system, even if below the surface it is calling the gremlin itself.

Once I have a chance to get back into the code I'll throw you some feedback. You have my email so feel free to reach out anytime directly as well.

On Thu, Jun 17, 2021 at 8:12 AM stephen mallette @.***> wrote:

thanks, i'd be curious as to what you run into. if you can itemize what you find as being troublesome, perhaps i can help brainstorm workarounds and/or help propose changes in TinkerPop to help smooth the path to get this all working nicely. i sense we've hit on the main trouble spots though at this point: (1) needing to use Gremlin as opposed to the Graph API and related (2) properties on elements.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Syncleus/Ferma/issues/52#issuecomment-863186893, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXESAUCFJQD7OLSC6K3IKDTTHRDZANCNFSM4FQ6XBAA .