Opened 2 years ago

Last modified 2 years ago

#2522 accepted enhancement

Refactor PluginInfrastructure

Reported by: gkronber Owned by: gkronber
Priority: medium Milestone: HeuristicLab 4.0
Component: PluginInfrastructure Version: branch
Keywords: Cc:

Description (last modified by gkronber)

The plugin infrastructure should be simplified.

Related tickets (#1891, #1755, #2118, #862, #1223, #1349, #2406)

Remove features for dynamic updating of plugins

Originally (versions 3.0, 3.1, 3.2) , it was possible to update all or selected plugins dynamically using the plugin infrastructure. For this we hosted an update service that provided meta-information and binaries of plugins. This functionality is however not supported anymore. Therefore, all the code for dynamic updating can be removed. We decided that plugin updating is not necessary. Instead, users should just download the whole HeuristicLab package whenever a new version is released.

We discussed the idea that a small component could check and download new updated assemblies from our website and install them after restarting the application.

Remove features for uploading plugins to the plugin update service

Same reasons as above.

Unify AppDomain mechanism

The main reason for launching the applications in separate AppDomains was that we needed to be able to unload plugins. If we don't update plugins dynamically this is not necessary anymore.

Hive Slaves still need to be able to unload plugins therefore a we still need this mechanism.

Initially, different types of AppDomains could be created (full permissions vs. sandboxed). Meanwhile, hive slaves also start AppDomains without restricting permissions. Therefore, only one way of creating AppDomains should be supported if we decide to keep the AppDomain separation.

Support loading of assemblies / plugins from sub-folders of the application folder

  • HeuristicLab is the main application folder and contains HL applications (optimizer, slave, PPOV-Cockpit), the (hidden) configuration files, as well as our license agreement
  • HeuristicLab/Libs contains all HL core assemblies
  • HeuristicLab/ExternalLibs contains all external libraries
  • HeuristicLab/Plugins contains user-created plugins and additional plugins (such as FLA, MetaOpt, ...).

The plugin-infrastructure should not reference UI components (WinForms) (Done)

Currently, the assembly for the plugin infrastructure also contains user controls. After the refactoring it should be possible to use a core version of the plugin infrastructure without UI. A compact API should be implemented to query information and to control the plugin infrastructure.

Remaining UI components should be redesigned

  • Improve positioning of windows
  • Don't open a new window for each element (e.g. information for referenced plugins, license)
  • Completely remove 'Plugin Manager' in start page and instead add an entry for 'About' (AboutDialog)
  • Remove the Starter window completely and instead ship multiple executables (HeuristicLab.exe) directly launches the Optimizer.
  • A simple view with information about each plugin (Name, Description, Files, License, Dependencies, Source, Contact, Website, ...) should be sufficient (comparable to nuget-package-manager in VS).

More comments (from earlier related tickets)

  • The plugin infrastructure itself cannot be updated. If the plugin infrastructure has to be changed, updating - HeuristicLab plugins with the update service will result in an inconsistent state.
  • The update service cannot update the application configuration. Therefore it is not possible to add/update the definition of services which are used in plugins (e.g. OKB, Hive).
  • Grouping plugins to products is not really useful and was never effectively used in HeuristicLab 3.3.x. (Obsolete: administration UI removed)
  • Working with the plugin administration UI is quite cumbersome. The usability should be improved. (Obsolete: administration UI removed)
  • Codename of the release and release date should be shown in the SplashScreen and the about dialog (#2406) (Done)

Change History (26)

comment:1 Changed 2 years ago by gkronber

r13332: branched trunk/sources for refactoring of plugin infrastructure

comment:2 Changed 2 years ago by gkronber

  • Description modified (diff)
  • Status changed from new to accepted

comment:3 Changed 2 years ago by gkronber

r13333: removed classes for plugin uploading and updating

comment:4 Changed 2 years ago by gkronber

  • Description modified (diff)

comment:5 Changed 2 years ago by gkronber

r13334: removed unused files

comment:6 Changed 2 years ago by gkronber

r13335: removed IStatusDisplay and PluginInfrastructureCancelEventArgs

comment:7 Changed 2 years ago by gkronber

  • Description modified (diff)

comment:8 Changed 2 years ago by gkronber

r13338:

  • moved UI components out of HeuristicLab.PluginInfrastructure -> HeuristicLab.PluginInfrastructure.UI
  • moved ErrorDialog to HeuristicLab.MainForm.WindowsForms
  • moved ErrorHandling (for building an error message string) to HeuristicLab.Common
  • Changed exception handlers in Views to use MainForm.ShowError()
  • Changed usages for ErrorDialog in non-UI components to throw exceptions instead.

TODO: following non-UI components used the ErrorDialog and now throw an exception:

  • SingleObjectiveTestFunctionProblem
  • TravelingSalesmanProblem
  • VehicleRoutingProblem
Last edited 2 years ago by gkronber (previous) (diff)

comment:9 Changed 2 years ago by gkronber

  • Description modified (diff)

comment:10 Changed 2 years ago by gkronber

  • Description modified (diff)

comment:11 Changed 2 years ago by gkronber

  • Description modified (diff)

comment:12 Changed 2 years ago by gkronber

r13340: added release name to SplashScreen, added AssemblyInfo.cs.frame file for HeuristicLab.PluginInfrastructure.UI

comment:13 Changed 2 years ago by gkronber

  • Description modified (diff)

comment:14 Changed 2 years ago by gkronber

r13341: moved files from folders into top-level folder to reduce the number of folders

comment:15 Changed 2 years ago by gkronber

r13342: deleted empty folders

comment:16 Changed 2 years ago by gkronber

r13343: removed support for restarting of HL-applications (nobody seems to use this anyway)

comment:17 Changed 2 years ago by gkronber

r13344: removed unused interface IControlManager, removed usage of restartApplication field (see r13343)

comment:18 Changed 2 years ago by gkronber

  • Description modified (diff)

comment:19 Changed 2 years ago by gkronber

  • Description modified (diff)

comment:20 Changed 2 years ago by gkronber

r13352: added overrides for ShowError in IMainForm

comment:21 Changed 2 years ago by gkronber

r13353: added assembly attribute for release code name and updated AboutDialog as well as SplashScreen to show information of the EntryAssembly (in our case HeuristicLab-3.3.exe)

comment:22 Changed 2 years ago by gkronber

  • Description modified (diff)

comment:23 Changed 2 years ago by gkronber

r13360: added new PluginInformationDialog

comment:24 Changed 2 years ago by gkronber

r13363: improvements to new PluginInformationDialog and removed obsolete classes

comment:25 Changed 2 years ago by gkronber

r13369: improvements to AboutDialog and PluginInformationDialog

comment:26 Changed 2 years ago by gkronber

r13389: removed Starter form and instead init plugin discovery and launch of application from Startup project (.exe)

Note: See TracTickets for help on using tickets.