Skip to content
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

[BOUNTY $50] Create a Ferma-examples project #37

Open
freemo opened this issue Oct 23, 2017 · 11 comments
Open

[BOUNTY $50] Create a Ferma-examples project #37

freemo opened this issue Oct 23, 2017 · 11 comments

Comments

@freemo
Copy link
Member

freemo commented Oct 23, 2017

Create a Ferma-examples project including various usage examples. There should be a collection of very simple hello-world example projects showing off all of Ferma's features. There should also be an example project for each major graph DB and how Ferma can work with it. Ideally these should run in-memory through maven but when this isnt possible perhaps throw in some vagrant images as well.

@Jotschi
Copy link
Contributor

Jotschi commented Oct 23, 2017

A good point to start would be to migrate the following Ferma 2.x examples: https://github.com/Jotschi/graph-ogm-examples/tree/master/ferma

@deepthought42
Copy link

Hey guys, I'm working on trying to integrate Ferma with OrientDB in our company's product. I'd be happy to help build out an example using orientdb if someone can help me understand why I get NullPointer exceptions using annotation based traversals as is laid out in the current Readme.md

@freemo
Copy link
Member Author

freemo commented May 22, 2018 via email

@Jotschi
Copy link
Contributor

Jotschi commented May 22, 2018

@deepthought42 Using Ferma with OrientDB should be no problem. We use it with OrientDB 2.2.x gentics/mesh - I also build an example to use it with the Tinkerpop 3.x API. https://github.com/Jotschi/vertx-graphql-example

An example using the new OrientDB 3.0.1 release / Graph API would be welcome I guess.

@deepthought42
Copy link

I feel like a shmuck. I had been battling this problem all day and simply spinning up a fresh database server seems to have fixed the problem. I definitely appreciate how quick you guys were at getting back.

@Jotschi I found the project interesting. I haven't heard of gentics/mesh before but it looks like a really cool project. I'll definitely be digging into it and your example a bit more.

I still plan to put together an example of how I used ferma with orientdb, if that's something you still need.

@Jotschi
Copy link
Contributor

Jotschi commented May 23, 2018

@deepthought42 Make sure to use OrientDB 3.0.1 and the new Graph API - https://orientdb.com/docs/3.0.x/release/3.0/What-is-new-in-OrientDB-3.0.html#new-database-administration-access-and-pooling-api - As well as Tinkerpop 3.x - I would be interested in an example. I have not yet had time to test TP 3 support of OrientDB 3.0.0 although the vertx-graphql-example is already using TP3 using an OrientDB 3.x milestone release

@deepthought42
Copy link

@Jotschi not a problem. I'm well on my way with it. I have run into a slight problem though. With OrientDB 3.0.1, and the latest maven releases for ferma and ferma-orientdb I ran into the issue that everything executes correctly, but nothing actually gets saved to the database when I use OrientTransactionFactoryImpl. Oddly enough, if I use DelegatingFramedGraph everything saves without issue. Have you experienced this issue before? There's nothing in the ferma-orientdb codebase that stands out to me as problematic. The only thing I can think of is maybe it has something to do with the transaction wrapper, but I'm not familiar enough with the code to be sure.

@Jotschi
Copy link
Contributor

Jotschi commented May 23, 2018

@deepthought42 No that does not ring a bell.. sorry. I just know that the transaction handling has been touched in OrientDB 3.x Maybe that had an effect on the implementation. Some transaction handlers may require you to actively invoke tx.success(); Otherwise close() for try-with-resouces will not invoke commit(). I hope that I will soon have some time to work on the migration to OrientDB 3.x for Gentics Mesh. Tests are already looking great but I still have some issues with clustering.

@deepthought42
Copy link

@Jotschi I ran into another issue when putting together examples. I generally like having an example for every way a tool can be used, so I started creating examples using abstract classes, interfaces and concrete classes. For some reason using annotations with concrete classes will allow me to save a vertex, but it won't save any of the properties or create edges for an adjacency. Have you experienced this before?

@freemo
Copy link
Member Author

freemo commented May 24, 2018 via email

@deepthought42
Copy link

No problem the repo can be found here. https://github.com/deepthought42/orientdb3-ferma

I'm not entirely sure where the problem is. As I said, it's not saving the properties on the concrete class. The peculiar thing to me is that my test passes as if the property were there.

https://github.com/deepthought42/orientdb3-ferma/blob/af601c4607b8e4070fa717e1059cd7b76cba37e4/src/test/java/qanairy/orientdb_ferma/TraversalTests.java#L30

I would expect that line to fail instead of passing since I'm not seeing the name property on the Pet vertex in the database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants