ArangoDB-Community / arangodb-tinkerpop-provider

An implementation of the Tinkerpop OLTP Provider for ArangoDB
Apache License 2.0
84 stars 16 forks source link

Update to ArangoDB 3+ and Tinkerpop 3+ #29

Closed arcanefoam closed 5 years ago

arcanefoam commented 6 years ago

PREFACE This is work in progress, but thought I should share to get some input, pointers and help. Although it is a pull request, it should probably be better to make this into a new tinkerpop-arangodb-provider project.

SO FAR

  1. I think around 70% of the implementation approach is there. However, making the Tinkerpop gremlin-suite run will give me a better estimate (more on that later).
  2. Both the ArangoDB and Tinkerpop APIs have gone over major simplification. My approach is similar, as I have removed one layer of abstraction: all the ArangoDBSimpleXXXX classes.
  3. Vertex and Edges implement Map<String, Key> as I imagined VelocyPack serialization would be more straight forward this way (see next point).
  4. It turns out that VelocyPack actually detects the Map nature first so I had to implement serializer and deserializer for Vertex and Edge. NO biggie, and I think it actually works nicely.
  5. I am in the process of migrating the AQL queries to the new syntax. I am no expert so my ideas on this particular might be very off. Pointers here are welcome.
  6. If I am not mistaken, transactions are supported, but via JavaScript "magic". As such, the current implementation does not make use of transactions. Question: What would you consider a good approach for handling changes in the Vertex/Edge properties? My first idea was to update the Vertex/Edge in the db each time a property changes, but this might cause overhead and performance hits. The other option is to keep track of "dirty" elements and use the transaction commit method to batch update the existing changes. Any ideas/pointers are welcome.
  7. I removed the batch classes as I didn't quite understand their purpose or how did they work from a Tinkerpop perspective. I am guessing with the rest in place it should not be hard to bring them back, IF they are needed
  8. I am starting to run some of the Tinkerpop test suite tests against my implementation. It has helped iron out many bugs (mainly from my false assumptions about gremlin and VelocyPack serializing stuff as Maps and not as my types.
  9. I have tried to keep your code/docs style, but its very different from mine so I might be still messy here and there.

I would be happy to talk more about this via posts, email, slack, etc. Just let me know.

dothebart commented 5 years ago

Hi, sorry for the late reply. We have been discussing this lately, and decided that we would like (if) to move this repository to https://github.com/ArangoDB-Community and give you full admin access to it if you want to keep maintaining it. If more colaborators want to join, you could easily add them by yourselves.

However, we currently can't allocate resources to manage this in house - please tell me if this is ok for you.

arcanefoam commented 5 years ago

Made final changes with changes in implementation, cleaning the code base, fixing some javadocs and moving to the org.arangodb group (+ oss releases)