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

Add support for OrientDB #14

Closed
gytis opened this issue Jul 8, 2016 · 2 comments
Closed

Add support for OrientDB #14

gytis opened this issue Jul 8, 2016 · 2 comments
Assignees

Comments

@gytis
Copy link
Collaborator

gytis commented Jul 8, 2016

Implement a subsystem to provide support for OrientDB.

OrientDB has three API types which should be injected: Graph API, Document API, and Object API. However, we should consider if adding Object API worth it, because it hasn't been updated since version 1.5 and is not a recommended way of using OrientDB based on their documentation http://orientdb.com/docs/last/Java-API.html#object-api.

Graph API
To use Graph API OrientGraph needs to be injected. It is not thread safe and does automatic transaction management.
OrientGraphFactory could also be used to create OrientGraph, so we should inject it too. This would allow users to connect to other databases from the ones defined in the config.
We should proxy OrientGraph and as a result OrientGraphFactory to be able to control transactions.

More info on Graph API: http://orientdb.com/docs/last/Graph-Database-Tinkerpop.html

Document API
To use Document API ODatabaseDocumentTx needs to be injected. Database instances are not thread safe and new instance should be created for every thread.
It does support ACID transactions, thus we should proxy it in order to be able to control the transactions with JTA API.
ODatabaseDocumentTx allows users to control security and indexes. We need to investigate if this is safe and has any impact for us.

More info on Document API: http://orientdb.com/docs/last/Document-Database.html

Object API
To use Object API OObjectDatabaseTx needs to be injected. Database instances are not thread safe and new instance should be created for every thread.

More info on Object API: http://orientdb.com/docs/last/Object-Database.html

@gytis gytis self-assigned this Jul 8, 2016
@scottmarlow
Copy link

I think there may be a broken "multi-thread Access" link on the Document API page. http://orientdb.com/docs/last/Java-Multi-Threading.html has info on threading. It seems that the very last thing done after opening a database, is calling database.close() to clear the ThreadLocal reference to the database. Each time that you open a database, the ThreadLocal references the opened database. When you close a database, the ThreadLocal is cleared.

@gytis
Copy link
Collaborator Author

gytis commented Aug 16, 2016

scottmarlow/wildfly#8

@gytis gytis closed this as completed Aug 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants