You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
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.
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
The text was updated successfully, but these errors were encountered: