Implementation of shared database support#1451
Conversation
|
Issue: #970 |
e79c5ff to
add5fb3
Compare
| private final List<Object> openDatabaseOnlyActions = new LinkedList<>(); | ||
| private final List<Object> severalDatabasesOnlyActions = new LinkedList<>(); | ||
| private final List<Object> openAndSavedDatabasesOnlyActions = new LinkedList<>(); | ||
| private final List<Object> remoteDatabasesOnlyActions = new LinkedList<>(); |
There was a problem hiding this comment.
Could you please investigate if its possible to use a more concrete typ here and above then object?
Using Object in a generic type is making the whole concept of generics ad absurdum.
There was a problem hiding this comment.
Those lists are used to add actions. Unfortunately there are differnt types of them, such as AbstractAction, GeneralActions which extends MnemonicAwareAction or just the interface Action.
I think this could be a good stuff for a new PR.
|
Looks good overall, just some minor remarks 👍 Please also add some new Database tests. |
|
Why do you want to include Oracle? What is the reasoning here? Is this a DB that is likely to be used in this context? I am not really sure as Oracle is expensive and hard to maintain. I am against changing the events and adding a location to them. Why must this be differentiated in the first place? All the metadata must be stored in the DB as well, including biblatex or bibtex mode (this is not something the user should change). Also do not forget the save actions, as they have an influence on the values in the DB as well. What happens if a change locally cannot be stored in the DB as there are conflicts? |
|
Me really wants Oracle. Some bigger institutes use Oracle and they don't want to run other databases. At least, this is, what I understood. I will contact them again and ask how important Oracle is. Currently, it seems that the hard part of the Oracle implementation is already done. The synchronization via events seems to be easy - see implementation hints at #970. |
|
Ok, then please remove the lib file and use a file from maven repositories for the ojdbc.jar |
Okay, this is going to be implemented.
Unfortunately I didn' t understand that completely. Now if you work on remote database you've still the possibility to save the file locally. Otherwise the changes are pushed by EntryEvents. Are there some other data which are involved within the saving process?
In this mode the newest version is held by remote database. Changes are going to be pushed automatically and every time you push an entry your local database is also going to be updated (this process is going to be accelerated via hashing etc). So there is no scenario a conflict can occur except connection problems. But in this case the editor should restrict any editings (TODO). Or two people are working at the same time at one field. In this case the last push will win. |
add5fb3 to
e7dcebc
Compare
|
The save actions control stuff like that a specific field must be lower or upper case letters. Think about it: person A always uses lower case letters for the title, and person B uses always upper case letters for the title - what effect will this have on the database sync when basically the same data is used? They will create a lot of traffic if they work concurrently as the save of one will overwrite all the title fields of the other, and it will create conflicts. You can only overcome this if both know the correct save actions, and that is the reason why the save actions are stored in the metadata. Regarding resolving conflicts: sounds ok to be practical. It feels wrong, however, from my background with using version control systems. |
d47d740 to
ee64d6a
Compare
|
I think it would be very profitable to unite the code for file-based exports with the code for sql-exports. For example, I really like the |
|
Currently I'm working on save actions. As I see the remote synchronization differs a lot from the local saving of metadata and defaults (think about the relational structure). Unifiying the code would dissolve the Currently I'm going to implement this in |
e092e5c to
bc26166
Compare
|
@simonharrer @koppor It seems that ojdbc.jar is not longer available in maven repositories.
|
|
Since groups are a very important feature, @obraliar will work on groups in this PR, too. Other than groups, the feature is ready to be investigated. |
| Converts_HTML_code_to_Unicode.= | ||
| Connection= | ||
| Host= | ||
| Port= |
There was a problem hiding this comment.
If possible it would be nice to reuse the existing translations of Port and Database. (One can consider reusing "Server hostname" and possibly "Username" as well, to not add more strings.)
|
@Goldfinger2007: Your BibEntry contains some characters, which invalidates the SQL query. This is going to be fixed. Thanks for the test. |
b468ef8 to
5cca450
Compare
| private String type; | ||
| private String driverPath; | ||
| private String urlPattern; | ||
| private int defaultPort; |
There was a problem hiding this comment.
make these parameters final
|
Conflict resolution with Optimistic Offline Lock 👍 After resolving the minor issues from above, I vote for merging to prevent the continuous merging conflicts. Follow up at #1703 |
Support for MySQL, PostgreSQL and Oracle database systems. Full entry synchronisation. Full meta data synchronization. Group synchrnoization. Semi-automatic/event based synchronization. Version control system. Conflicts resolving machanisms. User interfaces for different situations. Extensive synchronization and class tests.
|
@obraliar Could you please answer http://discourse.jabref.org/t/new-sql-structure/197/4 ? Thanks! |
Implementation of shared database support for MySQL, PostgreSQL and Oracle database systems.
Made changes:
sqlpackage removed. (This request aims to replace the old system completely)(manual and semi-automated pull)
Screenshots: