Plugins with persistence mechanism
Hi,
I have following problem with the current plugin mechanism of our application:
In general, plugins can easily be integrated into the application. But some plugins need some sort of persistence mechanism (i.e., some database tables). And here the problem arises. The application itself uses an Oracle database user with a standard datamodel for persistence purposes.
Until now the additional tables for the optional plugins were integrated into that standard datamodel. In consequence, the standard datamodel grew in size with every possible plugin. In addition, the main application got dependent on the optional plugins. If a plugin needs a change in its database tables (e.g., a new column) then the standard datamodel has to be changed, too.
The first solution that came to my mind was that each plugin gets its own database user. So the main applications is totally unaware of its plugins (as it should be). So far so good. The tricky thing is that the database tables of the plugin reference tables of the standard datamodel. Oracle allows SELECTs and foreign key constraits accross database users, so there is no problem at first glance. But taking a closer look, following problems arise:
1) how to connect the data from the plugin tables with the data of the standard datamodel tables in my plugin code (in an efficient way because the tables contain lots of data)
2) data changes of the standard datamodel tables can trigger data changes in the plugin tables (= some specific data operations must be performed on the plugin tables)
I would be very thankful for any suggestions how to solve these two problems best. Or perhaps is there a completely different solution to the whole plugin problem?
I searched the internet but found nothing about this sort of plugin problem - are there any existing 'standard' solutions?
Thanks
Werner

